myxce/.wolf
Rongsong Shen 487e7b9419
fix(scheduler-sim-diagnostics): bootstrap limit plugin in sim mode (bug-1825)
info limit was correctly implemented and tested but inert against a real
replay: register_limit()'s only call site was normal-mode sched_register_
plugins(); sim mode's own plugin bootstrap (sim_bootstrap_picker()) never
registered the limit plugin. The snapshot format already carries the
original session's limit config (sim->core.config, a borrowed reference set
by xce_sched_core_load_snapshot()) -- nothing needed to change in the
recording/replay format.

New sim_bootstrap_limit_plugin() (sim_limit.c, mirroring sim_picker.c's
structure) registers the plugin via plugin_register_core() and seeds it via
a new limit_seed_config(plugin, xce_sched_core_t* core, config) entry point,
wired into sim_loop.c alongside the existing sim_bootstrap_picker() call.
limit_new_plugin() extracted from register_limit() as a factory, mirroring
builtin_fcfs_new_plugin()'s established pattern; register_limit() itself is
behavior-preserving.

First attempt set plugin->sched to a disguised xce_sched_sim_driver_t*,
relying on it sharing xce_scheduler_t's first-member layout to reuse the
existing config_hook path -- rejected on review: this repeats the exact
cross-cast pattern that already corrupted memory once in this codebase (see
core.h's xce_core_cache_clear_cb_t history). Fixed by making
limit_seed_config() take xce_sched_core_t* as an honest parameter instead,
with limit_update_config() (normal mode) and the new sim path both
delegating to a shared limit_seed_config_impl() -- no cast, no aliasing risk,
independently verified by two review rounds reading the actual struct
layouts and call chains.

Also added sim_limit.c to sched_sim_isolation_lib so Req 5 AC 17's
controller-I/O-isolation check covers it (an initial gap, closed in the same
remediation round). Two ripple waves of the same established link-stub
pattern applied to the ~24 white-box test files that #include sim_loop.c.

info limit now shows real configured-limit data against a genuine replay.
Live usage will still correctly show "no active usage instance yet" until a
separate, larger fix (logged as bug-1826) wires limit *matching* into the
sim decision path -- deliberately out of this task's scope.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RLSNJhNoULvVcUhXEFafQC
2026-09-18 04:46:49 +00:00
..
hooks chore(wolf): checkpoint buglog.json (1062 bugs) 2026-08-27 08:27:43 +00:00
.gitignore chore(wolf): checkpoint buglog.json (1062 bugs) 2026-08-27 08:27:43 +00:00
_scan-state.json Merge branch 'better_xce_build' into scheduler-framework 2026-09-08 03:09:53 +00:00
anatomy-index.json chore(openwolf): sync anatomy index and memory log 2026-09-17 06:56:52 +00:00
anatomy.md chore(openwolf): sync anatomy index and memory log 2026-09-17 06:56:52 +00:00
buglog.json fix(scheduler-sim-diagnostics): bootstrap limit plugin in sim mode (bug-1825) 2026-09-18 04:46:49 +00:00
cerebrum.md chore(openwolf): sync anatomy index, memory log, and cerebrum notes 2026-09-17 04:04:03 +00:00
config.json docs: save scheduler-snapshot-job-allocation and xce-test-cli-ux spec docs, sync OpenWolf state 2026-08-28 06:30:37 +00:00
cron-manifest.json chore: checkpoint all prior work for clean state 2026-06-04 13:04:16 +00:00
cron-state.json chore(build): make xce-build.sh self-wrap into nix develop 2026-09-07 15:31:06 +00:00
memory.md chore(openwolf): sync anatomy index and memory log 2026-09-17 06:56:52 +00:00
OPENWOLF.md chore(wolf): checkpoint buglog.json (1062 bugs) 2026-08-27 08:27:43 +00:00
reframe-frameworks.md chore: checkpoint all prior work for clean state 2026-06-04 13:04:16 +00:00
STATUS.md chore(wolf): regenerate handoff, sync anatomy/memory bookkeeping 2026-09-13 09:43:21 +00:00