You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bridge build-out S7 — PM stack direct bridge access at the edge (adopts #13502) #14373
Bridge build-out S7 — PM stack direct bridge access at the edge (adopts #13502)
Implements design §4.8. Traces to spec item 1. Adopts #13502 ("Send a message to an agent from Cloudflare with no machine"): this slice is that issue's build-out form; when this lands, #13502's acceptance is met and it should be closed against this slice's evidence. Depends on S3 (#14368) for the PM credential.
Scope
The PM console edge Worker (pm-stack/console/edge) calls the bridge Worker by service binding (same Cloudflare account), presenting a dedicated PM credential: its own sender identity, from_addrservice:pm-stack, minted and revocable through the S3 credential machinery with send scope plus pipeline read for the console's own views.
The console's message.send act kind and its agents/messages reads move to that binding. A message sent from the app with the laptop away is delivered at the edge and is NOT listed under "Waiting for a machine".
The fleet hosted-worker's declared bridge capability (pkgs/fleet/hosted-worker/src/capabilities.ts, today a declaration) is wired to the same binding, so the PM service API and the console share one send path.
The laptop fleet-binary path remains for laptop-local services (pm-dispatch and friends keep their existing route); this slice changes the console's send path only.
Acceptance
With the laptop unreachable, a message sent from the console UI is delivered to the target agent's mailbox (verified in the bridge store) and never appears as waiting-for-a-machine.
The delivered row's provenance shows the PM identity (service:pm-stack), distinguishable in the pipeline from owner-sent and agent-sent rows.
Revoking the PM credential stops console sends at the edge with a clear console-side error; laptop-local dispatch is unaffected.
Console bun test suites pass with the edge send path covered; the hosted-worker capability resolves to the same binding in its tests.
Design of record: doc/2026-11-24_design_message-bridge-buildout.md (PR #14364). Spec numbers below refer to §1 of that doc; design detail is in the section cited per issue.
Filed by Felix's design lane, 2026-11-24. Not enqueued in this pass, per the filing-comment rule: Felix dispatches lanes from the slice index (design doc §7, also posted on #13907).
Claimed by felix (worker felix) for slice S7 implementation, 2026-11-24. Branch felix/14373-pm-edge-bridge. This slice adopts #13502: its acceptance is this slice's acceptance; records will be coordinated on both issues. Design: doc/2026-11-24_design_message-bridge-buildout.md §4.8. S3 (#14368, PR #14407) is merged, so the PM stack gets its own scoped bridge credential (service:pm-stack) instead of relaying through the laptop fleet binary.
Completion record (code half) — S7 implementation is landed as PR #14431, left unmerged for Felix's review.
What was built (two commits: c07e03b the slice, 6d8da8b the verification fixes): bridge-worker service credentials (owner direct mint, addr service:<own name>, new read scope opening the agents/message-log pipeline views to the holder only — enroll-minted agent credentials never carry it, and the shared fleet token does not open the views); console edge sends + agents/messages reads over the BRIDGE service binding under the PM credential, with byte-for-byte the old hold-for-a-machine behaviour when the credential or binding is absent, and a plain console error (never a silent hold) when the credential is revoked; hosted-worker's bridge capability wired to the same binding and credential (send/agents/messages door, fail-closed 503 unconfigured, 502 naming a revoked credential).
Verification, remote only: run 45415227230 caught 6 real failures across the three suites (bridge 82/83, console 598/602, hosted 208/209) — each fixed at its root in 6d8da8b. Run 45417551302 on head 6d8da8b: bridge worker 83/83, console bun 602 pass / 0 fail (23 files), hosted worker 209/209, with the new tests passing by name (service-credential mint/send-provenance/read-scope/revoke/hash-only; edge bridge send + fallback; hosted door + capability). No new dependencies (the one package.json change adds a test file to the hosted test script).
Acceptance status: the code-side criterion (console + hosted suites pass with the edge send path covered, capability resolves to the same binding) is met. The three live criteria — laptop-unreachable delivery verified in the bridge store, service:pm-stack provenance in the live pipeline, revocation stopping console sends at the edge — remain open and are listed step-by-step at the end of PR #14431 (deploy bridge worker → mint the PM credential into the vault as bridge.pm-stack-token → deploy edge + upload BRIDGE_TOKEN → live check). This issue stays open on those.
**main-ci watch: new main-branch failure queued as task 23551.**
Workflow pm-console-edge deploy red on main: run 45425727853 (push, head 83bffcc7 = this issue's PR #14431 merge) — sole failed job deploy pm-console-edge (138557061163), step 'Type-check the console': src/worker.ts(101,15): error TS18048: 'env.BRIDGE' is possibly 'undefined'. Prior three runs of this workflow green; still broken at origin/main tip 5c71a0de (no later commit touches the file). Root cause characterized in the task packet (optional BRIDGE binding + closure-narrowing loss; hoist to a local).
Note: the 15:30Z watch note on #12521 deduped this run to task 23038 as a live fix, but a fresh broker read this pass shows 23038 is done (terminal), so per one-live-fix deduplication a fresh packet was enqueued here instead of on #12521. No duplicate issue filed.
Fixed on main by PR #14455 (merge commit of fix/pm-console-edge-bridge-narrowing). Post-merge run 45431451686 succeeded: type-check passed and deploy pm-console-edge is green.
Main-CI recurrence (2026-11-24): pm-console-edge deploy run 45441275620 failed on main after merge commit 40b75e0153333a381eeaa0a6f6889366196cc87f (PR #14463 / S8). Failed job deploy pm-console-edge, step Type-check the console: test/console.test.ts(794,7) TS2769 (credentials not in { state, scopes }) and (818,125) TS2322 (string not assignable to null). This is separate from the earlier TS18048 already fixed by #14455. Reusing the existing live tracker/task 23551 and PR #14458 under the one-live-fix-per-workflow rule; task reactivated with this run context. No duplicate issue/task/session.
Main-CI recurrence (2026-11-24): run 45449902156 failed job deploy pm-console-edge (job 138643778842) at Type-check the console. npx tsc --noEmit -p ../tsconfig.json reports TS2769 at ../test/direct.test.ts:389 and ../test/edge.test.ts:3922: fixture objects include kind, but the selected overload expects { agent: string; state: string }. The test and deploy steps were skipped. Reusing this tracker under the one-live-fix-per-workflow rule; existing task 23551 is parked until 2026-11-24T17:56:48Z and PR #14458 remains open. No duplicate issue/task/session created.
Activity
developing-today commentedon Nov 24, 2026
CODE-5303
developing-today-fleet commentedon Nov 24, 2026
Claimed by felix (worker felix) for slice S7 implementation, 2026-11-24. Branch felix/14373-pm-edge-bridge. This slice adopts #13502: its acceptance is this slice's acceptance; records will be coordinated on both issues. Design: doc/2026-11-24_design_message-bridge-buildout.md §4.8. S3 (#14368, PR #14407) is merged, so the PM stack gets its own scoped bridge credential (service:pm-stack) instead of relaying through the laptop fleet binary.
bridge: finish the S7 verification fixes (#14373)
developing-today-fleet commentedon Nov 24, 2026
Completion record (code half) — S7 implementation is landed as PR #14431, left unmerged for Felix's review.
What was built (two commits: c07e03b the slice, 6d8da8b the verification fixes): bridge-worker service credentials (owner direct mint,
addr service:<own name>, newreadscope opening the agents/message-log pipeline views to the holder only — enroll-minted agent credentials never carry it, and the shared fleet token does not open the views); console edge sends + agents/messages reads over theBRIDGEservice binding under the PM credential, with byte-for-byte the old hold-for-a-machine behaviour when the credential or binding is absent, and a plain console error (never a silent hold) when the credential is revoked; hosted-worker'sbridgecapability wired to the same binding and credential (send/agents/messages door, fail-closed 503 unconfigured, 502 naming a revoked credential).Verification, remote only: run 45415227230 caught 6 real failures across the three suites (bridge 82/83, console 598/602, hosted 208/209) — each fixed at its root in 6d8da8b. Run 45417551302 on head 6d8da8b: bridge worker 83/83, console bun 602 pass / 0 fail (23 files), hosted worker 209/209, with the new tests passing by name (service-credential mint/send-provenance/read-scope/revoke/hash-only; edge bridge send + fallback; hosted door + capability). No new dependencies (the one package.json change adds a test file to the hosted test script).
Acceptance status: the code-side criterion (console + hosted suites pass with the edge send path covered, capability resolves to the same binding) is met. The three live criteria — laptop-unreachable delivery verified in the bridge store,
service:pm-stackprovenance in the live pipeline, revocation stopping console sends at the edge — remain open and are listed step-by-step at the end of PR #14431 (deploy bridge worker → mint the PM credential into the vault asbridge.pm-stack-token→ deploy edge + uploadBRIDGE_TOKEN→ live check). This issue stays open on those.Merge pull request #14431 from developing-today/felix/14373-pm-edge-b…
dezren39 commentedon Nov 24, 2026
Workflow
pm-console-edge deployred on main: run 45425727853 (push, head83bffcc7= this issue's PR #14431 merge) — sole failed jobdeploy pm-console-edge(138557061163), step 'Type-check the console':src/worker.ts(101,15): error TS18048: 'env.BRIDGE' is possibly 'undefined'. Prior three runs of this workflow green; still broken at origin/main tip5c71a0de(no later commit touches the file). Root cause characterized in the task packet (optionalBRIDGEbinding + closure-narrowing loss; hoist to a local).Note: the 15:30Z watch note on #12521 deduped this run to task 23038 as a live fix, but a fresh broker read this pass shows 23038 is done (terminal), so per one-live-fix deduplication a fresh packet was enqueued here instead of on #12521. No duplicate issue filed.
Fix #14373: narrow env.BRIDGE before the closure in edge worker.ts
dezren39 commentedon Nov 24, 2026
Fixed on main by PR #14455 (merge commit of fix/pm-console-edge-bridge-narrowing). Post-merge run 45431451686 succeeded: type-check passed and deploy pm-console-edge is green.
dezren39 commentedon Nov 24, 2026
Main-CI recurrence (2026-11-24): pm-console-edge deploy run 45441275620 failed on
mainafter merge commit40b75e0153333a381eeaa0a6f6889366196cc87f(PR #14463 / S8). Failed job deploy pm-console-edge, stepType-check the console:test/console.test.ts(794,7)TS2769 (credentialsnot in{ state, scopes }) and(818,125)TS2322 (stringnot assignable tonull). This is separate from the earlier TS18048 already fixed by #14455. Reusing the existing live tracker/task 23551 and PR #14458 under the one-live-fix-per-workflow rule; task reactivated with this run context. No duplicate issue/task/session.dezren39 commentedon Nov 24, 2026
Main-CI recurrence (2026-11-24): run 45449902156 failed job
deploy pm-console-edge(job 138643778842) atType-check the console.npx tsc --noEmit -p ../tsconfig.jsonreports TS2769 at../test/direct.test.ts:389and../test/edge.test.ts:3922: fixture objects includekind, but the selected overload expects{ agent: string; state: string }. The test and deploy steps were skipped. Reusing this tracker under the one-live-fix-per-workflow rule; existing task 23551 is parked until 2026-11-24T17:56:48Z and PR #14458 remains open. No duplicate issue/task/session created.