8000 fix(session): name the missing session in `min session hooks` by gominimal-aw-bot[bot] · Pull Request #1899 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(session): name the missing session in min session hooks - #1899

Merged
norrietaylor merged 3 commits into
mainfrom
inbox-patch/fix/session-hooks-name-missing-session-bc7dafeb62e6b41f
Oct 4, 2026
Merged

norrietaylor merged 3 commits into
mainfrom
inbox-patch/fix/session-hooks-name-missing-session-bc7dafeb62e6b41f

Conversation

@gominimal-aw-bot
@gominimal-aw-bot gominimal-aw-bot Bot commented Oct 3, 2026 •
Copy link
Copy Markdown
Contributor

Routing-Key: inbox-route/I_kwDOSUhdos8AAAABUzmLNg

min session hooks <name> printed 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, then send GetSessionHooks by the resolved record's
id 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 — pass
  • cargo build --workspace --locked — pass
  • cargo test -p minimal --locked — pass (285 passed; 1 pre-existing unrelated failure in legacy_network_spellings_parse_with_hint)
  • cargo clippy -p minimal --all-targets --locked -- -D warnings — blocked by pre-existing needless_borrows_for_generic_args lints in crates/args/src/lib.rs (sandbox resolves cargo to stable 1.99.0 instead of the pinned 1.97.0); unrelated to this change

Summary by CodeRabbit

  • Bug Fixes
    • Session hook requests now identify the requested session when it cannot be found, making it clearer which lookup failed. Other errors from the service continue to be reported as before.

`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>
@gominimal-aw-bot
gominimal-aw-bot Bot requested a review from a team as a code owner October 3, 2026 17:07
@gominimal-aw-bot gominimal-aw-bot Bot added the agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. label Oct 3, 2026
@coderabbitai
coderabbitai Bot commented Oct 3, 2026 •
Copy link
Copy Markdown
Contributor

Review in Change Stack →

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
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 9b901ebb-6696-400a-b6c9-09282cfdddc2
📥 Commits

Reviewing files that changed from the base of the PR and between a6e7270 and 859858e.

📒 Files selected for processing (2)
  • crates/minimal/src/cmd/session.rs
  • crates/minimal/tests/cli.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/minimal/tests/cli.rs

Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 1 remain after this review.


📝 Walkthrough

Walkthrough

The 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 nosuch.

Changes

Session Hooks

Layer / File(s) Summary
Command visibility and named missing-session error
crates/minimal/src/cmd/session.rs, crates/minimal/tests/cli.rs
cmd_session_hooks is public. When the daemon returns exactly "no session found", the command reports No session found matching '<requested session>'. Other daemon errors pass through unchanged. The integration test checks the expected message for nosuch.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: norrietaylor

Merge Risk: ⚪ Minimal · up to 85985

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)

Check name Status Explanation Resolution
Description check ⚠️ Warning 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 the daemon’s exact “no sessio… 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 sectio…
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly describes the change and follows the repository’s Conventional Commit format.
Full details: Description check

Explanation

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.

  • Fix all pre-merge checks with AI
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the session name,
The missing one returns in the frame.
The command shares its public way,
The test confirms what errors say.
Soft paws hop past the hooks today.

Comment @coderabbitai help to get the list of available commands.

@gominimal-aw-bot gominimal-aw-bot Bot added the agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch label Oct 3, 2026
@norrietaylor norrietaylor changed the title fix: fix(session): name the missing session in min session hooks fix(session): name the missing session in min session hooks Oct 4, 2026
…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.
@norrietaylor
Copy link
Copy Markdown
Member

/review

@minimal-foundry
minimal-foundry Bot commented Oct 4, 2026 •
Copy link
Copy Markdown
Contributor

Reviewed: 1 finding, none blocking at 896e34415326.

Address the comments on the diff.

Clobber: none: git log shows the three commits in the PR are its own fix iterations (name the missing session -> map only the daemon's missing-session error -> resolve the session before reading its hooks), none reverting an outside fix.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — advisory review

Verdict COMMENT — 1 finding, 1 inline.

Comment thread crates/minimal/src/cmd/session.rs Resolved
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.
@norrietaylor
Copy link
Copy Markdown
Member

/review

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — advisory review

Verdict COMMENT — 1 finding, 1 inline.

Comment thread crates/minimal/src/cmd/session.rs Resolved
@norrietaylor
Copy link
Copy Markdown
Member

/review

@norrietaylor norrietaylor left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@norrietaylor
norrietaylor enabled auto-merge October 4, 2026 03:27
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 4, 2026
Merged via the queue into main with commit 588fbde Oct 4, 2026
35 checks passed
@norrietaylor
norrietaylor deleted the inbox-patch/fix/session-hooks-name-missing-session-bc7dafeb62e6b41f branch October 4, 2026 03:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0