Skip to content

id(bench): PR #1387 guest_replay benchmark replays zero events — restore() never puts committed chat events in replay #1403

Closed

Description

@dezren39

Finding

PR #1387's new benchmark harness (pkgs/id/benches/world_bench.rs, head commit b6f5b720e9fc7d117f44b46181818d114dbad3aa) ships a guest_replay benchmark that never replays anything through the guest. It builds a journal of N Committed chat events, calls WorldCore::restore, and then pushes restored.replay through its CountingProgram — but on current main, restore does not put committed chat events into replay at all, so the guest pass iterates an empty vec and guest.seen stays 0. The reported guest_replay number is restore-only time, mislabeled as guest replay.

Evidence

  • PR: wip(id): F11.8 slice 1 benchmark harness — four world benchmarks + just/nix runners (#539) #1387 (OPEN, slice 1 of id(ci): F11.8 benchmark harness with committed baselines #539)
  • pkgs/id/benches/world_bench.rs:121 — bench_guest_replay builds the journal from chat_event(...) entries (WorldEventKind::Chat).
  • pkgs/id/benches/world_bench.rs:166 — for event in &restored.replay { guest.update(event)?; } — the loop that is supposed to be the measured guest workload.
  • Current main pkgs/id/src/world/core.rs:347 (verified at 37418e56): in WorldCore::restore, the JournalEntry::Committed match arm is WorldEventKind::System { .. } | WorldEventKind::Chat(_) => {} — chat events are applied to core state via commit_prepared but are not pushed to replay. Only Input committed events (core.rs:344) and journal System entries (core.rs:317) land in replay.
  • The bench's own inline comment half-notices this ("count the guest pass over the full journal's events as the replay workload when restore() consumed them into core state directly") but the code does not do that — it still iterates restored.replay.

Why it matters

Slice 2 of #539 commits baselines recorded from this harness, and slice 3's CI job diffs medians against them. A guest_replay baseline that contains zero guest work will (a) understate the real replay cost the benchmark exists to track, and (b) make any future fix to the bench look like a massive regression when the guest pass starts doing real work. The failure is silent: the bench prints a plausible-looking line either way.

Acceptance criteria

  • guest_replay actually pushes the N committed events through the guest (e.g. iterate the journal's committed events / core history, or build the journal from event kinds that restore returns in replay), OR the benchmark is renamed/re-scoped to state honestly that it measures restore only.
  • The bench asserts the guest saw the expected count (e.g. guest.seen == events, or restored.replay.len() is checked non-empty) so a future restore-semantics change cannot silently re-empty the workload.
  • cargo bench --bench world_bench -- --quick --only guest_replay (or the just/nix runner equivalent) completes with the assertion in place.

Refs #539. Found by pr-diff-review-b reviewing PR #1387's diff against current main.

Activity

  1. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 27, 2026
  2. developing-today commented on Oct 27, 2026

    @developing-today
    Contributor
  3. added
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Oct 27, 2026
  4. dezren39 commented on Oct 27, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · filed

  5. dezren39 commented on Oct 28, 2026

    @dezren39
    MemberAuthor
  6. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 28, 2026
  7. 39 remaining items

  8. added
    queue/claimedQueue worker lifecycle state
    and removed
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    on Oct 31, 2026
  9. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  10. added
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    status/parkedDeliberately paused with a recorded resume condition
    and removed
    queue/claimedQueue worker lifecycle state
    on Oct 31, 2026
  11. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · parked

  12. dezren39 commented on Oct 31, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done

  13. removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedQueue worker lifecycle state
    on Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)kind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/pr-diff-reviewFiled by the pr-diff-review jobtask/triageQueue packet kind: verify, reproduce, and route this item

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions