feat(sdk): Add finding verification pass#290
Merged
Conversation
Run candidate findings through a shared post-processing pipeline that deduplicates, verifies, merges, and gates suggested fixes before reporting. Add shared prompt-section helpers so agent prompts use the same tagged structure, and emit debug finding-processing events for dropped, revised, merged, and stripped findings. Co-Authored-By: GPT-5 Codex <noreply@anthropic.com>
Scan balanced JSON objects in verifier output and accept the first object matching the verdict schema. This keeps valid reject and revise decisions when the model emits reason before verdict. Co-Authored-By: GPT-5 Codex <noreply@anthropic.com>
Propagate authentication and subprocess failures from finding verification so runs do not silently succeed with unverified findings. Keep verifier revisions anchored to the original validated finding location and fix payload, while still allowing severity and explanation changes. Co-Authored-By: GPT-5 Codex <noreply@anthropic.com>
Use the existing defaults merge when resolving repo-defined skills in layered configs so base defaults apply unless the repo layer overrides them. This preserves the base verification setting for repo-local skills when the repo config omits its own verification defaults. Co-Authored-By: GPT-5 Codex <noreply@anthropic.com>
Inherit only the layered defaults that repo-defined skills intentionally share from the base config. Keep base verification inheritance without leaking unrelated defaults, and allow verifier reject responses to include finding = null. Co-Authored-By: GPT-5 Codex <noreply@anthropic.com>
Include auxiliary usage when rendering skill costs in the Ink progress display and completed skill summary. Verification now contributes to the displayed total cost once the run has reported auxiliary usage. Co-Authored-By: GPT-5 Codex <noreply@anthropic.com>
Include auxiliary usage in CLI summaries, saved run listings, and GitHub core check skill rows so displayed costs match the full run cost. Keep the usage contract unchanged by centralizing primary plus auxiliary cost formatting in the renderer helper layer. Co-Authored-By: GPT-5 Codex <noreply@anthropic.com>
Trigger fail-fast from final skill reports instead of per-file candidate findings so verification and other post-processing can reject false positives first. Preserve skipped Ink skill state when skipped skills emit completion for JSONL streaming. Co-Authored-By: GPT-5 Codex <noreply@anthropic.com>
Run verifier sessions with bounded internal concurrency so multiple candidate findings do not serialize every second-pass trace. Preserve verifier authentication diagnostics and keep quiet fail-fast tied to final skill reports instead of file-level candidates. Co-Authored-By: GPT-5 Codex <noreply@anthropic.com>
Pass the skill tool configuration into the verification runtime so the second-pass agent has the same read-only context the skill requested. Co-Authored-By: GPT-5 Codex <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5fb055b. Configure here.
Treat near-immediate duplicate SIGINT delivery as the same user interrupt so pnpm-wrapped runs can finish graceful shutdown instead of force-exiting after one Ctrl+C. Preserve the later second Ctrl+C force-exit path. Co-Authored-By: GPT-5 Codex <noreply@anthropic.com>
Discard findings that never receive a verifier verdict when verification is aborted. This keeps interrupted and fail-fast-adjacent runs from surfacing unverified candidates as accepted findings. Log the discard through the existing finding-processing debug path. Co-Authored-By: GPT-5 Codex <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.

Add a default-on second pass that verifies candidate findings before they are reported. The verifier runs through the existing runtime abstraction with the auxiliary model, can keep/revise/reject findings, and can be disabled with
[defaults.verification] enabled = false.This also pulls duplicated prompt-section construction into shared helpers and moves SDK/CLI post-analysis work into one
postProcessFindingspipeline so dedupe, verification, merge, and fix-gate behavior stay aligned. High-verbosity output now logs processing events such as dedupe drops, verification revisions/rejections, cross-location merges, and stripped suggested fixes.Validated with
pnpm lint,pnpm run typecheck,pnpm build,pnpm test -- --maxWorkers=1, andpnpm test:evals.