Repository navigation
S10 (#192) — repair the þing-01 redaction guard; a declared root that vanishes now fails - #204
Merged
Merged
Conversation
… that vanishes now fails tests/test_redaction_guard.py pins the #135 delivery-log redaction audit over five module trees. Epic #148's #153 moved the machinery from unfao/ to contract/ and four of the five roots were never re-pointed. The guard kept passing while scanning 6 files instead of 17. Re-pointing fixes today. The assertion that every declared root EXISTS fixes the class, and that is the half worth having: rglob on a nonexistent directory yields an empty iterator rather than raising, so a missing root and a clean root were indistinguishable to the scan. A package move silently emptied it while the suite stayed green. A third check bounds the count, so narrowing surfaces as a number rather than as nothing. Mutation-proven by restoring the pre-S10 roots: two failures, one naming all four missing paths, one reporting "covers only 6 files". The guard is also now proven to bite on the defect it was written for — a module reading os.environ['APPWRITE_DATASTORE_API_KEY'] — which had never been demonstrated. An unproven guard is what two silent days buys you. Explicit list, not derivation, decided and recorded. test_clone_readiness.py enumerates an overlapping set for a different question; folding them together would couple two guards whose sets are free to diverge, since a module can be partner-neutral without being credential-blind. What makes the list safe is the existence assertion. No leak occurred. The relocated modules were checked at registration and again here: zero hits for os.environ, getenv, load_dotenv, API_KEY, credentials. Two entries that had vouched for this guard are restored rather than quietly reverted — C-57's "already mechanically enforced" and Cluster I's fix strategy — because a claim that was false for two days is worth more as a record. Also caught by the register's own integrity guard while writing this: the extraction regex for C-74 used a `(?=^### )` boundary, and since C-74 was the last entry in Open Concerns it swallowed the `## Disagreements` heading, filing three D-entries under Open. Four integrity tests failed immediately. Fixed with a section-aware boundary — the guard S2 built catching a defect in the tooling that maintains the register it guards. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Aug 2, 2026
Closed
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.
Closes #192. Closes register C-74. Part of epic #181.
The defect
tests/test_redaction_guard.pypins the þing-01 #135 delivery-log redaction audit over five module trees. Epic #148's #153 moved the machinery fromunfao/tocontract/, and four of the five roots were never re-pointed.Silent by construction.
_python_sourcescallsrglobon anything that is not a file, andrglobon a nonexistent directory yields an empty iterator rather than raising. A missing root and a clean root are indistinguishable to the scan.Re-pointing fixes today; the existence assertion fixes the class
That is the half worth having. A declared path that does not exist is now an error rather than silence, and a third check bounds the count so narrowing surfaces as a number.
Mutation-proven by restoring the pre-S10 roots — two failures:
And the guard is now proven to bite on the defect it was written for — a module reading
os.environ['APPWRITE_DATASTORE_API_KEY']. That had never been demonstrated, which is what two silent days buys you.List, not derivation — decided, per the issue
test_clone_readiness.pyenumerates an overlapping module set for a different question ("does the machinery import without the partner?"). Folding them together would couple two guards whose sets are free to diverge — a module can be partner-neutral without being credential-blind. Two lists that each say what they mean beat one that means neither.What makes the explicit list safe is the existence assertion. Without it, a list is exactly the fragile thing it looked like here.
No leak occurred
Checked at registration and again now: zero hits for
os.environ,getenv,load_dotenv,API_KEY,credentialsacross all 17 files. The audited fact stayed true. What had gone was the thing that would notice it stopping.Two claims restored, not quietly reverted
C-57 said the redaction clause was "already mechanically enforced"; Cluster I's fix strategy cited this exact file as the guard pattern working. Both were corrected when C-74 was registered this morning. Both are true again — and the episode is left visible, because a claim that was false for two days is worth more as a record than as a correction tidied away.
The register's own guard caught me mid-story
The extraction regex for moving C-74 used a
(?=^### )boundary. C-74 was the last entry in Open Concerns, so the match ran past the section break and swallowed the## Disagreementsheading, filing three D-entries under Open.Four integrity tests failed immediately:
Fixed with a section-aware boundary. The guard S2 built, catching a defect in the tooling that maintains the register it guards — which is the epic's thesis arriving from an unexpected direction.
Verification
Register: 74 concerns, 17 open, 57 resolved.
🤖 Generated with Claude Code