feat(scheduler-sim-discrete-clock): remove the simulator speed argument and shadow copy (task 3.1)

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rongsong Shen 2026-09-29 05:19:34 +00:00
parent eb5f339541
commit aa2bb6d090
Signed by untrusted user: rshen
GPG key ID: 80533536B0EB651C
32 changed files with 72 additions and 129 deletions

View file

@ -35,8 +35,8 @@ Test-first throughout (red → green → refactor). Every sub-task leaves the bu
- _Boundary: main, CliCompat_
- _Depends: 1.1, 2.1_ (shares the new test file with 2.1, and its output assertions need the pinned clock)
- [ ] 3. Integration: remove the simulator speed fields
- [ ] 3.1 Remove the simulator speed argument and shadow copy, and update every test that set them
- [x] 3. Integration: remove the simulator speed fields
- [x] 3.1 Remove the simulator speed argument and shadow copy, and update every test that set them
- Remove the simulator's speed argument and its shadow copy, and in the same change update every test that assigns or asserts them: the 22 tests that only assign a speed, the startup test (keep its core frozen-setting assertions, drop the shadow-copy ones), the REPL parameter test's remaining assignments, and the non-zero speed assignments that 2.1 added to the new discrete-clock tests to prove RED (those tests keep asserting the pinned clock) (design.md, Modified Files and the build-order constraint).
- Rename the three core clock tests that describe simulation speed modes as formula tests, including their test registrations and the file header; update the stale speed comments in the scheduler test build file, in the step-verbosity REPL test (which describe the removed speed argument), and in the command-line flag-meaning comments that describe the simulator speed argument, the simulator header's comments, and the core header's documentation of the speed setting (1/1 in normal mode, 0/1 in simulation mode).
- Done when a search of the scheduler sources and tests finds no simulator speed argument or shadow copy, only the core speed setting, and the full scheduler suite passes.
@ -69,3 +69,4 @@ Test-first throughout (red → green → refactor). Every sub-task leaves the bu
## Implementation Notes
- Build dir: `bash src/tools/xce-build.sh scheduler asan xce.build.discrete` builds into `src/xce.build.discrete`; iterate with `meson test -C src/xce.build.discrete --suite scheduler` and grep its testlog for `:FAIL`.
- 2.1 added `args->sim_speed = DISCRETE_CLOCK_RED_SPEED` (and that define) to `test_sim_discrete_clock.c` to prove RED; 3.1 removes both. Its fixture writer leaves mkdtemp dirs under `/tmp` (as `test_sim_record_output.c` does).
- `test_clock.c` (~40, ~435) quotes scheduler-core AC 12 "fast mode" wording in its session-timing tests; reword it together with 4.2.