Skip to content

fix(bridge): propagate caller execution timeout - #727

Merged
drewstone merged 1 commit into
mainfrom
fix/bridge-timeout-contract-20260803
Aug 3, 2026
Merged

fix(bridge): propagate caller execution timeout#727
drewstone merged 1 commit into
mainfrom
fix/bridge-timeout-contract-20260803

Conversation

@drewstone

Copy link
Copy Markdown
Contributor

Problem

BridgeSeam.timeoutMs only armed Runtime's local reader timer.
Runtime did not put the value in its cli-bridge request, so the bridge substituted its own 300,000ms process cutoff and killed a Pi run even though Runtime specified 14,400,000ms.

Change

  • Send the caller's exact BridgeSeam.timeoutMs as execution.timeoutMs on every durable bridge turn.
  • Keep Runtime's local timer and explicit durable-run cancellation so transport loss still fails loudly and cleans up the server-owned process.
  • Reject invalid values before any bridge request is dispatched.
  • Document the public seam contract in generated API docs.

This uses the existing bridgeExecutor, durable run, cancellation, and AgentProfile paths.
It adds no coordinator, request wrapper, compatibility path, or Discovery-local runtime.

Completion criteria

  • timeoutMs: 14400000 appears unchanged in the structured bridge request.
  • Runtime and cli-bridge act on the same caller-selected number.
  • Zero, negative, fractional, and timer-overflow values fail before dispatch.
  • Existing local cancellation and durable-run terminal checks remain in force.
  • Generated public API documentation is current.
  • Branch merges cleanly into current origin/main.

Verification

  • After rebasing onto current main: pnpm vitest run tests/runtime/bridge-executor.test.ts — 28 passed.
  • After rebasing: pnpm typecheck — pass.
  • After rebasing: pnpm docs:check — pass.
  • After rebasing: pnpm verify:package — pass, including 22 static-import cases, package lint, exports, 232 shipped-file edge scan, and Worker execution.
  • Full suite before the conflict-free rebase: 2,358 passed, 6 skipped across 203 files.

The receiving wire contract and process-lifetime fix are in drewstone/cli-bridge#107.
Both PRs must merge before rerunning the Discovery pursuit.

@tangletools tangletools left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Auto-approved drewstone PR — b28b2de9

This PR was opened by the trusted drewstone account.
The full PR reviewer audit still runs separately and will publish findings if it detects issues.

tangletools · auto-approval · reason: drewstone_author · 2026-08-03T20:44:17Z

@drewstone
drewstone merged commit dac6158 into main Aug 3, 2026
4 checks passed
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.

2 participants