Skip to content

feat(cli): support custom patch validation prompts - #940

Merged
kmbroai merged 3 commits into
mainfrom
dev/kyleb/patch-validation-prompt
Sep 16, 2026
Merged

kmbroai merged 3 commits into
mainfrom
dev/kyleb/patch-validation-prompt

Conversation

@kmbroai

@kmbroai kmbroai commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

patch can now use environment-specific build, test, and runtime instructions to validate a generated fix through --validation-prompt-file PATH, matching the flag already available on scan.

Changes

  • Read the UTF-8 prompt once with the existing scan prompt loader and pass it to the fix-finding task for saved findings, issue text/files, and Linear inputs.
  • Preserve prompt path checks for the invocation directory, the saved finding's repository, and all enclosing worktrees, while allowing explicitly selected external files.
  • Require the task to run the requested validation and cleanup, report evidence, and identify failed or unavailable checks before claiming the patch is fixed or verified.
  • Document the flag and cover help/schema discovery, input routing, relative paths, multi-finding reuse, invalid files, and the existing publication-resume exclusion.

Testing

  • Current revision: focused patch and target suites (77 passed, two platform skips), pnpm run types, pnpm run format, and git diff --check passed. Directory-link regression tests failed before the fixes and passed afterward, including invocation from subdirectories and nested worktrees; explicitly selected file controls continue to pass.
  • Initial revision: pnpm run build:ci and pnpm run build:plugin passed. Local pnpm run test --seed 12345: 3,064 passed, 50 skipped, 11 failed. All 11 failures reproduce on unchanged main: authentication fixtures encounter a pre-existing Git marker in the local temporary directory.
  • Hosted CI covers randomized Linux, macOS, and Windows suites, installed packages, containers, plugin source contracts, and analysis. See the PR checks for the current revision's results.

Risk and rollout

The flag is optional and has no default prompt. Existing behavior, sandbox permissions, and output contracts remain unchanged when it is omitted. Validation runs inside the patch task using its existing permissions and result contract. Tests use deterministic Codex fixtures; no live model validation was run.

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 Sep 16, 2026
@kmbroai
kmbroai marked this pull request as ready for review September 16, 2026 14:56
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 16, 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
🔒 Security Review Completed 2026-09-16T15:29:26.678173Z e9aeb3a New commits

Security findings

Blocking findings (2)

ℹ️ 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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛡️ Codex Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: d85399b116

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread sdk/typescript/src/cli.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛡️ Codex Security Review · Automatically triggered

Here are some automated security review suggestions for this pull request.

Reviewed commit: f48b8b9eee

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

Comment thread sdk/typescript/src/cli.ts Outdated
@kmbroai
kmbroai merged commit b4119d1 into main Sep 16, 2026
55 checks passed
@kmbroai
kmbroai deleted the dev/kyleb/patch-validation-prompt branch September 16, 2026 15:38
@github-actions github-actions Bot mentioned this pull request Sep 17, 2026
3 tasks
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.

2 participants