Repository navigation
fix: Brain tests not hermetic against a task worktree's activate.sh - #678
Merged
Merged
Conversation
…metic A task worktree's activate.sh exports PYAUTO_ROOT/BRAIN/MIND/HEART/HANDS/TASK and resolvers honour them as hard overrides, so the suite failed locally (test_grouped_organ_consumers) while CI, which sets none, stayed green. An autouse fixture now starts every test from CI's environment. Closes #677 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.
Summary
A task worktree's
activate.sh(written bybin/worktree.sh) exportsPYAUTO_TASK,PYAUTO_ROOT,PYAUTO_BRAIN,PYAUTO_MIND,PYAUTO_HEARTandPYAUTO_HANDS. Resolvers honour these as hard overrides; for example,_hygiene_repos.candidate_map_pathsdoes forPYAUTO_MIND. Sotest_grouped_organ_consumers::test_hygiene_map_and_heart_board_find_grouped_checkoutsfailed locally after/start_library's activation step, while CI, which sets none of them, stayed green. The #676 ship neededenv -u PYAUTO_MINDto get past it.A new autouse fixture in
tests/conftest.pyclears those variables, so every test starts from CI's environment. A test that needs one still sets it itself.Closes #677
API Changes
None — test-suite isolation only.
See full details below.
Full API Changes (for automation & release notes)
Added
tests/conftest.py::_no_task_worktree_paths— autouse fixture (tests only).Migration
Test Plan
activate.shsourced: 2370 passed, 1 skipped (previously 1 failed).Readiness
Heart dev-ship gate (PyAutoBrain): GREEN.
Merge mode: auto-merge on green (declared
Consequence: notify).🤖 Generated with Claude Code