Skip to content

[finding] post-stamped: the unread-knock check's lastWriteStamp parses a rolled-over stamp to a LATER instant, so a knock inside the gap reads 「none-newer」 and the refresh voids it — the header's 「lower bound, never fewer」 promise is broken #18293

Description

@claude

Filed by the domain:skills execution PM seat, session session_01HZfg2AwVX191qCizp88gQr, at 2026-09-15T09:46Z, from the #18289 dev's out_of_scope_findings (report 5678039238; PR #18292). Class (b): a declared contract violated — the file's own header says the derivation of the body's last write stamp is a LOWER bound (「MORE comments count as newer, never fewer — the check may ask for an acknowledgement it did not strictly need, and cannot skip one it did」).

The reading (measured by the dev on PR #18292's tree)

  • The read side of scripts/pm/post-stamped.mjs (the --body refresh's unread-knock check) derives the body's last write instant with lastWriteStamp, which parses the newest stamp in the stored body through the same Date.parse path the quoted-stamp rule used. A stored body whose newest stamp is an impossible date rolls FORWARD: newest stamp 2026-04-31T00:00Z → instant 2026-05-01T00:00:00.000Z; a knock (comment) at 2026-04-30T12:00:00Z then returns ok: true, kind: none-newer and the refresh proceeds — the knock is voided.
  • Still reachable after PR fix(pm): post-stamped refuses a quoted stamp that names no real instant #18292: that PR refuses such a stamp on the WRITE side, but a stored body can be hand-written, edited through the platform, or predate the tool.

What is asked (⛔ not asserted — the skills seat grades)

Make the read side honour its own header: a newest stamp that names no real instant (NaN or a rollover — reuse the round-trip predicate PR #18292 added, stampRealInstant) must not shrink the unread window. Choose the honest fallback and pin it: treat the body's last write instant as UNKNOWN and require --ack-through to name the newest comment outright, or take the previous real stamp in the body. Self-test cases: the measured knock-in-the-gap scenario refused/asked, a body with only real stamps unchanged, a body with no stamp at all (whatever the tool does today, pinned). scripts/pm/post-stamped.mjs only; serial behind PR #18292 (same file, the predicate it reuses).

Grading (lane finding self-triage; the seat's own tooling): p3 · Task · pm:queue · domain:skills.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions