The wake digest's `PREVIOUS SESSION DID NOT WRAP` alarm fired falsely at three
consecutive wakes and was overridden by hand at two of them. It was scoped as a
two-valued-detector problem. Diagnosing the class first found four defects, and
the scoped one was not the cause:
1. TIME BASE (the cause). Transcript timestamps are UTC (`...Z`); the code
dropped the suffix and called `time.mktime`, which reads a struct_time as
LOCAL, then compared the result against `os.path.getmtime`, a true epoch.
Measured: +7201 s skew against a 900 s tolerance. Because the skew exceeds
the tolerance, a wrap written at the end of a session could NEVER land inside
the window — the alarm was systematic, not intermittent.
2. SELECTION. "Newest transcript quiet for >60 s" excluded the previous session
at exactly the moment it mattered: on 2026-08-17 it had ended 12 s before the
wake, was skipped, and the session from four days earlier was reported
instead. The defect is time-dependent and disappears ~60 s later, which is
why re-running the digest afterwards showed nothing wrong.
3. EVIDENCE. Wrap records were dated by mtime, which any later edit moves — the
08-14 record read 08-17 because a CODA was appended to it. Now dated by git
add-time, which cannot move once committed; mtime is a labelled fallback.
4. ARITY. `verdict is None` (could not assess) was folded into silence with
"wrapped fine". Now four outcomes, per REVIEWED-104: wrapped · unwrapped ·
unassessable-subject (environment) · unassessable-check (defect).
Acceptance is old-vs-new on the real case, not a unit pass. At the reconstructed
wake instant the old code selects the wrong transcript AND returns a false alarm
on the right one; the new code selects correctly and returns `wrapped`. Both
defects independently produced the alarm, so fixing only the arity — the scoped
task — would have shipped a fix that left it firing.
The selftest gains a control derived from the property rather than from the
check: a transcript's last inner timestamp and its file mtime are two readings of
one moment, so their MEDIAN skew detects a systematic clock mismatch (1 s now,
~7200 s before). Max is printed too, because one transcript legitimately skews
31 h — the same mutable-mtime problem, on the transcript side.
The old real-substrate gate demanded both verdicts occur across live sessions
and PASSED while the detector was broken: it established that outcomes were
spread, never that any was correct. Demoted to a printed note with its limit
stated beside it. Filed as PENDING-142 ADDENDUM 1.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013Y6t6qx7cpaCu5xGdD36u4