diff --git a/.kiro/specs/scheduler-sim-decision-trace/tasks.md b/.kiro/specs/scheduler-sim-decision-trace/tasks.md index d08861dd..25111665 100644 --- a/.kiro/specs/scheduler-sim-decision-trace/tasks.md +++ b/.kiro/specs/scheduler-sim-decision-trace/tasks.md @@ -114,6 +114,15 @@ - The full scheduler test suite, including the 28 tests updated in 1.6, must still build and pass under ASAN with the completed capture source. Missing scheduler sources are added to those tests, or stubbed. - _Requirements: 2.5, 6.1, 6.2, 6.3, 6.4, 9.4_ +- [ ] 2.4 Split the trace sources under the 800-line file cap, with no behaviour change + - Added during implementation (2026-10-08, user decision). After 2.3, `sched_trace.c` is 1130 lines and `sched_trace_capture.c` is 1065, both over the scheduler's 800-line cap (src/scheduler/CLAUDE.md). + - Move outcome capture (dispatch, pend, reconstructed record) into a new `src/sched_trace_outcome.c`. Split `sched_trace.c` along a clear seam, e.g. entries and line budget versus counters, summaries and rollback, so every trace source is under 800 lines. Shared static helpers go behind an internal header (e.g. `src/sched_trace_internal.h`); the public `include/sched/trace.h` interface is unchanged. + - Register every new source in the scheduler's main source list, in the core isolation test's scan and no-stdio check, and in each white-box test that includes the trace sources (the 27 from 1.6, plus the trace model, capture and gate tests). + - Update design.md's File Structure Plan and TraceModel/TraceCapture file references to the new files. + - Done when every trace source is under 800 lines, the full scheduler suite passes unchanged under ASAN, and the core isolation test scans the new files. + - _Requirements: 11.2, 11.4_ + - _Depends: 2.3_ + - [ ] 3. Allocator-thread hooks at the decision seams - [ ] 3.1 Hook the allocator loop: position, record lifecycle, selection and no-decision paths (P) - **Position:** when session settings are present, every real job pop increments it.