--- id: "bug-1506" status: "fixed" status_updated: "2026-09-24" status_note: "" component: "scheduler" severity: "unknown" timestamp: "2026-08-07T09:05:00Z" last_seen: "2026-09-19T09:00:00Z" occurrences: 1 files: ["src/scheduler/testsuite/test_repl_breakpoints_inspection.c"] tags: ["scheduler-core", "task-12.2", "repl", "xstring", "test-fixture", "makeString"] related: ["bug-1507"] legacy: true --- # bug-1506: sched_repl_breakpoints_inspection_test: repl_dispatch(sim, "break JOB_STATE_CHANGE jobid=12345")… ## Description sched_repl_breakpoints_inspection_test: repl_dispatch(sim, "break JOB_STATE_CHANGE jobid=12345") stored NULL for the breakpoint's token/filter key/value -- TEST_ASSERT_EQUAL_STRING("jobid", ...) failed with 'Expected jobid Was NULL'. ## Environment _Not recorded (migrated from buglog.json)._ ## Reproduction _Not recorded (migrated from buglog.json)._ ## Root cause makeString() (src/lib/xstring.c) is an interned-xstring allocator backed by a process-global xstr_table that must be initialized via xstring_table_init() before first use -- xce_sched_core_init() (core.c) is the only call site in the scheduler tree and does this transitively. New task 12.2 unit tests built a bare xce_sched_sim_driver_t via memset(0) and called repl_state_ensure()/repl_dispatch() directly for pure command-dispatch tests, without ever calling xce_sched_core_init() first (the real driver flow always does, via sched_sim_driver_start() before xce_repl_start() runs, so this precondition is always satisfied in production -- only the test fixtures skipped it). With xstr_table uninitialized (NULL), makeString()'s internal key_find()/key_add() against a NULL kvmgr container fail gracefully and return NULL rather than crash, so the bug surfaced as silently-NULL breakpoint fields, not an immediate crash. ## Fix Added xce_sched_core_init(&(sim.core)) as the first statement (right after memset) in every Group A/B test in test_repl_breakpoints_inspection.c that calls repl_dispatch()'s break/delete commands or the repl_break.c matcher functions -- matching the real driver's own precondition ordering. ## Verification _Not recorded (migrated from buglog.json)._ ## References - Related: bug-1507