Skip to content

scripts: block a publish that adds personal metadata - #439

Merged
HarperZ9 merged 1 commit into
mainfrom
privacy/publish-metadata-gate
Nov 5, 2026
Merged

HarperZ9 merged 1 commit into
mainfrom
privacy/publish-metadata-gate

Conversation

@HarperZ9

@HarperZ9 HarperZ9 commented Nov 5, 2026

Copy link
Copy Markdown
Owner

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 in project-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 after publish_lint --strict and before any push; new --deny-list.
  • Fix: the export walked scripts/ and would have copied the gitignored scripts/.publish-denylist.txt into the public tree. It is now excluded, with a test.
  • CI: new publish_metadata job runs the gate on the checkout.
  • Docs: 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 and test_publish_lint.py: 37 passed locally (Python 3.12, Windows).
  • The gate on this checkout: 0 over the baseline. check_file_gate.py and check_path_length.py: clean.

Not covered: the site build in the portfolio repo does not call the gate yet.

🤖 Generated with Claude Code

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>
@HarperZ9
HarperZ9 merged commit 1b1f8d0 into main Nov 5, 2026
81 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant