Skip to content

Harden the gate against corpus-set drift: vacated-id resurrection and re-added files pass green #20

Description

@systemfsoftware-maker

Problem

Two accepted-by-design narrowings leave the one-file gate green through states the corpus law forbids:

  1. Resurrecting a vacated id passes. Adding a rule with id CONST-T1 (or T2/T5, G1/G2, E1-E4) today yields valid: 41 rules and exit 0. AGENTS.md forbids resurrecting vacated ids forever; the gate's docstring states "Vacancy is named, not enforced" — the enforcement surface is review only.
  2. A re-added corpus file is invisible. PATHS = ["CONSTITUTION.md"] is hardcoded; re-adding a CONSTITUTION-ARTICLES.md (or any second law file) is not a defect to the gate — the vacuous-pass doctrine was scoped to the declared input set, and the set itself can drift silently.

Why filed, not fixed

Both were settled design decisions for this branch (KTD6: the narrowing is the contract; vacancy naming is the check). Hardening is real governance design — a hardcoded VACATED_IDS set goes stale the next time a rule is vacated; wiring --against HEAD~1 into every pre-commit changes the repo's verification law beyond this change's scope.

Suggested fix

Either (a) a VACATED_IDS set in scripts/validate-constitution.ts that fails on mint-collision with historical ids (self-maintaining: add ids as they are vacated), or (b) pre-commit runs deno task test --against HEAD~1 and treats reassigned id: lines as failures, plus a glob step failing on any second CONST*.md corpus file at repo root.

Severity: P2 (advisory)
Confidence: 100 (scenario constructible), 75 (fix shape)
Reviewer(s): adversarial (corroborated by testing on the fixture-persistence half)
Source: branch restore-single-document, commit 0e853af; ce-code-review run 20260901-050207-ecc9e7b4

Source: PR #21 (#21)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions