Skip to content

test(agent): synchronize handoff steering with tool approval - #8042

Merged
shellz-n-stuff merged 1 commit into
mainfrom
codex/handoff-steer-test
Oct 2, 2026
Merged

shellz-n-stuff merged 1 commit into
mainfrom
codex/handoff-steer-test

Conversation

@shellz-n-stuff

Copy link
Copy Markdown
Collaborator

Summary

handoff_cap_binds_within_a_single_turn can finish the turn before its steer is accepted. It also requests test_tool, which the fake MCP server does not expose, so the supposed tool round fails immediately.

Call the real cap_test__tool_0 fixture and hold its permission response until the steer is acknowledged. Assert that the next model request contains the steer and the handoff cap still prevents a second summary. This changes one regression test; production code is unchanged.

Validation

  • Reproduced the exact CI failure on unchanged main with a temporary 250 ms reader delay; the repaired test passed with the same delay. The delay is not committed.
  • Temporarily reset the handoff counter when a steer is queued: the repaired test failed. Restored production code afterward.
  • All six handoff regressions passed: cargo test -p buzz-agent --locked --test regressions handoff_.
  • just ci passed on the combined stack: repository checks, Rust and Tauri tests/lint, desktop tests/build, web build, and mobile checks/tests.
  • All 54 native-agent regressions passed on the combined stack, including this test.

Stack

  1. This PR → main: deterministic handoff regression.
  2. fix(mcp): support Goose discovery handshake #8037 → this branch: Goose MCP discovery compatibility.

Merge this PR first, then retarget #8037 to main.

Signed-off-by: Alex Rosenzweig <arosenzweig@squareup.com>
@shellz-n-stuff
shellz-n-stuff marked this pull request as ready for review October 2, 2026 15:38
@shellz-n-stuff
shellz-n-stuff requested a review from a team as a code owner October 2, 2026 15:38
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-02T15:41:11.384538Z 694ddd7 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the codex-security-review-current The posted Codex security review matches its recorded range. label Oct 2, 2026
@github-actions

github-actions Bot commented Oct 2, 2026

Copy link
Copy Markdown

🔐 Codex Security Review

Note: This is an automated, security-focused review generated by Codex.
Use it as a supplement to human review; false positives are possible.

Scope

  • Exact PR diff: 448407a972ca9da0c1e13d49ee2c2170821be8a2...694ddd7a74682931a52eb1182e982b4131d7adb6
  • Model: gpt-5.6-sol

💡 Click "edited" above to see earlier reviews for this PR.


Review Summary

Overall Risk: NONE

The PR only updates a regression test. The revised tool name matches the registered MCP tool, permission approval reliably gates the next round, steering is verified in the final LLM request, and stderr synchronization avoids the prior race. No concrete security, correctness, or reliability issues found.

Findings

No concrete security, correctness, or reliability findings were identified.

Notes

  • Review was limited to read-only static inspection as required; tests were not executed.

Generated by Codex Security Review |
Requested by: @shellz-n-stuff |
Workflow run

@shellz-n-stuff
shellz-n-stuff merged commit 2c270cf into main Oct 2, 2026
88 checks passed
@shellz-n-stuff
shellz-n-stuff deleted the codex/handoff-steer-test branch October 2, 2026 16:10
shellz-n-stuff added a commit that referenced this pull request Oct 2, 2026
## Summary

Goose 1.52 starts MCP connections with `server/discover`. `buzz-dev-mcp`
rejects that request with `ExpectedInitializeRequest`, preventing Goose
from loading its Buzz tools.

Upgrade the tool server to rmcp 3.4.1 and adopt the renamed SDK types.
Subprocess tests exercise discovery and legacy initialization, tool
listing, file reads/edits, invalid arguments, connection survival, and
EOF shutdown. Include the server in both Rust unit-test runners and make
the cancellation regression approve its shell call before testing
cancellation.

The native agent retains its independent rmcp 1.x client. Cargo also
unifies the existing 3.x dependency used by the mesh smoke harness.

## Validation

- Normal `git push` passed all hooks, including Rust tests, Tauri
checks, and repository policy checks.
- `just ci` passed on the final stack: repository checks, Rust and Tauri
tests/lint, desktop tests/build, web build, and mobile checks/tests.
- MCP: 78 existing tests and two subprocess lifecycle tests passed; the
discovery regression fails with the old SDK.
- All 54 native-agent regressions passed on the final stack, including
cancellation of a real MCP shell process.
- Previously exercised unmodified Goose 1.52 and 1.47 with Sandpit and
the real tool server. Allowed workspace operations and permitted network
traffic succeeded; disallowed file and network operations were denied.
- Live staging desktop check with Goose 1.52: the reply appeared in
Buzz, an allowed request returned HTTP 200, and a disallowed request
returned CONNECT 403.

## Stack

1. **#8042 → `main`**: deterministic handoff regression.
2. **This PR → #8042**: Goose MCP discovery compatibility.

Merge the lower PR first, then retarget this PR to `main`. This diff
contains only the compatibility change and its tests; the relay build
repair is already on `main` in #8036.

---------

Signed-off-by: Alex Rosenzweig <arosenzweig@squareup.com>
wpfleger96 pushed a commit that referenced this pull request Oct 2, 2026
…del-labels

* origin/main:
  fix(acp): steer running turns with edited mentions (#6132)
  fix(mcp): support Goose discovery handshake (#8037)
  test(agent): synchronize handoff steering with tool approval (#8042)

Signed-off-by: Duncan <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@buzz.block.builderlab.xyz>

This branch was successfully deployed

1 active deployment
codex-review — 694ddd7a Deployed Oct 2, 2026 by shellz-n-stuff via Run Codex Security Review #6548
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

codex-security-review-current The posted Codex security review matches its recorded range.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants