Repository navigation
Conversation
|
Thanks for the thoughtful proposal and for the real work behind it — the problem statement is fair: catalog entries can drift from npm, and today that only surfaces when someone installs. We are not going to merge this in its current form. With a catalog this large, sampling a few dozen entries cannot give meaningful coverage, and a manually triggered, non-blocking report adds an ongoing maintenance surface — a bespoke tar reader plus a pinned third-party checker — without changing what users actually see. That trade-off is not one we want to take on right now. The direction we do consider valuable is entry-time verification rather than periodic sampling: checking npm availability and the npm Either way, thank you for taking the time. The write-up and the tests are appreciated, and this is a decision about maintenance scope, not about the quality of your work. |
Catalog audit: advisory ENTRY static checks over npm-backed entries
Problem
The catalog lists thousands of npm-backed entries, but nothing in the repo can tell
whether a listed tarball still resolves and still passes the ecosystem's ENTRY static
checks. Today that is a manual
npxinvocation per plugin, so packaging regressions,renamed repositories, and catalog/npm attribution drift stay invisible until someone
installs the plugin.
Change
Three new files. No runtime code, no
package.jsonscript, and no dependency changes(
package.jsonand the lockfile are untouched).scripts/audit-catalog.mjs— read-only, dependency-free audit (Node built-ins +the npm CLI):
(
https://api.dsh-plugin.org/plugins.zh.json, persrc/server/http/catalog.ts);--catalog <file|url>switches to a local snapshot or another URL;--limit N(default 20,hard cap 50) in catalog order after deduplicating names, and records that rule in
the report;
npm pack <name> --ignore-scripts --registry=https://registry.npmjs.org/intoos.tmpdir(), extracts with a built-in tar reader (no new dependency), and checksthat the npm
repositorymatches the catalog repo — a mismatch is recorded asnot_runwith reasonrepository_mismatchand the checker is not run for it;npx -y dsh-standards@1.6.9 check <dir> --scope entry --entry-claim static --no-exec --jsonand keepsconclusion.status, counts, coverage, duration andreason per package;
not_runwith a reason andnever abort the round; the temporary tree is removed at the end; the process exits
0 unconditionally.
.github/workflows/catalog-audit.yml— manual (workflow_dispatch) only,permissions: contents: read, Node 24 (the checker's engines require >= 24.9),uploads
audit-report.json+step-summary.mdas artifacts and appends the summaryto the run page. No schedule, no comments, no commits, no writes to main.
tests/audit-catalog.test.mjs— unit tests for entry filtering, sampling andclamping, checker-status mapping, repository back-link comparison, and tar path
safety (17 tests; no network, no child processes). It is
.mjsbecause the subjectis a build-free script and
tsconfig.test.jsonisstrictwithoutallowJs.Boundaries
always exits 0. Nothing here gates merges, admission, or installs.
two artifacts (plus the run-page summary). No package code is executed:
npm packnever installs,
--ignore-scriptsis passed, and the checker runs with--no-exec.ENTRY sample and is partial;
not_runmeans "not assessed here", not "bad". Both theJSON (
disclaimer) and the Markdown summary say this explicitly.Verification
The 404, wrong-repository, timeout and unparsable-report paths were checked locally
(fixtures for the pure mapping; a nonexistent package and a mismatched catalog repo for
the end-to-end path) and all of them land on
not_runwithout aborting the run.Rollback
Revert the commit, or delete the three files. Nothing else references them: no
package.jsonscript, no existing workflow, no runtime import. No data or configmigration is involved.
Notes
dsh-standards@1.6.9so repeated runs stay comparable;bumping it is one constant in the script plus one assertion in the tests.
npxfetches that pinned checker from npm on first use and reuses the npm cacheafterwards. The workflow is manual and read-only, so this remains an explicit,
maintainer-initiated action.