You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Give every capture pass a terminal receipt, including forfeited ones #583
On the real Pi CLI, a capture forfeited at the 500 ms shutdown drain left an auto_capture_start line but no completion and no dispose line: exit 0, no row, nothing to attribute the loss to. The shutdown runners assert the absence of a row for the unanswered scenario (scenario === "unanswered" ? [] : [fact]) but never assert that an explanatory terminal line exists.
Every started pass should emit exactly one terminal evidence line — completed, aborted-with-reason, or dropped-with-reason — and a test should assert the receipt exists whenever a pass started. A mutation making publish() resolve the item's done promise without running the pass is now caught (two unit tests plus integration hangs), but no test covers the forfeit-path receipt.
Fixed at the current heads, with one reporting caveat worth naming here rather than opening a new ticket. Each pass now ends in a terminal receipt including the forfeited paths — timeout, host cancellation, host shutdown, capture failure, grant too small — and the integration runners assert the reason tag, so a silent zero-row exit is no longer the expected outcome. The caveat: a request-timeout pass writes two terminal lines, so a consumer that assumes exactly one terminal record per pass double-counts. Also, the queue-overflow drop still has no report rendering, tracked under #603 (capture stop reasons that never reach the human report). Whether the double line matters depends on whether anything downstream counts terminal receipts; nothing in this repository does today.
Closed — shipped in 0.40.0. test/capture/request-lifecycle.test.ts asserts what this asked for, and the forfeit path is not left uncovered:
for each of request_timeout and host_cancelled: the abort reaches the actual provider signal and a terminal receipt is written before disposal;
"capture reports use explicit terminal reasons instead of inferring missing completion" pins the vocabulary, so an absent row can no longer be read as an unexplained success.
Ran on main at db2c6f3: 5 pass, 0 fail. The reason whitelist in src/status/metrics.ts carries host_shutdown, capture_threw and insufficient_host_grant.
Separate, still open, and deliberately left in #584: queue_full is absent from that whitelist, so an item dropped at queue pressure has no terminal reason to report. Different failure, different fix.
Activity
ocsi-architect commentedon Nov 29, 2026
Fixed at the current heads, with one reporting caveat worth naming here rather than opening a new ticket. Each pass now ends in a terminal receipt including the forfeited paths — timeout, host cancellation, host shutdown, capture failure, grant too small — and the integration runners assert the reason tag, so a silent zero-row exit is no longer the expected outcome. The caveat: a request-timeout pass writes two terminal lines, so a consumer that assumes exactly one terminal record per pass double-counts. Also, the queue-overflow drop still has no report rendering, tracked under #603 (capture stop reasons that never reach the human report). Whether the double line matters depends on whether anything downstream counts terminal receipts; nothing in this repository does today.
ocsi-architect commentedon Nov 29, 2026
Closed — shipped in 0.40.0.
test/capture/request-lifecycle.test.tsasserts what this asked for, and the forfeit path is not left uncovered:request_timeoutandhost_cancelled: the abort reaches the actual provider signal and a terminal receipt is written before disposal;Ran on
mainatdb2c6f3: 5 pass, 0 fail. The reason whitelist insrc/status/metrics.tscarrieshost_shutdown,capture_threwandinsufficient_host_grant.Separate, still open, and deliberately left in #584:
queue_fullis absent from that whitelist, so an item dropped at queue pressure has no terminal reason to report. Different failure, different fix.