5.1 KiB
Created
Created by tickets.sh create.
Plan
Implementation plan:
- Move current
crates/pod/src/main.rsstartup logic behind apodcrate library entrypoint, leaving the existing binary as a thin temporary wrapper. - Add a reserved
podsubcommand to theinsomniabinary that delegates to the same Pod runtime entrypoint. - Keep internal spawn defaults and Nix installed commands unchanged in this first step unless the change is smaller than expected; the long-term plan is still to remove
insomnia-podafter internal callers useinsomnia pod. - Add/update parser tests so
insomnia podis reserved andinsomnia --pod podremains available for a Pod literally namedpod. - Validate focused CLI/parser/runtime help behavior and affected crates.
Implementation report
Implementation report from coder Pod insomnia-pod-subcommand-coder-20260531:
- Branch:
insomnia-pod-subcommand-runtime - Commit:
544257b(cli: add insomnia pod runtime entrypoint) - Extracted current Pod runtime startup into
pod::entrypointwithrun_cli()/run_cli_from(...)sharing onerun_cli_inner(...)path. - Kept existing
insomnia-podbinary as a thin temporary wrapper around the shared entrypoint. - Added reserved
insomnia pod ...dispatch in the user-facinginsomniabinary. insomnia pod --helpreaches the Pod runtime parser withUsage: insomnia pod ....insomnia memory lintremains a headless path before TUI/raw-terminal/Pod side effects.- Pod named
podremains addressable with explicit--pod pod. - Internal spawn default migration and Nix removal of
insomnia-podwere intentionally left for follow-up phases.
Validation reported by coder:
cargo fmt --checkpassedcargo test -p tui parse_passedcargo test -p pod subcommand_help_uses_insomnia_pod_invocationpassedcargo run -q -p tui -- pod --help+ grep passedcargo run -q -p pod --bin insomnia-pod -- --help+ grep passedcargo run -q -p tui -- memory lintpassedcargo check -p tui -p pod -p clientpassed./tickets.sh doctorpassedgit diff --checkpassed
Unresolved follow-ups:
- Switch internal spawn/restore defaults to
insomnia podvia typedprogram + prefix_argscommand resolution. - Remove
insomnia-podfrom packaging once internal callers no longer depend on it.
Review: approve
External review by reviewer Pod insomnia-pod-subcommand-reviewer-20260531: approve.
Reviewer summary:
- The existing
insomnia-podruntime startup is now a library-callablepod::entrypointpath. - Both the temporary
insomnia-podwrapper and the newinsomnia pod ...path call the same runtime entrypoint. insomnia pod --helpreaches the Pod runtime parser/help with the appropriate invocation name.- Existing Pod runtime flags, semantics, and
INSOMNIA-READYstderr handshake are preserved. insomnia memory lintremains headless and returns before terminal/TUI setup.- Existing CLI behavior is preserved except that leading positional
podis now a reserved subcommand; explicit--pod podremains available. - Spawn/Restore default migration and Nix removal were correctly left for later phases.
Blockers: none.
Non-blocking follow-ups:
- Migrate
client::spawn_pod,SpawnPod, and restore/discovery paths to typedprogram + prefix_argsso default runtime startup can becomeinsomnia pod .... - Add installed-binary smoke coverage once CLI E2E exists.
Implementation report
Main workspace validation after merge:
cargo fmt --checkpassedcargo test -p tui parse_passedcargo test -p pod subcommand_help_uses_insomnia_pod_invocationpassedcargo run -q -p tui -- pod --helpsmoke passed (Usage: insomnia pod, Pod runtime flags present)cargo run -q -p pod --bin insomnia-pod -- --helpsmoke passed (Usage: insomnia-pod, Pod runtime flags present)cargo run -q -p tui -- memory lintreached the headless command path. It exited1because the current generated.insomnia/memorycontains existing lint errors, which is the expected lint-failure exit code; no TUI/Pod startup side effects were observed.cargo check -p tui -p pod -p clientpassed with pre-existing dead-code warnings./tickets.sh doctorpassedgit diff --checkpassed
Closed
Added the first single-binary migration step: Pod runtime startup is now available as a shared pod::entrypoint library path, the existing insomnia-pod binary is a temporary thin wrapper, and the user-facing insomnia binary now supports insomnia pod ... with the same Pod runtime parser/help. Existing internal spawn defaults and Nix packaging are intentionally unchanged for this step. External review approved and validation passed.