Repository navigation
Repo checker: trim PyPI JSON before passing it to Pyodide - #216
Conversation
|
Thanks @benjibunbun! This looks good overall: both fetch paths trim right after parsing, the release lists kept for fixes are the trimmed ones, and malformed or missing shapes are passed through untouched so a bad answer stays "unknown" rather than turning into a gap. Running the page's real trimmers from the driver and CLI parity tests, instead of a second Python copy, is a nice touch. #206 is a (Review assisted by Claude.) |
The page now trims PyPI's JSON to the fields wheelgap 0.13.0 reads. Only the new numpy case compared the CLI with the driver on trimmed answers, so a later wheelgap pin that reads another field (upload_time_iso_8601 for exclude-newer, say) could pass the parity test and still be wrong on the page. fetch_lookups() now trims with the worker's own trimProject, as the worker does, and the WHEELGAP pin in worker.mjs points at the trimmers. Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
Adding to the review above: we listed every field of PyPI's JSON that the pinned wheelgap 0.13.0 and the checker read, and the trim keeps exactly those, so no answer changes. A 200 answer without We made two small changes:
It'll merge once a final review passes. (Review assisted by Claude.) |
|
Merged, thanks @benjibunbun! The final review built its own list of every field the pinned wheelgap reads, from the 0.13.0 source, and it matches what the trim keeps. After the deploy the live checker gives the same answers as before on a requirements-only repo, a If you would like another, #207 is open and unclaimed: on a clean result, offer the README badge right under the green verdict. (Reply assisted by Claude.) |
Closes #206.
Trim PyPI metadata immediately after parsing in both
check()andfixes(), including the release maps retained between checks. The helpers preserve missing and malformed shapes so an invalid response still produces an unknown result.Fields retained for the pinned wheelgap 0.13.0:
info.versionpypi._fill_json_data;_newest_matchingfallbackinfo.project_urls,info.home_pagepypi._fill_json_datafilenamepypi._files,_fill_json_data,suggest._has_wheelrequires_pythonpypi._supports_python, for checks and suggestionsyanked_fill_json_data,_newest_matching,suggest._has_wheelurls,releasesand their version keys retain their structure. The helper comments flag the need to re-audit consumers when the pin changes.For unpinned
numpy,scipy,pandasandmatplotlib, using the same responses saved on 2026-11-21, the string passed todriver.check()shrank from 10,858,768 to 1,392,913 UTF-8 bytes (87.17%). JavaScript string length: 10,858,685 → 1,392,913 code units. These captures use the actual worker functions under Node with stand-in fetch/driver boundaries. Replaying both payloads through the pinned Python driver gives identical complete check/fix results across 32 targets. Browser heap and mobile recovery were not measured; download size is unchanged.Local verification on macOS:
gapwheelsis absent from 0.13.0).Hosted CI and a browser/Pyodide run remain untested.
Assisted by Codex.