Skip to content

Read maths, object streams, subtitles and ignore_paths as the document does - #7

Merged
M-Colley merged 1 commit into
mainfrom
fix/false-positives-and-ignore-paths
Nov 5, 2026
Merged

M-Colley merged 1 commit into
mainfrom
fix/false-positives-and-ignore-paths

Conversation

@M-Colley

@M-Colley M-Colley commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Fixes #3, fixes #4, fixes #5, fixes #6.

Each of these reported a correct, finished paper as wrong. All four are fixed in both the Python package and the browser engine, and extension/engine.js is regenerated.

Issue Rule Cause Fix
#3 STY003 The prose view blanks inline maths, so in and $[a]$ and $[b]$ the two "and"s became adjacent Skip a match when maths sits between the two words. the \emph{the} is still reported, because a group closes between those words, which the existing heading check covers.
#4 ACC006 It searched the raw bytes for /Marked true. A catalog in a compressed /ObjStm (pdfTeX's default object compression, LaTeX tagging) never shows it Inflate the object streams with zlib (stdlib) and search those too, over the whole file rather than the first 4 MB. In the browser engine, runChecks inflates them up front with DecompressionStream, because rules run synchronously.
#5 BIO002 It compared the entry with Crossref's title alone. The subtitle is in its own field, so "DeepMimic" scored 0.14 against the full title Compare with both title and title: subtitle, and keep the better score.
#6 VEN006 and others ignore_paths was accepted and never read anywhere Applied by the rules that walk the tree: VEN006, finding the main document, and the .bib search when the document names none. Matching follows .gitignore, and **/__pycache__/** joins the defaults. A project's list replaces the default list, as every list in the file does. Files the document inputs are still read. Documented in the README.

Tests. New cases are in tests/test_false_positives.py (10) and in browser/test-engine.mjs (12, the same cases). Without the fix, 7 of the Python cases fail and the engine tests do not run. With it, 971 Python and 411 engine tests pass, and docs/rules.md is unchanged. Each fix also has a control showing the genuine case is still reported: a real repeat next to maths, an untagged PDF with object streams, a different work behind the DOI, and a bad file name outside the ignored paths.

Check on a real project. On the paper where these were found, this branch removes every one of these findings (3 errors and 2 warnings on main). The findings it still reports are genuine.

🤖 Generated with Claude Code

@google-cla

google-cla Bot commented Nov 5, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

…t does

Four false findings on a real ACM paper, fixed in the Python package and the
browser engine alike (extension/engine.js regenerated):

- STY003: two words with inline maths between them are not a repeated word;
  the prose view blanks the maths, the reader does not (#3).
- ACC006: a PDF that keeps its catalog in a compressed object stream (PDF 1.5,
  pdfTeX's default, LaTeX tagging) is tagged; inflate /ObjStm streams before
  looking for /Marked true, and read the whole file, not its first 4 MB (#4).
- BIO002: Crossref keeps the part after the colon in `subtitle`; compare the
  entry with the title and with title: subtitle (#5).
- ignore_paths was accepted and never applied. The rules that walk the tree
  now honour it (VEN006, finding the main document, the .bib fallback), read
  like .gitignore, and the default list skips __pycache__ (#6).

Regression tests in tests/test_false_positives.py and browser/test-engine.mjs;
971 Python and 411 engine tests pass, docs/rules.md unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@M-Colley
M-Colley force-pushed the fix/false-positives-and-ignore-paths branch from a65fc58 to e79c405 Compare November 5, 2026 08:32
@M-Colley
M-Colley merged commit aec1ac6 into main Nov 5, 2026
8 of 9 checks passed
@M-Colley
M-Colley deleted the fix/false-positives-and-ignore-paths branch November 5, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant