fix(core): Location liveness check stats the server fs for workspace Locations
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend
Research direction
Start with the existence check in packages/core/src/location-services.ts and location-service-map.ts, then trace how workspaceID is handled for a Location. Confirm that workspace-backed Locations do not depend on the server filesystem while local Location eviction remains unchanged. Use the issue’s acceptance criteria to verify that a workspace directory absent on the host can still build and remain alive.
Written by the indexing model from the issue text.
Description
What
`LocationServiceMap` keeps a Location alive based on a process-local `existsSync(ref.directory)` (see `packages/core/src/location-services.ts` / `location-service-map.ts` existence check). For a workspace-backed Location whose directory only exists inside the sandbox (e.g. `/workspace` in a Modal image, DO-hosted sessions), this check consults the wrong filesystem: the Location can be evicted or never admitted even though the placement is healthy.
Fix direction
Skip the local existence check when `location.workspaceID` is set. Workspace liveness is owned by the workspace row plus the provider binding; a cheap substitute is "workspace row exists", which is already a point read. Do not probe the sandbox for liveness — that would provision lazily-idle workspaces.
Acceptance
- A workspace Location whose directory does not exist on the server host builds and survives.
- Local Location eviction behavior unchanged.
Found while auditing boot-cycle process-vs-workspace resolution after #44526. Mechanical fix; no design dependency.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- Avg merge
- 7h 20m
- Merged PRs (30d)
- 358
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from anomalyco/opencode
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
[FEATURE]: Bump gitlab-ai-provider to 6.15.1 on v2 (Fable 5.1, GPT-6 Astra, workflow reconnect fix) Open
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
All issues in anomalyco/opencode
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#610 ·
-
bug clawsweeper:linked-pr-open clawsweeper:needs-live-repro clawsweeper:no-new-fix-pr impact:message-loss issue-rating: 🐚 platinum hermit P2 regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
danielmiessler/LifeOS#2218 ·