Clear the cache inside core_begin_session_internal() so a job cached as unsatisfiable in one session is re-evaluated fresh in the next (Req 7.2). An initial weak-symbol cast-based approach was rejected: it corrupted xce_sched_sim_driver_t.alt_events_file, since core_begin_session_internal() is shared between driver.c (real xce_scheduler_t) and sim_loop.c (a structurally different, deliberately isolated sim driver struct with no cache field at the same byte offset) -- the strong cache_clear() symbol won unconditionally for both, invisible to ASAN and untested by any test_sim_*.c file. Fixed via a driver-registered callback: xce_sched_core_t gains a cache_clear_cb hook (NULL by default, per xce_sched_core_init()'s full-struct memset), set only in main.c's driver-mode branch -- mirroring the existing on_decision/xce_core_set_decision_cb() pattern. --sim mode returns before that registration is ever reached, so its hook stays NULL and core_begin_session_internal()'s guarded call is a no-op. The real xce_scheduler_t-casting adapter lives in alloc_cache.c rather than driver.c, since ~11 tests white-box-include driver.c without linking alloc_cache.c. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XYdtrEWWZfKRRGED7raEYg |
||
|---|---|---|
| .. | ||
| settings | ||
| specs | ||
| steering | ||