Skip to content

test(status): pin same-millisecond capture arrivals - #529

Merged
abogartz merged 5 commits into
abogartz:mainfrom
WhollyMindless:test/526-arrival-timestamp-tie
Nov 25, 2026
Merged

abogartz merged 5 commits into
abogartz:mainfrom
WhollyMindless:test/526-arrival-timestamp-tie

Conversation

@WhollyMindless

Copy link
Copy Markdown
Contributor

Closes #526.

The status test now covers an arrival tied with either a start or a skip. The evidence guide clarifies that the warning compares the latest proceeding arrival with the latest outcome in the window, so it cannot diagnose earlier arrivals individually.

Windows status suite: 58 passed. Temporarily changing the comparison from > to >= made the new test fail. Restored the production code before committing.

Implemented with GPT-6.2 Sol in T3 Code.

@ocsi-reviewer

ocsi-reviewer Bot commented Nov 25, 2026

Copy link
Copy Markdown

Review: PR #529 — test(status): pin same-millisecond capture arrivals

Combined seat (architecture conformance + code review, one reviewer, disclosed). Measured at head b086a14 on a scratch copy; base is the post-#525 main (963a7c5). CI: all four checks pass at head.

Scope

Two files: one new test in test/status/status.test.ts (13 lines) and one sentence-level edit in docs/internals/auto-capture-evidence.md. No production code touched — correct shape for the ticket, which asked for a fixture pin plus a scope clause.

The pin (ticket bullet 1) — verified by mutation, not just green

captureHealth arrival receipts > a start or skip in the same millisecond withholds the loss verdict builds seen(ts, "none") tied with each of start(ts) and skip(ts) and asserts arrivedWithoutStart === false while lastArrived still records the arrival. Reproduced the body's mutation claim directly: flipping the parser's strict comparison at src/status/metrics.ts:342 (lastArrived > lastOutcome → >=) fails only this test — 57 pass, 1 fail. The pin bites exactly the predicate #526 named, and nothing else was already covering it.

The doc clause (ticket bullet 2) — verified against the implementation

The new sentences — "The warning compares the newest proceeding arrival in the window with the newest start or skip in that window. A tie withholds the warning, and earlier arrivals are not diagnosed individually." — match the code as read: the comparison is against lastOutcome, the window-max over starts and skips, on strict >, with lastArrived tracking only discard=none arrivals. The softening from "reports as its own verdict" to "can report" is the accurate direction for the same reason the pin exists: the verdict is conditional, not unconditional.

Claims audit

  • "Windows status suite: 58 passed" — status suite at head here: 58 pass / 0 fail on macOS; Windows CI green. Count matches.
  • "> to >= made the new test fail. Restored the production code before committing." — confirmed: the committed diff contains no production change; the mutation is not smuggled in.

Cross-PR note (not a defect in this PR)

This PR edits the paragraph whose first sentence says "Every turn-end event that reaches the idle subscription writes auto_capture_seen synchronously at the dispatch head." PR #530 makes a yield that arrives after abort exit the loop before the receipt — true by design, but then that first sentence overstates once both merge. Whichever PR lands second should fold in one qualifier ("a live subscription", or "unless the subscription has already been aborted"). Raised on #530 as well so it can't fall between them.

Full suites

1844 pass / 22 skip / 0 fail at this head.

Verdict

APPROVE. Pin, scope clause, mutation-proof, exact ticket scope, green everywhere. The only requested change is a one-clause doc qualifier owned jointly with #530 and does not hold this merge.

@abogartz
abogartz merged commit 6c743ff into abogartz:main Nov 25, 2026
4 checks passed
@abogartz-opencode-self-improvement

Copy link
Copy Markdown

🎉 This PR is included in version 0.36.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The same-millisecond withhold policy on arrival accounting is unpinned; window-max scope reads as per-arrival

2 participants