test(web-shell): fail when a fixture date outlives the frozen capture clock

Captures render at a fixed instant, so a fixture dated after it silently reads
as "just now": `formatRelativeTime` measures `Date.now() - value`, a future
value yields a negative age, and that lands in the `mins < 1` branch. This
already happened on this branch. The first frozen constant sat at 2026-01-01,
before the channel editor's 2026-07-28 pairing requests, and turned "7/28/2026"
into "just now" across four views. Nothing failed -- no assertion covers that
label -- and it was caught only by reading a preview diff by eye.

Scan the visuals specs for ISO date literals and require each to precede
FIXED_CAPTURE_TIME. The docstring already asked for this; a comment does not
fail a build. `harness.ts` is skipped because it is where the constant itself
is written, so its literal is the boundary rather than a fixture.

The scan reaches further than the fixture that caused the incident: it covers
eleven literals across the suite, eight of them a 2026-07-03 pair I had not
been aware of. Verified in both directions -- silent against the tree as it
stands, and flagging a planted 2027-06-01 literal.

Not a general date linter. It catches ISO strings in fixtures, which is the
shape the regression actually took; an epoch number is already opaque enough
that nobody reads it as a date.
This commit is contained in:
yiliang114 committed 2026-09-09 11:42:24 +09:00
1 parent ed3e34c425
commit b162c19344

Diff Content Not Available