Skip to content

fix: derive board footer family from Brain — Heart/Hands tests stale after Nerves+Gut #450

Closed

Description

@Jammy2211

Overview

PyAutoHeart tests/test_dashboard.py::test_the_family_footer_carries_the_cortex_in_the_canonical_order and the equivalent PyAutoHands tests/test_board.py footer test fail on both mains: PyAutoBrain main added Nerves and Gut to the board family (config/policy.yaml board: boards:), so the rendered footer is brain, mind, cortex, memory, <hands|heart>, nerves, gut, organism while the tests pin the old six-entry literal. This keeps Heart main CI red and shows as pre-existing red on PyAutoHeart#240/#241 and PyAutoHands#291.

Plan

  • Replace the hard-coded FAMILY_WITHOUT_HEART / FAMILY_WITHOUT_HANDS literals with an expectation derived from PyAutoBrain's source of truth — _theme.board_links (which reads config/policy.yaml board: boards:), through the same theme() resolver the dashboards already use.
  • Keep the test's intent: the footer carries every sibling board in the policy's canonical order, the Cortex is present, and the page omits its own organ.
  • Run the full Heart and Hands suites outside the bundle env (0 failed), and run the footer tests against the PyAutoBrain#427 branch (Eyes organ order) to show the next organ birth cannot re-break them.
  • Ship Heart then Hands as pending-release PRs.
Detailed implementation plan

Affected Repositories

  • PyAutoHeart (primary)
  • PyAutoHands

Branch Survey

Repository Current Branch Dirty?
./organs/PyAutoHeart main clean
./organs/PyAutoHands main clean

Both repos are claimed by eyes-organ-order (#439) and PyAutoHeart by autolens-visualization-rebirth (#446): parallel claim human-approved 2026-09-28 — this task touches only the footer tests (Heart tests/test_dashboard.py, Hands tests/test_board.py); #439 touches organ-order lists in config/docs; #446 touches Heart config/repos.yaml excluded list.

Suggested branch: feature/board-footer-family-fix

Implementation Steps

  1. PyAutoHeart/tests/test_dashboard.py: drop FAMILY_WITHOUT_HEART; compute the expected family as list(dashboard.theme().board_links("", dashboard.BOARD_KEY)) (the policy's board: boards: order, self removed); assert the footer's data-organ list equals it, cortex is in it and heart is not.
  2. PyAutoHands/tests/test_board.py: same for FAMILY_WITHOUT_HANDS via board.theme() / board.BOARD_KEY.
  3. Leave dashboard sources and the legacy BOARD_FAMILY fallback tuple untouched (their fallback tests already derive from the tuple).
  4. Verify: full suites with env -u PYAUTO_ROOT -u PYAUTO_MIND -u PYAUTO_BRAIN -u PYAUTO_HEART -u PYAUTO_HANDS, OMP_NUM_THREADS=8; footer tests once with PYAUTO_BRAIN pointing at the PyAutoBrain#427 worktree.

Key Files

  • PyAutoHeart/tests/test_dashboard.py — footer family test (~line 1074)
  • PyAutoHands/tests/test_board.py — footer family test (~line 144)
  • PyAutoBrain/board/_theme.py — board_links, boards_footer (read-only source of truth)
  • PyAutoBrain/config/policy.yaml — board: boards: list

Original Prompt

Click to expand starting prompt

Heart and Hands board-footer tests expect the old six-organ family after Nerves and Gut joined

Type: bug
Target: PyAutoHeart
Repos:

  • PyAutoHeart
  • PyAutoHands
    Difficulty: small
    Autonomy: safe
    Priority: high
    Lane: local-dev
    Status: formalised
    Consequence: notify
    Witness: In both PyAutoHeart and PyAutoHands, pytest tests/test_dashboard.py -k footer is green, and the expected family list is derived from PyAutoBrain (_theme.py ORGANS / the policy board list), not a hard-coded literal.
    Review-minutes: 0
    Unattended: ready

Why

Verified 2026-09-28 by two independent runs. tests/test_dashboard.py::test_the_family_footer_carries_the_cortex_in_the_canonical_order
fails on PyAutoHeart main (a95ebc9; Heart main CI is red), and the equivalent footer test fails on
PyAutoHands main (reproduced on a detached origin/main worktree).

Cause: PyAutoBrain main added Nerves and Gut to the board family (PyAutoNerves#172, PyAutoGut#9), so
the rendered footer's data-organ attributes are now
brain, mind, cortex, memory, hands, nerves, gut, organism, while both tests still expect the old
six-entry FAMILY_WITHOUT_HEART list. The Heart assertion (tests/test_dashboard.py:1088):

assert re.findall(r'data-organ="(\w+)"', footer) == FAMILY_WITHOUT_HEART

fails with "At index 5 diff: 'nerves' != 'organism'; Left contains 2 more items".

Consequence today: PyAutoHeart#240, PyAutoHeart#241 and PyAutoHands#291 CI show this pre-existing red,
and Heart's main CI is red — two organ mains red.

What

  • Update the expected family list in the Heart and Hands footer tests to the canonical organ order:
    Brain, Mind, Cortex, Memory, Eyes, Heart, Hands, Nerves, Gut (PyAutoMind#439 lands Eyes after
    Memory), with the repo's own organ omitted from its own footer (Heart omits Heart; Hands omits Hands).
  • Preferably derive the expectation from PyAutoBrain's _theme.py ORGANS / the policy board list
    instead of a literal, so the next organ birth cannot re-break these tests.

Claims

PyAutoHeart and PyAutoHands are currently claimed by #439 (eyes-organ-order) and #446 — a
parallel claim is needed to work this fix alongside them (or fold it into #439, which already
touches the organ order).

Activity

  1. added a commit that references this issue on Sep 28, 2026
  2. Jammy2211 commented on Sep 28, 2026

    @Jammy2211
    CollaboratorAuthor

    Parallel claim (human-approved 2026-09-28): PyAutoHeart and PyAutoHands are also claimed by eyes-organ-order (#439), and PyAutoHeart by autolens-visualization-rebirth (#446). No file overlap — this task touches only the Heart tests/test_dashboard.py and Hands tests/test_board.py footer-family tests.

  3. Jammy2211 commented on Sep 28, 2026

    @Jammy2211
    CollaboratorAuthor

    Library PRs created

    Footer-family expectation now derived from _theme.board_links (PyAutoBrain config/policy.yaml board: boards:), self omitted; cortex-present and self-absent asserted. Full suites outside the bundle env: Heart 1063 passed, Hands 472 passed. Footer tests 3/3 each against the PyAutoBrain#427 branch and against a scratch policy with an eyes board after memory.

    API changes: none (test files only) → no workspace impact. Heart YELLOW within the human-acknowledged set. Merge is human (Heart then Hands, any order); then /prm.

  4. Jammy2211 commented on Sep 28, 2026

    @Jammy2211
    CollaboratorAuthor

    Shipped

    The Heart and Hands footer-family tests now derive their expected family from PyAutoBrain (_theme.board_links, i.e. config/policy.yaml board: boards:), with each board omitting itself and the Cortex still asserted present, so the next organ birth cannot re-break them. This clears the pre-existing footer red on Heart main, PyAutoHeart#240/#241 and PyAutoHands#291.

    Test files only — no API change, no workspace impact. Both libraries remain pending release (organ repos; the obligation is carried into the completion record).

    Closed out by /prm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions