Skip to content

id: world_bench fails at restore — journal event at sequence 1 uses participant 1 without INPUT scope #8316

Closed

Description

@dezren39

Found by repo queue task 12126 (lane code-w, 2026-11-10) while re-running the world bench at current main for issue #7064.

Symptom

cargo bench -p id --bench world_bench (laptop, worktree at main merge 43b8df9, branch queue/12126-7064-many-worlds) fails partway:

bench journal_append_fsync unit=us_per_append median=18485.871 min=17578.015 reps=5
bench checkpoint_compaction unit=us_per_compact median=36294.215 min=31043.202 reps=5
Error: restore

Caused by:
    journal event at sequence 1 uses participant 1 without INPUT scope
error: bench failed, to rerun pass `-p id --bench world_bench`

Full log: laptop /tmp/bench-12126.log (2026-11-10 run). The two unit benches complete; the failure hits at the restore stage, before bench_many_worlds can produce a line — so there is currently no way to re-measure the many_worlds p99 for issue #7064 / issue #557 at current main.

Why it matters

Suggested first step

Reproduce on a quiet machine with cargo bench -p id --bench world_bench -- --only <the restore bench> (identify which bench function owns the restore stage), then bisect writer vs reader: dump the sequence-1 journal event's scopes as written and as the restore validator expects them.

Related: issue #7064 (measurement this blocks), issue #8239 (fix whose verification this blocks), issue #557 (parent remainder).

Activity

  1. added
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Nov 10, 2026
  2. developing-today commented on Nov 10, 2026

    @developing-today
    Contributor
  3. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    Released to the queue under Drew's 2026-11-13 unblock-all order (main chat, 23:53 CT). Task(s) 15288 moved from blocked/parked to queued in the fleet unblock-all pass (worker main-unblock-all-2026-11-13). Dependency gates still recorded on a task remain recorded — the dependency checker will re-block it if a gate is genuinely unmet.

  4. added a commit that references this issue on Nov 14, 2026
  5. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · done (fixed and merged)

    Diagnosis (writer vs reader): the bench harness was wrong; the restore validator is right. Reproduced at main e9cf612 with the exact error from this issue. bench_guest_replay issued its synthetic participant with scopes JOIN|CHAT only, hand-built the journal's Issued entry with the same scopes, then appended Committed Input events from participant 1. WorldCore::restore validates each event kind against the participant's Issued scopes — behavior pinned by restore_refuses_input_and_chat_without_the_matching_scope — so it refused the first committed event at sequence 1. No real writer can produce that journal (input submission requires INPUT scope at write time), so real checkpoint/reopen paths were never at risk.

    Fix (bench only, no product code): pkgs/id/benches/world_bench.rs — the participant is now issued WorldScopes::GUEST (JOIN|CHAT|INPUT) and the constructed Issued entry records the same set.

    Verification (laptop): before the fix, the bench died at guest_replay as reported. After: --only guest_replay at full size passes (bench guest_replay unit=us_per_event median=0.821, 10,000 events × 5 reps), and the full bench in --quick mode completes all six stages — including bench many_worlds … p99_ms=9.130 target_p99_ms=50 target_met=true. The #7064 measurement and #8239 verification paths are unblocked; the recorded full-size many_worlds run itself belongs to task 12126 / issue #7064.

    Closing as done.

  6. added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/small-fixQueue packet kind: bounded fix with reproduction and targeted tests
    and removed on Nov 14, 2026
  7. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged — closure stands; harness fix is on main; bench re-run inconclusive in this window

    State found (2026-11-14): this issue was closed today (13:07:07Z) with status:done applied, one minute into this task's claim. The triage therefore verified the closure rather than re-doing the work:

    • The fix shape the issue pointed at is on main. pkgs/id/benches/world_bench.rs (lines ~824–847) now documents the exact pitfall — "an INPUT-less Issued entry makes restore refuse the first committed [event]" — and rebuilds the Issued entry from the minted participant via restore's own path, so the journal the bench writes is one restore accepts. This matches the issue's bisect question: the bench harness was at fault, not the restore validator (the validator's INPUT-scope requirement is the correct behaviour for real journals).
    • Independent bench re-run: inconclusive in this window. cargo bench --bench world_bench -- --only guest_replay from pkgs/id did not reach a verdict within the execution window (the id bench suite's build exceeded the ~285s tool timeout; no pass/fail line was produced). I am not claiming a green bench from this run.
    • The measurement this issue was blocking (id(world): many_worlds p99 latency 5,650.792 ms vs 50 ms target — profile and reduce (#557 remainder) #7064's recorded many_worlds run, and impl(id): group-commit batching for world journal appends — one sync per queued input batch (#7064 follow-on) #8239's p99 verification) remains the place the bench gets exercised end-to-end; if guest_replay or the many-worlds restore stage fails there, this issue's evidence (sequence-1 event scopes as written vs as validated) is the starting point and the closure should be revisited.

    Task 15288 completes as triaged, follow_up_task_ids [] — no new packet: the closure + on-main harness fix cover the defect, and the open measurement work already lives in #7064/#8239.

  8. dezren39 commented on Nov 14, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · already done — follow-on revival duplicate

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)status:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions