Add deterministic, opt-in security patch review stages - #627
Draft
tdullien1 wants to merge 10 commits into
Draft
Conversation
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.
Summary
Add optional, programmatically enforced review stages for generated security patches so patch scope, local coding conventions, and merge risk are evaluated independently before a patch or draft pull request is accepted.
Changes
--review-minimality,--review-style, and--assess-patch-riskstages to both patching entry points.--max-review-revisionsfor bounded author revisions; restart earlier reviews after later-stage changes and reconcile conflicting reviewer decisions once.Testing
bun test --timeout 30000 tests-ts/cli-skills.test.ts tests-ts/cli-patch.test.ts— 66 tests passed.node scripts/generate-models.cjs --check— passed.node node_modules/typescript/bin/tsc --noEmit— passed.node node_modules/prettier/bin/prettier.cjs --check --ignore-path .gitignore --ignore-path .prettierignore '**/*.{cjs,mjs,js,ts,tsx,json,md}'— passed.Risk and rollout
All new review stages are opt-in and disabled by default. Reviewers run read-only and cannot apply or merge patches. Explicit revision budgets bound corrective loops; malformed, blocked, or inconsistent verdicts stop patch publication. The bundled risk-assessment schema accounts for most of the added lines.
Public disclosure review