From 12408a384bfb384a8523f6c1c8fde25e81dd69e2 Mon Sep 17 00:00:00 2001 From: Rongsong Shen Date: Thu, 20 Aug 2026 08:10:26 +0000 Subject: [PATCH] chore(wolf): checkpoint buglog.json (983 bugs) --- .wolf/buglog.json | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/.wolf/buglog.json b/.wolf/buglog.json index c600a14e..af11ac77 100644 --- a/.wolf/buglog.json +++ b/.wolf/buglog.json @@ -16211,8 +16211,8 @@ "related_bugs": [ "bug-1559" ], - "occurrences": 2, - "last_seen": "2026-08-17T00:00:00.000Z" + "occurrences": 3, + "last_seen": "2026-08-20T00:00:00.000Z" }, { "id": "bug-909", @@ -17752,6 +17752,28 @@ ], "occurrences": 1, "last_seen": "2026-08-20T07:26:00Z" + }, + { + "id": "bug-1602", + "timestamp": "2026-08-20T08:30:00Z", + "error_message": "User request: scheduler simulation mode should show event time and session when events occur, and loading a replay file should show its total session count up front.", + "file": "src/scheduler/src/repl_break.c, src/scheduler/src/sim.c", + "root_cause": "Feature gap, not a defect: repl_print_event_summary() (interactive REPL event echo) printed only the event type/payload, no clock time or session number; sched_sim_driver_start() never reported how many sessions a loaded .replay file contains before stepping through it.", + "fix": "repl_print_event_summary() now prefixes each echoed event with \"[sim] t= () session=\". Non-obvious correctness point found via sim_loop.c inspection (not assumption): events are read+echoed individually AS THEY STREAM from the file, and the ReplaySession/begin_round message for that batch -- which is what increments rs->session_count via xce_repl_on_begin_round() -- comes AFTER those events in file order (file layout is event,event,...,ReplaySession). So every echoed event always belongs to the UPCOMING session; the function reports session_count+1, not the raw count. A first attempt using the raw count failed its own new test (session=0 instead of session=1) and was corrected after tracing the real sim_loop.c call order (xce_repl_check_event at line ~593 vs xce_repl_check_begin_round at ~631) rather than trusting the repl.h doc comment's summary.\n\nAdded sim_prescan_session_count() (sim.c): scans sim->replay_file from the current position using msg_root_has_shape() shape-only classification (ReplayEvent/ReplaySession/SnapshotEntry, matching sim_loop.c main loop's own three-way dispatch) to count ReplaySession messages, then rewinds via fseek back to the captured ftell() position -- mirrors sim_locate_and_load_snapshot()'s own established rewind pattern. Confirmed safe via research: capn_init_fp() in this codebase is always unpacked (packed=0), reading via a single plain fread() per message with no internal read-ahead buffer, so ftell/fseek stay exactly in sync with message boundaries. Wired into sched_sim_driver_start() right after sim_set_virtual_clock(): prints \"[sim] replay file contains N sessions\" once at load, non-fatal on scan failure. User explicitly chose this pre-scan approach over a recording-time trailer message (would have required a schema change and only worked for newly-recorded files) via AskUserQuestion.\n\nAdded test_replay_load_reports_total_session_count (2-session fixture) and extended test_step_echoes_events_before_session_decisions with t=/session=1 assertions in test_repl_breakpoints_inspection.c. Full scheduler suite: 42/43 Ok, only pre-existing unrelated bug-1560 remains (now 3 occurrences).", + "tags": [ + "scheduler", + "repl", + "sim", + "replay", + "session", + "feature", + "observability" + ], + "related_bugs": [ + "bug-1595" + ], + "occurrences": 1, + "last_seen": "2026-08-20T08:30:00Z" } ] }