feat(repos_sync): check the hygiene conductor's repo coverage - #132
Merged
Conversation
Advance the prompt draft/bug/pyautobrain/ → active/ and register the task in active.md. Issue PyAutoBrain#197 filed via the GitHub MCP surface (no gh CLI in this cloud session). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SzmzZidPBRqQZjEEw1d6ET
The tenant firewall could not catch the hygiene conductor's repo-array drift,
because its entry for hygiene.sh ALLOWLISTED the stale names — it asked "are
these names permitted here?" when the question was "does this cover the
organism?". So the arrays drifted to five libraries of six and four organs of
seven with every check green.
check_hygiene_coverage asks the second question, in two legs because either
alone is escapable:
A. every reader the conductor might use returns exactly the declared sets.
Note what this can and cannot prove: the conductor reads repos.yaml, so a
manifest edit moves both sides together and they can never desynchronise —
that is the point of deriving. What leg A actually guards is the READER,
specifically the PyYAML-free fallback used only where PyYAML is absent and
verified nowhere else. A fallback that quietly drops a repo is exactly the
original bug's class, so both readers run and both must agree.
B. no repo name is written back into a *_REPOS=(...) array — what stops a
future edit from "simplifying" the derivation away.
Both legs were driven with failing input before being trusted: leg B on a
re-hardcoded array, leg A on a deliberately narrowed fallback regex, which it
caught as four repos dropped by the minimal reader alone.
The hygiene.sh firewall allowlist entry is REMOVED rather than updated: the
conductor now names no instance fact, so re-adding an entry would re-permit the
drift this check exists to catch.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SzmzZidPBRqQZjEEw1d6ET
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SzmzZidPBRqQZjEEw1d6ET
This was referenced Aug 5, 2026
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.
The Mind half of PyAutoLabs/PyAutoBrain#197 — paired with PyAutoLabs/PyAutoBrain#200, which repairs the conductor itself. Safe to merge in either order: the check skips cleanly when PyAutoBrain is not checked out.
Why the firewall could not catch this
The hygiene conductor's repo arrays drifted to five libraries of six and four organs of seven, with every drift check green. The tenant firewall had an entry for
hygiene.sh— but it allowlisted the stale names. It asked "are these names permitted here?" when the question was "does this cover the organism?".check_hygiene_coverageasks the second question, in two legs because either alone is escapable:Leg A — every reader the conductor might use returns exactly the declared sets.
Worth being precise about what this can and cannot prove: the conductor reads
repos.yaml, so a manifest edit moves both sides together and they can never desynchronise — that is the whole point of deriving. What leg A actually guards is the reader, specifically the PyYAML-free fallback, which runs only where PyYAML is absent and is verified nowhere else. A fallback that quietly drops a repo is exactly the original bug's class, so both readers run and both must agree. A--parserflag was added to the helper for this.Leg B — no repo name is written back into a
*_REPOS=(…)array. This is what stops a future edit from "simplifying" the derivation away.Both legs were driven with failing input before being trusted
A drift check that cannot fail is decoration.
PyAutoFit, PyAutoLens.The allowlist entry is removed, not updated
The conductor now names no instance fact at all (verified by running the token scan over both its files), so re-adding an entry would re-permit the drift this check exists to catch. A comment in its place says so.
Testing
privacyjob pins), plus 3.11 — 9 new.repos_sync.py --checkgains exactly one line and nothing else: diffed against a stashed baseline to prove the 6 tenant-firewall mismatches it still reports are pre-existing PyAutoHands drift, not introduced here.lifecycle.py check: OK.tests/**is KEEP-copied verbatim into the public template, and a test that hardcodes the list under test can only agree with itself.Generated by Claude Code