fix(client): distinguish location sync failures - #45601
Open
opencode-agent[bot] wants to merge 1 commit into
Open
fix(client): distinguish location sync failures#45601opencode-agent[bot] wants to merge 1 commit into
opencode-agent[bot] wants to merge 1 commit into
Conversation
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.
Summary
location.sync()loads location info and then hydrates multiple independent resources. Previously, any rejected request could make the TUI replace the prompt with “Session location unavailable,” even when the directory existed and its info had loaded successfully.LocationSyncErrorwith the requested location, failed resource, originalcause, and a classification that distinguishes directory, transport, lookup, and resource failures. Successful reads remain cached; failed reads remain retryable.LocationDirectoryErroronly after checking the requested placement's filesystem. Check before booting location services so initialization failures are not mistaken for missing directories. Follow directory symlinks and keep authorization intact.This covers the false-positive warning path discussed in #45592 and overlaps with the narrower mitigation in #45148. The reporter's exact trigger remains unconfirmed.
Validation
bun test test/solid-location.test.ts test/solid-data.test.ts— 25 passed.bun test test/location.test.ts test/fetch.test.ts test/handler-policy.test.ts test/config.test.ts test/workerd.test.ts --timeout 30000— 17 passed.bun test test/cli/tui/data.test.tsx test/context/session-tabs.test.tsx test/component/session-tabs-status.test.tsx test/cli/tui/composer-keymap.test.tsx --timeout 30000— 88 passed.GOMAXPROCS=4 bun typecheckpassed in client, protocol, server, and TUI.bun run generatecompleted in client;git diff --checkpassed.Regression coverage includes every resource in the combined sync, original-cause retention, retry/cache behavior, transport and server failures, real rendered TUI Retry clicks, directory recovery after reconnect, absent/restored/deleted directories, files, symlinks, initialization failures, authorization, and placement-specific filesystem errors. Workspace filesystem tests use an in-memory
Workspace.connectadapter; real remote provisioning and bare-location workerd behavior were not exercised by those tests.Requested by: @jlongster (James via Slack)