Skip to content

fix: cortex find_script walks ancestors without resolving symlinks - #475

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/cortex-find-script-symlink
Oct 6, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/cortex-find-script-symlink

Conversation

@Jammy2211

Copy link
Copy Markdown
Contributor

Closes #471

find_script walked root.resolve().parents, so from a task worktree with a symlinked PyAutoCortex it returned the canonical checkout's script. Now walks root.absolute().parents, matching the conductor's keep-caller-paths convention. Restores the deleted test_a_fixture_tree_finds_the_schema_its_checkout_ships verbatim 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

)

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>
@Jammy2211
Jammy2211 merged commit d08edc8 into main Oct 6, 2026
4 of 6 checks passed
@Jammy2211
Jammy2211 deleted the feature/cortex-find-script-symlink branch October 6, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: cortex find_script walks ancestors without resolving symlinks

1 participant