From 7141734f07918eb7928aa5f1a0d6df608c7c4cdd Mon Sep 17 00:00:00 2001 From: Hare Date: Sun, 31 May 2026 22:20:05 +0900 Subject: [PATCH] close: insomnia cli ownership --- .../artifacts/.gitkeep | 0 .../item.md | 4 +- .../resolution.md | 39 +++++++++++++++ .../thread.md | 47 +++++++++++++++++++ 4 files changed, 88 insertions(+), 2 deletions(-) rename work-items/{open => closed}/20260531-111956-insomnia-crate-cli-owner/artifacts/.gitkeep (100%) rename work-items/{open => closed}/20260531-111956-insomnia-crate-cli-owner/item.md (98%) create mode 100644 work-items/closed/20260531-111956-insomnia-crate-cli-owner/resolution.md rename work-items/{open => closed}/20260531-111956-insomnia-crate-cli-owner/thread.md (74%) diff --git a/work-items/open/20260531-111956-insomnia-crate-cli-owner/artifacts/.gitkeep b/work-items/closed/20260531-111956-insomnia-crate-cli-owner/artifacts/.gitkeep similarity index 100% rename from work-items/open/20260531-111956-insomnia-crate-cli-owner/artifacts/.gitkeep rename to work-items/closed/20260531-111956-insomnia-crate-cli-owner/artifacts/.gitkeep diff --git a/work-items/open/20260531-111956-insomnia-crate-cli-owner/item.md b/work-items/closed/20260531-111956-insomnia-crate-cli-owner/item.md similarity index 98% rename from work-items/open/20260531-111956-insomnia-crate-cli-owner/item.md rename to work-items/closed/20260531-111956-insomnia-crate-cli-owner/item.md index 20227f47..8250c33d 100644 --- a/work-items/open/20260531-111956-insomnia-crate-cli-owner/item.md +++ b/work-items/closed/20260531-111956-insomnia-crate-cli-owner/item.md @@ -2,12 +2,12 @@ id: 20260531-111956-insomnia-crate-cli-owner slug: insomnia-crate-cli-owner title: CLI: make insomnia crate own binary entrypoint and CLI dispatch -status: open +status: closed kind: task priority: P2 labels: [cli, tui, pod, architecture] created_at: 2026-05-31T11:19:56Z -updated_at: 2026-05-31T13:17:15Z +updated_at: 2026-05-31T13:20:02Z assignee: null legacy_ticket: null --- diff --git a/work-items/closed/20260531-111956-insomnia-crate-cli-owner/resolution.md b/work-items/closed/20260531-111956-insomnia-crate-cli-owner/resolution.md new file mode 100644 index 00000000..26581c72 --- /dev/null +++ b/work-items/closed/20260531-111956-insomnia-crate-cli-owner/resolution.md @@ -0,0 +1,39 @@ +Moved product CLI/binary ownership from `tui` to `insomnia`. + +Implementation: +- Moved `PodRuntimeCommand` from the transitional `insomnia` helper role into `client`, so lower crates no longer depend on the product CLI crate. +- Made `tui` a library implementation crate and exposed launch APIs for already-parsed modes/options. +- Added the `insomnia` package binary entrypoint and moved top-level CLI parsing/dispatch there. +- Routed `insomnia pod ...` through `pod::entrypoint` from the `insomnia` crate. +- Routed `insomnia memory lint ...` from the `insomnia` crate. +- Kept normal TUI launch behavior for resume, multi-Pod dashboard, Pod name, `--pod`, and `--session` modes. +- Updated packaging so `package.nix` builds package `insomnia` and still exposes only `bin/insomnia`. +- Updated active development/docs references away from `cargo run -p tui -- ...`. + +Review: +- External reviewer `insomnia-cli-owner-reviewer-20260531` initially requested changes for a parser regression around `--resume` combined with Pod selection. +- Fix commit `37281b6` restored mutual exclusion for `-r --pod`, `--pod -r`, and `-r `, and improved `--multi --pod` diagnostics. +- Reviewer approved after re-review. + +Validation after merge: +- `cargo fmt --check` +- `cargo check -p client -p pod -p tui -p insomnia` +- `cargo test -p client` +- `cargo test -p pod` +- `cargo test -p tui` +- `cargo test -p insomnia` +- `cargo run -p insomnia -- --help` +- `cargo run -p insomnia -- pod --help` +- `cargo run -p insomnia -- memory lint --help` +- invalid/conflict CLI smoke tests for `--session not-a-uuid`, `-r --pod`, `--pod -r`, and `-r ` +- dependency checks confirming `client`, `pod`, and `tui` do not depend on `insomnia`, and `tui` does not depend on `pod` +- `nix build .#insomnia` +- `test -x ./result/bin/insomnia` +- `test ! -e ./result/bin/insomnia-pod` +- `./result/bin/insomnia pod --help` +- `./tickets.sh doctor` +- `git diff --check` +- `rg "cargo run -p tui" docs README.md crates package.nix flake.nix || true` produced no active hits. + +Notes: +- Validation emitted pre-existing dead-code warnings in `llm-worker`/`tui` but passed. diff --git a/work-items/open/20260531-111956-insomnia-crate-cli-owner/thread.md b/work-items/closed/20260531-111956-insomnia-crate-cli-owner/thread.md similarity index 74% rename from work-items/open/20260531-111956-insomnia-crate-cli-owner/thread.md rename to work-items/closed/20260531-111956-insomnia-crate-cli-owner/thread.md index 4d235c12..af9b6846 100644 --- a/work-items/open/20260531-111956-insomnia-crate-cli-owner/thread.md +++ b/work-items/closed/20260531-111956-insomnia-crate-cli-owner/thread.md @@ -143,4 +143,51 @@ Validation adequacy: - Reviewer reran focused parser tests and manually confirmed conflict diagnostics through the built binary after the fix. +--- + + + +## Closed + +Moved product CLI/binary ownership from `tui` to `insomnia`. + +Implementation: +- Moved `PodRuntimeCommand` from the transitional `insomnia` helper role into `client`, so lower crates no longer depend on the product CLI crate. +- Made `tui` a library implementation crate and exposed launch APIs for already-parsed modes/options. +- Added the `insomnia` package binary entrypoint and moved top-level CLI parsing/dispatch there. +- Routed `insomnia pod ...` through `pod::entrypoint` from the `insomnia` crate. +- Routed `insomnia memory lint ...` from the `insomnia` crate. +- Kept normal TUI launch behavior for resume, multi-Pod dashboard, Pod name, `--pod`, and `--session` modes. +- Updated packaging so `package.nix` builds package `insomnia` and still exposes only `bin/insomnia`. +- Updated active development/docs references away from `cargo run -p tui -- ...`. + +Review: +- External reviewer `insomnia-cli-owner-reviewer-20260531` initially requested changes for a parser regression around `--resume` combined with Pod selection. +- Fix commit `37281b6` restored mutual exclusion for `-r --pod`, `--pod -r`, and `-r `, and improved `--multi --pod` diagnostics. +- Reviewer approved after re-review. + +Validation after merge: +- `cargo fmt --check` +- `cargo check -p client -p pod -p tui -p insomnia` +- `cargo test -p client` +- `cargo test -p pod` +- `cargo test -p tui` +- `cargo test -p insomnia` +- `cargo run -p insomnia -- --help` +- `cargo run -p insomnia -- pod --help` +- `cargo run -p insomnia -- memory lint --help` +- invalid/conflict CLI smoke tests for `--session not-a-uuid`, `-r --pod`, `--pod -r`, and `-r ` +- dependency checks confirming `client`, `pod`, and `tui` do not depend on `insomnia`, and `tui` does not depend on `pod` +- `nix build .#insomnia` +- `test -x ./result/bin/insomnia` +- `test ! -e ./result/bin/insomnia-pod` +- `./result/bin/insomnia pod --help` +- `./tickets.sh doctor` +- `git diff --check` +- `rg "cargo run -p tui" docs README.md crates package.nix flake.nix || true` produced no active hits. + +Notes: +- Validation emitted pre-existing dead-code warnings in `llm-worker`/`tui` but passed. + + ---