Skip to content

fix: keep unchecked packages out of clean wheel verdicts - #244

Merged
patrickballard merged 3 commits into
wheelgap:mainfrom
fbirds5230:fix/237-incomplete-wheel-verdicts
Nov 23, 2026
Merged

patrickballard merged 3 commits into
wheelgap:mainfrom
fbirds5230:fix/237-incomplete-wheel-verdicts

Conversation

@fbirds5230

@fbirds5230 fbirds5230 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

With one public dependency and one unchecked private dependency, the checker still showed a green verdict card, a checkmark in the headline, and “all wheels” on the platform tiles. The separate alert was the only indication that the result was incomplete.

The headline now says how many packages weren't checked, the card stays neutral, and an otherwise passing tile shows ? with the unchecked count. Known wheel gaps and targets outside the lock keep their existing labels. It also fixes “All 1 packages have” to “1 package has”.

A shared helper counts distinct private package names for the headline, tiles, “Keep it green” heading, and copied share text. Repeated requirements for one package count once, matching the names in the warning.

Fixes #237.

Tests

  • All 196 site tests pass, along with the site's JavaScript syntax checks.
  • Python 3.14.10 with pytest 8.4.2: 603 passed, 2 skipped because wheelgap isn't installed in that test environment.
  • The separate driver and CLI-parity run with the browser's pinned wheelgap 0.13.0: 163 passed, 6 skipped because that release doesn't provide wheelgap.gapwheels.
  • python3 scripts/check_notes.py passes.

The regression checks fail on the original code. They cover singular/plural headlines, zero/one/two private packages, the card's clean class, and the count passed by the actual platform renderer. The repeated-requirement case also exercises the copy handler to check that the share text and headline agree.

Before and after

For one checked package and one private package, the tested headline changes from ✓ All 1 packages have a wheel for this target to 1 checked package has a wheel for this target; 1 more wasn't checked (its index isn't known to be PyPI). The DOM regression checks confirm that the card loses its clean class and that the target renderer shows ? / 1 not checked instead of ✓ / all wheels.

The requested before/after screenshots aren't included: the available browser cannot open the local preview artifacts. The observations above come from the formatter and DOM regression tests, not a visual browser check.

@patrickballard

Copy link
Copy Markdown
Contributor

Thanks @fbirds5230, this is a really careful fix: the headline, the card and the tiles all stop claiming a pass now, the "All 1 packages" English is fixed, and the renderTargets test really does fail on the old code.

We'd normally push the last bits ourselves, but "Allow edits by maintainers" is off on this branch, so here's what's left before it can go in:

  • One count everywhere. The headline and tiles now use r.private_count ?? private.length, but the share line (copy-share handler, site/check/check.mjs ~line 631) and the "Keep it green" / "Fix it" heading (~line 597) still use (r.private || []).length. With your repeatedPrivate case (private: ["corp"], private_count: 2) the headline says "2 more weren't checked" while the copied share line says "1 more wasn't checked". Please add one small helper (say notCheckedCount(r)) and use it in all four places.
  • Count packages, not entries. private_count counts requirement entries (the driver's docstring says it's there to ask "was every entry skipped as private?"), so one package named corp listed twice under different markers reads as "2 more weren't checked". For a sentence that talks about packages, the distinct-name count ((r.private || []).length, the same list the alert shows) fits better, so the helper can just return that. Then update the repeatedPrivate test to expect "1 more wasn't checked", and add a check that the share line and headline agree for that result.
  • Optional wording nit: in the "couldn't be checked" branch of verdictText(), "1 of 3" reads oddly once "2 more weren't checked" follows. "1 of 3 checked packages couldn't be checked on…" would match the other branches.
Prompt for your AI assistant (if you use one)
In wheelgap/tracker, site/check/check.mjs: add a helper `function notCheckedCount(r) { return (r.private || []).length; }`
and use it for notChecked in renderVerdict(), renderTargets(), the "Keep it green"/"Fix it" heading check, and the
last argument of shareText() in the copy-share handler, replacing every other `(r.private || []).length` /
`r.private_count ?? ...`. In tests/site/check-page.test.mjs, change the repeatedPrivate case
(private: ["corp"], private_count: 2) to expect "1 checked package has a wheel for this target; 1 more wasn't
checked (its index isn't known to be PyPI)", and assert the share text built for that result also says
"1 more wasn't checked". Run the site tests.

Once that's pushed, we'll take another look and merge it.

(Review assisted by Claude.)

@patrickballard

Copy link
Copy Markdown
Contributor

Thanks @fbirds5230! Your second commit covers everything from the first review: one count of distinct private names, used in the headline, tiles, heading and share line, and the share line now matches the headline.

One thing blocks it: main moved today (#241), and the branch now conflicts in tests/site/check-page.test.mjs. The fix is to keep both names in resultPage()'s functions list: yours (notCheckedCount) and main's (chooseFile). Nothing else conflicts.

We'd push that merge ourselves, but "Allow edits by maintainers" is off on your branch. Could you either tick that box in the PR sidebar, or merge main in yourself? CI will run once it's approved for your first PR here.

@patrickballard

Copy link
Copy Markdown
Contributor

Thanks @fbirds5230, the merge is clean: both notCheckedCount and chooseFile are kept, and the headline, card, tiles and share line all agree now.

A final review of the merged head found two small things. "Allow edits by maintainers" is still off, so we can't push them ourselves:

  • The gaps table still claims a pass. In renderTable() (site/check/check.mjs, around line 577), when no checked package lacks a wheel, the note says None: every package installs from a wheel here. With the Repo checker: "✓ All 1 packages have a wheel" in a green card when a private index's packages weren't checked #237 lockfile (idna checked, corp-utils private), that sentence appears just under a tile that now shows ? / 1 not checked. When notCheckedCount(r) > 0, it should say something like None among the checked packages; 1 more wasn't checked (its index isn't known to be PyPI). Please also add a test asserting the note doesn't say "every package" when private is set, since no test covers gaps-note yet.
  • "its" vs "their" in the share line. shareText() in check-logic.mjs (around line 654) always says (their index isn't known to be PyPI), so one unchecked package gets "1 more wasn't checked (their index…)" while the headline says "its". A small shared helper for the tail, used by both verdictText() and shareText(), would keep them identical. Tighten the share-line test to match the full tail.
Prompt for your AI assistant (if you use one)
In wheelgap/tracker site/check/check-logic.mjs, add and export a helper
`notCheckedTail(n)` returning `n ? \`; ${n} more ${n === 1 ? "wasn't" : "weren't"} checked (${n === 1 ? "its" : "their"} index isn't known to be PyPI)\` : ""`,
and use it in both verdictText() and shareText() instead of their own tail strings.
In site/check/check.mjs renderTable(), when there are no gap rows and notCheckedCount(r) > 0, set gaps-note to
`None among the checked packages${notCheckedTail(notCheckedCount(r))}.` instead of "None: every package installs from a wheel here."
Add tests: shareText() with notChecked 1 says "(its index", with 2 says "(their index"; and renderTable() for a result with
private: ["corp"] and no gap rows doesn't say "every package". Run the site tests.

Once that's in, we'll take one more look and merge it.

(Review assisted by Claude.)

@patrickballard
patrickballard merged commit ed5551a into wheelgap:main Nov 23, 2026
1 check passed
@patrickballard

Copy link
Copy Markdown
Contributor

Merged, thanks @fbirds5230! The checker no longer shows a green "all packages have a wheel" when a private index's packages weren't checked, and the headline, tiles and share line now agree on the count.

One sentence it didn't cover was already on main: the gaps note still says "None: every package installs from a wheel here" in that case. We'll fix that ourselves in a follow-up PR, so nothing more is needed from you.

If you'd like another, tracker#239 is open: a uv.lock locked for [tool.uv] environments shows false gaps on the platforms it leaves out.

patrickballard added a commit that referenced this pull request Nov 23, 2026
…when some weren't checked (#245)

With a private index's packages left unchecked and no gaps among the rest, the note under the table said "None: every package installs from a wheel here." next to a tile showing "1 not checked". It now says "None among the checked packages; 1 more wasn't checked (its index isn't known to be PyPI)." One helper words that tail for the headline, the share line and the note, so the share line no longer says "their" for one package. The unknown headline drops "checked" from "1 of 3 checked packages couldn't be checked". Follow-up to #244, from its second review.

Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

Repo checker: "✓ All 1 packages have a wheel" in a green card when a private index's packages weren't checked

2 participants