Skip to content

fix(runtime): persist external tool effects - #449

Open
AsperforMias wants to merge 1 commit into
langgenius:mainfrom
AsperforMias:fix/runtime-persist-external-tool-effects
Open

fix(runtime): persist external tool effects#449
AsperforMias wants to merge 1 commit into
langgenius:mainfrom
AsperforMias:fix/runtime-persist-external-tool-effects

Conversation

@AsperforMias

Copy link
Copy Markdown
Collaborator

Summary

  • Persist MCP external-effect intent, attempt, result, and unknown-fence state in D1.
  • Redeliver a durable MCP result after terminal-receipt loss without invoking the provider again.
  • Require Driver protocol v2 and a durable effect ledger for MCP execution.

Why

Verification

  • Commands: just db-reset-local; just check; just e2e deterministic session-log
  • Manual/local fault injection: actual local D1 plus real Driver Dispatcher simulates provider success followed by lost terminal delivery, restarts the Dispatcher, and asserts exactly one provider call.
  • Not run: live remote MCP or Cloudflare resources (not available).

Impact

  • User/API/contract changes: Driver control protocol v2; an unknown effect fails closed with its durable effect ID.
  • Generated files / GraphQL / DB / lockfile: additive 0005_external-tool-effects plus Drizzle snapshot/journal; no GraphQL or lockfile changes from this PR.
  • Env or config changes: none.
  • Risk and rollback: deploy API and Driver protocol v2 together. Migration is additive; old Driver versions are intentionally rejected to prevent unsafe execution.

Review

@AsperforMias

AsperforMias commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator Author

这个要driver那边的#89先合 @Yevanchen

@AsperforMias
AsperforMias force-pushed the fix/runtime-persist-external-tool-effects branch 2 times, most recently from 2bd7bc5 to da90cf5 Compare July 29, 2026 14:23
@AsperforMias
AsperforMias marked this pull request as ready for review July 29, 2026 14:29
@Yevanchen
Yevanchen force-pushed the fix/runtime-persist-external-tool-effects branch from da90cf5 to b432453 Compare July 29, 2026 16:12
@Yevanchen
Yevanchen force-pushed the fix/runtime-persist-external-tool-effects branch from b432453 to c8a9b17 Compare July 29, 2026 16:17
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.

fix(runtime): persist uncertainty for external tool effects

1 participant