Skip the local existence check for a remote project's tied root - #266
Open
shenghsi wants to merge 1 commit into
Open
Skip the local existence check for a remote project's tied root#266shenghsi wants to merge 1 commit into
shenghsi wants to merge 1 commit into
Conversation
historical_thread_belongs_to_panel (landed in v0.11.3) started requiring a tie override's target directory to exist before trusting it, so a session tied to a worktree that was later deleted falls back to its natural root instead of disappearing. Path::exists only ever inspects this process's own filesystem, though, and for a remote project the tied root lives on the remote host -- so the check always reported a perfectly valid remote tie as "gone", silently breaking every retie for remote-project users. Skip the check for remote projects, restoring the pre-v0.11.3 behavior there. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R1w3ZFFG8tjN3aRWALbxm8
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
historical_thread_belongs_to_panel(landed in v0.11.3, PR Fix two ways a historical Agent Thread session can go missing #264) started requiring a tie override's target directory to exist before trusting it, so a session tied to a worktree later deleted falls back to its natural root instead of disappearing from every panel.Path::existsonly ever inspects the calling process's own filesystem. For a remote (SSH) project, the tied root is a path on the remote host, not this machine, so the check always reported a perfectly valid remote tie as "gone" -- silently discarding every retie for remote-project users, a regressionv0.11.3shipped.v0.11.3(unconditional-trust) behavior there. Local projects keep the new existence check.Test plan
cargo test -p agent_threads --lib(295 passed)historical_thread_belongs_to_panel_trusts_a_remote_tie_it_cannot_locally_stat, which reties a thread to a path that cannot exist locally and asserts a remote-project lookup still trusts it./script/clippy -p agent_threadscargo fmt --all -- --checkRelease Notes: