Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
refactor: remove unreachable OpenCode enforcement fallback in buildVendorSpawnConfig
[._.]/ Adam Eivyd1c0bf99a39b
diff --git a/server/lib/providerVendors.js b/server/lib/providerVendors.jsindex 133a6a9034..bfaa4a284b 100644--- a/server/lib/providerVendors.js+++ b/server/lib/providerVendors.js@@ -454,8 +454,10 @@ const OPENCODE = {matchProvider: isLocalOpencodeProvider,},[PUBLIC_REVIEW_ACTIONS_POSTURE]: {- // Attachable on every backend (MTPLX and gateways included): unlike the- // no-tool gate there is no model-capability probe involved.+ // No `spawnArgs` here — see the builder's docstring above: OpenCode+ // ships no sandbox, so this row is never an enforcement and the+ // attachable builder below is unreachable through the posture gate+ // (`enforcesPublicReviewPosture` requires `spawnArgs`).tuiSpawnArgs: opencodePublicReviewActionsTuiSpawnArgs,matchProvider: matchOpencodeBinary,},@@ -903,12 +905,7 @@ export function buildVendorSpawnConfig(provider, ctx) {}return recipe.tuiSpawnArgs(provider, ctx);}- if (recipe?.spawnArgs) return recipe.spawnArgs(provider, ctx);- // See supportsPublicReviewPosture for why the actions stage may fall- // through to the vendor's ordinary headless recipe and the gate may not.- if (!supportsPublicReviewPosture(provider, posture)) {- throw new Error(`Provider '${providerLabel(provider)}' has no enforced ${posture} public-review posture`);- }+ return recipe.spawnArgs(provider, ctx);}const vendor = PROVIDER_VENDORS.find((v) => v.spawnArgs && matchesProvider(v, provider));return vendor.spawnArgs(provider, ctx);diff --git a/server/lib/providerVendors.publicReview.test.js b/server/lib/providerVendors.publicReview.test.jsindex 46800ae258..2814b471b5 100644--- a/server/lib/providerVendors.publicReview.test.js+++ b/server/lib/providerVendors.publicReview.test.js@@ -361,9 +361,10 @@ describe('public-review provider postures', () => {// …as do non-binary records, whatever their vendor.expect(supportsTuiPublicReviewActionsProvider({ id: 'claude-api', type: 'api', command: 'claude' })).toBe(false);expect(supportsTuiPublicReviewActionsProvider({ id: 'opencode-api', type: 'api', command: 'opencode' })).toBe(false);- // #6238 — OpenCode is attachable on EVERY backend: unlike the no-tool gate- // (Ollama-only — see the `mtplxBacked` cases above) there is no- // model-capability probe involved, so an MTPLX or gateway wrapper qualifies.+ // #6238's attachable OpenCode recipe was later withdrawn from the+ // sandboxed-actions posture entirely (see "rejects both headless and+ // attachable OpenCode actions without OS isolation" below) — an MTPLX or+ // gateway wrapper is no more eligible than any other OpenCode backend.expect(supportsTuiPublicReviewActionsProvider({ id: 'opencode-tui', type: 'tui', command: 'opencode', mtplxBacked: true })).toBe(false);expect(supportsTuiPublicReviewActionsProvider({ id: 'opencode-cli', type: 'cli', command: 'opencode' })).toBe(false);expect(supportsTuiPublicReviewPosture({ id: 'opencode-tui', type: 'tui', command: 'opencode', ollamaBacked: true }, PUBLIC_REVIEW_NO_TOOL_POSTURE)).toBe(false);