Repository navigation
fix(scaffold): close holes in the seeded gate ratchet config checks - #203
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…pty options, files strings Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…t*.config arm Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ty severity Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…s, strict npmrc quotes Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <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.
Threat model
An agent weakens a quality gate inside its own change by editing linter, type-checker or test config. The ratchet must report that as WEAKENED, or fail closed. A config the ratchet cannot read never passes. No threshold, timeout, pin or budget moves.
Allow-list design
Closed list of files and keys the ratchet reads (anything outside it is not judged; anything inside it that cannot be parsed is UNREADABLE, exit 2, never a skip):
pnpm-workspace.yaml:blockExoticSubdepsmust not become false (new)tsconfig*.json: strictness flags as before, plusfilesmust not become[](new); unquoted key or unclosed object is UNREADABLE (new)pyrightconfig.json: same strict parse (new)eslint.config.*):no-emptywithallowEmptyCatchis WEAKENED (new)vitest*.config.*: now ratcheted likevitest.config.*; a new second file that competes is WEAKENED (new)select, coverage thresholds, Sonar scope, package.json scripts, and the rest of the existing list.Legit changes still pass: tightening, adding a rule, unchanged config, a normal first push.
Reproduction against origin/main (per item)
UNREADABLE '-eval', DID NOT RUN exit 0): already fixed on origin/main, not reproducible..mjs,.js,.cjs,.tsconfigs read correctly; unreadable fails closed.selectremoved or narrowed): already fixed. A zero-configs-checked run cannot happen on the base route; a defensive guard was added (unreachable, no probe).blockExoticSubdeps: false,allowEmptyCatch,files: [], second vitest config. Malformed pyright{ badalready failed closed; an unquoted key or unclosed object still passed and is now UNREADABLE.Probe list
GR_ONLY=holes bash scripts/gate-ratchet.test.sh: 41 checks, each weakening case with a clean control, plus "unchanged passes" and "tightened passes" controls for TS and Python. Revertinggate-ratchet.shto origin/main makes 20 of the 41 fail (every weakening probe); the controls pass either way.Residuals
node_modulespresent, a tightened ESLint option value is still reported as WEAKENED (pre-existing, not touched here).gate-ratchet.sh: expect a text merge.🤖 Generated with Claude Code
🤖 Generated with Claude Code