Coordinator boundary: advisory tier for prose / pasted-spec leakage#95
Merged
Merged
Conversation
…kage The structural guard catches language *files* and re-vendored language dirs, but not a grammar, typing rules, or a whole language spec pasted into a narrative doc (how "TypeFix Zero" ended up inside README.adoc). This adds a NON-blocking advisory scan to hooks/validate-coordinator-boundary.sh: - Scope: the coordinator's narrative surface (top-level *.md/*.adoc + docs/, minus docs/disambiguation/). It does NOT scan wiki/ (where rust/ocaml/agda/ebnf teaching snippets legitimately live) or extraction-queue/ (staged content). - Flags: grammar/proof code fences (agda/lean/coq/idris/ebnf/bnf/antlr/g4), implementation-language fences (rust/ocaml/reason/rescript), and unfenced spec tells (BNF ::=, sequents, universe/fixpoint typing judgments). - WARNS only — never fails the build (heuristic; false positives must not block). Emits GitHub Actions ::warning:: annotations so findings surface on PRs. Verified: passes clean on the current tree; flags a planted TF0-style spec (fix : (A -> A), an agda fence, a ::= production) as 3 warnings while staying exit 0; structural leaks still hard-fail. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MWPX7iyvHf5AuwBAn1sJPy
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.
Why
Follow-up to #88 (the pure-coordinator pivot). That PR's
hooks/validate-coordinator-boundary.shcatches structural leakage — language source files (*.agda/*.ebnf/*.ks/…), compiler source trees, and re-vendored language directories. But it would not have caught the original "TypeFix Zero" incident: a whole language spec pasted as prose intoREADME.adoc. This adds a heuristic tier to close that gap as far as is sensible.What
A non-blocking advisory tier in
hooks/validate-coordinator-boundary.sh:*.md/*.adoc+docs/, minusdocs/disambiguation/(cross-language by design). It deliberately does not scanwiki/(the kept teaching pages legitimately embedrust/ocaml/agda/ebnfsnippets, 28–42 fences each) orextraction-queue/.agda/lean/coq/idris/ebnf/bnf/antlr/g4), implementation-language fences (rust/ocaml/reason/rescript), and unfenced spec tells (BNF::=, sequents⊢, universe/fixpoint typing judgments likeType i : Typeandfix : (A -> A)).::warning::annotations so findings still surface on PRs. The existing structural checks remain hard errors.Verification
The narrative surface is currently clean (0 hits), and the original TF0 text now lives only in the exempt
extraction-queue/typefix-zero/— so this passes today and would have flagged the original paste.Honest limitation
This is heuristic prose detection: it catches grammar/proof/impl code blocks and common typing-judgment notation, but a sufficiently plain-English language description with no notation could still slip past. The primary defenses remain the rewritten instruction layer (prevention) and review; this is a best-effort backstop, kept advisory precisely because it's fuzzy.
🤖 Generated with Claude Code
https://claude.ai/code/session_01MWPX7iyvHf5AuwBAn1sJPy
Generated by Claude Code