Repository navigation
fix(kanban): resolve linked worktree anchors by branch - #70585
Closed
roycepersonalassistant wants to merge 2 commits into
Closed
roycepersonalassistant wants to merge 2 commits into
roycepersonalassistant wants to merge 2 commits into
Conversation
Collaborator
|
Thanks for the focused worktree-isolation fix. The premise is confirmed on current main: Problems
Suggested changes
Automated hermes-sweeper review. |
This was referenced Aug 6, 2026
Author
|
Superseded by #81821, rebuilt from current upstream main with the requested linked-anchor documentation and passing focused tests. |
This was referenced Aug 19, 2026
13 of 14 tasks
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.
What does this PR do?
Fixes Kanban worktree resolution when an explicit repo-root anchor is itself a linked checkout. A linked root on a different branch now materializes
<linked-root>/.worktrees/<task-id>on the requested task branch instead of silently reusing the anchor checkout.The resolver preserves current sibling-isolation behavior by comparing Git common-directory identity: a foreign checkout owned by the surrounding repo still falls back to that repo’s canonical per-task worktree, while a standalone linked checkout is treated as the exact requested anchor. Existing targets are also validated against the requested branch before reuse.
Related Issue
N/A — regression found in a local Kanban worktree workflow.
Type of Change
Changes Made
hermes_cli/kanban_db.pyto distinguish standalone linked-root anchors from linked targets owned by a surrounding checkout.tests/hermes_cli/test_kanban_worktree_isolation.pywith linked-root anchor, stale-target mismatch, same-branch reuse, sibling fallback, and canonical mismatch coverage.How to Test
scripts/run_tests.sh tests/hermes_cli/test_kanban_worktree_isolation.py -q— 7 passed.scripts/run_tests.sh tests/hermes_cli/test_kanban*.py tests/tools/test_kanban_tools.py -q -k "not dashboard_direct_status_change and not connect_falls_back_to_delete_on_locking_protocol and not wal_checkpoint_truncates_wal_file"— 881 passed..venv/bin/ruff check hermes_cli/kanban_db.py tests/hermes_cli/test_kanban_worktree_isolation.pyandgit diff --check— clean.Broader-suite exclusions are environment/baseline-only: two dashboard tests require FastAPI unavailable in this dev venv; the WAL checkpoint test cannot create a WAL because bundled SQLite 3.50.4 is intentionally forced to DELETE journal mode; the clean-main logging-order test fails in the full file on current
origin/mainbut passes in isolation. None touches worktree resolution.Compatibility / Risk
<repo>/.worktrees/<task-id>is preserved.5006e4545.Checklist
Code
Documentation & Housekeeping
Merge/install intentionally not performed.