Skip to content

Perf: support mixed-tier allocation replay in exact-parent A/Bs #775

Description

@chrisbbreuer

Parent: #461\nMotivated by: #772\n\n## Problem\n\ntools/exact-parent-regression.ts can attach native Context allocation replay only when the attribution invocation is VM-only: zero tree-walker entries, nonzero VM execution, and zero native-tier publication. That is correct for required-bytecode profiles but rejects ordinary representative workloads whose frozen execution boundary intentionally mixes the tree-walker and VM.\n\nThe #772 DateTimeFormat reflection row preserves an exact mixed-tier signature across parent and candidate (84,001 tree-walker entries, 2 VM entries, 1,932,823 VM dispatches, and 89,600 Shape transition requests), yet the optional allocation replay fails before recording its exact allocation delta. The allocation evidence therefore had to remain a separate three-replay native-attribution result rather than a measured field in the generated exact-parent artifact.\n\n## Scope\n\n- Version the exact-parent allocation-replay contract so each supported row declares its required execution/admission/native-tier signature instead of inheriting one VM-only predicate.\n- Validate the full invocation-phase signature and checksum for every replay, including tree-walker, VM, quick-kernel, baseline, optimizer, deoptimization, runtime, host callback, Wasm, admission, generated-code, and Shape counters relevant to the row.\n- Require parent and candidate signatures to remain logically equivalent while retaining exact raw counts; do not normalize a tier change away.\n- Preserve exact allocation-request and byte replay across every sample and fail closed on partial telemetry, binary/source/revision drift, or a competing process.\n- Publish the schema/matrix change as a new representative version; historical artifacts and VM-only profiles remain unchanged.\n\n## No-workaround rules\n\n- Do not merely allow nonzero tree-walker entries, omit tier fields, weaken admission checks, change workload source to fit the tool, or infer allocation deltas from wall/RSS.\n- Do not add benchmark recognition, row-name special cases, hidden warmups, source transforms, unavailable-as-zero metrics, or unbounded caches.\n- No stacks, queues, jobs, Promise/microtask, Worker lifecycle, or Map/Set iterator implementation changes.\n\n## Acceptance\n\n- [ ] A frozen mixed-tier execution-signature contract is machine-readable and versioned.\n- [ ] #772's exact parent/candidate pair produces one generated artifact with allocation and byte metrics measured, identical checksum/execution/Shape signatures, and exact repeated replay.\n- [ ] Existing VM-only, required-bytecode, frontend, batch, schema-v2 direct-binary, and schema-v3 overlay fixtures remain fail-closed and green.\n- [ ] Mutations of every required tier/admission/native/Shape field, replay allocation value, identity, or sample fail validation.\n- [ ] Full benchmark harness self-tests, representative matrix validation, docs generation, and focused Home tests pass.\n

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions