fix(cli): judge install-from-source lease admission by its daemon command
Summary
Follows #5151 and the #5165 mutation audit. install-from-source runs as install_source, but two checks mixed the names. Both now use resolveDaemonCommandName (from servesPublicCommand).
- Admission: an http(s) URL source may skip the heartbeat, since the daemon downloads it. Other sources keep it.
- Proxy:
install-from-sourcenow allocates likeinstall(by spec without--udid/--serial). Help updated. - Adds the missing lease-backend test.
Before / after
install-from-source https://ā¦:
- Reused lease: base sends
lease_heartbeat,install_source; head sends one admission-checkedinstall_source. - Proxy, no stored lease: base fails
run open first; head allocates.
Validation
The three changed test files at c814ec7ea3: 59 passed (help string edited after that run).
The new proxy test fails with run open first when the lookup is reverted, and passes with the fix.
Mutations at 4a85bbcbb6:
- Deleting
state.leaseBackend !== options.leaseBackendfails the backend test. - Skipping name resolution fails both URL tests.
- Treating every
install_sourceas upload-free fails the local-path test.
An explicit backend mismatch is refused earlier, so the backend test stores none; it reallocates. CI pending.
Security
Resend and heartbeat rules are unchanged. With real client and daemon, on a non-proxy-provider connection, a refused URL install sends no heartbeat and is resent once. install, reinstall and local paths keep the heartbeat.
š¤ Generated with Claude Code