Repository navigation
scripts: block a publish that adds personal metadata - #439
Merged
Merged
Conversation
publish_metadata_gate.py freezes the 1,370 findings already in the tree as counts per file and category, then fails on any growth, any new file with a finding, and any hit from a private pattern (machine name, git global email, untracked deny list). publish_public.py runs it on the staging tree before a push and takes --deny-list; CI runs it on the checkout. The export no longer copies scripts/.publish-denylist.txt, which it would have shipped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Wires the metadata check from #438 into the publish path as a blocking gate.
scripts/publish_metadata_gate.py: the tree already holds 1,370 findings in 214 files (mostly workspace paths in test fixtures and scripts), so they are frozen as counts inproject-docs/records/2026-11-04-publish-metadata-baseline.json(path, category, count; no values). The gate fails on a count that grows, a new file with a finding, or any hit from the machine name, the git global email or the untracked deny list. The baseline only shrinks unless--allow-growth.scripts/publish_public.py: runs the gate on the staging tree afterpublish_lint --strictand before any push; new--deny-list.scripts/and would have copied the gitignoredscripts/.publish-denylist.txtinto the public tree. It is now excluded, with a test.publish_metadatajob runs the gate on the checkout.docs/features/publish-metadata.md. CHANGELOG entry under Unreleased.Verified:
tests/test_publish_metadata_gate.py(8 tests) plus the scripts: pre-publish metadata check #438 tests andtest_publish_lint.py: 37 passed locally (Python 3.12, Windows).check_file_gate.pyandcheck_path_length.py: clean.Not covered: the site build in the portfolio repo does not call the gate yet.
🤖 Generated with Claude Code