Skip to content

fix(publish): sync publisher hardening + fail-closed institution-identity gate#2

Merged
exos-marc merged 1 commit into
mainfrom
fix/publish-institution-identity-gate
Jul 22, 2026
Merged

fix(publish): sync publisher hardening + fail-closed institution-identity gate#2
exos-marc merged 1 commit into
mainfrom
fix/publish-institution-identity-gate

Conversation

@exos-marc

Copy link
Copy Markdown
Contributor

What

Brings the party-anonymous playbook publish pipeline current and adds a final, deterministic institution-identity gate.

Publisher hardening (this branch was at the initial public-release state)

  • publication-noise scrub (e-sign audit lines, emails, UUIDs, URLs, opaque tokens)
  • street-address redaction, incl. City, <FullStateName> ZIP
  • GC --redact-terms with match-across-punctuation
  • dict-KEY rewriting and scanning (slugs live as corpus.stats map keys)
  • version_ingest filename-stem → ordinal

New: 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 raises PublishError, 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.stats dict key, or a filename-derived document_id slug — 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

  • Detector validated against real leaked-name strings (all caught) and a benign set (zero false positives).
  • Regression tests: a name leaking across prose + dict key + slug hard-blocks; --redact-terms clears it on every surface; governing-law / generic descriptors pass; City, <FullState> ZIP redacted.
  • tests/test_publish.py green (23/23).

🤖 Generated with Claude Code

…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>
@exos-marc
exos-marc merged commit 2632a29 into main Jul 22, 2026
2 checks passed
@exos-marc
exos-marc deleted the fix/publish-institution-identity-gate branch July 22, 2026 19:58
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