Repository navigation
Keep identities out of release text, and make a test enforce it - #92
Merged
Merged
Conversation
…force it Fixing the workflow that leaked was not enough, because the same leak came back twice inside the same change: - the CHANGELOG entry explaining the fix quoted the identity it was removing; - the release.yml comment did the same, in a second file; - and when this guard was written, its first CHANGELOG sentence quoted the assertion output, putting the name back a third time. All three were caught by reading, and reading is what had already failed. So the rule is a test now: tests/test_release_hygiene.py extracts every released section from CHANGELOG.md the same way release.yml does, and checks it against the anonymizer's own dictionary, privacy._ru_personas(). Reading the list from the feature that hides these names means the guard cannot drift from what it protects. Verified red — restoring the identity fails with the name reported. Also in this commit: - tests/test_primitives.py carried an owner name in a routing fixture. The route does not depend on the name (checked: any name, including a nonsense one, yields "user"), so the assertion holds with the name removed. - The workflow comment and the CHANGELOG entry now describe the leak without reproducing it, which was the whole point of the exercise. What this does NOT do: the identity list itself is untouched. config.yaml rag.ru_personas, rag/synonyms.py and the privacy tests ARE the feature that hides these names; deleting them would remove the anonymizer. A separate tree-wide sweep remains — 21 occurrences in 6 files, none in the release path — and is reported rather than bundled here.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Follow-up to #91. Fixing the workflow that leaked turned out not to be enough — the same
leak came back three times inside the same change:
release.ymlcomment did the same, in a second file;output, putting the name back a third time.
All three were caught by reading carefully, and reading carefully is what had already
failed. So the rule is a test now.
The guard
tests/test_release_hygiene.pyextracts every released section fromCHANGELOG.mdusing the same regex
release.ymldoes, and checks each against the anonymizer's owndictionary —
privacy._ru_personas(). Reading the list from the feature that hides thesenames means the guard cannot drift from what it protects.
Verified red, not asserted green: restoring the identity fails with
assert not {'Murat': ['Murat']}. It caught the third occurrence itself.Also here
tests/test_primitives.pycarried an owner name in a routing fixture. Checked that theroute does not depend on it — any name, including a nonsense one, yields
"user"— sothe assertion is unchanged in meaning with the name removed.
reproducing it.
What this deliberately does not do
The identity list itself is untouched.
config.yamlrag.ru_personas,rag/synonyms.pyand the privacy tests are the feature that hides these names;deleting them would remove the anonymizer. That remains the ruling from #89 and stands.
A separate tree-wide sweep is still open — 21 occurrences in 6 files, none in the
release path — and is reported rather than bundled here:
autohooks/context.py,autohooks/examples/cowagent.yaml,docs/hooks/autohooks-platforms.mdElitests/test_lifecycle/test_c8_tails.pyfeatures/importance.py,shared/dialogue.py,tests/test_conflict_bm25.pyмамочкаruff,ruff format,mypy, full suite (2107 passed) — clean on commit.