Pin the load-bearing native and encoder dependencies - #2179
Conversation
A caret range means the manifest gate does not bind. harper-pro, a container rebuild, and anyone installing published harper without this lockfile all resolve to whatever is newest at install time, so a rocksdb-js or msgpackr minor reaches a running node with no Harper PR and no human merge. That is the mechanism behind 5.1.22 shipping rocksdb-js 2.4.0 while the cross-column-family read fix was in 2.5.0: the pin permitted the fix and the image predated it. The same latitude equally admits a regression. extended-iterable is pinned for a sharper reason than the rest. rocksdb-js requires exactly 1.0.3 while the root asked for ^1.0.1, so the day 1.0.4 publishes a fresh resolution hoists 1.0.4 for the root and nests 1.0.3 under rocksdb-js — two modules, two SKIP sentinels. A vector query whose candidate record was deleted then returns harper's SKIP into a map() belonging to rocksdb-js's ExtendedIterable, which does not recognise it and emits the sentinel as a result row: a phantom record on the read path, no exception and no log line. msgpackr has the same shape via its extension registry, where the nested copy never saw addExtension for Blob. update-rocksdb-js.yml gains --save-exact. It ran `npm install --save`, and with no .npmrc the default save-prefix of ^ applies, so the next rocksdb-js release would have rewritten 2.7.1 back to ^2.8.0 and reverted this commit unattended. Every pin is the version the lockfile already resolved, so no dependency moves here; only the range narrows. lmdb, cbor-x, ordered-binary, alasql and argon2 were already exact. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request updates and pins several dependencies in package.json, including @harperfast/extended-iterable, @harperfast/rocksdb-js, msgpackr, structon, bufferutil, segfault-handler, and utf-8-validate. There are no review comments, and I have no feedback to provide.
|
Reviewed; no blockers found. |
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
|
Re-reviewed The prior Medium finding is resolved: Worth noting why the new canary holds up: Renovate's This PR looks good, nice job! — |
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
Co-Authored-By: GPT-5 Codex <noreply@openai.com>
|
Reviewed — |
A caret range does not bind the version that reaches a running Harper node. harper-pro, a rebuilt container, and anyone installing published
harperwithout this lockfile can resolve a newer native or encoder dependency without a Harper PR or human merge.This PR converts the load-bearing ranges to the versions the lockfile already resolved. No installed dependency moves; only the allowed resolution narrows. The pins cover rocksdb-js, the encoder/iterator modules whose identity crosses its boundary, structon, and the optional native addons.
The module identity is now enforced rather than documented as an assumption. Docker smoke requires the root
msgpackrand@harperfast/extended-iterablespecs to be exact and byte-equal to rocksdb-js's requirements, verifies their installed root versions, and rejects a nested copy under rocksdb-js. A rocksdb-js automation or Renovate PR that moves only one side will therefore fail before it can merge.The shrinkwrap canary remains meaningful after rocksdb-js becomes exact: exact specs still participate in installed-versus-packed comparison but not range discrimination, while ranged
fastifyand@aws-sdk/client-s3provide the discrimination proof. Registry queries retry three times with 1s/2s backoff. If the surviving canaries are current and a query remains unresolved, the check fails closed with a retry-specific error; Kris selected that behavior rather than treating “unknown” as “current.”For the human reviewer
bufferutil,segfault-handler, andutf-8-validateare exact because their prebuild/platform behavior is load-bearing, but exact optional pins also remove the in-range escape when a new Node ABI needs a newer prebuild. Their absence is largely silent today.The pre-existing lock entries for
@harperfast/extended-iterableandsegfault-handlerstill lackresolved/integrity. That pattern is lockfile-wide rather than introduced here, but an exact version without a tarball hash is a weaker supply-chain guarantee.Verification
npm run buildnpm run lint:requirednpx mocha unitTests/build-tools/checkShrinkwrapPins.test.mjs— 13 passingnpm run test:unit:resources— 1,556 passing, 15 pendingunitTests/apiTests/cache-test.mjs:69; its isolated rerun passed.The local umbrella unit/integration reruns were not clean under this machine's forced isolated Harper root: unrelated config/logger tests expected the user boot configuration, and one high-volume integration run returned nonzero without preserving the failing case in its truncated output. The prior PR head passed both umbrella suites, and the authoritative current-head GitHub matrices are green.
Review coverage
Authored by GPT-5.6 Codex. Independent pre-push review covered the full PR with Claude and the Harper-domain adjudicator, plus delta rounds with Claude and Gemini. Earlier rounds also included Cursor Grok; Cursor Composer was pruned. The final delta review found the build tooling complete and carried only the dependency-policy decisions above.
Human-Review-Need: 4 @ 3e2adc8