anomalyco / anomalyco/opencode

fix(core): FileSystem boot realPath probes the server fs for workspace Locations

Open
#44,561 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

What

The Location `FileSystem` service resolves `location.directory` with a process-local `realPath` during Location boot (`packages/core/src/filesystem.ts:66`). For a workspace-backed Location whose directory exists only inside the sandbox, boot fails or resolves against the wrong host, so the Location cannot fully construct on a server without a matching local directory.

Fix direction

For `location.workspaceID` placements, skip host realpath canonicalization (treat the configured directory as canonical) or defer canonicalization to first execution-plane use via `Environment.files`. Must not trigger provisioning at boot.

Acceptance

  • A workspace Location whose directory does not exist on the server host constructs its full service graph.
  • Local symlink canonicalization behavior unchanged.

Found during #44554 (see PR #44560, which fixed liveness eviction only). Part of the boot-cycle process-vs-workspace audit alongside #44552, #44553, #44555.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in packages/core/src/filesystem.ts at line 66 and trace how FileSystem resolves location.directory during Location boot. Compare workspaceID placements with local locations, then verify that a workspace directory absent from the server host can construct its full service graph without provisioning at boot while local symlink canonicalization remains unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.