Skip to content

fix(server): check project directory on location boot - #51287

Open
opencode-agent[bot] wants to merge 2 commits into
folder-access-basefrom
location-boot-check
Open

opencode-agent[bot] wants to merge 2 commits into
folder-access-basefrom
location-boot-check

Conversation

@opencode-agent

@opencode-agent opencode-agent Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Stacked review of #51171

This PR is based on an exact mirror of OpeOginni:folder-access-errors at eb15a9b so the Changes tab shows only the follow-up. GitHub App permissions do not allow us to create a PR against the contributor’s fork directly. This base branch is for review only; merging this PR into the mirror will not update #51171 or v2. After review, the commits can be cherry-picked onto the contributor branch or the final fix.

  • Move the directory check into the per-location graph build, so it runs on boot/reload rather than every HTTP request.
  • Keep failed boots retryable and return the existing typed 400/403 errors at the HTTP boundary. Skip the local check for workspace-backed locations.
  • Remove the directoryCheck option at Brendan’s request for review. The probe now runs whenever the map has FSUtil and the location is bare.
  • Add regression coverage for repeated requests and reload.

Review caveat: FSUtil is also present in workerd (for temporary filesystem use) and simulation. This change removes their explicit opt-outs, so a bare location in either environment now attempts a host realPath probe. Existing workerd coverage only tests /api/info, not location boot. Do not treat the passing tests as proof that those environments support this behavior; resolve this concern before merging into a runtime branch.

Verification: server tests (17 passed), core location/node-build tests (30 passed), scoped typechecks for core/server/client/protocol (4 passed), and oxlint (0 errors). Full bun run check is blocked by this host’s Node 18: Astro requires Node >=22.12 for @opencode/www.

Requested by: @Brendonovich (Brendan via Slack)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant