mirror of
https://github.com/pbakaus/impeccable.git
synced 2026-09-18 17:16:46 +03:00
The recorder deduplicated by arguments per run, not across runs, so the frozen call snapshot arrived with 12,208 lines (43% of 28,266) that repeat an earlier line byte for byte. Every one re-asserts what its first occurrence already asserts, and `crates/core/tests/vectors.rs` replays line by line with no count anywhere, so removing them changes nothing it checks: the replay still reports 8,321 pass, 0 fail. Duplicates were removed with `awk '!seen[$0]++'`, keeping first occurrences and file order, and every changed file was checked to equal that transform of its old contents. No line was added, reordered, or rewritten, and no vector file gained or lost a distinct call. The tree drops from 9.2 MB to 5.7 MB. Co-Authored-By: Claude Code <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Vau2X53xGTjjTCXWMVBoNY
27 lines
1.5 KiB
Markdown
27 lines
1.5 KiB
Markdown
# Function-level vectors
|
|
|
|
`record-calls.mjs` runs the detect CLI and the pure-function unit tests with a
|
|
loader hook (`hooks.mjs` / `hooks-impl.mjs`) that routes every exported
|
|
function declaration in the pure engine modules through `recorder.mjs`. Each
|
|
call whose arguments and result are plain data is written once (deduplicated by
|
|
arguments) to `calls/<module>/<fn>.jsonl` as `{ "args": [...], "result": ... }`.
|
|
|
|
Encoding of values JSON cannot carry: `{"$undef":true}`, `{"$nan":true}`,
|
|
`{"$inf":1|-1}`, `{"$negzero":true}`, `{"$map":[[k,v],...]}`, `{"$set":[...]}`.
|
|
|
|
`calls/_skipped.json` names the functions whose calls held DOM-ish objects or
|
|
closures; those are covered end to end by the `detect` goldens instead.
|
|
|
|
`calls/` (about 6 MB) is the frozen snapshot recorded from the JS engine
|
|
right before it left the tree with the launcher swap. It can never be
|
|
regenerated: the modules `record-calls.mjs`, `hooks.mjs`, `hooks-impl.mjs`,
|
|
and `recorder.mjs` instrumented no longer exist here, and those scripts stay
|
|
only as the historical record of how the vectors were produced. Treat the
|
|
directory as read-only test data for the engine's rule-level parity checks.
|
|
|
|
The recorder deduplicated per run, not across runs, so the snapshot arrived
|
|
with 12,208 byte-identical repeat lines (43% of it) that asserted nothing the
|
|
first occurrence did not. Those were removed once, keeping first occurrences
|
|
and file order. That is the only edit the snapshot accepts: every remaining
|
|
line is a distinct call, and no line may be added, reordered, or rewritten.
|