fix(publish): sync publisher hardening + fail-closed institution-identity gate#2
Merged
Merged
Conversation
…tity gate Brings the party-anonymous publish pipeline current and adds a final, list-independent institution-identity gate. Publisher hardening (was missing here): publication-noise scrub (e-sign audit lines, emails, UUIDs, URLs, opaque tokens), street-address redaction, GC redact-terms with match-across-punctuation, dict-KEY rewriting/scanning, and version_ingest ordinals. New step 5.5 — institution-identity gate: after every transform, re-scan the whole surface (string values AND dict keys) for high-confidence institution shapes (University of X, X University, X College, Regents of, Board of Trustees/Regents) and postal addresses surviving the scrub. ANY hit raises PublishError unconditionally (like the known-entity backstop); the fix path is --redact-terms. This closes the class of leak where an unregistered counterparty name survives in a signature block, a corpus.stats dict key, or a filename-derived document_id slug — which the list-dependent backstop and the advisory proper-noun sweep both miss. Governing-law states and generic descriptors deliberately do not match. Validated against the real incident strings; regression tests cover a name leaking across prose + dict key + slug (blocks), redaction clearing it, and benign governing-law/descriptor text passing. Suite green. Co-Authored-By: Claude Opus 4.8 <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.
What
Brings the party-anonymous
playbook publishpipeline current and adds a final, deterministic institution-identity gate.Publisher hardening (this branch was at the initial public-release state)
City, <FullStateName> ZIP--redact-termswith match-across-punctuationcorpus.statsmap keys)version_ingestfilename-stem → ordinalNew: step 5.5 — fail-closed institution-identity gate
After every transform, re-scan the whole surface — string values AND dict keys for high-confidence institution-name shapes (
University of X,X University,X College,Regents of …,Board of Trustees/Regents) and any postal address surviving the scrub. Any hit raisesPublishError, unconditionally (like the known-entity backstop); the fix path for a real survivor is--redact-terms.This closes the class of leak where a counterparty that was never registered survives in a signature block, a
corpus.statsdict key, or a filename-deriveddocument_idslug — which the list-dependent known-entity backstop and the advisory proper-noun sweep both miss. Governing-law states ("laws of the State of New York") and generic descriptors ("the University", "College of Health Professions") deliberately do not match, so the gate is fail-closed without blocking benign content.Verification
--redact-termsclears it on every surface; governing-law / generic descriptors pass;City, <FullState> ZIPredacted.tests/test_publish.pygreen (23/23).🤖 Generated with Claude Code