Skip to content

fix(oracles): label the per-law table as first-rejecting-law credit - #22

Merged
KyleAMathews merged 1 commit into
mainfrom
overnight/law-credit-label
Nov 11, 2026
Merged

KyleAMathews merged 1 commit into
mainfrom
overnight/law-credit-label

Conversation

@KyleAMathews

@KyleAMathews KyleAMathews commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

The gap report's per-law table now says what it counts. It credits each history to the first law that rejected it, so a law with no count is not shown to reject nothing.

Why it matters

A check returns its first violation, so a later law on the same history is not checked. The table was titled "Kills by law", and it read as every law's rejections. On yocto-queue, laws P1 and P2 got no count, and the table made them look like restated laws. Hand mutants showed that both laws are sensitive. This was field report V80.

What changes

  • The section title is now "First law to reject, by law", and the column is "Mutants it rejected first".
  • The section line says that each count credits only the first law that rejected a history. A later law on the same history is not checked. Its next step stays the same: to test a law with no count, add a history that varies the input the law judges.

Evidence

  • Law: the classify oracle's report law owes this section text. Authority: the maintainer's F18 item (2026-11-10) and field report V80.
  • RED: with the new expected text, the classify oracle fails on the parent with 10 failures. The message is "the kills-by-law section does not direct the author to a next step".
  • GREEN: the fast gap oracles pass, 31,249 tests.
  • Mutant: the parent's text is the mutant, and the RED above rejects it.
  • Limits: this PR changes only the text. The CLI still cannot say which laws can reject a mutant.

For the maintainer

The maintainer chose option (b) for F18: rerun the mutants with other laws' verdicts ignored, before a "law kills nothing" directive. This PR defers that option, for two reasons. The CLI issues no per-law "kills nothing" directive, so the rerun has nothing to gate. A rerun also cannot judge a shadowed law on the same history without a change to the check API, which the item ruled out. Please approve the deferral, or pick another design.

This pull request and its description were written by Isaac.

The gap report's "Kills by law" table credited each history to the first law
that rejected it, since a check returns its first violation, but it read as
every law's rejections. A law that a first law shadows looked like a law that
rejects nothing (field report V80, yocto-queue). The table is now "First law
to reject, by law", and its line says that a later law on the same history is
not checked.

The classify oracle's expected section text changed first. RED on the parent:
"the kills-by-law section does not direct the author to a next step" (10
failures). GREEN: the fast gap oracles pass, 31,249 tests. The maintainer's
option (b), a rerun that ignores other laws' verdicts, is deferred: the CLI
issues no per-law directive, and a rerun can't judge a shadowed law on the
same history without changing the check API.

Co-authored-by: Isaac <no-reply@databricks.com>
@changeset-bot

changeset-bot Bot commented Nov 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 29d9c38

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@tanstack/oracles Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Pre-merge checks: Passed 1 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Title check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
Passed Passed checks: 1 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@pkg-pr-new

pkg-pr-new Bot commented Nov 11, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/TanStack/oracles/@tanstack/eslint-plugin-oracles@22
npm i https://pkg.pr.new/TanStack/oracles/@tanstack/oracles@22

commit: 29d9c38

@KyleAMathews
KyleAMathews merged commit feb65a3 into main Nov 11, 2026
8 checks passed
@KyleAMathews
KyleAMathews deleted the overnight/law-credit-label branch November 11, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant