Repository navigation
Fix false active ACP turns and rejected steers - #1427
Conversation
|
🚨 SLOP COP 🚨 · I am the Slop Cop. I am now reviewing this pull request for security, quality, performance, architecture, and end-to-end behavior. |
SawyerHood
left a comment
There was a problem hiding this comment.
🚨 SLOP COP 🚨 · review
ELI5
BB can think a helper still works after it stops. This change adds a stop sign and protects the next note.
However, one broken note can still mark another note as broken. It is like putting the wrong name on two toy boxes.
Review
I found nine issues. I recommend fixes before merge.
High findings:
- The ACP fallback clears the runtime turn tracker, but it leaves the adapter tracker on the old turn.
- A completed target turn can stop the server before it records a failed request.
- One explicit rejection and its error can also reject the next pending steer.
- The host behavior changes without a host daemon protocol version increase.
- The committed plugin SDK declaration and its template copy remain stale.
Medium findings:
- The server can reject a request that already has an acceptance event.
- Rejection state does not cross timeline page limits.
- The generic runtime treats JSON-RPC code
-32001as an ACP result for every adapter. - Repeated array searches make unresolved-request work grow with the square of the request count.
The request-state code now exists in two projection paths. A shared request-state index can remove this duplication and address the page and performance issues.
I found no direct data-access or permission issue. The generic error handling can still clear valid state and resend input.
Checks
- I inspected all 25 changed files and the related runtime, server, timeline, contract, and SDK code.
git diff --checkpassed.- The selected agent-runtime, thread-view, and server tests passed.
- The plugin SDK declaration check failed because the committed output is stale.
- GitHub CI is green.
- A local dev server passed browser checks for the home page, new-thread composer, and provider picker.
- The browser showed no console error.
- Direct reproductions confirmed the ACP state fault and both timeline faults.
- A full local server run had unrelated timeouts during heavy parallel work.
|
I addressed the SlopCop findings in 345ca03.
The full type check and all related regression suites pass. |
345ca03 to
7dab8a9
Compare
get-bb#1427 landed on main with `HOST_DAEMON_PROTOCOL_VERSION = 112` while this branch was also sitting on 112, so both sides claimed the same number and the same block of the contract test. Resolved by taking 113 here and keeping get-bb#1427's 112 line in the version history, so the two changes read in the order they landed: 113 zero-work Claude Code runs settle with a full turn lifecycle 112 ACP stale-steer results trigger a safe new-turn retry 111 parentToolCallId restored on a resumed Codex child turn Note that `commands.ts` merged clean rather than conflicting — both sides made the byte-identical 111 to 112 edit — so the constant needed bumping by hand after the merge, and only the test flagged the collision. Checked that 113 appears nowhere else: every other reader imports the constant. No behaviour change beyond the bump. get-bb#1427 is ACP-only — it keys off `isAcpProviderId` and an ACP bridge error code — so it neither subsumes nor overlaps the claude-code `result` path this branch fixes.
Summary
Tests
pnpm exec turbo run typecheck --filter=@bb/agent-runtime --filter=@bb/thread-view --filter=@bb/server --filter=@bb/apppnpm exec turbo run test --filter=@bb/agent-runtime --forcepnpm exec turbo run test --filter=@bb/thread-view --forcepnpm exec turbo run test --filter=@bb/domain --forcepnpm exec turbo run test --filter=@bb/server --force -- test/threads/thread-send-dispatch.test.tsNotes
This change does not alter the server and host daemon wire contract.