Skip to content

refactor(runtime)!: enforce durable SDK protocol v3 boundaries - #112

Merged
WH-2099 merged 20 commits into
mainfrom
chore/upgrade-dependencies
Sep 2, 2026
Merged

refactor(runtime)!: enforce durable SDK protocol v3 boundaries#112
WH-2099 merged 20 commits into
mainfrom
chore/upgrade-dependencies

Conversation

@WH-2099

@WH-2099 WH-2099 commented Aug 11, 2026

Copy link
Copy Markdown
Member

Summary

  • Rebase the SDK integration onto current main and update ACP 1.4.0, Codex 0.152.0, Claude Agent SDK 0.3.257, Anthropic SDK 0.123.0, OpenCode 1.18.25, Bun 1.4.0, and Vite+ 0.3.0.
  • Adapt Claude post-result informational frames, background task resource links, heartbeat progress, thinking-token usage, and exact terminal ordering.
  • Bound MCP prepared-resource disposal while retaining ownership across the complete remote cleanup budget.
  • Preserve the hello-owned Run identity when backend startup fails before input activates the Run.
  • Keep the contract subsystem and raise its strict wire grammar to protocol version 3.
  • Synchronize 8 Codex schemas and 62 transitively reachable generated TypeScript files.

Breaking contract

  • Contract consumers must use protocol version 3.
  • Mixed protocol version 2 and version 3 deployments are intentionally rejected.
  • Every completeRun and failRun call requires the exact runId.

Validation

  • Local full check passes with 1,666 tests, 40 explicit live or environment skips, 0 failures, and 6,765 assertions across 87 files.
  • Formatting, lint, declarations, generated synchronization, package output, Bun executable build, and the packed stateful MCP artifact pass.
  • Multi-agent lifecycle, race, cleanup, protocol, and KISS reviews found no remaining deterministic merge blocker.
  • Remote checks for 3439bed are in progress.

Merge order

This Driver PR is independently testable and may merge before the Mosoo PR after its own CI is green.

The downstream Draft still pins 5e66125 and must repin 3439bed and revalidate protocol version 3 before it can merge.

If the Driver merge strategy rewrites the commit SHA, Mosoo must pin the resulting durable commit.

The separate Cloudflare backup-capture blocker continues to keep the Mosoo PR in Draft.

Related work

Copilot AI balanced review requested due to automatic review settings August 11, 2026 18:06
@WH-2099 WH-2099 self-assigned this Aug 11, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings August 11, 2026 20:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings August 12, 2026 10:55

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

Copilot AI review requested due to automatic review settings August 12, 2026 22:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@WH-2099
WH-2099 force-pushed the chore/upgrade-dependencies branch from 7bd412a to 443c669 Compare August 26, 2026 07:27
Copilot AI review requested due to automatic review settings August 26, 2026 07:27

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 95 out of 986 changed files in this pull request and generated no new comments.

@WH-2099
WH-2099 force-pushed the chore/upgrade-dependencies branch from 443c669 to 84ccdd9 Compare August 27, 2026 05:11
Copilot AI review requested due to automatic review settings August 27, 2026 05:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 98 out of 1022 changed files in this pull request and generated no new comments.

@WH-2099
WH-2099 force-pushed the chore/upgrade-dependencies branch from 84ccdd9 to a152882 Compare August 27, 2026 06:39
Copilot AI review requested due to automatic review settings August 27, 2026 06:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 98 out of 1024 changed files in this pull request and generated 1 comment.

Comment thread src/host-ports/index.ts
Copilot AI review requested due to automatic review settings August 27, 2026 15:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 98 out of 1073 changed files in this pull request and generated no new comments.

Copilot AI review requested due to automatic review settings August 27, 2026 15:21
@WH-2099
WH-2099 force-pushed the chore/upgrade-dependencies branch from c73abd4 to 19bbfcf Compare August 27, 2026 15:21
Copilot AI review requested due to automatic review settings August 30, 2026 21:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 96 out of 368 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

src/protocol/events/runtime-event-validation.ts:366

  • error.details accepts NaN and infinities here because every JavaScript number passes this check. These values are not JSON-serializable under the protocol's own isJsonValue rules (src/protocol/json.ts:21-26) and are silently converted to null during transport, so validation can mutate the reported detail value instead of rejecting it at ingress. Require finite numbers before returning the details record.

Comment thread src/protocol/paths/index.ts
Copilot AI review requested due to automatic review settings August 31, 2026 05:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 96 out of 368 changed files in this pull request and generated no new comments.

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

src/protocol/start.ts:21

  • driverGeneration is propagated into provider startup even though the boot schema accepts any nonnegative integer, including values above Number.MAX_SAFE_INTEGER. OpenAI then rejects such a parsed payload in assertOpenAiRuntimeIdentity, while ACP and Claude accept the same boot payload, so validation depends on the selected runtime and occurs after the trust boundary. Make the boot schema require a safe integer before constructing DriverStartInput.

Copilot AI review requested due to automatic review settings August 31, 2026 05:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 96 out of 368 changed files in this pull request and generated 1 comment.

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

README.md:228

  • This now incorrectly says release publication is gated only by the provider-free MCP test. The release workflow runs vp run test:live:artifact immediately afterward (.github/workflows/release.yml:114-127), and that command executes the complete OpenAI, Claude, and OpenCode matrix. Keep this documentation aligned with the actual fail-closed release gate.

Comment thread src/runtimes/runtime-public-id-state.ts Outdated
Copilot AI review requested due to automatic review settings August 31, 2026 18:02

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 95 out of 366 changed files in this pull request and generated 4 comments.

Comment thread src/runtimes/claude/agent-sdk-task-events.ts Outdated
Comment thread src/surfaces/cma-sdk/sse-bytes-decoder.ts
Comment thread README.md Outdated
Comment thread src/protocol/events/runtime-event-types.ts
Copilot AI review requested due to automatic review settings August 31, 2026 18:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 95 out of 366 changed files in this pull request and generated no new comments.

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

src/core/driver-command-dispatcher.ts:1103

  • This directly awaits cleanup supplied by an AgentDriverMcpPort with no deadline. The public AgentDriverMcpExecution contract requires execute to be bounded but imposes no such requirement on disposal, so a custom host port can leave the command active indefinitely, suppress its terminal update, and eventually make run-terminal/shutdown joining time out. Bound disposal at this dispatcher boundary (and log a timeout as the existing cleanup diagnostic), rather than relying only on the built-in remote executor to implement its own timeout.

Copilot AI review requested due to automatic review settings September 1, 2026 18:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 93 out of 368 changed files in this pull request and generated no new comments.

BREAKING CHANGE: contract consumers must use protocol version 3.
Copilot AI review requested due to automatic review settings September 1, 2026 21:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The advertised dependency versions and downstream validation target do not match the current implementation pins.

Review details
  • Files reviewed: 90/371 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

@WH-2099

WH-2099 commented Sep 1, 2026

Copy link
Copy Markdown
Member Author

Checkpoint 3439bed is green.

GitHub Validate PR title and Check passed.

The Check job includes repository validation, image build, and image-environment verification.

Local validation remains 1,666 passed, 40 explicit skips, 0 failed, and 6,765 assertions.

@WH-2099
WH-2099 merged commit ef16d02 into main Sep 2, 2026
4 of 5 checks passed
@WH-2099
WH-2099 deleted the chore/upgrade-dependencies branch September 2, 2026 07:26
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.

refactor(runtime)!: enforce durable SDK protocol v3 boundaries

2 participants