Skip to content

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

Done

Description

@patrickballard

When some of a file's packages are kept off pypi.org (they come from an index that isn't known to be PyPI's) and the rest all have wheels, the verdict card still reads as a clean pass. #225 fixed the badge and the share line for this case. The headline, the green card and the platform tiles were left as they were.

To see it, run the driver under CPython, as tests/test_check_driver.py does, on a Pipfile.lock whose corp-utils comes from an index the lock doesn't describe:

{"_meta": {"sources": [{"name": "pypi", "url": "https://pypi.org/simple", "verify_ssl": true}]},
 "default": {"idna": {"version": "==3.10"}, "corp-utils": {"version": "==1.0", "index": "corp"}},
 "develop": {}}

With PyPI's answer for idna==3.10, driver.check() returns packages: 1, private: ["corp-utils"] and {"wheel": 1, "source": 0, "missing": 0, "unknown": 0} for the target. The page then shows:

  • the headline ✓ All 1 packages have a wheel for this target;
  • the card with the green clean class;
  • a ✓ "all wheels" tile for each platform;
  • and, below all that, an alert that says corp-utils wasn't checked.

Someone who reads the headline and stops there sees a pass for a project that was only partly checked. "All 1 packages have" is also wrong English, whenever a file has exactly one package.

Where

  • verdictText(h) in site/check/check-logic.mjs writes the headline. shareText() beside it already takes notChecked and never gives a ✓ when it is set.
  • renderVerdict() in site/check/check.mjs: isClean ignores r.private (only the badge checks it), and sets the clean class.
  • tileText(c, outside) in site/check/check-logic.mjs, called from renderTargets().
  • tests/site/check-page.test.mjs: the withPrivate case checks the badge and the "Fix it" heading only.

What to do

  • Pass the number of packages that weren't checked (r.private_count) to verdictText(), as shareText() gets it. With any, no ✓, and say it in the same words as the share line: All 1 checked package has a wheel for this target; 1 more wasn't checked (its index isn't known to be PyPI).
  • isClean is false when any package went unchecked, so the card isn't green.
  • A tile shows ✓ only when nothing went unchecked. Otherwise it shows ? with "N not checked", as it does for unknown packages.
  • Fix the singular everywhere verdictText() counts: "1 package has", "All 2 packages have".

Done when:

  • tests/site/check-logic.test.mjs: verdictText() with 0, 1 and 2 packages not checked, and with 1 and 3 packages checked; no ✓ whenever one wasn't checked; singular and plural right.
  • tests/site/check-logic.test.mjs: tileText() for a target whose checked packages all have wheels, with and without unchecked packages.
  • tests/site/check-page.test.mjs: the withPrivate case also checks that the card has no clean class and that the headline has no ✓.
  • In the PR: before and after, as screenshots. A local page fed the result above is fine.

Activity

  1. added
    bug
    good first issue
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buggood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions