Skip to content

docs(rfc-008): P2c doc sweep — align spec to shipped P2a/P2b validators#388

Merged
lantiscooperdev merged 1 commit into
mainfrom
docs/rfc-008-p2c-doc-sweep
Jun 13, 2026
Merged

docs(rfc-008): P2c doc sweep — align spec to shipped P2a/P2b validators#388
lantiscooperdev merged 1 commit into
mainfrom
docs/rfc-008-p2c-doc-sweep

Conversation

@lantisprime

Copy link
Copy Markdown
Owner

RFC-008 P2c — documentation sweep

Documentation-only slice closing out RFC-008 Phase 2: align the RFC spec text to
the validators already merged in P2a (#381) and P2b (#384). No behavior
change — the shipped code is the source of truth; the RFC prose is corrected to
match it. (One sub-3-LOC comment update in validate-bp-contract.mjs.)

Applies the deferred findings from the P2-plan second-opinion review
(R1 …6635 → R2 …e5f0): F-2, F-5, F-6, F-9, F-10, N-3, N-4.

Changes

Finding Edit
F-5 validate-schemas.mjs "meta-meta / official-meta-schema" over-claim → "keyword-grammar doc-validity linter" (5 locations, incl. 2 line-wrapped in P2-bp-contracts.md).
N-3 Drop vacuous bp-XXX arms from assertions 7 + 11 (contracts carry hashes, not label/event ids; real binding = version-hash equality).
F-2 Document event-id uniqueness in assertion 12 (events mirror of assertion 6) — matches shipped validate-bp-contract.mjs.
N-4 Assertion 8 → shipped set-difference invariant (merge-base, fail-closed, bootstrap); bp set = 11 (bp-007 absent) everywhere.
F-6 Remove the never-shipped validate-taxonomy-schema.mjs from P2-bp-contracts.md.
F-9 tests/lib/{mini-jsonschema,version-hash}scripts/lib (promoted P1b/P2a); rewrite in living docs, annotate in historical rows.
F-10 P2 phase-table counts 12/2 → 39/5 (git-stat grounded).

Files: RFC-008-decouple-enforcement-from-substrate.md,
RFC-008/P0-schema-contracts.md, RFC-008/P2-bp-contracts.md,
scripts/validate-bp-contract.mjs (+39/−31).

Plan review (Rule 18 step 2)

Second-opinion via the harness (codex): R1 HOLD (one same-class F-5 miss — a
line-wrapped occurrence single-line grep can't catch) → R2 ACCEPT, converged.
Reply episodes …071719…cb0e / …072322…7227.

Verification

  • tests/test-validate-bp-contract.mjs → 98/0 (comment-only change).
  • scripts/em-rfc-validate.mjs → RFC registry consistent (8/8/8).
  • Completeness: F-5 (5 loc) + F-9 classes fully swept via broad single-token
    greps (defeats line-wraps); index files grep-clean (no Rule 10 edits needed).

Follow-up

🤖 Generated with Claude Code

Apply the deferred P2-plan-review findings (F-2, F-5, F-6, F-9, F-10, N-3,
N-4) as documentation-only edits, correcting RFC-008 spec text to match the
validators merged in P2a (#381) and P2b (#384).

- F-5: reword the validate-schemas.mjs "meta-meta/official-meta-schema"
  over-claim to keyword-grammar doc-validity linter (5 locations incl. two
  line-wrapped in P2-bp-contracts.md).
- N-3: drop the vacuous bp-XXX arms from assertions 7 + 11 (contracts carry
  hashes, not label/event ids; real binding is the version-hash equality).
- F-2: document event-id uniqueness in assertion 12 (events mirror of
  assertion 6) — matches shipped validate-bp-contract.mjs.
- N-4: assertion 8 reworded to the shipped set-difference invariant
  (merge-base, fail-closed, bootstrap carve-out); bp set = 11 (bp-007 absent).
- F-6: drop the never-shipped validate-taxonomy-schema.mjs from P2-bp-contracts.
- F-9: tests/lib/{mini-jsonschema,version-hash} refs updated to scripts/lib
  (promoted P1b/P2a) — rewrite in living docs, annotate in historical rows.
- F-10: P2 phase-table counts 12/2 -> 39/5 (git-stat grounded).

Plan second-opinion reviewed via harness (codex): R1 HOLD (one same-class
F-5 miss) -> R2 ACCEPT converged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@lantiscooperdev lantiscooperdev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bot code review — P2c doc sweep (#388)

Reviewed the full diff against the shipped validators and the converged plan. No blocking findings. Summary for the human approver, with the judgment calls surfaced explicitly.

Faithfulness to shipped code (verified by reading scripts/validate-bp-contract.mjs)

  • Assertion 7 (L485) / 11 (L449): the dropped bp-XXX arms are genuinely vacuous in the shipped code — assertion 7 checks only manifest emits_labels + classifier _priority arms (:423-455); assertion 11 checks only manifest capabilities + event_translations (:492-503). Contracts carry hashes, not ids. ✅
  • Assertion 8 (L486): reworded text matches stableIdCheck (:153-186) — set-difference vs merge-base(HEAD, origin/main), fail-closed (exit 2) on shallow/unresolvable, bootstrap carve-out. ✅
  • Assertion 12 (L450): event-id uniqueness now documented; matches the shipped check at :512-519. The stale "flagged for P2c doc sweep" comment was updated in the same change. ✅

Same-class completeness

  • F-5 over-claim: all 5 locations swept (RFC L498, RFC L1509-historical, P0-doc L84, P2-bp:32, P2-bp:71-72). Note: :71-72 was line-wrapped — caught by codex R1, not by line-grep. Broad single-token re-grep confirms no residual.
  • F-9 tests/lib: 7 locations handled. Correct meta-schema usages (schema.json as bp meta-schema; "not a meta-schema interpreter") intentionally left untouched.

Judgment calls worth a human eye

  1. Annotate-not-rewrite for historical rows (RFC L1342, L1509, L1392): these are merged-phase / change-log / v9-resolution records where tests/lib and validate-taxonomy-schema were accurate at the time. I annotated the later promotion/fold rather than rewriting history. Codex endorsed this. If you'd prefer the historical entries rewritten outright, say so.
  2. F-10 counts 12/2 → 39/5: git-stat-grounded (combined P2a→P2b diff) for an otherwise estimate-grade table. Approximate by nature.

Verification

test-validate-bp-contract.mjs 98/0 · em-rfc-validate registry consistent · index files grep-clean (no Rule 10 edits).

Out of scope (tracked)

#387 — same bp-001..bp-012 overcount in RFC-002 + pending-analysis.md.

Recommending approval pending your review of the two judgment calls above. (Bot comment — not an approval; the review-required gate is satisfied by your UI approval.)

@lantiscooperdev lantiscooperdev merged commit b425099 into main Jun 13, 2026
3 checks passed
@lantisprime lantisprime deleted the docs/rfc-008-p2c-doc-sweep branch June 13, 2026 08:43
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.

2 participants