Skip to content

R-15 gate status guard: strict canonical-block grammar and fuller prose parsing (follow-up to #933) #935

Description

@qnbs

Follow-up to #933 / PR #934. These late P2 findings came in on the frozen merge head 59ee5411. They are deferred under the freeze rule (after one material correction wave, only P0/P1/security findings reopen the head). The live contract and ledger pass the guard, so none of them hides drift today. Each one is a hardening gap in scripts/check-r15-gate-status.mjs.

Findings to address

  1. Strict block grammar (Codex P2, cubic P2): the canonical R15_GATE_STATUS block is token-scanned, so R15_GATE2=IMPLEMENTED_HEADLESS BROKEN or a standalone garbage line passes. Parse the block line by line: each line must be exactly R15_GATE<id>=<STATUS>, with no other content.
  2. Fences before comments (Codex P2): HTML comments are removed before fence state is evaluated, so a literal unterminated <!-- inside a valid fence swallows the rest of the document. Evaluate fences first and strip comments only from non-fenced prose.
  3. Coordinated gate lists (Codex P2, cubic P2): Gates 4 and 3 are not admitted resolves only Gate 4. Expand Gates N(, N)* (and|or) N lists.
  4. Duplicate + invalid status (cubic P2): entryProblem stops at the duplicate check, so an invalid status on a duplicate entry is never reported. Report every applicable problem.

Acceptance

  • One regression test per item in tests/unit/checkR15GateStatus.test.ts.
  • pnpm docs:check stays green on the live documents.
  • No change to the protected merge-admission evaluator files.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions