fix(server): engine-attested Cloud MCP health; network probe becomes on-demand - #2834
Conversation
…on-demand Background health re-verified the engine's MCP over the server's own network stack on every check — a duplicate verifier that can disagree with the engine (field incident: corporate TLS). The engine is now the authority: by default health attests tools from the engine's mcp status (connected implies initial tools/list succeeded on opencode >=1.17) and never touches the network. The direct tools/list probe runs only when explicitly requested (GET health?probe=1) and on reconcile (an explicit repair action). /experimental/connect/state — consumed per prompt by the steering plugin — is pinned to probe:false.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
fraimz — ✅ PASSED1 passed · 0 failed · 0 skipped — run Full frame proof with validated screenshots: ✅ windows-enterprise-ca-rootcause — Windows packaged app uses OS trust and engine-attested Cloud MCP readinessInternal demo
|
fraimz — ✅ PASSED1 passed · 0 failed · 0 skipped — run Full frame proof with validated screenshots: ✅ windows-enterprise-ca-error-state — Windows enterprise CA error state: old build fabricates outage, fixed build trusts engine truthInternal demo
|
Summary
Root-cause fix #2 from the corporate-TLS field incident (follow-up to #2823). The architecture problem: background health re-verified what the engine already attested, over a different network stack — two verifiers, guaranteed eventual disagreement. This PR makes the engine the single authority for background health and demotes the network probe to an on-demand diagnostic.
readOpenworkCloudMcpHealthgainsprobe?: boolean(default false)toolsattested from engine status (connected⇒ initial tools/list succeeded, opencode ≥1.17 semantics);tools.direct.checked: falseGET …/health?probe=1→ full direct-probe verification (for the Advanced diagnostics Refresh / support)POST …/reconcilekeepsprobe: true(explicit repair wants full verification)/experimental/connect/state(per-prompt, feeds steering) pinned toprobe: false— cheap and engine-attestedValidation
pnpm --filter openwork-server exec bun test src/cloud-mcp-health.test.ts src/cloud-mcp-reconcile.e2e.test.ts— 27 pass / 0 fail (new: default path makes zero fetches to the cloud endpoint, tools attested, delivery applied; route-level default vs?probe=1; existing probe tests opt in viaprobe:true)pnpm --filter openwork-server test— 453 pass / 0 fail (one earlier run had 2 unrelated reload-watcher flakes that passed on rerun and reproduce on clean dev)pnpm --filter openwork-server typecheck— cleanNote: touches
cloud-mcp-health.tsalongside the parallel egress PR (different regions; whichever merges second takes a trivial rebase). App-side follow-up (optional): Advanced diagnostics Refresh can passprobe=1to keep its deep-verification behavior explicit.