Tier: M (2-4 days) | Type: test
Context. test/leaks/scan-leak.test.ts (PR #114) already writes a raw heap-final.heapsnapshot via v8.getHeapSnapshot() (lines 62-72) for CI debugging and asserts a regression slope on process.memoryUsage().heapUsed (line 113). What it does NOT do is diff retained-object counts by constructor across before-and-after snapshots, which is the failure mode we most fear after PR #154 (pipelined scan) and PR #156 (batch-path optimiser) landed: a retained WeakRef / buffer pool that leaks slowly. This issue adds the constructor-level diffing layer, publishes the artifact from the nightly job, and documents the harness.
Scope.
- Extend
test/leaks/ with a runner that takes structured v8 heap snapshots before / after N scans and parses retained-object counts by constructor.
- Diff constructor counts, fail on growth over a configured threshold.
- Bench on Node with
--expose-gc so GC is deterministic.
- Nightly job (not per-PR) publishes the diff as an uploaded artifact.
Acceptance.
Files. test/leaks/heap-snapshot.test.ts (new), test/leaks/README.md (new), .github/workflows/ci.yml.
Tier: M (2-4 days) | Type: test
Context.
test/leaks/scan-leak.test.ts(PR #114) already writes a rawheap-final.heapsnapshotviav8.getHeapSnapshot()(lines 62-72) for CI debugging and asserts a regression slope onprocess.memoryUsage().heapUsed(line 113). What it does NOT do is diff retained-object counts by constructor across before-and-after snapshots, which is the failure mode we most fear after PR #154 (pipelined scan) and PR #156 (batch-path optimiser) landed: a retained WeakRef / buffer pool that leaks slowly. This issue adds the constructor-level diffing layer, publishes the artifact from the nightly job, and documents the harness.Scope.
test/leaks/with a runner that takes structured v8 heap snapshots before / after N scans and parses retained-object counts by constructor.--expose-gcso GC is deterministic.Acceptance.
test/leaks/README.md(new)Files.
test/leaks/heap-snapshot.test.ts(new),test/leaks/README.md(new),.github/workflows/ci.yml.