Skip to content

feat(toolchain): break-glass option and zero-ceiling handling for /toolchain:ratchet - #12223

Merged
kyle-sexton merged 6 commits into
mainfrom
fix/12140-ratchet-break-glass-description
Nov 2, 2026
Merged

kyle-sexton merged 6 commits into
mainfrom
fix/12140-ratchet-break-glass-description

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Closes #12140

Replaces #12160

Summary

Replaces #12160, a lanes App PR whose only failing check was check-catalog: the ratchet_break_glass option description was 323 characters, over the 300-character budget in docs/contracts/plugin-option-naming/README.md. This PR merges #12160's head (c3c4ecb90a) and shortens that description, so the break-glass option and zero-ceiling handling for /toolchain:ratchet land unchanged.

Fix

The ratchet_break_glass description in plugins/toolchain/.claude-plugin/plugin.json is now 265 characters with the same meaning. Its README option row is synced. The default stays false; no test changed.

Verification

  • jq -r '.userConfig.ratchet_break_glass.description | length' on the manifest printed 265.
  • node scripts/validate-plugin-contracts.mjs run in the worktree printed "Plugin contracts validated: 65 setup skills, 6 retirement manifests, and 17005 plugin files checked."
  • Left out: the test suites, which CI runs on this head.

Related

🤖 Generated with Claude Code

melodic-automation-lanes Bot and others added 5 commits November 1, 2026 22:58
Lane-Activity: work-resolve-issue/resolve-issue
Lane-Activity: pr-unblock/address-feedback
Lane-Thread: PRRT_kwDOTCGFQM6yfYDh
Lane-Thread: PRRT_kwDOTCGFQM6yfYDm
Lane-Activity: pr-unblock/address-feedback
Lane-Thread: PRRT_kwDOTCGFQM6yfXp7
… the 300-character budget

The description was 323 characters; check-catalog fails any userConfig
description over 300. It is now 265, with the same meaning and the same
default of false. The README option row is updated to match.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T02:53:04.645195Z 4deab3d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed a7744c2930e5cadb1d6c5c9f0ecd611c5ed04544: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #12223, incremental since 4deab3d1

No security issues found. This round covers only the change since 4deab3d1. I read every hunk of all 3 files in scope: both copies of ratchet.py and ratchet.test.sh. None of them matches a trusted-path glob.

What I checked

  • cmd_add in both ratchet.py copies (performance L402-404, toolchain L404-406):
    • The --break-glass option used to overwrite the file's break_glass key. It now uses setdefault, so it only fills in a key the file doesn't already have.
    • A ceilings file that already says "break_glass": false can no longer be switched on by add --break-glass on. This narrows what the option can change and widens nothing.
    • The flip side is that add --break-glass off no longer turns off a file that already has true. Changing it then means editing the checked-in file, which goes through normal review. That is a behaviour choice for code review, not a security path.
    • Nothing new reaches a shell. Where the counter command comes from is unchanged.
  • ratchet.test.sh: it adds one test case that writes a temp fixture under $WORK and runs a local printf counter command. No credentials and no network access are involved.

Not counted as findings

  • Prior findings: the only earlier entry is the last round's summary comment, which reported 0 findings, so there is nothing to carry forward. Round cap: not reached (0 of 3 rounds with findings).
  • PR context: the description has no embedded instruction text. The wrapper withheld the closing issue's body.
  • Spend: none beyond the normal lane runs.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-review: 1 inline finding(s) on 4deab3d1e81e1523f9604b9ba13fea0603a9394b; the summary is in this lane's pull request comment.

claude-lane: claude-review

Comment thread plugins/performance/scripts/ratchet.py Resolved
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed a7744c2930e5cadb1d6c5c9f0ecd611c5ed04544: read 3 of 3 changed file(s); 0 finding(s), 0 as inline comments.

Code review (incremental, since 4deab3d)

I read every hunk of the three files in scope: plugins/performance/scripts/ratchet.py, plugins/performance/scripts/ratchet.test.sh and plugins/toolchain/skills/ratchet/scripts/ratchet.py.

The prior finding is fixed. My last review flagged that --break-glass overwrote the file's existing break_glass key (thread). cmd_add now uses data.setdefault("break_glass", args.break_glass == "on"), so the option only sets the key when the file doesn't have one. That matches the manifest's promise that "the file's own break_glass key wins over this option". load() already rejects a non-boolean break_glass value (ratchet.py:101-102), so whatever key the file keeps is a valid boolean.

  • Test: the new case in ratchet.test.sh writes a file with "break_glass": true, runs add --per-file --break-glass off, and checks that the command exits 0 and the key is still true. Against the old assignment the test would fail, so it guards against a regression.
  • Generated copy: the toolchain copy's hunk is the same as the canonical one. I compared them by reading; I haven't confirmed that CI's copy check passes.

No new findings. Nothing in this change creates a billing or paid-resource charge. The PR context contains no embedded instructions.

`ratchet.py add --break-glass` now fills the key only when the file lacks
it, so the repository's setting wins in code as the option description and
SKILL.md state. The toolchain copy is regenerated, and ratchet.test.sh
covers a file with "break_glass": true kept under --break-glass off.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 2f07339 Nov 2, 2026
43 checks passed
@kyle-sexton
kyle-sexton deleted the fix/12140-ratchet-break-glass-description branch November 2, 2026 03:57
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Post-merge mutation testing

Killed 3, survived 4, timeout 0, no coverage 0, invalid 0, not run 0.
Covered-code score 43%; mutation score 43%.

File Killed Survived Timeout No coverage Invalid Not run
plugins/performance/scripts/ratchet.py 3 2 0 0 0 0
plugins/toolchain/skills/ratchet/scripts/ratchet.py 0 2 0 0 0 0

Surviving mutants

Location Operator Disposition Cause
plugins/performance/scripts/ratchet.py:124 ROR productive input-gap
plugins/performance/scripts/ratchet.py:224 ROR productive input-gap
plugins/toolchain/skills/ratchet/scripts/ratchet.py:270 AOR productive input-gap
plugins/toolchain/skills/ratchet/scripts/ratchet.py:208 SBR productive input-gap

The run's summary has the full report.

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.

feat(toolchain): add a per-file baseline mode, the lint rollout rule and a break-glass setting to /toolchain:ratchet

1 participant