Repository navigation
Conversation
… show The native dlx only ran when the first-run gate was switched off, so a plain `vis dlx <package>` started Node even in CI, where the gate skips itself without any network work. The binary now decides the gate the way the Node handler does: - `--yes`, a truthy `VIS_DLX_YES`, CI, or a stdin or stdout that is not a terminal: the gate does nothing, the package manager runs natively. - a terminal outside CI without `--yes`: the gate resolves each package against the registry and looks the version up in `~/.vis/state/dlx-seen.json`. An approved version with no Socket token makes the gate silent, so it runs natively. The packument is read through the shared registry client and cache (`inspect::Packuments`). - a version that is not approved yet (the panel and the prompt), a Socket token, `--offline`, a range spec, `--info`, or a value of a gate variable that is not ASCII are handed to Node before any output. The registry cache is written only after every package is known to be approved, so a hand-off writes nothing. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
`vis attest` always started Node. Two of its paths are reproducible natively, byte for byte: - `vis attest <subject>` with no ambient OIDC token: Node hashes the artifact and skips signing, with the JSON document under `--format json` or a warning line. A run that signs (`CI` equal to `true`, a GitHub Actions or Sigstore token), `--require-signing`, and every thrown failure stay in Node. - `vis attest verify`: the locked packages of a pnpm workspace are checked against the registry's provenance and signatures, with up to eight packuments in flight (the cache of `vis inspect` is shared) and the registry's signing keys from `~/.vis/cache/registry-keys` or the registry. ECDSA P-256 signatures are verified with ring. The JSON and NDJSON reports are native, and so is the table for a run that finds nothing; a table of findings is drawn by the terminal UI, so Node prints it, after the native run has written the cache it filled so Node finds it warm. Everything this binary does not read the way Node does is handed over before any output: `--prod-only`, `MARSHALL_*`, `VIS_NPM_KEYS_URL`, a proxy or CA setting, a registry that needs a credential, a packument, key or signature in a shape the checks name, and a base64 text that is not canonical. The packument lookup of `inspect` is widened (`Packuments::read`, the view and the provenance helper) and the keys cache gets a loader that defers its write until the run is known to answer. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… the gate Run against the lockfile of a real workspace (2110 packages, byte-identical JSON and the same cache files as Node), a package whose packument this binary cannot read ends the scan after hundreds of fetches. The packuments that were read are now written before the hand-off, as they are for the table of findings, so Node finds them warm. The launcher gate moves after the helpers it uses and its flag reader is split, to satisfy the lint rules. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
`vis add` without `--no-marshall-check` always started Node, because the pipeline looks every package up in the registry first. The binary now runs that check itself and answers the run in which no marshall finds anything, which prints nothing: - versions resolve as Node resolves them: `semver.coerce` of the spec, else the registry's `/<name>/latest`, and a name that does not resolve is dropped. - the packument is read through the shared lookup and cache (outside a workspace root Node ignores `.npmrc`, so the binary asks the default registry there). `author`, `provenance`, `s1ngularity`, `newBin` and `metadata` are the ones `vis inspect` runs; `deprecation` and `packageAge` are new. - `downloads` (npm stats), `archivedRepo` (GitHub) and `expiredDomains` (a DNS NS lookup over UDP, answered only when it finds name servers) keep Node's 24 hour disk caches, byte for byte. A failed GitHub lookup is no finding, as in Node. - any finding, a registry or service answer the checks do not read as Node does, an expired or odd cache entry, a proxy or CA setting, and `MARSHALL_DISABLE_ALL` or any `MARSHALL_*` variable that is not the `DISABLE` of one of those marshalls go to Node before anything is printed or written. The cache the check filled is written only once the run is sure to answer. The launcher gate no longer requires the flag and reads the `MARSHALL_DISABLE_*` variables of the marshalls the check runs, per variable. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…at finds
Checked against the real registry: the pipeline of `vis add` passes the
five author thresholds as `undefined`, and `{ ...DEFAULTS, ...thresholds }`
lets them replace the defaults. The recent-version and dormant-maintainer
checks therefore never report, and the new-publisher check has no window
that excuses a young package. The native check now does the same, where
it ran the defaults `vis inspect` runs and declined runs Node answers.
A hand-off names the check that found something, lint fixes for the
launcher gate, and the real-network case is dropped from the parity suite.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
Thank you for following the naming conventions! 🙏 |
PR Summary by QodoRun add checks, attest verification, and dlx gates natively
AI Description
Merge Risk
|
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Merging this PR will not alter performance
Performance Changes
Comparing Footnotes
|
Code Review by Qodo
1. Malformed DNS replies hide domain warnings
|
Problem
vis add <pkg>without--no-marshall-checkalways started Node: the pipeline looks every package up in the registry first, and native had no counterpart.Change
native/cli/src/marshall_check/runs that check and answers the run in which no marshall finds anything (it prints nothing). Anything else is handed to Node before output, manager run or write.semver.coerceof the spec (node-semver's expression), elsehttps://registry.npmjs.org/<name>/latest(fixed host, ignores.npmrc; a name that fails is dropped).author,provenance,s1ngularity,newBin,metadata(asvis inspect), plus newdeprecationandpackageAge. Outside a workspace root Node ignores.npmrcand asksregistry.npmjs.org; native does the same.downloads(npm stats),archivedRepo(GitHub) andexpiredDomains(a DNS NS lookup over UDP to 1.1.1.1/8.8.8.8, counted only when it returns an NS record) keep Node's 24 h disk caches, byte for byte. A failed GitHub lookup is no finding, as in Node.undefinedand its spread replaces the defaults, so recent-version and dormant-maintainer never report and new-publisher has no window. Found by running against the real registry;vis inspectuses real defaults, so the two differ on purpose.--no-marshall-check; the blanketMARSHALL_*decline became per variable, foraddonly (MARSHALL_DISABLE_<marshall>of the ten checks pass;MARSHALL_DISABLE_ALL,_TYPOSQUATS,_SOCKET, anything else stays Node). Proxy/CA/Node options keep a checking run in Node.bin/route.mjs,routing.json, the route snapshot androute.test.tsupdated together.What stays in Node (honest slice)
react@19.0.0has a metadata one), so those runs are handed over; native has already fetched and written nothing, so Node fetches again (a double fetch on that path; I did not warm the cache on hand-off here).signatures(opt-in), Socket/deps.dev/Snyk (config-only, so off without asecurityconfig).Verification
cargo fmt/clippy -D warnings,cargo test -p vis-cligreen (loopback stubs for the registry, stats API, GitHub, and a UDP DNS server).add-marshall-parity.test.ts(new; stub registry, seeded service caches) andadd-parity.test.ts,route,routing-fixture, whole__tests__/nativeat this tip withFORCE_COLOR=3 CI=1 GITHUB_ACTIONS=true TERM=xterm-256color: green except twobeforeAll/afterAllhook timeouts (30 s) in unrelatedrun-all-hitandsort-package-jsonunder the full parallel load; both pass when rerun.vis add <pkg>@<exact>,<pkg>,<pkg>@latest, a range, an unknown name; inside and outside a workspace root): same stdout, same stub-manager log, same~/.vis/cachetree for the clean ones (zod, chalk); native declined for every package where Node printed a table; no case where native answered and Node had findings.🤖 Generated with Claude Code