test(scheduler-sim-step-verbosity): task 1.1 - RED tests for preamble dedup

Adds 6 failing tests for the Event Echo Preamble Deduplicator
(Requirements 1.1-1.4, 2.2): a second echoed event sharing its
predecessor's rendered timestamp+session omits its preamble; two
events across a session boundary both print their own preamble; the
critical raw-vs-rendered nuance (Requirement 1.3) - two events whose
raw nanosecond timestamps genuinely differ but whose rendered,
second-granularity timestamp and session are identical still dedupe,
with a fixture-premise self-check proving the two raw values really
do render identically; the first echoed event in a fresh session
always prints its preamble; a structural event under continue mode
after suppressed routine events follows the same rule; event content
and ordering are unaffected regardless of the preamble decision.

Lands in a new test_repl_step_verbosity.c (1010 lines, 6 tests) rather
than extending test_repl_event_echo.c (705 lines) - proactive split
per this file family's established practice, since appending would
have pushed that file well past the project's ~1000-line trigger.
Registered in testsuite/meson.build. No production code touched.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YAWMhfRJFnmmnG8h97yUDd
This commit is contained in:
Rongsong Shen 2026-09-03 03:54:01 +00:00
parent 1374540954
commit 6a2aa47f5e
No known key found for this signature in database
GPG key ID: 5BCDAAE0123E9FE2
3 changed files with 1050 additions and 1 deletions

View file

@ -1,7 +1,7 @@
# Implementation Plan
- [ ] 1. Core: event echo preamble deduplication
- [ ] 1.1 Write failing tests for preamble deduplication across consecutive echoed events
- [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`