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.