myxce/src
lei.chen b20caf8ddf test(scheduler): lock three-path UNAVAIL/RECONCILING skip symmetry (Phase 0)
Phase 0 of scheduler-hardening-plan.md: a cross-file structural regression
test locking the invariant whose three observed violations were bug-1799
(charge without reset-skip), bug-1801 (the complement) and bug-1814
(rusage delta without the skip): every w->resInUse/core->sharedInUse-
mutating path shares ONE identical skip condition for UNAVAIL/RECONCILING
workers.

test_res_account_symmetry.c drives all three paths in one core per round
-- core_reset_workers() (core_session.c, bug-1751 skip),
sched_charge_account()/sched_update_account() (resource.c, bug-1801 skip)
and sched_reconcile_host_resource_usage() (resource.c, bug-1814 skip) --
using the real sched_account_jobs() from scheduler.c, and asserts the
accounts do not drift across consecutive rounds. A per-path test cannot
see asymmetry by construction; bug-1799's live shape was asymmetry
compounding across rounds (resInUse grew one full charge per round for
two weeks).

Three cases: two-round zero drift with a RECONCILING worker (B frozen at
its seeded value, both host entries named by the job's account so the
skips are active decisions, not vacuous); UNAVAIL worker plus a real
usage climb 2.0->5.0->0.0 proving the reconcile delta still applies on
the healthy host while the excluded host's account-entry used baseline
never advances (bug-1814's half-damage); and a status-clear round
proving the freeze is per-round status-gated, never permanent.

Link technique: the separate-compiled-sources shape of
sched_trace_error_paths_test -- the test white-box #includes
core.c/core_session.c/resource.c/schedobj.c + the four hooked trace
sources, and meson compiles every other scheduler_srcs entry (minus
main.c) as its own TU, which resolves sched_account_jobs() from
scheduler.c's own object without white-box including scheduler.c (and
without the plugin_* stubs test_resource_accounting.c needs: real
plugin.c is one of those TUs).

Red proof: temporarily removing resource.c's bug-1801 skip trips the
zero-drift assertion immediately (2.5 -> 4.5, exactly one extra charge
per round -- bug-1799's live shape); mutation reverted, suite green.

Full scheduler suite: 102/102 OK.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-30 04:45:43 +00:00
..
autoscaler merge: sync Rongsong's scheduler-framework (c5b172c7..3442a57d, 781 commits) 2026-10-14 05:17:03 +00:00
configs E2 Phase 3: per-project/per-queue license quotas via limit vres + controller shared-alloc migration fix 2026-10-28 05:36:43 +00:00
controller fix(testsuite): resize crr_build_config caller arrays -- bug-1977 2026-10-28 11:58:19 +00:00
docs docs: external-resources manual — xceesd kill/restart recover semantics 2026-10-29 10:26:42 +00:00
esd fix(esd): re-join after transparent reconnect -- bug-1978 2026-10-28 14:07:41 +00:00
frontend fix(xcecli): jobs submit with explicit command must not read stdin 2026-10-30 02:01:50 +00:00
harness build: eliminate all unused-variable/function warnings in our code 2026-10-21 09:28:34 +00:00
include E2 Phase 1: external-license-resources — xceesd daemon, extres role, EXTERNAL admission 2026-10-27 03:45:28 +00:00
lib E2 Phase 1: external-license-resources — xceesd daemon, extres role, EXTERNAL admission 2026-10-27 03:45:28 +00:00
nixSupport remove extralib 2026-09-04 11:24:43 +08:00
scheduler test(scheduler): lock three-path UNAVAIL/RECONCILING skip symmetry (Phase 0) 2026-10-30 04:45:43 +00:00
schema E2 Phase 1: external-license-resources — xceesd daemon, extres role, EXTERNAL admission 2026-10-27 03:45:28 +00:00
subprojects build: eliminate all remaining compile warnings 2026-10-21 15:38:42 +00:00
testsuite_support merge: sync Rongsong's scheduler-framework (c5b172c7..3442a57d, 781 commits) 2026-10-14 05:17:03 +00:00
tools bug-1971: preserve flaky test-failure evidence across xce-build.sh runs 2026-10-22 08:08:01 +00:00
worker external-license-resources 3.3b: elim load-index collector in xcecd 2026-10-28 11:17:36 +00:00
xceadmin resources: XCE_RESF_BUILTIN 从未被置位 — resources.yaml 加 builtin: true 声明式键 2026-10-28 01:46:21 +00:00
flake.lock remove extralib 2026-09-04 11:24:43 +08:00
flake.nix merge: sync Rongsong's scheduler-framework (c5b172c7..3442a57d, 781 commits) 2026-10-14 05:17:03 +00:00
meson.build E2 Phase 1: external-license-resources — xceesd daemon, extres role, EXTERNAL admission 2026-10-27 03:45:28 +00:00
meson.options build: remove nix dependency layer -- apt system libs + meson wrap subprojects 2026-10-20 18:04:22 +00:00