docs(scheduler-sim-live-allocation): reconcile equivalence suites (task 5.3)

Re-ran test_repl_equivalence.c, test_sim_equivalence.c, and
test_sim_contention_parity.c in full: all pass, 85/85, zero assertion
changes anywhere. Confirmed all three still exercise their own
link-satisfying always-PEND sched_job_picker/sched_allocator stub
(added task 4.1), correctly proving the new two-thread jbuf timing
didn't disturb decision ordering -- but not proving real live-path
resource-based dispatch parity, which is already covered separately
by tasks 4.1/4.3/5.1/5.2's real-scheduler_srcs-linked fixtures.

Fixed a stale documentation defect: all three files' header/inline
comments claimed sim mode "structurally CANNOT emit a DISPATCH
decision" via sim_picker_thread_fn(), a function this feature removed
in tasks 3.1/4.1. That claim is now false of production sim mode
(disproved by test_sim_live_allocation.c and others); corrected with
a RECONCILIATION addendum rather than rewriting the original
historical rationale. No production code or assertion values changed.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RLSNJhNoULvVcUhXEFafQC
This commit is contained in:
Rongsong Shen 2026-09-19 09:39:32 +00:00
parent a70c7a2c61
commit aacb7250e3
No known key found for this signature in database
GPG key ID: 5BCDAAE0123E9FE2
4 changed files with 77 additions and 6 deletions

View file

@ -72,6 +72,39 @@
* This is reported explicitly in this task's own status report, not
* hidden here.
*
* RECONCILIATION (scheduler-sim-live-allocation spec, task 5.3, 2026-09-19):
* sim_picker_thread_fn() named throughout the paragraphs above no longer
* exists -- it was removed by that spec's task 3.1/4.1, replaced in
* PRODUCTION by the shared sched_job_picker()/sched_allocator() pair
* (sched_election.c), which sim mode now spawns for real against
* &(sim->core), genuinely reaching sched_make_allocation() and capable of
* emitting a real DISPATCH. The "simulation driver structurally CANNOT emit
* a DISPATCH decision" claim above is therefore no longer true of production
* sim mode -- see test_sim_live_allocation.c and the
* sched_sim_contention_resource_driver_parity_test/sched_sim_contention_
* limit_driver_parity_test/sched_sim_e2e_limit_visibility_test family
* (meson.build), which link the real scheduler_srcs and prove genuine live
* DISPATCH/PEND parity between normal and sim mode, including under
* resource contention and active limits -- the requirement this feature's
* task 5.3 exists to satisfy. It remains true of THIS file's own fixture
* only, because this TU never links sched_election.c: task 4.1 gave it (and
* test_repl_equivalence.c/test_sim_contention_parity.c) their OWN
* link-satisfying sched_job_picker()/sched_allocator() stub definitions
* (below) that faithfully reproduce the old always-PEND contract, precisely
* so this file's pre-existing assertions stay valid unchanged. Confirmed via
* `git show` on task 4.1's commit: the only change made to this file by the
* whole scheduler-sim-live-allocation feature was adding those stubs -- zero
* existing assertions were touched. What this test still genuinely proves
* post-feature: sim_loop.c's real sched_sim_driver_run() now drives its
* picker/allocator via a genuine two-thread jbuf hand-off (the same
* production entry points, resolved here to this file's stub instead of the
* real allocation chain) rather than the old single fused thread, and that
* change did not alter the recorded-vs-replayed decision sequence -- the
* decision-timing/ordering risk requirements.md/design.md flagged for this
* migration. It does NOT re-prove resource-based dispatch equivalence,
* which is proved elsewhere (tasks 4.1/5.1/5.2, cited above) rather than
* duplicated here.
*
* The fixture is still a genuine, non-trivial regression guard, not a
* single-job happy path that could pass by accident: TWO queues at
* different priorities ("high"=5, "normal"=1) and FOUR jobs split across