Repository navigation
fix(server): enforce workspace scope on opencode proxy - #4189
Merged
Merged
Conversation
Deletes server surface with zero production callers, verified by repo-wide caller sweeps: - blueprint session seeding (+ direct opencode-DB writes) — the UI caller was removed earlier; drops the better-sqlite3 native dep - workspace import preview/apply routes — desktop imports archives via workspace-archive.mjs; the renderer client methods were never called - POST /workspace/:id/extensions/export — no callers - legacy /experimental/google-workspace/* routes — superseded by /experimental/extensions/call (gating test now probes that path) - one-time legacy config migrations: /runtime-config/migrate route + helpers, the legacy-config-sweep boot sweep, and the Settings > Advanced migrate action (config source inspection stays) - file-session read-batch/write-batch/renew/catalog-events routes — no callers anywhere (den-gateway test hits a mock upstream, still green) Kept intact: OpenWork Connect MCP (managed MCP, connect state and catalogs, cloud MCP health) and cloud provider injection / managed provider auth. openwork-server suite: 751 pass / 8 skip / 1 fail / 1 error — the same single pre-existing env failure as clean origin/dev (bun 1.3.5 lacks node:sqlite for workspace-kv-store.node.test.ts); zero new failures. Server and app typechecks pass.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This was referenced Aug 28, 2026
…m hold vs scoped search)
Contributor
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (850d48b72772259b184c3163a56764db100713cc). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack
Stacked on #4188. Review only commit
6ac38cbb/ the diff againstthin/server-phase1.Why
Before migrating trusted consumers from OpenWork session wrappers to the native opencode SDK/proxy, the workspace-mounted proxy must guarantee that callers cannot override its directory scope. Previously,
/workspace/:id/opencode/*preserved a caller-suppliedx-opencode-directoryheader anddirectoryquery parameter.What changed
scopeWorkspaceOpencodeRequestboundary.directoryquery values and overwrite them with the resolved workspace directory.x-opencode-directory(case-insensitive viaHeaders).This intentionally does not change unmounted global
/opencode/*behavior.Verification
pnpm --filter openwork-server typecheck— passpnpm --filter openwork-server build— passpnpm --filter @openwork/app typecheck— passpnpm install --frozen-lockfile --prefer-offline— passnode:sqlitelimitation already baseline-verified in refactor(server): remove ~4k LOC of dead legacy surface from openwork-server #4188; the second was the unrelated extension-preview 5s timeout, which passed 17/17 on immediate isolated rerun.Security assertions added
directoryquery values are replaced with exactly one workspace value