myxce/src/scheduler/include
Rongsong Shen 4195331b47
feat(scheduler-sim-live-allocation): extract shared picker/allocator into sched_election.c (task 3.1)
Relocates sched_job_picker()/sched_allocator() out of scheduler.c
(1382 lines, already over this project's 800-line cap) into a new
sched_election.c, retyped to xce_sched_core_t* -- the single
implementation both drivers will spawn (task 4.1 wires simulation
mode onto it). Independently verified bit-for-bit identical to the
pre-relocation bodies modulo the sched->/core-> rename; no statement
reordered, no branch changed.

sched_make_allocation() becomes extern (was static, sole caller moved
translation units); the old commit_decision() thin wrapper is deleted,
its sole caller now calls sched_commit_decision() directly with
identical semantics. sched_init() updated to spawn the relocated pair
against &(sched->core).

Adds an end-to-end fixture test proving a job flows from picked to a
committed decision against bare (non-xce_scheduler_t) core state.
Routes around, rather than fixes, two pre-existing out-of-boundary
gaps this fixture exposed (seqjob/parjob allocator init still reading
plugin->sched; make_sched_job()'s parse path not threading
maxtasks/mintasks) -- both documented in the test's own comments for
future follow-up.

sched_election.c added to the normal build only; sched_sim_isolation_lib
membership deferred to task 4.1, which is where sim mode actually
starts spawning these threads.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RLSNJhNoULvVcUhXEFafQC
2026-09-19 02:50:38 +00:00
..
sched feat(scheduler-sim-live-allocation): thread core state through allocation context and host search (task 2.1) 2026-09-18 13:52:14 +00:00
core.h feat(scheduler-sim-live-allocation): add unsatisfiable-cache callback seam (task 1.1) 2026-09-18 10:14:04 +00:00
decision.h feat(scheduler-core): implement session-start signal + decision callback (task 4.4) 2026-08-04 03:08:18 +00:00
driver.h feat(scheduler-core): implement record start/stop lifecycle (task 9.2) 2026-08-05 09:07:51 +00:00
plugin.h feat(scheduler-sim-live-allocation): make plugin hook dispatch core-safe (task 1.2) 2026-09-18 11:48:08 +00:00
recording.h feat(scheduler-core): implement what-if branching and simulation output recording (task 11.5) 2026-08-07 02:42:50 +00:00
repl.h fix(scheduler): clock/resval/jobid-format fixes plus REPL live-operator gaps (task 12.5) 2026-08-19 09:48:46 +00:00
scheduler.h feat(scheduler-sim-live-allocation): extract shared picker/allocator into sched_election.c (task 3.1) 2026-09-19 02:50:38 +00:00
sim.h fix(scheduler): sim resource over-commit, byte-unit display, sync job-state-at-capture 2026-09-12 14:06:41 +00:00