Skip to content

fix(core): skip missing locations during reload - #54878

Closed
Dante-dan wants to merge 1 commit into
anomalyco:devfrom
Dante-dan:fix/54827-reload-missing-location
Closed

Dante-dan wants to merge 1 commit into
anomalyco:devfrom
Dante-dan:fix/54827-reload-missing-location

Conversation

@Dante-dan

@Dante-dan Dante-dan commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

Addresses the reload failure in #54827. Inventory reconciliation is separate; the existing worktree refresh API already prunes missing directories.

Type of change

  • Bug fix

What does this PR do?

Skip a deleted location when reload encounters FileSystem.DirectoryNotFoundError, logging a warning so the remaining locations can reload. Other boot failures still fail the request.

How did you verify your code works?

Changed-file oxlint and git diff --check passed. Existing core missing-directory recovery test (1) and worktree refresh/pruning tests (3) passed. The broader location suite hit local 5s timeouts; core typecheck was stopped after no output. bun run check failed because Node 22 could not load the repository's TypeScript oxlint plugin. End-to-end reload reproduction has not completed locally.

Screenshots / recordings

No UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #54827

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I reproduced the failure on the base with a small test: load two locations, delete one directory, call LocationServiceMap.reload(). Reload fails with FileSystem.DirectoryNotFoundError. With this change it succeeds, the other location stays loaded, the deleted one isn't left in the map, and recreating that directory and loading it again works. location-layer.test.ts and the core typecheck pass.

Public API unchanged: the reload route and CLI just stop failing when a location's directory is gone.

No blocking concerns. Pruning the stale worktree rows asked for in #54827 is still separate, as you noted.

Related: #54827

@github-actions

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

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