ticket: use base32 project record ids
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
---
|
||||
title: "CLI: add insomnia pod runtime entrypoint"
|
||||
state: "closed"
|
||||
created_at: "2026-05-31T04:32:39Z"
|
||||
updated_at: "2026-05-31T04:50:14Z"
|
||||
---
|
||||
|
||||
## Background
|
||||
|
||||
Parent/umbrella ticket: `single-binary-insomnia-cli`.
|
||||
|
||||
The project currently has two installed command names:
|
||||
|
||||
- `insomnia` from the `tui` package for user-facing CLI/TUI/headless commands;
|
||||
- `insomnia-pod` from the `pod` package for Pod runtime processes.
|
||||
|
||||
The target direction is one primary executable, `insomnia`, with `insomnia pod ...` as the Pod runtime entrypoint. Pod runtime remains a separate process when spawned; only the binary/entrypoint is unified.
|
||||
|
||||
This ticket is the first implementation step. It should add the new `insomnia pod ...` runtime entrypoint and share Pod runtime startup code, without yet requiring all internal spawn paths or packaging to drop `insomnia-pod` in the same diff.
|
||||
|
||||
## Requirements
|
||||
|
||||
- Extract the current `crates/pod/src/main.rs` runtime startup into a library-callable entrypoint in the `pod` crate.
|
||||
- Keep existing Pod runtime flags/semantics.
|
||||
- Preserve `INSOMNIA-READY` stderr handshake and detached process behavior.
|
||||
- Keep the existing `insomnia-pod` binary only as a temporary transition wrapper if needed for tests/current spawn defaults.
|
||||
- Do not present it as the long-term compatibility alias.
|
||||
- Do not change Nix installed command set in this ticket unless it is mechanically necessary.
|
||||
- Add `insomnia pod ...` to the existing `insomnia` binary in the `tui` crate.
|
||||
- `insomnia pod --help` should reach the Pod runtime parser/help.
|
||||
- `insomnia pod <runtime flags>` should invoke the same library entrypoint as the old runtime path.
|
||||
- This means `insomnia pod` becomes reserved as a subcommand; a Pod literally named `pod` can still be addressed through explicit `--pod pod` if needed.
|
||||
- Preserve existing user-facing TUI/CLI behavior for non-`pod` commands:
|
||||
- `insomnia memory lint` remains headless and returns before terminal/TUI/Pod side effects;
|
||||
- existing `insomnia <pod-name>` / `--pod` / `--multi` / resume behavior remains unchanged except for the reserved `pod` subcommand.
|
||||
- Do not yet switch `client::spawn_pod`, `SpawnPod`, or `RestorePod` default command resolution to `insomnia pod` unless doing so is small and fully tested.
|
||||
- If not switched, create/fill a follow-up note for command resolution `program + prefix_args` migration.
|
||||
- Do not rename the `tui` package/crate in this ticket.
|
||||
|
||||
## Non-goals
|
||||
|
||||
- Removing `insomnia-pod` from packaging in this first step.
|
||||
- Keeping `insomnia-pod` as a long-term alias.
|
||||
- Merging Pod controller into the TUI process.
|
||||
- Reworking Pod protocol or CLI UX beyond the new runtime subcommand.
|
||||
- Feature-gating TUI dependencies.
|
||||
|
||||
## Acceptance criteria
|
||||
|
||||
- `insomnia pod --help` works and uses the Pod runtime parser/help.
|
||||
- `insomnia-pod --help` still works if the temporary binary remains.
|
||||
- `insomnia memory lint` still runs headlessly without TUI/raw-terminal/Pod startup side effects.
|
||||
- Existing TUI parser tests are updated for the reserved `pod` subcommand and preserve other positional Pod-name behavior.
|
||||
- Pod runtime startup code has one shared library path rather than duplicated main logic.
|
||||
- Follow-up work for switching internal spawn defaults and removing `insomnia-pod` packaging is recorded if not completed here.
|
||||
- `cargo fmt --check`, focused `cargo test` for affected TUI/Pod CLI parsing, `cargo check -p tui -p pod -p client`, `./tickets.sh doctor`, and `git diff --check` pass.
|
||||
@@ -0,0 +1 @@
|
||||
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.
|
||||
@@ -0,0 +1,112 @@
|
||||
<!-- event: create author: tickets.sh at: 2026-05-31T04:32:39Z -->
|
||||
|
||||
## Created
|
||||
|
||||
Created by tickets.sh create.
|
||||
|
||||
---
|
||||
|
||||
<!-- event: plan author: hare at: 2026-05-31T04:33:28Z -->
|
||||
|
||||
## Plan
|
||||
|
||||
Implementation plan:
|
||||
|
||||
1. Move current `crates/pod/src/main.rs` startup logic behind a `pod` crate library entrypoint, leaving the existing binary as a thin temporary wrapper.
|
||||
2. Add a reserved `pod` subcommand to the `insomnia` binary that delegates to the same Pod runtime entrypoint.
|
||||
3. 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-pod` after internal callers use `insomnia pod`.
|
||||
4. Add/update parser tests so `insomnia pod` is reserved and `insomnia --pod pod` remains available for a Pod literally named `pod`.
|
||||
5. Validate focused CLI/parser/runtime help behavior and affected crates.
|
||||
|
||||
|
||||
---
|
||||
|
||||
<!-- event: implementation_report author: hare at: 2026-05-31T04:46:52Z -->
|
||||
|
||||
## 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::entrypoint` with `run_cli()` / `run_cli_from(...)` sharing one `run_cli_inner(...)` path.
|
||||
- Kept existing `insomnia-pod` binary as a thin temporary wrapper around the shared entrypoint.
|
||||
- Added reserved `insomnia pod ...` dispatch in the user-facing `insomnia` binary.
|
||||
- `insomnia pod --help` reaches the Pod runtime parser with `Usage: insomnia pod ...`.
|
||||
- `insomnia memory lint` remains a headless path before TUI/raw-terminal/Pod side effects.
|
||||
- Pod named `pod` remains addressable with explicit `--pod pod`.
|
||||
- Internal spawn default migration and Nix removal of `insomnia-pod` were intentionally left for follow-up phases.
|
||||
|
||||
Validation reported by coder:
|
||||
|
||||
- `cargo fmt --check` passed
|
||||
- `cargo test -p tui parse_` passed
|
||||
- `cargo test -p pod subcommand_help_uses_insomnia_pod_invocation` passed
|
||||
- `cargo run -q -p tui -- pod --help` + grep passed
|
||||
- `cargo run -q -p pod --bin insomnia-pod -- --help` + grep passed
|
||||
- `cargo run -q -p tui -- memory lint` passed
|
||||
- `cargo check -p tui -p pod -p client` passed
|
||||
- `./tickets.sh doctor` passed
|
||||
- `git diff --check` passed
|
||||
|
||||
Unresolved follow-ups:
|
||||
|
||||
- Switch internal spawn/restore defaults to `insomnia pod` via typed `program + prefix_args` command resolution.
|
||||
- Remove `insomnia-pod` from packaging once internal callers no longer depend on it.
|
||||
|
||||
|
||||
---
|
||||
|
||||
<!-- event: review author: hare at: 2026-05-31T04:46:53Z status: approve -->
|
||||
|
||||
## Review: approve
|
||||
|
||||
External review by reviewer Pod `insomnia-pod-subcommand-reviewer-20260531`: approve.
|
||||
|
||||
Reviewer summary:
|
||||
|
||||
- The existing `insomnia-pod` runtime startup is now a library-callable `pod::entrypoint` path.
|
||||
- Both the temporary `insomnia-pod` wrapper and the new `insomnia pod ...` path call the same runtime entrypoint.
|
||||
- `insomnia pod --help` reaches the Pod runtime parser/help with the appropriate invocation name.
|
||||
- Existing Pod runtime flags, semantics, and `INSOMNIA-READY` stderr handshake are preserved.
|
||||
- `insomnia memory lint` remains headless and returns before terminal/TUI setup.
|
||||
- Existing CLI behavior is preserved except that leading positional `pod` is now a reserved subcommand; explicit `--pod pod` remains 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 typed `program + prefix_args` so default runtime startup can become `insomnia pod ...`.
|
||||
- Add installed-binary smoke coverage once CLI E2E exists.
|
||||
|
||||
|
||||
---
|
||||
|
||||
<!-- event: implementation_report author: hare at: 2026-05-31T04:50:13Z -->
|
||||
|
||||
## Implementation report
|
||||
|
||||
Main workspace validation after merge:
|
||||
|
||||
- `cargo fmt --check` passed
|
||||
- `cargo test -p tui parse_` passed
|
||||
- `cargo test -p pod subcommand_help_uses_insomnia_pod_invocation` passed
|
||||
- `cargo run -q -p tui -- pod --help` smoke passed (`Usage: insomnia pod`, Pod runtime flags present)
|
||||
- `cargo run -q -p pod --bin insomnia-pod -- --help` smoke passed (`Usage: insomnia-pod`, Pod runtime flags present)
|
||||
- `cargo run -q -p tui -- memory lint` reached the headless command path. It exited `1` because the current generated `.insomnia/memory` contains 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 client` passed with pre-existing dead-code warnings
|
||||
- `./tickets.sh doctor` passed
|
||||
- `git diff --check` passed
|
||||
|
||||
|
||||
---
|
||||
|
||||
<!-- event: close author: hare at: 2026-05-31T04:50:14Z status: closed -->
|
||||
|
||||
## 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.
|
||||
|
||||
|
||||
---
|
||||
Reference in New Issue
Block a user