Skip to content

fix(vendor): an install that exits 0 is not an install (recovers #58) - #59

Merged
ralyodio merged 1 commit into
masterfrom
vendor-verify-recover
Sep 6, 2026
Merged

fix(vendor): an install that exits 0 is not an install (recovers #58)#59
ralyodio merged 1 commit into
masterfrom
vendor-verify-recover

Conversation

@ralyodio

@ralyodio ralyodio commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

#58 was squash-merged carrying only its first commit. update works; the fix that makes it deliver did not land.

The squash contains bin/crawlproof.ts, src/crawlproof.ts and test/crawlproof.test.ts. It does not contain src/vendor-verify.ts, and neither src/crawlproof.ts nor src/hqtui.ts on master imports it. So on master today, crawlproof update still accepts whatever pnpm leaves behind.

This is a straight cherry-pick of the dropped commit onto master.

What it fixes

pnpm 11 ships a minimumReleaseAge cooldown that refuses versions published in the last little while, and it does not fail when it refuses one: it resolves to the newest release old enough to pass, writes an exclude-list note, and exits 0. Reproduced in an empty directory on pnpm 11.18.0, registry reporting 0.2.0:

pnpm add @profullstack/crawlproof@latest    -> 0.1.0, exit 0
npm install @profullstack/crawlproof@latest -> 0.2.0

Both wrappers now ask what landed instead of trusting the exit code, and move to the next package manager when the answer is the wrong version. Verified from a wiped vendor prefix:

crawlproof: installing @profullstack/crawlproof@latest
crawlproof: installed 0.2.0 with npm

An unreachable registry means the wanted version is unknown, and unknown passes, so an offline box can still reinstall what it has.

Not --config.minimumReleaseAge=0: the cooldown is a real supply-chain protection, and switching it off in a tool that installs on other people's machines is a bigger decision than fixing an update.

51 tests pass across vendor-verify, crawlproof and hqtui; tsc clean on the touched files.

Note

This is the third squash in this session to drop a commit pushed shortly before the merge (crawlproof.com #240 lost bin/crawlproof.mjs, #243 lost the version bump). Worth checking merged content rather than the PR view when a branch had more than one commit.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HvWJ4336pxTFRdRbvsTQeD

`crawlproof update` said "installed with pnpm" and left the old version in
place, so the bug it was run to fix was still there. Same shape for `hqtui`.

pnpm 11 ships a `minimumReleaseAge` cooldown that refuses versions published
in the last little while, and it does not fail when it refuses one: it resolves
to the newest release old enough to pass, writes a note about an exclude list,
and exits 0. Reproduced in an empty directory on pnpm 11.18.0, with the
registry reporting 0.2.0:

  pnpm add @profullstack/crawlproof@latest  -> 0.1.0, exit 0
  npm install @profullstack/crawlproof@latest -> 0.2.0

So both wrappers now ask what landed instead of trusting the exit code, and
move to the next package manager when the answer is the wrong version. The
version installed is printed, because "installed" without a number is exactly
the claim that turned out to be false.

Deliberately not `--config.minimumReleaseAge=0`. The cooldown is a real
supply-chain protection, and switching it off wholesale in a tool that installs
on other people's machines is a bigger decision than fixing an update. Falling
through to npm leaves it as pnpm's default and still lets a deliberate update
finish.

An unreachable registry means the wanted version is unknown, and an unknown
want passes: an offline box must still be able to reinstall what it has.

Two failures on this branch are not from it: root-ubuntu's `groups` test fails
on master as of #56, and registry's summary test fails on an untracked
bin/argontv.ts sitting in the working tree.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HvWJ4336pxTFRdRbvsTQeD
@ralyodio
ralyodio merged commit 68463bf into master Sep 6, 2026
2 of 3 checks passed
@ralyodio ralyodio mentioned this pull request Sep 6, 2026
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

ThreatCrush Security Scan

12 finding(s)

HIGH/CRITICAL: 4 | MEDIUM: 4 | LOW: 4

Severity Rule Location
HIGH sh-remote-script-execution root-ubuntu.sh:3227
HIGH sh-remote-script-execution root-ubuntu.sh:3228
HIGH sh-remote-script-execution root-ubuntu.sh:4840
HIGH sh-remote-script-execution root-ubuntu.sh:4844
MEDIUM sh-remote-script-execution root-ubuntu.sh:4993
MEDIUM sh-remote-script-execution root-ubuntu.sh:6055
MEDIUM redos-nested-quantifier src/domain-free.ts:56
MEDIUM redos-nested-quantifier src/mail.ts:1042
LOW secret-generic-credential src/credentials.ts:36
LOW secret-generic-api-key test/credentials.test.ts:208
LOW secret-generic-credential test/mail.test.ts:135
LOW secret-generic-credential test/shorten.test.ts:36

Snippets are redacted; ThreatCrush never prints matched credential material.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant