Skip to content

Report numeric mixed fractions as unread factors in the AB2026 checker - #252

Merged
MaxGhenis merged 4 commits into
mainfrom
uk/ab2026-checker-mixed-fractions
Nov 5, 2026
Merged

MaxGhenis merged 4 commits into
mainfrom
uk/ab2026-checker-mixed-fractions

Conversation

@MaxGhenis

@MaxGhenis MaxGhenis commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

We answer two low findings from GPT-6.1 Sol's review of #231 at 4dd5281d, as part of #230, and the findings from its reviews of this PR at 8200b418 and c9027fe2. We also answer the two low findings from an Opus 5.5 cloud review of 58f1eb5c.

  • Mixed fractions (F1). The checker in pipeline/ab2026_harvest_contract.py read "x 2 and a half" as a factor of 2, so "4" under it passed at 8. The checker now reports a factor that "and" and a fraction follow, at any value: "x 2 and half", "/ 2 and a half", "x 2 and three quarters" and "x 1e6 / 2 and a half". We name the form in the README's list.
  • Repeated closing brackets (F2). The checker already marks "paragraph 1.7; read from [[HMT]] Figure 1.A" as a bar reading, but a mutant that allowed one closing square bracket passed every test. We add that row and its negated twin.
  • Whitespace (review of 8200b418). The checker missed the fraction in "x 2 and a half" when two spaces or a tab separated "a" from "half". It now reads any run of whitespace in a note as one space, as it already does in value_raw, and we say so in the README.
  • Worded signs (review of c9027fe2). The checker missed the worded sign in sign from the wording; x 2, with two spaces after "sign", so "4" failed at −8. It now lower-cases a note and collapses its whitespace before it reads a worded sign, as it does before it reads a factor.
  • Every whitespace character (cloud review of 58f1eb5c). The parametrized test tried six runs and left the other whitespace characters to Hypothesis's random draws, so a mutant that misread an em space after "sign" survived one pass of the test file. The test now tries each of the 29 characters at every space in the 20 notes.

We stage none of these forms in the 5,952 rows, and the checker still finds 0 problems in the 12 families.

Invariants

  • The checker never reads part of a numeric mixed fraction as a factor: under each note in the new matrix, "4" gets the unread-factor problem at 4, 8, 10, 1.6 and 2,000,000.
  • The checker keeps the factor when the word after "and" starts no fraction: "4" under "x 2 and rounded", "x 2 and halfway" or "x 2 and a" passes at 8.
  • The checker ignores a locator's bar-reading phrase after one negation, including when repeated closing brackets precede the figure.
  • The checker reads a note the same way under any run of whitespace. We replace each space in 20 notes with a longer run or with each of the 29 characters Python counts as whitespace, and the checker returns the same factors and the same problems at 10 values. Hypothesis also tries mixed runs of those characters.

Checks

  • All 2,150 tests in tests/test_ab2026_harvest_contract.py pass.
  • We weakened the new pattern four ways, limited the locator's closing square brackets to one, and weakened the whitespace rule and the sign read ten ways. A test killed each of the 15 mutants.
  • We compared the checker's reading of all 5,952 staged notes before and after each whitespace fix, and none changed.

🤖 Generated with Claude Code

The checker read "x 2 and a half" as a factor of 2, so "4" under it passed
at 8. It now reports a factor that "and" and a fraction follow, at any value.
We also add the locator rows for repeated closing square brackets, which a
mutant allowing one such bracket passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
policyengine-scorecard Ready Ready Preview Nov 5, 2026 4:57pm UTC

Request Review

Sol's review of 8200b41 found that two spaces or a tab hid the fraction
in "x 2 and a half", so "4" under it passed at 8. The checker now reads
any run of whitespace in a note as one space, as it already does in
value_raw. We add three rows to the mixed-fraction matrix, a Hypothesis
test that widens a space in 14 notes, and a clause in the README's list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
"sign  from the wording; x 2" with two spaces reported an opposite sign at
-8, though the README says the checker reads any run of whitespace in a note
as one space (Sol, review of c9027fe). The checker now lower-cases the note
and collapses its whitespace before it reads a worded sign, as it does before
it reads a factor.

The whitespace test now compares factors and complete problem lists, over
every space in 20 notes, and Hypothesis tries all 29 whitespace characters.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

Closing and reopening so CI runs on 58f1eb5c: GitHub dropped the push event for that commit.

@MaxGhenis MaxGhenis closed this Nov 5, 2026
@MaxGhenis MaxGhenis reopened this Nov 5, 2026
MaxGhenis pushed a commit that referenced this pull request Nov 5, 2026
MaxGhenis pushed a commit that referenced this pull request Nov 5, 2026
The parametrized test tried six runs and left the other whitespace characters
to Hypothesis's random draws, so a mutant that misread an em space after "sign"
survived one run (cloud review of 58f1eb5). The test now tries all 29
characters at every space in each of the 20 notes, and compares factors and
complete problem lists at 10 values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MaxGhenis
MaxGhenis marked this pull request as ready for review November 5, 2026 21:07
@MaxGhenis
MaxGhenis merged commit 83fe4af into main Nov 5, 2026
15 checks passed
@MaxGhenis

Copy link
Copy Markdown
Contributor Author

We merged 96712654 with a merge commit, under the merge-your-own-PR gates.

  • Independent review. An Opus 5.5 cloud session approved 96712654 with two low findings in the description, and we answered both there before merging (hub-notes/pr252-review-96712654). The same session had approved 58f1eb5c with two low findings, and we answered them in 96712654 and its description (hub-notes/pr252-review-58f1eb5c). Subfleet held the Codex lanes this afternoon, so no GPT-6.1 Sol review ran at this head.
  • CI. gh pr checks returned 0 at this head, with all 15 checks listed, and GitHub reported the merge state as clean.
  • Scope. In this PR we changed the family checker, its tests and the README. We changed no staged row, no file under app/, and no site or lane data.

Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com

@MaxGhenis
MaxGhenis deleted the uk/ab2026-checker-mixed-fractions branch November 5, 2026 21:12

This branch was successfully deployed

1 active deployment
Preview — 96712654 Deployed Nov 5, 2026 by vercel[bot]
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