Skip to content

fix(firewall): register the six PyAutoHands incident-citation surfaces #134

Description

@Jammy2211

The tenant-firewall (organ code) leg of python3 scripts/repos_sync.py --check exits 1, so the whole body-map drift gate is red. Every other leg passes.

Source prompt: draft/bug/autohands/the_organ_code_tenant_firewall_gate_is.md (Type: bug, Difficulty: medium, Autonomy: supervised).

High-level plan

  • Reproduce the red leg and enumerate every offending file/token pair.
  • For each, apply the rule the three prior firewall tasks settled: a fact the code could derive, or that is arbitrary, gets refactored out; a genuine branded fact gets its surface declared in FIREWALL_ALLOWLIST.
  • Declare the six PyAutoHands surfaces, whose tokens are all prose provenance citing a real incident.
  • Refactor the one finding that is arbitrary fixture filler rather than growing the allowlist for it.
  • Prove the gate is green and that the detector can still fail (an allowlist that is too broad also reads green).

Detailed plan

Findings (7, not the 6 the prompt names)

repos_sync.py --check reports:

PyAutoBrain/tests/test_health_conductor.py     'PyAutoFit' (177), 'PyAutoLens' (40)
PyAutoHands/autohands/check_search_memory.py   'PyAutoFit' (10),  'PyAutoLabs' (10)
PyAutoHands/autohands/env_config.py            'PyAutoFit' (41),  'PyAutoLabs' (41)
PyAutoHands/tests/test_check_search_memory.py  'PyAutoFit' (38),  'autogalaxy_workspace' (25)
PyAutoHands/tests/test_env_config.py           'PyAutoFit' (88),  'PyAutoLabs' (88)
PyAutoHands/tests/test_python_matrix_workflow.py  'PyAutoFit' (55)
PyAutoHands/tests/test_repro_command.py        'PyAutoFit' (147), 'PyAutoLabs' (147)

The seventh (test_health_conductor.py) is not in the prompt — it landed with the health-conductor STALE fix (PyAutoBrain#198/#201) after the prompt was written. Green is unreachable without it.

Judgment: allowlist the six (PyAutoHands)

All twelve tokens are prose provenance in comments and docstrings — citations of PyAutoLabs/PyAutoFit#1452 (the 2026-07-30 unbatched multi-start OOM that took down two nightly release-integrate runs) and PyAutoFit#1439, plus the autogalaxy_workspace interferometer script the OOM came from. No code path is keyed on a repo name, so there is nothing to parameterise; an issue number cannot be derived, and deleting the citations would destroy provenance for an incident that cost two nights to diagnose.

This is the register the intentional surface case of #114 ("without changing organ source or detector semantics"), not the the code could derive it case of PyAutoBrain#193. No PyAutoHands file changes — the facts were already intentional; only the declaration was missing.

check_search_memory.py:136 is the one token that is not a comment: it is in the printed failure message a workspace developer sees. Kept deliberately (human decision) — the issue pointer is the most useful part of that message.

Judgment: refactor the seventh (PyAutoBrain)

In test_health_conductor.py the names are the repo half of stubbed "<repo>: <problem>" Heart reason strings. No assertion reads them — the conductor classifies by verdict and reason text, not by reporter; the only reason-touching assertions are self-referential (sorted(reasons) == sorted(STALE_ONLY["stale_reasons"])) or counts. Pure filler, so replaced with library-a / library-b plus a comment fixing the convention. No allowlist growth. Same judgment as the checkout_a/b/c fixture rename in PyAutoBrain#193.

Considered and rejected

Teaching the checker to ignore comments would fix all seven at a stroke, but it would silently un-guard facts sitting in comments beside code, weaken the one genuine output-string case, and change detector semantics organism-wide — well beyond a bug prompt scoped to PyAutoHands. #114 cleared this same class explicitly without touching the detector.

Files

  • PyAutoMind/scripts/repos_sync.py — six FIREWALL_ALLOWLIST entries, in alphabetical position.
  • PyAutoBrain/tests/test_health_conductor.py — neutral placeholders + convention comment.

Verification

  • repos_sync.py --check → all ten legs OK (was: tenant firewall 7 mismatches), exit 0.
  • Heart's own producer heart/checks/manifest_drift.run() with PYAUTO_ROOT=/home/userproblem_count: 0.
  • pytest PyAutoBrain/tests/222 passed, 0 failed.
  • Negative probes (an over-broad allowlist also reads green, so green alone proves nothing):
    • a new token appended to the now-listed env_config.pynew instance fact(s) in allowlisted file — 'autolens_workspace', exit 1. ✅
    • a real repo name put back into the unlisted Brain fixture → new instance fact(s) in unlisted file — 'PyAutoLens', exit 1. ✅
    • both reverted → green again, exit 0. ✅

Branch: claude/autohands-firewall-allowlist-1dzeuw (PyAutoMind + PyAutoBrain).

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