fix(scheduler): mirror plugin_begin_session/plugin_end_session into sim-mode driver (bug-1681)
sim_loop.c never called plugin_begin_session()/plugin_end_session() at its round boundary, unlike driver.c's normal-mode round -- a driver- equivalence gap found by an /xce-audit-invariants scheduler pass. Currently inert (sim mode's only reachable picker, builtin_fcfs, leaves both hooks NULL) but structurally identical to bug-1613's class of bug. Relocated plugin_begin_session()/plugin_end_session() from an implicit xce_scheduler_t* to xce_sched_core_t* directly (mirroring sched_account_jobs()'s prior relocation) -- their bodies never touched anything beyond core->plugins, so driver.c's comment claiming they "needed the full xce_scheduler_t*" was itself stale. sim_loop.c now calls both, same relative position as driver.c. A full-tree grep (done after the first build attempt failed on an untouched file) turned up a third live call site in scheduler.c's legacy sched_begin_session()/ sched_end_session(), plus four testsuite files with their own stub definitions of the same functions -- all updated to match the new signature. Extended test_sim_session_ordering.c's existing bug-1613 regression tests with new plugin_begin_session()/plugin_end_session() spies (call-count + session_active-window proof, same technique as the existing sched_account_jobs spy). RED/GREEN independently verified: temporarily disabled the two new call sites, confirmed both new assertions fail (Expected 2 Was 0 / Expected 1 Was 0), restored, reconfirmed green. Full scheduler suite: 51/52 green, the one failure is the pre-existing unrelated bug-1560 sandbox flake. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AgYRU3zDTqNGV5Jk8aiKLg
This commit is contained in:
parent
6d2668ced3
commit
6400f96d9d
12 changed files with 248 additions and 54 deletions
|
|
@ -166,15 +166,15 @@ int xce_core_end_session(xce_sched_core_t* core)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int plugin_begin_session(void* arg)
|
||||
int plugin_begin_session(xce_sched_core_t* core)
|
||||
{
|
||||
(void)arg;
|
||||
(void)core;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int plugin_end_session(void* arg)
|
||||
int plugin_end_session(xce_sched_core_t* core)
|
||||
{
|
||||
(void)arg;
|
||||
(void)core;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue