Repository navigation
fix(session): name the missing session in min session hooks - #1899
norrietaylor merged 3 commits into
Conversation
`min session hooks <name>` surfaced the daemon's bare `no session found` for a missing session, while every other session command reports `No session found matching '<name>'`. Resolve the session through `resolve_session` before sending `GetSessionHooks`, and name the session in the error arm for a session that disappears between the two calls. Add an integration test asserting the named error. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 1 remain after this review. 📝 WalkthroughWalkthroughThe session hooks command is now public. When the daemon returns exactly "no session found", the command reports an error that includes the requested session name. An integration test checks the message for ChangesSession Hooks
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The named missing-session error is covered by the reported integration test, with no identified merge-blocking risk. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Description checkExplanation The description includes a summary and verification results, but it says the command resolves the session before requesting hooks. The change summary says it instead maps th 8000 e daemon’s exact “no session found” response to a named error and passes other errors through unchanged. Resolution Update the summary to match the implementation: explain that the command names the requested session when the daemon returns exactly “no session found,” while other daemon errors pass through unchanged. Add the repository’s Checklist section, or state why it does not apply.
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
A rabbit checks the session name, Comment |
min session hooksmin session hooks
…sion hooks` Drop the extra resolve_session round trip. It duplicated the daemon's existence check and could resolve a different session than the hooks lookup. Rename only the 'no session found' reply; pass any other daemon error through unchanged.
|
/review |
|
Reviewed: 1 finding, none blocking at Address the comments on the diff. Clobber: none: |
Name a missing session through the shared resolve_session lookup instead of matching the daemon's error text, and read the hooks by the resolved record's id so both calls target the same session.
|
/review |
|
/review |
There was a problem hiding this comment.
Approved at 896e344: minimal-review passed with one non-blocking finding (the destroyed-between-calls window, a deliberate tradeoff explained on the resolved thread), 0 open threads, all lanes green.
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABUzmLNg
min session hooks <name>printed the daemon's bareno session foundfor a missing session, while every other session command reports
No session found matching '<name>'. Resolve the session throughresolve_session, then sendGetSessionHooksby the resolved record'sid so both calls target the same session. A session destroyed between the
two calls still gets the daemon's own error; that window is not named.
Adds an integration test asserting the named error.
Verification
cargo fmt --all --check— passcargo build --workspace --locked— passcargo test -p minimal --locked— pass (285 passed; 1 pre-existing unrelated failure inlegacy_network_spellings_parse_with_hint)cargo clippy -p minimal --all-targets --locked -- -D warnings— blocked by pre-existingneedless_borrows_for_generic_argslints incrates/args/src/lib.rs(sandbox resolvescargoto stable 1.99.0 instead of the pinned 1.97.0); unrelated to this changeSummary by CodeRabbit