4.9 KiB
Created
Created by tickets.sh create.
Plan
Implementation plan:
- Find all internal
insomnia-podexecutable resolution paths (client::spawn_pod,SpawnPod,RestorePod/discovery, tests/dev helpers). - Introduce a typed runtime command structure with
programandprefix_args, avoiding shell-string parsing. - Make the default runtime command for callers running from
insomniausecurrent_exe()+podprefix args. - Preserve explicit override behavior for development/debugging; if the existing env var cannot safely support prefix args, keep it as executable-only and document that it bypasses the unified default.
- Update tests to assert prefix args are included and existing spawn/restore behavior is unchanged.
- Leave Nix/package removal of
insomnia-podto a follow-up unless this change proves complete and low-risk.
Implementation report
Implementation report from coder Pod spawn-through-insomnia-pod-coder-20260531:
- Branch:
spawn-through-insomnia-pod-subcommand - Commit:
4f622b8(cli: spawn pods through insomnia pod) - Added new
pod-commandcrate with typedPodRuntimeCommand { program, prefix_args }. - Default runtime command now resolves to
current_exe()+podprefix args, except when running through the temporary legacyinsomnia-podwrapper. INSOMNIA_POD_COMMANDremains executable-only, is not shell-parsed, and bypasses prefix args for development/debug override behavior.- Migrated internal Pod runtime launches to the typed command:
client::spawn_podSpawnPodchild process creationPodDiscovery::restore/RestorePod- TUI spawn/restore callers through
client::spawn_pod
- Preserved detached process behavior, process groups, socket prediction/probing, and
INSOMNIA-READYstderr handshake. - Left
insomnia-podpackage/output removal for the next phase.
Validation reported by coder:
cargo fmt --checkpassedcargo test -p pod-commandpassedcargo test -p client -p pod-commandpassedcargo test -p pod --lib discovery::testspassedcargo test -p pod --test spawn_pod_testpassedcargo test -p tui parse_pod_subcommand_uses_runtime_modepassedcargo check -p client -p pod -p tuipassed with existing dead-code warnings./tickets.sh doctorpassedgit diff --checkpassed
Unresolved follow-ups:
- Remove/demote
insomnia-podpackage/output once packaging/devshell/docs are updated. - Optional stronger future test: capture actual argv of a mock spawned executable in a default-command call site.
Review: approve
External review by reviewer Pod spawn-through-insomnia-pod-reviewer-20260531: approve.
Reviewer summary:
- The implementation adds typed
PodRuntimeCommand { program, prefix_args }command resolution. - Default runtime command is now current executable plus
podprefix args, except for the temporary legacyinsomnia-podwrapper path. INSOMNIA_POD_COMMANDremains executable-only and is not shell-parsed.client::spawn_pod,SpawnPod, andRestorePod/discovery restore paths now use the typed command.- Detached process behavior and
INSOMNIA-READYhandshake are preserved. - Nix/package removal and crate rename are not mixed into this ticket.
Blockers: none.
Non-blocking follow-up:
- Future test could capture actual argv of a mock spawned executable in a default-command call site. Current tests are adequate for this ticket because the typed command composition and existing spawn behavior are covered.
Implementation report
Main workspace validation after merge:
cargo fmt --checkpassedcargo test -p pod-commandpassedcargo test -p client -p pod-commandpassedcargo test -p pod --lib discovery::testspassedcargo test -p pod --test spawn_pod_testpassedcargo test -p tui parse_pod_subcommand_uses_runtime_modepassedcargo check -p client -p pod -p tuipassed with pre-existing dead-code warnings./tickets.sh doctorpassedgit diff --checkpassed
Closed
Switched internal Pod runtime spawning/restoration to typed program + prefix_args command resolution. Default runtime command now uses the current executable plus pod, while INSOMNIA_POD_COMMAND remains executable-only and not shell-parsed for development/debug overrides. client::spawn_pod, SpawnPod, and RestorePod/discovery restore paths use the typed command; detached process behavior and INSOMNIA-READY handshake are preserved. External review approved and validation passed. insomnia-pod packaging removal remains the next phase.