Confirms the full scheduler test suite passes with no regressions (63/64; sole failure is the pre-existing, unrelated bug-1758) and that the feature works correctly at realistic scale. Built a synthetic multi-round replay mirroring the original motivating scenario (a JOB_PUSH immediately followed by several JOB_UPDATE/JOB_STATE_CHANGE events for the same job, all sharing one rendered second/session) and ran it through the real interactive binary in both step and continue mode: a 6-event same-context run and a 4-event structural run each collapsed to exactly one preamble line, an elapsed-time context change and a session-only context change (same rendered second, different session) each correctly forced a fresh preamble - confirming the dedup key is genuinely the (timestamp, session) pair, not either field alone. Continue mode's pre-existing, unrelated Event Echo Gate correctly suppressed routine events throughout. A non-interactive batch run of the same fixture produced the identical single decision step/continue mode already showed, confirming no scheduling-decision divergence. This is the final task of the scheduler-sim-step-verbosity spec; all implementation tasks (1.1-2.2) are now complete. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YAWMhfRJFnmmnG8h97yUDd
26 lines
3.9 KiB
Markdown
26 lines
3.9 KiB
Markdown
# Implementation Plan
|
|
|
|
- [ ] 1. Core: event echo preamble deduplication
|
|
- [x] 1.1 Write failing tests for preamble deduplication across consecutive echoed events
|
|
- Cover: two consecutive echoed events with identical rendered timestamp and session omit the second's preamble; two consecutive events with a different session both print their own preamble; two consecutive events whose raw high-resolution timestamps differ but whose rendered timestamp and session are identical still dedupe; the first echoed event in a fresh REPL session always prints its preamble; a structural event echoed under continue mode after a stretch of suppressed routine events follows the same rule; every event's own content line and ordering remain present and unaffected regardless of the preamble decision
|
|
- Observable: the new test cases fail against today's REPL, which prints the timestamp/session preamble unconditionally before every echoed event
|
|
- After adding the new test cases, check `test_repl_event_echo.c`'s resulting line count against this project's ~1000-line split trigger (design.md's File Structure Plan); if approached or exceeded, split the preamble-dedup tests into a new `test_repl_step_verbosity.c` (duplicating shared fixture helpers per this file family's established convention) and register the new file's test target in `testsuite/meson.build`
|
|
- _Requirements: 1.1, 1.2, 1.3, 1.4, 2.2_
|
|
- _Boundary: Event Echo Preamble Deduplicator_
|
|
|
|
- [x] 1.2 Implement the preamble deduplication cache and print-skip logic
|
|
- Add the last-printed rendered timestamp and session cache to the REPL session state, zero-initialized alongside the state's existing fields; update the event echo path to compare the candidate rendered timestamp and session against the cache, printing and updating it only when either has changed (or no preamble has been printed yet this session), while always still printing the event's own content line unconditionally
|
|
- Observable: all tests from 1.1 pass; a captured transcript shows exactly one preamble line per distinct rendered (timestamp, session) run of consecutive echoed events, with every event's own content line still present
|
|
- After landing the implementation change, re-check `repl_break.c`'s line count against its already-accepted 949-line residual (design.md's Architecture Integration); if it meaningfully exceeds that residual, evaluate extracting `repl_print_event_summary()` and its Event Echo Gate neighbors into a new file rather than pre-splitting speculatively
|
|
- _Requirements: 1.1, 1.2, 1.3, 1.4, 2.2_
|
|
- _Boundary: Event Echo Preamble Deduplicator_
|
|
|
|
- [ ] 2. Validation: regression and real-transcript verification
|
|
- [x] 2.1 Verify every other REPL command and mode's existing behavior remain unchanged outside the preamble's own deduplication
|
|
- Confirm which events are echoed, event ordering, event content, and every other REPL command's behavior and output match their pre-feature baseline exactly except for the preamble line's now-conditional printing; confirm no scheduling decision or simulation state changed as a result of this feature
|
|
- Observable: the existing REPL test suite's pre-existing assertions all still pass, updated only where a specific assertion pinned the old always-print-preamble shape for two events that legitimately share rendered context (each such update documented with which acceptance criterion justifies it), and a step-mode transcript comparison against the pre-feature baseline shows no textual difference outside the preamble line's presence or absence
|
|
- _Requirements: 2.1, 2.3, 2.4_
|
|
|
|
- [x] 2.2 Run the full scheduler test suite and re-verify against a realistic multi-event transcript
|
|
- Observable: the full test suite passes with no regressions, and a step/continue pass over a transcript containing several consecutive same-context events shows the preamble collapsing to one line per distinct context while every event's own content line still appears in order
|
|
- _Requirements: 1.1, 1.2, 1.3, 1.4, 2.1, 2.2, 2.3, 2.4_
|