Repository navigation
Oracle step 5: follow findings from one run to the next - #57
Merged
Merged
Conversation
Each run rewrites its findings and sees about two thirds of what is there, so findings are paired with the previous run's by meaning (one model call), a paired finding keeps its id, and an earlier finding not found again is carried forward as open unless one of its files changed — then a re-check reads the code and may close it as fixed, guarded or broke. Nothing is closed without that re-check; if matching or a re-check fails, the findings concerned stay open. Writes changes.json; the report gains "Since the previous run". A local folder target is never fetched into. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Fetch the previous commit only into Oracle's own clone: a local folder target that is itself a shallow checkout was fetched into. - Changed files relative to the target (--relative), so a target inside a bigger repository sees its changes; against the tree on disk, so a local folder's uncommitted edits count; -z so unusual file names are not quoted. - Places naming a folder, a line anchor or a quoted path match the files that changed. - Ids are unique against every id ever handed out (issued_ids), closed ones included, so a closed finding's id is never reused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Matching quality check on real findings (the open item in the description). Input: two runs on one commit of a ~3,000-file TypeScript monorepo, 92 and 82 findings, plus 48 reference pairs judged separately earlier. A Sonnet agent was given only
Prompt left as is. In real runs, watch for matches between findings on the same files for different reasons. |
maciej-szlosarczyk
approved these changes
Nov 27, 2026
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
Step 5 of Oracle's build order: each run is compared with the previous one. Every open finding comes out as new, still open, fixed, guarded or broke, and keeps one id across runs. Design: Step 5 in
agents/oracle/DESIGN.md.The first live runs showed why this can't be a simple diff:
How it works
prompts/compare.md, no tools) pairs the previous run's open findings with this run's. A paired finding keeps its id.merged.split, with new ids.prompts/recheck.md, tree tools) reads the places as they are now and returnsstill_open,fixed,guarded,brokeorunsure.Ids are a finding's fingerprint in the run that first saw it, made unique against every id ever issued (
issued_ids, closed findings included). They never change, so step 6 can use them to label pull requests.Backlog. A run's open set is its findings plus
changes.json→carried, so weekly runs build up coverage instead of dropping what each run missed.Changed files are the difference between the previous commit and the tree on disk, relative to the target. Oracle's own shallow clone fetches the previous commit one deep. A local folder target is only read and never fetched into, even if it is a shallow checkout.
Output
changes.json: the previous run, the outcome for each earlier finding, the change for each current finding, the carried backlog, issued ids and counts. The counts are also inrun.json→changes, for the dashboard summary later.report.mdgains a Since the previous run section: broken agreements first (they are bugs now), then fixed, guarded and carried.previousRun()takesneeds, so a run that crashed before writing findings is never used as the previous run.prompt_versionis bumped to 2026-11-25.Testing
npm test: 674 tests, 668 pass, 0 fail, 6 skipped (unchanged). 26 new tests: matching, merge and split, id uniqueness, carry and re-check, every failure path, and changed files against real temporary git repos (shallow clones, subfolder targets, uncommitted edits, odd file names, no fetch into a local folder).npm run buildleavesdist/unchanged (agents are not bundled yet).Not yet done
🤖 Generated with Claude Code