Skip to content

Oracle step 5: broke only when the change since the previous run caused it - #59

Merged
joshsiaw merged 1 commit into
mainfrom
oracle-broke-since
Dec 1, 2026
Merged

joshsiaw merged 1 commit into
mainfrom
oracle-broke-since

Conversation

@joshsiaw

Copy link
Copy Markdown
Contributor

Problem

Step 5 marks a re-checked finding broke whenever its places now disagree. The re-check is told only which files changed since the previous run, not how, so it cannot tell a disagreement the change caused from one that was already there.

Seen on a first weekly run: two places had disagreed for weeks before the previous run, which recorded the agreement as a risk rather than a bug. Unrelated edits to one of the files triggered a re-check, which found the disagreement and counted it as broke, so the dashboard showed 1 "broke as Oracle predicted" for something Oracle had not predicted, only missed.

Change

  • The re-check sees the diff. compare.diffOf gives each finding the diff of its changed files since the previous commit (read-only, uses the commit changedFiles already fetched; cut at 12,000 characters, saying so). The listing also carries previous_commit.
  • New status found_broken: the places disagree, but the diff does not show the change since the previous run caused it (already disagreed, or no diff). broke is now kept for disagreements the diff shows were introduced.
  • Rule in code, not just the prompt: a broke with no diff behind it is downgraded to found_broken, with a note.
  • Reported apart, not published. report.md gets a "Found broken" section (after Broke, before Fixed); changes.json counts found_broken. publish.js already sends counts by name, so the dashboard payload is unchanged and its broke means only what Oracle predicted. No dashboard change, no new release needed on the board side.

Tests

  • diffOf: only the asked files; uncommitted edits count; null (not empty) when the commit or files are missing; cut at the limit.
  • Re-check is given diff and previous_commit; found_broken is counted and reported apart and never as broke; broke without a diff is downgraded; publish never sends found_broken and never folds it into broke.
  • The last two checked against planted violations (downgrade removed; publish adding found_broken into broke): each fails.
  • 691/697 pass (6 Elixir skips); dashboard 245/245. dist/ rebuilt: only dist/oracle.js and its re-check prompt change; scan bundles untouched.

🤖 Generated with Claude Code

…ed it

The re-check now sees the diff of each finding's changed files since the
previous run. A disagreement the diff did not cause (it was already there,
or nothing shows what changed) is found_broken, reported apart and not
published: the board's "broke as Oracle predicted" counts only what Oracle
predicted. A broke with no diff behind it is downgraded in code.

Seen on a first weekly run: two places had disagreed for weeks before the
previous run, which recorded the agreement as a risk; unrelated edits to one
of the files then triggered a re-check, which found the disagreement and
counted it as broke.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@joshsiaw
joshsiaw added this pull request to the merge queue Dec 1, 2026
Merged via the queue into main with commit 4d4fc96 Dec 1, 2026
5 checks passed
@joshsiaw
joshsiaw deleted the oracle-broke-since branch December 1, 2026 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants