fix(trace): an action names the generator that produced it

The setup exclusion landed for the model arm only, because only a model
pick stamped a source. A seeded run returned setup's action through the
same entry with no marker, so its denominator still counted the login
while the model arm's did not, and the two are compared.

serializeAction names setup and seeded on the wire, so both arms are
counted by one rule. An already-recorded trace names nothing and keeps
exactly the count it was reported with; unattributed_actions counts those
steps so the old denominator cannot pass as the new one. TraceVersion is
deliberately unbumped: oracle-reduction refuses a differing version, and
a bump would make all 169 recorded runs unreplayable.
This commit is contained in:
pj committed 2026-08-18 17:58:38 +05:30
1 parent 66fd5bce5d
commit 454988fbc8
19 files changed
+377 -82

No files matched your search

+4 -2
View File
@@ -45,12 +45,14 @@ const HOST: Host = {
// runParity emits the parity scenario's action stream from a fresh Pcg. It
// drives pick.ts directly (not installRuntime, whose globals are locked once)
// so the caller can run it repeatedly to assert determinism.
// so the caller can run it repeatedly to assert determinism. The scenario has
// no setup, so it stands in for the entry's action-root branch and tags what it
// emits the way that branch does.
export function runParity(): (SerializedAction | null)[] {
const rng = new Pcg(PARITY_SEED_HI, 0n);
const stream: (SerializedAction | null)[] = [];
for (let i = 0; i < PARITY_STEPS; i++) {
stream.push(serializeAction(nextAction(PARITY_ROOT, rng, HOST)));
stream.push(serializeAction(nextAction(PARITY_ROOT, rng, HOST), "seeded"));
}
return stream;
}