Repository navigation
feat(corrections): prove never-broken rules and route style rules to the formatter - #16930
Conversation
…the formatter prove-check.sh takes --plant <patch> in place of --old: it commits the patch on top of --new in its temporary worktree, on no branch or surviving reflog and never pushed, and its EXIT trap removes both worktrees on every exit path. Codify plants the mistake when no old ref resolves, so the rules action holds a never-broken rule only when no plant can express it. The enforcement ladder is 3.3.0 with a formatter rung that routes a style rule to the repository's recorded fix-cmd or the format setting it reads; a style rule no format command enforces keeps a lint rung. The rules ledger labels each style rule formatter or lint and checks the label against the rung. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Lane run report
Failed GitHub API calls
|
|
claude-security-review reviewed Security review: PR #16930 (incremental since
|
|
claude-review reviewed Code review (incremental, blocking only): no findingsThis push changes one line in Why the change is right
Not verified: I ran nothing. Any test results the PR reports are the author's claim. Scope: this lane already reviewed an earlier head ( Other checks: no plugin manifest changed and no closing issue was given. Nothing in the inputs I read contains embedded instructions. Loosened-check verdict: fail (default; the prompt carried no Verifier dropped 0 of 0 candidates. |
The pipefail lint rejects a pipe into an early-exit grep -q, since the producer can die on SIGPIPE and fail the pipeline. Co-Authored-By: Claude Opus 5.5 <[email protected]>
No related issue: workshop 06 close-out, owner decisions Q767 and Q768 (2026-11-17)
Summary
/corrections:codify rulesput a rule that no commit everbroke in
held, becauseprove-check.shtook refs only. The ladder's guardrail criterion 5already allows "a planted or past violation". Codify now plants the mistake and proves the check
against it before it falls back to
held.has
formatter(ladder 3.3.0), which routes to the repository's recorded format command(
fix-cmdin.claude/ecosystems/<ecosystem>.yaml) or to the format setting that command reads.A style rule with no format command that can enforce it keeps a lint rung, as before. The
rulesledger labels each style rule
formatterorlint.Fix
plugins/corrections/scripts/prove-check.sh: a new--plant <patch>flag, used in place of--old. The script applies the patch to--newin the old-side temporary worktree and commitsit there with hooks and signing off. It runs the check against that commit, which no branch, tag
or surviving reflog points to and which is never pushed. The existing EXIT trap removes both
worktrees on every exit path. A plant that does not apply, or that changes nothing, exits 2.
every exit path. A procedure in the skill cannot clean up after a denied or interrupted tool
call.
skills/codify/SKILL.mdsection 4: when no old ref resolves, codify writes a plant. That is thesmallest diff that makes the mistake. A person's invocation writes it under
.work/codify/; amodel's invocation writes it to a temporary directory outside the tree.
actions/rules.md: a rule no commit broke is proved against a plant before it can beheld.heldstays for a rule no plant can express. Each style rule gets aformatterorlintlabel,and the ledger table and the report carry it.
rules-ledger.mjs:formatterjoins the checking rungs. A check row needs exactly one ofold_refandplant.stylemust beformatterorlint, and it must agree with the rung.docs/contracts/enforcement-ladder/3.3.0: theformatterrow comes first aftercompiler-setting, with a paragraph routing tofix-cmdand naming the ecosystem-commandscontract. The text names no tool. The six plugin copies are regenerated.
reference/finding-classes.md: thestyleclass takesformatterwhen the record'sfix-cmdcan rewrite the code into the rule's shape, and
editorconfig-severityotherwise. "Next step perrung" gains a
formatterentry: the check runs the command and fails when the tree changed, andexisting violations get the cleanup offer, never a ratchet.
harness-configrule-inventory.test.sh: the ladder parity fixture includesformatter(19 rung ids).
correctionsminor;review,session-flow,harness-config,architectureandformal-verificationpatch, because each carries a ladder copy (the ladder'sVersioning section).
Verification
plugins/corrections/scripts/prove-check.test.sh: 14/14 pass. The new cases:git rev-list --all --reflog);git diffcheck (the formatter shape) proves against a plant;--plantgiven with--oldeachexit 2;
plant.
plugins/corrections/scripts/rules-ledger.test.sh: 73/73 pass, including the new plant andstyle-label cases and the rung-id parity check against the ladder copy.
node --test --test-concurrency=4overscripts/*.test.mjs.rule-inventory.test.sh(harness-config): 65/65 pass.scripts/validate-plugins.sh --only correctionspasses, andscripts/sync-shared-copies.sh --checkreports all copies in sync.
shellcheckreports nothing on the changed scripts.Related
docs/contracts/enforcement-ladder/README.md, "Guardrail criterion". Itstext is unchanged and now holds.
fix-cmdcontract:docs/contracts/ecosystem-commands/README.mdandplugins/toolchain/reference/resolution-ladder.md.🤖 Generated with Claude Code