feat(scheduler-core): implement REPL breakpoints and state inspection (task 12.2)
Adds the interactive simulation REPL's breakpoint and state-inspection commands (Req 5 AC 22): `break <event_type> [key=value ...]` / `info break` / `delete <id>|all` on event and decision types, and `info session/job/queue/worker/resource/summary`. repl.c (370 lines after task 12.1) couldn't hold this task's full surface under the project's 800-line cap, so it's split three ways (matching the snapshot.c/snapshot_wire.c/snapshot_load.c precedent): repl.c (execution control + dispatch), repl_break.c (matching/CRUD + the three new driver-facing hooks), repl_info.c (info dumps), sharing state via repl_internal.h. sim_loop.c gained 3 new bare hook calls (repl.h inline wrappers, same pattern as task 12.1's two) at the points design.md's pseudocode requires -- per decoded event before it joins the batch, per session boundary, and per drained decision -- landing sim_loop.c at exactly 800/800 lines. Two real bugs found and fixed during development (bug-1506, bug-1507): an uninitialized xstr_table left breakpoint filter fields silently NULL instead of failing loud, and repl_breakpoint_free() called a bare free() on an RTTI-refcounted makeString() string, corrupting the heap. Review found one gap: `info job` printed only a resreq presence flag instead of the actual resreq text, when format_resreq() already existed in this repo for exactly this purpose. Fixed to match. Scheduler suite: 35/35 clean (was 34/34). RED-phase evidence (2 real bugs plus 2 synthetic probes, all reverted with confirmed zero residue) recorded in tasks.md. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JPPXeKSUXUqcqvzNXY1rzJ
This commit is contained in:
parent
02f7f48ff9
commit
2fecea3592
18 changed files with 3067 additions and 212 deletions
|
|
@ -100,9 +100,11 @@
|
|||
* recording.c, recording_events.c, recording_session.c, snapshot.c,
|
||||
* snapshot_wire.c) and test_sim_record_output.c's own set (core.c,
|
||||
* core_clock.c, core_events.c, core_session.c, decision.c, plugin.c,
|
||||
* plugins/builtin_fcfs.c, recording.c, recording_session.c, sim.c,
|
||||
* plugins/builtin_fcfs.c, recording.c, recording_session.c, repl.c, sim.c,
|
||||
* sim_loop.c, sim_record.c, sim_verify.c, snapshot.c, snapshot_load.c,
|
||||
* snapshot_wire.c) -- no prior test file combines both the normal-mode
|
||||
* snapshot_wire.c -- repl.c added by task 12.1, required at link time by
|
||||
* sim_loop.c's own repl.h inline wrappers) -- no prior test file combines
|
||||
* both the normal-mode
|
||||
* driver stack and the full simulation stack in one TU; this task is the
|
||||
* first to genuinely need both halves of the pipeline live simultaneously.
|
||||
* Verified no static-symbol collisions exist across the combined file set
|
||||
|
|
@ -153,6 +155,9 @@
|
|||
#include "../src/recording.c"
|
||||
#include "../src/recording_events.c"
|
||||
#include "../src/recording_session.c"
|
||||
#include "../src/repl.c"
|
||||
#include "../src/repl_break.c"
|
||||
#include "../src/repl_info.c"
|
||||
#include "../src/sim.c"
|
||||
#include "../src/sim_loop.c"
|
||||
#include "../src/sim_record.c"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue