Repository navigation
Switch node_compat to Node 26.13.1 - #218
Conversation
|
Reviewed #218 at fad0d5f, excluding the stacked PR changes. Two medium-severity findings need changes: 1. Await asynchronous subtest hooksLocation: test.js:266–289. The new runHooks loop discards the promises returned by beforeEach/afterEach callbacks. With asynchronous hooks and an awaited child test, executing the unchanged module produces Await setup before invoking the child, await teardown before settling it or restoring mocks, and propagate hook failures while retaining the at-most-once teardown guard. Add a regression check with asynchronous beforeEach and afterEach callbacks. This is incomplete newly added support, not a regression from previously working asynchronous hooks. 2. Validate raw P-521 private scalars before arithmeticLocation: web-crypto.js:3072–3078, scalar loop:2987–2992. The raw-private P-521 import passes arbitrary-length input to p521PublicPoint before validating the scalar size or range. The helper converts the entire input to BigInt and performs elliptic-curve operations for each bit. A 6,600-byte input filled with 0x55, with its first byte set to 1, took 3,783 ms in the exact extracted helper; Node 26.13.1 createPrivateKey rejected that input with ERR_INVALID_ARG_VALUE in under 1 ms. A 66-byte control was accepted by Node. Invalid input therefore causes avoidable synchronous CPU work before eventual validation. Validate size/range before deriving the public point. Prefer the existing native P-521 ECDH implementation in web_crypto.rs over this custom, secret-dependent BigInt arithmetic. The comment stating that native ECDH has no P-521 support is stale on this merged head. Verification and limitsThe focused probes ran under Node 26.13.1, not QuickJS/WASM. The hook probe evaluated the actual test.js module with unused argument-validation/error-construction dependencies substituted; the arithmetic probe evaluated the exact helper source. The timing is not a WASM measurement. Exact-head CI run 45798881357 succeeded, but I did not rerun the Rust/WASM suites or historical migration replay. Production-path regression checks remain necessary. No additional confirmed defect was found in the reviewed migration/report contracts. |
|
Addressed in c7cb37df. Subtests now await asynchronous setup and teardown, restore mocks before settling, and retain at-most-once teardown. Raw P-521 private imports require exactly 66 bytes before native derivation. The custom BigInt arithmetic is removed. The adapter uses the existing fixed-width library remainder and P-521 backend: direct ECDH rejects Node-accepted noncanonical scalars such as n+1. Raw/JWK exports retain the original d. This requires crypto-full; other tiers report unsupported-curve after length validation. Public WASM regressions and pinned Node controls cover these cases. This is not a cryptographic audit or compiled constant-time qualification. |
Fix SQLite prepare and value contracts [skip ci]
vigoo
left a comment
There was a problem hiding this comment.
Re-reviewed df908bf. Both earlier findings are resolved: asynchronous subtest hooks complete before settlement and mock restoration, and raw P-521 imports validate length before using the native backend instead of custom BigInt arithmetic. Local focused probes passed hook ordering/failure cleanup and invalid-length rejection. Pinned Node 26 controls confirmed the noncanonical-scalar contract. Exact-head CI 46000316443 passed, including the public WASM regressions for hooks and P-521 with and without the backend. No new blocker found in the corrective delta. I did not rerun Rust/WASM locally or qualify constant-time behavior; unrelated merged-main and separately reviewed SQLite changes were excluded from this re-review.
processmetadata (Lithium, ABI 147). Host Node.js/npm remain 22.14.0 / 10.9.2; native addons remain unsupported242970e7mainata57ed896, retaining Restore catchable preinit filesystem errors #240's catchable preinit filesystem errors and Add wasm-rquickjs:import-abort and name imported resource methods explicitly #241's import-abort support alongside Switch node_compat to Node 26.13.1 #218/Fix SQLite prepare and value contracts [skip ci] #231. The only manual conflict resolution retains all three independent native process imports; no behavior/design change is authored in this integration. Existing crypto providers, P-521 support, fetch precedence and optimizer/invocation changes remain intact. Node 26 error contracts, cipher-selected PKCS#8 exports, callbackdsaEncodingand fallible PKCS#8 entropy are preservedc7cb37dfawaits asynchronous subtest setup/teardown and mock restoration before settlement, preserving primary failures and eager synchronous execution. Raw P-521 private imports validate exactly 66 bytes before existing-library scalar reduction/public derivation; the custom production JS BigInt point helper is removed and original scalar bytes remain intact for exportcrypto-full. Normal no longer has the JS arithmetic fallback: valid-length keys report an unsupported curve; wrong lengths fail validation first. Noncanonical accepted scalars retain their original raw/JWK encoding. Existing zero/order-multiple imports still reject earlier than Node's later export failure; complete error-order fidelity, cryptographic security and compiled constant-time qualification are not claimedValidation
df908bf7has parents242970e7anda57ed896. Exact-candidate checks passed: preinit 9; SQLite runtime 14; Node SQLite 32 / 107 ignored; process features, async subtest cleanup and Normal P-521 one each; import-abort 3; report currentness 1; DTS 87. Workspace all-target Clippy (-Dwarnings), all five skeleton Clippy lanes, fmt and diff checks exited 0; Cargo still emitted manifest warnings. Head/tree and clean source state were verified before and after every check. Direct integration assessment is COMPLETE/CLEAR with no integration findings or evidence blockers (nov27-218-df908bf7-local-integration, rev3, in golem-review). Exact-head CI46000316443 completed successfully after the authorized job-specific retry: attempt 2 reports 28 successful validation jobs; publish/release-binaries and separate Proof were skipped. Its API assigns new job IDs throughout, but 27 successful jobs retain identical attempt-1 start/end timestamps and step records; only skeleton Clippy has a new execution interval (13:24:46–13:27:02 UTC). Initial Clippy job140510172936failed WASI SDK 25 download with HTTP 403 before Clippy; retry140532098848succeeded without a source fix. The 28 successes are the terminal run result, not 28 fresh executions in attempt 2. Previous-head CI remains historical, and neither this assessment nor CI creates a new approval or team approvaldfpreinit attempt failed fixture compilation with the WASI SDK environment unset; the corrected environment run passed all nine checks. That initial failure is retained, not counted as a pass. Superseded localb409316ewas never published; its optimizer invocation selected no tests because the runtime wrapper supplied an unsupported timing flagc7cb37df: crypto runtime 52 passed (includes Full/Normal P-521 contracts and three real npm apps), assert runtime 15 passed; Node crypto 196 passed / 199 ignored and mocking 42 passed / 12 ignored; workspace all-target Clippy (-Dwarnings), fmt and diff checks passed. Historical unchanged-production hook/P-521 regressions fail and repaired WASM passes; the stale-host apparent hook pass was discarded. Pinned Node 26 controls support the raw-import contract; deliberate failed child tests make the host-Node hook run exit 1, not an all-green Node runfad0d5f0: all-target build and Clippy, five skeleton Clippy lanes, fmt/diff; crypto runtime 51 passed, Node crypto 196 passed / 199 ignored, util deep equality 1 passed. Native Rust is unchanged by the final two-file cleanup; those five native lanes were not rerun as newc7results. Shared callback regression assertions fail unchanged WASM and pass repaired WASM; final fixture adds a direct-KeyObject control. Host Node 22.14.0 and 26.13.1 callback controls passfad0..c7diffs/context, exact locked conversion/remainder sources and retained logs: all four concerns are addressed in exactc7bytes, with no actionable in-scope blocker. Raw findings/dispositions and completed direct assessment are retained in golem-review (local · portal); this is separate from CI and does not transfer an older approval. Earlier changes-required verdicts and the accepted command-level persistence-test rationale remain historical, not relabeled as unanimous clearanced235247: Node compatibility 3158 generated cases passed / 7636 ignored; runtime groups 1–9: 591 passed / 4 ignored; fork test-other: 160 CTRF plus 26 non-CTRF tests passed; build, quick-checks, skeleton Clippy and Preview 3 checks passed. One Node shard first failed WASI SDK download (403, before tests), then passed on rerun. These results do not validatec7fad0d5f0: all 28 executed jobs succeeded, including eight Node-compat shards, nine runtime groups, stock/fork optimizer lanes, test-other, Preview 3, report and quality checks. Release/publish jobs and separate Proof were skipped. CI 45854299208 passed on exact headc7cb37df4ba788e6d842a66eb996acd7b093ba0d: all 28 executed jobs succeeded; release-binaries, publish and separate Proof were skipped. No Golem consumer/recovery check is claimed. NJ-03 campaign work, runtime behavior, host durability and shipped consumer artifacts remain distinct. Existing P-521 encrypted-DER import and AES-192 normalization gaps are neither added nor claimed fixedNode compatibility inventory
Comparison:
mainata57ed896(Node 22.14.0) →df908bf7(Node 26.13.1). The main integration changes no configuration/report inputs; current counts match Vigoo's242970e7fold of #231, which adds five runnable selections relative toc7cb37df.These are generated classification inventories, not a paired behavioral measurement or a new-head full-suite pass. The suite and denominators changed; moved/split/removed cases make the runnable decrease non-comparable as a regression count. The historical audit accounts for all 3260 formerly passing cases, including target changes/removals. Earlier baseline repairs in this PR restore 37 runnable selections; one previously unevaluated HTTP-abort case is explicitly a known timeout gap. No ignored or known-gap case is counted as runnable.