Repository navigation
Closed
Labels
benchmarksBenchmark design, evidence, and regression gatesBenchmark design, evidence, and regression gatesperformanceMeasured runtime, memory, scaling, or build performanceMeasured runtime, memory, scaling, or build performanceruntimeJavaScript runtime and builtin implementationJavaScript runtime and builtin implementation
Description
Parent: #479
Related: #460, #461, #480, #614
Problem
The repository has an informal human-readable gc-profile lifecycle table, while #479 requires reproducible cold-context evidence that separates creation, first source/module work, destruction, retained process memory, and exact finalization. The current table aggregates repeated in-process timings, has no versioned schema or source/options identity, and cannot prove a bounded create/destroy plateau or support exact-parent causal claims.
Scope
- Add a versioned, machine-readable cold lifecycle schema and structural validator.
- Measure explicit no-evaluation, first-source-evaluation, first-module-evaluation, and full-feature context scenarios without hiding context creation, builtin installation, parsing/compilation, finalization, or destruction outside their declared boundaries.
- Retain per-sample create, configure/evaluate, destroy, total wall/CPU, peak/current/retained RSS, allocator/GC ownership, and
Context.GcFinalizerStatscounts. - Add repeated create/destroy soak checkpoints that distinguish healthy bounded allocator reuse from monotonically retained context-owned state.
- Record exact zig-js/Zig/OS/hardware revisions, context options, source/module checksums, sample order, power/thermal availability, and every rejected/contaminated sample.
- Integrate schema and fixture self-tests into the existing benchmark validation gate and document the publication boundary.
No-workaround rules
No pre-created contexts, hidden warmup in cold scenarios, shared mutable realm state, delayed finalizers, forced GC presented as ordinary teardown, unbounded pools/caches, omitted samples, or peak RSS substituted for post-teardown current RSS.
Acceptance
- Machine-readable fixtures cover no-evaluation, source, module, and full-feature cold lifecycles with exact boundary/identity metadata.
- Every accepted sample includes separated create/work/destroy timings, current/peak/retained RSS, and exact finalizer counts or an explicit unavailable reason.
- Soak validation rejects monotonic context-owned retention and verifies callbacks/finalizers exactly once.
- Exact-parent collection fails closed on dirty revisions, competing work, checksum/options drift, missing counters, thermal contamination, and unbalanced sample order.
- Structural self-tests, complete benchmark validation, docs generation, offline links, and focused lifecycle tests pass; tooling/docs-only work flips 0 Test262 cases.
Metadata
Metadata
Assignees
Labels
benchmarksBenchmark design, evidence, and regression gatesBenchmark design, evidence, and regression gatesperformanceMeasured runtime, memory, scaling, or build performanceMeasured runtime, memory, scaling, or build performanceruntimeJavaScript runtime and builtin implementationJavaScript runtime and builtin implementation
Activity
tools(bench): publish cold context lifecycle evidence (#661)
chrisbbreuer commentedon Aug 20, 2026
Implemented and pushed
b815b3e7.The frozen V1 profile and V19 integration add four non-scored
context_lifecyclescenarios: no evaluation, first source, first dependency-free module, and full WebAssembly feature configuration plus first class/typed-array/JSON/RegExp work. Every sample preserves create/work/destroy phase time, fresh-process wall/CPU and Darwin counters, same-domain baseline/live/peak/post-destroy RSS, four soak checkpoints, context-options identity, checksum, and all 15GcFinalizerStatscounters. Finalizer accounting starts immediately after Context creation so mid-work collection cannot disappear from the record.The collector requires at least eight cold iterations, exact per-iteration checksums, one lane, exact first-parent/clean revisions, alternating order, adequate CPU occupancy, no competing evidence process, measured counters, and nominal thermal state. It rejects incomplete cell-kind reconciliation and material monotonic/final retained growth beyond the frozen 8 MiB/5% bound. No contexts, warmups, collections, finalizers, or pools are hidden outside the declared boundary.
Validation: all four real macOS scenarios returned their frozen checksums; a 16-context no-evaluation diagnostic plateau had identical 75% and 100% post-destroy checkpoints; runner build passed; representative matrix 25/25; complete
benchmark-comparison-test31/31; release compatibility 12/12; dependency audit 16 edges/61 tools; docs 50 pages and 268 offline links. Benchmark/tooling/docs only, so flips 0 Test262 cases. The local timing values are diagnostic and are not published as a speed claim. Fresh pushed CI is pending.chrisbbreuer commentedon Aug 20, 2026
Completed in
b815b3e7.The V19 non-scored lifecycle profile now covers all four required cold scenarios with separated create/work/destroy timing, same-domain RSS checkpoints, exact checksums/options, full finalizer reconciliation, and fail-closed exact-parent validation. The local 31-part benchmark gate, release compatibility, dependency inventory, 50-page docs build, and 268-link offline check passed; benchmark/tool/docs-only scope flips 0 Test262 cases.
Fresh pushed gates:
The profile is already in use for #662, which was selected from a fresh current-main cold sample rather than inferred from the new schema.