Skip to content

node compile cache: unmap an accepted entry's stored source, keep only the bytecode mapped - #39384

Closed
robobun wants to merge 4 commits into
mainfrom
farm/797e97d3/compile-cache-unmap-source
Closed

robobun wants to merge 4 commits into
mainfrom
farm/797e97d3/compile-cache-unmap-source

compile cache test: assert the exact retained mapping; document the w…

bdeac4a
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Aug 17, 2026 in 12m 22s

Code review found 1 potential issue

Found 1 candidates, confirmed 1. See review comments for details.

Details

Severity Count
🔴 Important 0
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🟡 Nit test/js/node/module/node-module-module.test.js:257-267 Test hardcodes wrong header size (108 instead of 76)

Annotations

Check warning on line 267 in test/js/node/module/node-module-module.test.js

See this annotation in the file changed.

@claude claude / Claude Code Review

Test hardcodes wrong header size (108 instead of 76)

The test's `bytecodeOffset` computation and its comment use a 108-byte header, but `HEADER_SIZE` in `src/jsc/NodeCompileCache.rs` is `3 * 4 + 2 * HASH_SIZE = 76` bytes — the actual `blob_file_offset` is `(76 + code_size).next_multiple_of(128)`. The 32-byte error is masked today by the subsequent `roundDown(pageSize)`, but it's a latent flake: change `108` → `76` (or derive it as `3*4 + 2*32` with a reference to `HEADER_SIZE`) in both the comment and the computation. The PR description repeats th