Repository navigation
fix: cortex find_script walks ancestors without resolving symlinks - #475
Merged
Merged
Conversation
) find_script walked root.resolve().parents, so a tree reached through a symlinked PyAutoCortex (bundle worktrees link it to the canonical checkout) returned the script under the resolved path, not the path the caller named. Walk root.absolute().parents instead; load_cortex still keys its module on script.resolve(). Restores test_a_fixture_tree_finds_the_schema_its_checkout_ships (dropped in the d04e3a0 rewrite) verbatim, and adds a tmp_path symlink regression test; both were red before the fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #471
find_scriptwalkedroot.resolve().parents, so from a task worktree with a symlinked PyAutoCortex it returned the canonical checkout's script. Now walksroot.absolute().parents, matching the conductor's keep-caller-paths convention. Restores the deletedtest_a_fixture_tree_finds_the_schema_its_checkout_shipsverbatim and adds a tmp_path symlink regression test.Tests: cortex tests 49 passed from the worktree root and the repo dir; full Brain suite 1197 passed. Each new test was red on the unfixed code first.
Heart: readiness STALE (release validation stale: source moved since rehearsal — PyAutoNerves); human-acknowledged 2026-10-05. Tier
notify— auto-merge on green per the approved plan; PyAutoBrain has no PR test CI, so the gate is the local full suite above.Part of bundle
pyautobrain-worktree-guards(one issue + one PR per member). No workspace impact (Brain tooling only).🤖 Generated with Claude Code