feat(scheduler-core): extract xce_sched_core_t from monolithic scheduler struct (task 4.1)

Splits xce_scheduler_t along the controller-I/O seam: xce_sched_core_t
(new core.h/core.c) now holds all scheduling state (jobs/queues/workers/
users/projects/resource managers/plugins/three-thread-cbuf pipeline),
while xce_scheduler_t shrinks to {core; apictx; cluster_cfg}. Proven via
an nm-based link-time isolation test (zero netio/xcecli/idgen/delaymgr
symbols reachable from core.c) plus a reproducible wall-clock-call guard.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019dw5WnN3DXStaEaPYfACU1
This commit is contained in:
Rongsong Shen 2026-08-03 10:55:58 +00:00
parent 604a564904
commit 7c229284e2
Signed by: rshen
SSH key fingerprint: SHA256:8Vf2pZ3h6rJa7EhGK+WaAQ9Mta/apZvteW6g9U/WKKk
26 changed files with 1233 additions and 661 deletions

View file

@ -74,20 +74,22 @@
- _Requirements: 4.1, 4.2, 6.1, 6.2, 6.3, 6.4_
- _Depends: 2.5_
- [ ] 3. Run Phase 1 HA soak regression
- [x] 3. Run Phase 1 HA soak regression
- Run sequential and chaotic HA failover soak rounds against a cluster running the new picker architecture
- Observable: zero new job loss, decision divergence, or liveness stall attributable to this phase's changes across the soak run
- _Requirements: 4.3_
- _Depends: 2.6_
- _Verified: 15-round sequential soak, 2026-08-03 — PASS: 15 rounds, 48 jobs submitted, zero job loss; all 3 nodes led (ctrl-1,ctrl-2,ctrl-3)_
- [ ] 4. Foundation: Scheduler Core Extraction
- [ ] 4.1 Extract the scheduling core from the monolithic scheduler struct
- [x] 4.1 Extract the scheduling core from the monolithic scheduler struct
- Split scheduling state (jobs, queues, workers, resources, resvals, users, projects, plugin instances) into its own core structure holding zero controller I/O state (no API client context, no cluster config)
- Confirm the core links only against the approved minimal data-structure subset and never links network/timer/API libraries — no wall-clock time call appears anywhere in the extracted core's source
- Observable: the core structure compiles and links with zero symbols from the networking/API libraries; a build-time or link-time check confirms this
- _Requirements: 5.1, 5.2_
- _Depends: 3_
- _Verified: 2026-08-03 — new xce_sched_core_t (core.h/core.c) holds all scheduling state, xce_scheduler_t shrank to {core; apictx; cluster_cfg}; nm-based isolation test (test_core_isolation.c) proves zero netio/xcecli/idgen/delaymgr symbols; 14/14 scheduler suite passing; independent review APPROVED (own fresh build/test/nm run + reproduced RED)_
- [ ] 4.2 Pin the determinism invariants
- Hardcode the picker-to-allocator handoff channel's capacity to 1 inside core initialization — never expose it as a parameter