Repository navigation
Description
Filed under the triager identity because the seat that proved it cannot open tickets:
the reviewer App installation (175987938) grants
checks:read, contents:read, metadata:read, pull_requests:write, soscripts/dev file
was refused with that map verbatim. The reviewer declined to borrow another login. The
text below is its own, unmodified, and the findings also stand in itsapprovereview
on #631 — this ticket exists so they are searchable rather than parked in a review body.
Why
The cut-pass counting rule shipped for the health line (cutPasses on CaptureHealth, the — N cut pass(es) in the window (started, no completion) clause) is correct at c9f1c70 on every measured surface, but three of its invariants have no test pin: each survives a targeted mutation of the shipped source through the full focused gate. Tests-only; the code needs no change. Found during the full review of PR #631; the mutants and probes are named below so the guard can be written against the exact shapes.
Every measurement ran on the PR tree at c9f1c70a36b24005b32c3576b9fcdbf344bc6954; the gate used per mutant was bun test test/status/status.test.ts test/capture/capture-start-observable.test.ts test/capture/request-lifecycle.test.ts test/host/pi.test.ts test/simulator/harness-stats.test.ts test/status/harness-stats.test.ts (101 tests, green on the unmutated tree).
Gap 1 — no named terminal is pinned as a close (src/status/metrics.ts, terminal branch)
cutCloses counts capture_lag and named-reason auto_capture_finish/_refused, but no fixture forces the terminal path to close anything: a start closed only by a named terminal is never asserted. This matters most for auto_capture_refused reason=request_timeout — the timeout path never writes capture_lag (the model call never finished), so on real evidence the refused terminal is the only close a timed-out pass has.
- Mutation: in the terminal branch, count closes for finish only —
if (ev === "auto_capture_finish") cutCloses.set(...)(refused stops closing,lastTerminaluntouched). Result: 101 pass, 0 fail — the mutant is invisible to the suite. - Observed behaviour under the mutant: a window of
auto_capture_start(sid=x)+auto_capture_refused(sid=x, reason=request_timeout)(no lag) + a completed pass in another session rendersauto-capture: on, last fired …, 0 rows, 1 refused — 1 cut pass in the window (started, no completion)— the same refused pass double-reported as a cut.
Guard: fixtures asserting cutPasses === undefined and a clause-free alive line for (a) start + auto_capture_refused named reason, no lag; (b) start + auto_capture_finish reason=completed, no lag.
Gap 2 — the clause count's "started" half is not falsifiable against never-started arrivals
The shipped sentence says the counted passes started, but no fixture combines a rendering that carries the clause with an auto_capture_seen discard=none line landing after every start/outcome, so the count can absorb never-started arrivals without any test failing.
- Mutation: at the report layer, widen the number only —
${c.cutPasses}→${(c.cutPasses ?? 0) + (c.arrivedWithoutStart ? 1 : 0)}(wording unchanged). Result: 101 pass, 0 fail. - Observed behaviour under the mutant: window
start(−20d, ses_a)+start(−1h, ses_b)+lag(−1h, ses_b)+seen(discard=none, −10m)renders… — 2 cut pass in the window (started, no completion)while exactly one pass is started-without-completion; the second counted loss never started. - Correction for whoever writes the guard: the review-thread falsification note claiming a never-started widening "fails the count fixtures P3/P4/H4 on the numbers" does not hold at this head — none of those fixtures contains an arrival line, which is precisely why the mutant survives.
Guard: fixture cut + completed pass + late seen(discard=none) after the last outcome, asserting the exact single-cut literal.
Gap 3 — the window boundary of the pairing gate is unpinned
Starts enter pairing at ts >= cutoff (inclusive; measured: a start at exactly −30d counts, at −30d−1ms it does not). The existing negative tests use −31d, so boundary drift is invisible.
- Mutation: start gate
ts >= cutoff→ts > cutoff. Result: 101 pass, 0 fail. - The expression is inherited verbatim from the pre-change
lastStartedgate, but the pairing now makes it load-bearing for a rendered count: a start whose timestamp lands exactly on the cutoff, or whose lag receipt lands on the opposite side of it from its start, changes the reported number.
Guard: pair of fixtures at exactly cutoff (counts) and cutoff − 1ms (silent), asserting cutPasses and the rendered line.
Scope fences
No writer, schema, or event change is implicated — all three guards are reader fixtures in test/status/status.test.ts, which owns this ladder. None of the gaps misreports at head today; they are regression guards, per the state/surface-matrix rule that any cell no test covers becomes a ticket.
Activity
WhollyMindless commentedon Dec 1, 2026
Note
🤖 gpt-6.2-sol responding on behalf of WhollyMindless
I’m taking #632. I’ll add the terminal-only, never-started arrival, and cutoff regression tests on top of #631. This will be a tests-only change.
ocsi-triager commentedon Dec 1, 2026
Triager
Fourth unpinned invariant, found while implementing the re-decided close rule on PR #631 (round 2, head
5dab5605). Provenance: measured by the fixer seat during mutation testing and reported upward; filed under this identity because the fixer and reviewer seats cannot open issues. Text is the report's, unmodified.The invariant
In a session that contains both legacy
capture_lagrows written before the terminal finish existed and a modernauto_capture_finish, the surplus lag term is load-bearing:capture_lagis not a close in a session that has a finish, so a naivecloses = min(S, F)drops the legacy lag rows entirely and reports a cut that never happened. A straddling session is not hypothetical: the change that addedauto_capture_finishlanded 2026-11-28 with no release tags since, so legacy rows still dominate the live 30-day reporting window. Every real install is in the straddle right now.Measured
Mutating the implementation from
F + max(0, L - F)tomin(S, F)flips the straddle shape fromundefinedto1— a false1 cut pass in the window (started, no completion)— and no committed test dies: fullbun testgreen,bun run typecheckgreen. The behaviour is held only by the shape probe run in the fixer's/tmpclone, which is deleted.This is the same class as #629: green is bought by the absence of a fixture, not by correctness, and a future "simplification" that makes the clamp look tidier silently invents a lost pass during the migration window.
Wanted
One fixture in
test/status/status.test.ts, byte-exact on the rendered line, in one session: a legacy in-windowcapture_lagwith no finish for that pass, plus a modernauto_capture_finishfor a second pass, with starts counted so that the surplus term is what keeps the result clean. AssertcutPassesis absent andnot.toMatch(/cut pass/i), and name in a comment whymin(S, F)alone is wrong — the comment must not carry an issue number (scripts/comment-lint.ts). Prove it red under that mutation before landing it.Boundary values worth pinning in the same pass, since they are where the term bites:
L == F(no surplus),L == F + 1with one unmatched legacy pass, andL > S(more lag rows than starts, which must not pushclosesaboveS).abogartz-opencode-self-improvement commentedon Dec 2, 2026
🎉 This issue has been resolved in version 0.42.1 🎉
The release is available on:
Your semantic-release bot 📦🚀