Add npm release-date anachronism checks - #86
Conversation
jpbelmo
left a comment
There was a problem hiding this comment.
First: apologies for the three-day silence — you delivered same-day and deserved better; the binaries release consumed the repo. Second: this is one of the strongest first PRs this project has received. You resolved a tension the issue didn't even know about (our 0.13.0 zero-network-until-yes invariant landed after #81 was written, and your ordering — disclosure local and pre-consent, lookups strictly after the yes and even after the visibility gate — is exactly right), you strengthened the zero-network test beyond what we asked, and the audited-allowlist answer to the slug-vs-package gap is better design than the issue's own sketch.
One required change: rebase onto main — your CHANGELOG section collides with the 0.14.x releases that shipped while you waited (our fault, not yours). Two optional notes: a trailing newline in test/program.test.ts, and one docs sentence acknowledging that npm's time.created resets on unpublish/republish (harmless given warn-only, worth naming). Rebase and this merges through our standard gate.
01d7aaa to
60c7e37
Compare
|
Merged. Fastest turnaround this repo has seen: review to rebase-with-every-optional-note in thirty minutes, on a first contribution that had already solved an invariant younger than your own PR. The disclosure-before-consent, lookups-after-yes ordering you chose is now part of how this repo thinks about network features. Issue #81's CLI half is done — welcome to the contributors list, and the server half will cite your design. |
|
Thanks @jpbelmo for the kind words! |
Summary
Closes #81.
Design
detected_skillsrecords a slug but not which package or ecosystem produced it, so this PR does not infer npm provenance broadly. Instead,signatures/package-map.jsonadds an auditednpmReleaseCheckPackageslist for four unambiguous package keys:better-auth@lemonsqueezy/lemonsqueezy.js@paddle/paddle-js@paddle/paddle-node-sdkThe package-to-slug relationship still comes only from
map; the new list does not detect skills. Tests require every map key for an eligible slug to be audited and exclude Tier 2-produced slugs.The checker:
registry.npmjs.orghosttime.createdPrivacy boundary
Privacy gate: run
registry.npmjs.orgnpm test/npm run typecheck/npm run build: greenhttps://registry.npmjs.orgconstant in the new checker module; that module contains no network primitive and production transport remains in allowlistedsubmit.ts/http-client.tsNetwork order remains explicit:
Declining causes zero network calls. A confirmed-public remote blocks before npm. The exact reviewed JSON remains byte-for-byte equal to the uploaded body.
Output behavior
--confirm-uploadhelp now states that it authorizes upload and subsequent eligible npm lookups.Verification
npm test— 54 files, 911 tests passednpm run typecheck— passednpm run build— passedgit diff --check— cleanVERDICT: APPROVEDNo bundle field, schema file, taxonomy entry, Redential upload header/body, runtime dependency, or postinstall script changed.