Skip to content

Ticket #28: Approval resumption's saved-tool-call check reads through ThreadBackend - #29

Merged
codaswin merged 1 commit into
mainfrom
brooklyn-base
Oct 30, 2026
Merged

codaswin merged 1 commit into
mainfrom
brooklyn-base

Conversation

@codaswin

Copy link
Copy Markdown
Owner

Summary

See docs/brooklyn/DECISIONS.md CopilotKit#31 for the full reasoning.

Closes #28.

Test plan

  • bun run typecheck / bun run lint — green
  • New test in approvals-saved-call.test.ts seeds a real postgres thread with a saved tool call and confirms savedToolCall matches it correctly through the real ThreadBackend
  • Existing approvals-saved-call.test.ts, approvals-execute.test.ts, approvals-interactive.integration.test.ts, approvals-policy.integration.test.ts, approvals-store.integration.test.ts, approvals.test.ts — all pass unchanged
  • Full suite (bun test): 8210 pass / 17 fail / 9 errors — back to the normal baseline, same pre-existing categories, no regressions

🤖 Generated with Claude Code

…nd (ticket #28)

The last of the three direct-getThreadMessages sites ticket #23 found
but left out of scope: approvals/wiring.ts's saved-tool-call
verification read a thread's messages straight from the inert
routineIntelligence placeholder in postgres mode. Same fix as
#21/#23: savedToolCall's ThreadHistory type widens from
Pick<IntelligenceLike, "getThreadMessages"> to a plain union with
Pick<ThreadBackend, "getThreadMessages"> -- no adapter needed, same
reasoning as ThreadTranscript in channels/summary.ts.

headlessThreadAccess itself moves earlier in index.ts, to right after
routineIntelligence's own declaration: approvalService is built long
before routineAgentRunner exists, and headlessThreadAccess (unlike
its sibling headlessRunner) never actually needed routineAgentRunner
in the first place. headlessRunner stays where it was.

New test in approvals-saved-call.test.ts seeds a real postgres thread
with a saved tool call and confirms savedToolCall matches it
correctly when read through the real ThreadBackend, not a fake.

See docs/brooklyn/DECISIONS.md CopilotKit#31.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@codaswin
codaswin merged commit 53b4acf into main Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Approval resumption's saved-tool-call check reads through ThreadBackend

2 participants