feat(rfc-008): P4d S8 P12 invariant CI gate (REQ-10/REQ-11)#419
Merged
Conversation
Code-defined meta-runner (tests/test-p12-invariant-suite.mjs) plus a separately-named required CI job p12-invariant-gate. Membership = glob(test-p12-*.mjs) union an EXPLICIT set (7 members, including the S5 uninstall and S6 seed-identity invariants that had no other CI step). Runner exits non-zero if any member fails; t_runner_fails_on_member_failure is the REQ-11 negative control. Self and sibling meta-runners are excluded from membership to prevent recursion. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
lantiscooperdev
left a comment
Collaborator
There was a problem hiding this comment.
PR-level review (bot account): RFC-008 P4d S8 p12-invariant-gate
Reviewed the full diff (2 files, +219) at the PR level, after the per-artifact negative-scenario-reviewer pass. The slice delivers REQ-10/REQ-11 in code and is internally consistent. Confirmations and observations below; final approval is the maintainer's.
Confirmed
- Membership maps cleanly to PRINCIPLES.md SS12 "Test this": global-clean (
test-p12-global-clean), per-project scope and ESC (enforcement-scope,install-contract-deploy,activation-scoping), the S4 gate toggle (s4-gate-e2e), the S5 uninstall round-trip, and the S6 seed-identity guard. The two previously-uncovered tests (uninstall, seed-identity) now have a CI home. - The
validatejob is byte-untouched; the new job is a clean sibling. No risk to existing CI. - REQ-11 negative control is real:
t_runner_fails_on_member_failurespawns the runner withP12_INJECT_FAIL=1and asserts exit 1 through the shared status-check path. - M1/M2/M3 from the per-artifact review are addressed in the committed code; N1 was correctly rejected as fail-closed-by-construction.
Observations (non-blocking)
- CI-time duplication. Five of the seven members (activation-scoping, install-contract-deploy, s4-gate-e2e, enforcement-scope, global-clean) also run as flat steps in the
validatejob, so they execute twice per CI run. This is the intended minimal-diff choice (the meta-runner is the authoritative named gate; the flat steps predate it). A future cleanup could drop the now-redundant flat steps fromvalidateoncep12-invariant-gateis the required check. Worth a follow-up, not a blocker. - "Required" is half-delivered by design. The job runs on every PR, but a failure will not block merge until branch protection marks
p12-invariant-gatea required status check. That out-of-band toggle is correctly tracked as OD-3. Until then REQ-10's "required" property is documentary.
Verdict
ACCEPT (comment-level). The code half of REQ-10/REQ-11 is complete, tested, and review-clean. Recommend the maintainer (a) approve and merge, then (b) apply the OD-3 branch-protection toggle so the gate actually blocks.
This was referenced Jun 21, 2026
Closed
lantiscooperdev
approved these changes
Jun 22, 2026
lantiscooperdev
pushed a commit
that referenced
this pull request
Jun 22, 2026
S7 (#418) and S8 (#419) are merged, completing P4d and therefore P4 (P4a #397 + P4c #398 + P4d S1-S8 all merged). Flips the stale 'S7-S8 open' / 'IN PROGRESS' status in the RFC body ledger (:1216), the RFC-008/README.md phase matrix (:21), and P4-enforce-config.md status line + the S7/S8 slice-table rows. Rule 10 doc-sync; no code change. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
RFC-008 P4d S8: P12 invariant CI gate (the last P4d slice)
Promotes the Principle-12 invariants into ONE separately-named required CI check whose membership is defined in code. Closes REQ-10 and REQ-11.
What changed
tests/test-p12-invariant-suite.mjs: a code-defined meta-runner. Membership isglob(tests/test-p12-*.mjs)union an EXPLICIT set (7 members), minus this runner and any sibling meta-runner. It runs each member as anodesubprocess and exits non-zero if any member fails.p12-invariant-gatein.github/workflows/plan-marker-validate.yml. The existingvalidatejob is byte-untouched.Why it matters
The S5 uninstall round-trip (
test-uninstall-enforcement.mjs) and the S6 seed-identity guard (test-enforce-config-seed-identity.mjs) had no CI step before this. The gate brings them, plus the S1 substrate-hook-independence, S4 gate-toggle, ESC enforcement-scope, contract-deploy, and global-clean invariants, under one named check.Members (7):
test-activation-scoping-e2e,test-enforce-config-seed-identity,test-enforcement-scope,test-install-contract-deploy,test-p12-global-clean,test-s4-gate-e2e,test-uninstall-enforcement.Requirements
t_membership_completere-derives the set, pins the EXPLICIT half against an independent literal (so a silent deletion trips), asserts every member exists on disk, and excludes the runner plus any sibling meta-runner.t_runner_fails_on_member_failureis the negative control.P12_INJECT_FAIL=1injects a synthetic failing member and asserts the runner exits 1.Test plan
node tests/test-p12-invariant-suite.mjsreturnsP12 INVARIANT GATE: PASS(exit 0); 2 meta-tests plus 7 members all green (activation-scoping 13, seed-identity 6, enforcement-scope 17, contract-deploy 36, global-clean 6, s4-gate 5, uninstall 14).validate,p12-invariant-gate.Review
negative-scenario-reviewer returned ACCEPT-WITH-MODIFICATION. Dispositions, all applied in this PR:
test-activation-scoping-e2e.mjsmember (it asserts the global and project enforcement-clean plus substrate hook-independence contract).spawnSyncstatus null and ENOENT already fail closed via!== 0.Follow-ups (tracked as issues)
p12-invariant-gatea required status check in branch protection (out-of-band repo setting).After this merges, P4d is complete; remaining RFC-008 work is P5-P8 tool breadth.