Repository navigation
fix: witness map missed 5 tested repos and split 2 more across keys - #271
Merged
Merged
Conversation
Follow-up to #267/#268, which fixed the PyAutoNerves half of the Refactor Agent's witness map. This is the audit that prompt asked for: Nerves was not a one-off. `test_witness` had no row for PyAutoCTI or for five organs that all have real suites, so `behaviour_preservation` reported them `unwitnessed` and the conductor advised "strengthen tests first" for repos that are already tested. Two more repos carried the same two-keys-per-repo defect #268 fixed for Nerves: `@PyAutoCTI`/`@autocti` and `@PyAutoReduce`/`@autoreduce` normalised to different keys with no alias joining them, and the Reduce row was keyed on the prefixed spelling — so the bare package spelling, the one prompts actually use, missed the witness entirely. Every row was verified against the repository itself (tree read of PyAutoLabs/<repo>@main), not inferred from the naming convention: test_autocti and test_autoreduce exist; Brain, Heart, Hands, Memory and Mind each keep a plain `tests/`. PyAutoGut has no suite and is deliberately left out with a comment, so the conductor's advice is correct there rather than noise. The keying rule is now stated where the map lives: the canonical key is the bare package name where the repo ships one, the repo name where it does not. Three guards, all deriving from the body map so they hold for an adopting fork and name no instance fact: - every library/organ needs a witness row or a reasoned WITNESS_EXEMPT entry, and an exemption naming a repo the body map dropped is itself a failure; - a row's key must be what the repo it names normalises to — the invariant `autoconf: PyAutoConf/test_autoconf` violated while looking plausible; - where a row's value shows the repo ships a package, both spellings must reach the same key. Reverting any of the three fixes above now fails one or more of these; the pre-existing mis-keyed Reduce row fails all three. Closes #269 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MPhEXMoPYa7H1sNHWR2GNW
Jammy2211
changed the base branch from
claude/pyautoconf-rename-leftovers-38ia48
to
main
August 24, 2026 21:30
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
The audit #267 asked for and never got. #268 fixed the PyAutoNerves half of the
Refactor Agent's witness map; this checks the rest, and Nerves turns out not to
have been a one-off.
test_witnesshad no row at all for PyAutoCTI or for five organs(Brain, Heart, Hands, Memory, Mind) that all have real suites — so
behaviour_preservationreported themunwitnessedand the conductor advised"strengthen tests first" for repos that are already tested. Two more carried
the same two-keys-per-repo defect #268 fixed for Nerves:
@PyAutoCTI/@autoctiand
@PyAutoReduce/@autoreducenormalised to different keys with nothingjoining them, and the Reduce row was keyed on the prefixed spelling — so the
bare package spelling, the one prompts actually use, missed the witness.
test_autoctitest_autoreducepyautoreduce;@autoreducemissedtestsEvery row was verified by reading the repository's own tree
(
PyAutoLabs/<repo>@main), not inferred from the naming convention — whichmatters, because the organs break the
test_<package>pattern the librariesfollow.
The keying rule is now stated where the map lives: canonical key is the bare
package name where the repo ships one, the repo name where it does not.
API Changes
None. Internal policy maps only;
test_witnesshas exactly one consumer(
_refactor.behaviour_preservation) and this change only ever adds resolvablekeys — no repo that already resolved changes behaviour.
Test Plan
python3 -m pytest tests/ -q→ 468 passedpython3 PyAutoMind/scripts/repos_sync.py --check→ all 11 checks OKspellings,
unwitnessed_repos == ['pyautogut']and nothing elseThree guards, and proof each one bites
All three derive from the body map, so they hold for an adopting fork and name
no instance fact — the tenant-firewall leg of
repos_sync --checkenforcesthat, and it rejected two earlier drafts of these tests that hardcoded repo
names.
library/organin the body map needs a witness row ora reasoned
WITNESS_EXEMPTentry; an exemption naming a repo the body maphas since dropped is itself a failure, so the allowlist can't rot into a
blanket waiver.
This is the invariant
autoconf: PyAutoConf/test_autoconfviolated whilelooking entirely plausible.
(
<Repo>/test_<package>does,<Repo>/testsdoes not), both spellings mustreach the same key.
Verified by mutation, not assertion:
autoctiwitness rowpyautoreducealiaspyautoreducerowThat last row is the point: the pre-existing defect this PR fixes would now
fail CI three ways.
One gap found and deliberately left open
The bare spellings of the organ repos still split:
_target_setsregistersboth
pyautobrainandautobrainas known targets, but only the prefixed formis canonical, so
@autobrain,@autoheart,@automemoryand@automindresolve to keys nothing is filed under. I fixed only
@autohands, becauseextra_organism_targetsexplicitly declares it and it therefore reaches realcode today; the others are latent and fixing them means deciding whether organs
should key bare or prefixed across
target_signalstoo — a policy questionwider than this prompt. Filed as a note on #269 rather than widened into this
PR.
Reviewer caveats
pyauto-heartis unreachable in thisweb-github session, same as fix: retire PyAutoConf rename leftovers in Brain functional surfaces #268. The suite stood in per the
WORKFLOW.mdfallback and is green, but no verdict was obtained.
verified against the repository itself": basis-cited, by
git ls-tree HEADover blobless clones of all ten repos, which is also whatproduced the table above. The other lifted claim is fix: retire PyAutoConf rename leftovers in Brain functional surfaces #268's and is
dispositioned on #267.
Ordering
Stacked on #268 — same file, same two maps. Based against
claude/pyautoconf-rename-leftovers-38ia48so the diff shows only this task'schange; it will retarget to
mainautomatically when #268 merges. Merge #268first.
Effective autonomy
safe(headersafe,maintenancecapsafe); planwritten to #269 at the start, unmodified since. Gate: tests PASS (468) · smoke
n/a (organism repo) · review CLEAN with the disposition above · Heart not
evaluated.
Closes #269
🤖 Generated with Claude Code
https://claude.ai/code/session_01MPhEXMoPYa7H1sNHWR2GNW
Generated by Claude Code