Skip to content

feat(cli): add optional sequential patch review stages - #605

Draft
tdullien1 wants to merge 3 commits into
mainfrom
codex/fix-finding-minimal-review
Draft

feat(cli): add optional sequential patch review stages#605
tdullien1 wants to merge 3 commits into
mainfrom
codex/fix-finding-minimal-review

Conversation

@tdullien1

Copy link
Copy Markdown
Collaborator

Summary

Add three optional, sequential review stages that help generated security patches stay minimal, match repository conventions, and receive an evidence-backed risk assessment before publication.

Changes

  • Add --review-minimality to remove unnecessary patch changes and unrelated refactoring.
  • Add --review-style to check applicable repository instructions, local coding patterns, and project style guides.
  • Add --assess-patch-risk to assess final-patch applicability, blast radius, regression protection, recoverability, and uncertainty.
  • Support all three flags for patch and scan --patch, preserve their fixed execution order, and reject incompatible resume or report-only usage.
  • Include the complete risk-assessment skill, supporting references and helpers, its JSON schema, and the exact public plugin-shipping manifest entries.
  • Keep each optional flag in a separate, independently buildable commit.

Most of the third commit is the existing 3,533-line assessment schema and its required skill assets; the CLI integration itself remains small and uses the existing fix-finding workflow.

Testing

  • bun test --timeout 30000 tests-ts/cli-skills.test.ts tests-ts/cli-patch.test.ts --only-failures — 54 passed.
  • bun test --timeout 30000 tests-ts/cli.test.ts tests-ts/runtime.test.ts --test-name-pattern 'exposes Incur help, schemas, manifests, and completions|projects only the unchanged external payload from the source checkout' — 2 passed.
  • bun test --timeout 30000 tests-ts/update-notice.test.ts --only-failures — 12 passed.
  • tsc -p tsconfig.build.json — passed.
  • tsc --noEmit — passed.
  • Prettier checks on all changed TypeScript, Markdown, and JSON files — passed.
  • JSON Schema Draft 2020-12 validation of the bundled assessment schema — passed.
  • git diff origin/main...HEAD --check — passed.

Risk and rollout

All three flags are disabled by default, so existing patching behavior remains unchanged. Optional reviewers run inside the existing generation workflow; the risk assessor is read-only and never applies or merges a patch. The plugin-shipping manifest explicitly includes only the assessment files needed at runtime.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@github-actions github-actions Bot added the enhancement New feature or request label Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant