Repository navigation
test: derive the board footer family from the Brain, not a literal - #107
Merged
Merged
Conversation
The footer-family test pinned the six-board family and went red once PyAutoBrain added the Eyes, Nerves and Gut boards (config/policy.yaml board: boards:). Derive the expectation from _theme.board_links, the same read the renderer makes, so the next organ birth cannot re-break it. Mirrors PyAutoHeart e365e47 and PyAutoHands 3a7a715. Refs PyAutoLabs/PyAutoMind#450 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
`tests/test_board.py::test_the_family_footer_carries_the_cortex_in_the_canonical_order` is red on main. It compared the rendered footer against a hard-coded `FAMILY_WITHOUT_MEMORY = ["brain", "mind", "cortex", "heart", "hands", "organism"]`, but the footer (correctly) renders from PyAutoBrain's `config/policy.yaml` `board: boards:`, which now lists `brain, mind, cortex, eyes, heart, hands, nerves, gut, organism`. The literal went stale when the Eyes, Nerves and Gut got boards.
The fix replaces the literal with `_family_without_memory()`, which reads `board.theme().board_links("", board.BOARD_KEY)` (the same read the renderer makes), and keeps two invariants: the Cortex is in the family, and this board's own key is not.
Precedent
The same stale literal was fixed on 09-28 under PyAutoMind#450 in PyAutoHeart (e365e47, PR #242) and PyAutoHands (3a7a715, PR #292). This PR applies the same pattern.
Test plan
🤖 Generated with Claude Code