test(ui): close the coverage gaps — and the deadline lie one of them was hiding#78
Merged
Conversation
…was hiding Measured instead of guessed: `vitest --coverage` over kit and console, then every uncovered branch read and judged. Most were real behaviour nobody had exercised. The bug: `deadlineVerdict` judged a LIVE run only on its prediction, so a run still going an hour past its deadline reported "on track" — the one thing that is certainly false. It now judges the clock first (and takes `now`, so the verdict is testable instead of reading the wall clock behind the caller's back). Newly covered, all of it behaviour an operator depends on: - the "did not reach the server" path in bulk, campaign and archival — a verb whose fate is UNKNOWN must never read as applied, - the kit's unexpected-status copy (`unexpected 503`), which says something different from "never left the browser", - KeysetTable's stale-load guard: a superseded page must not overwrite the newer one, - a decided bulk batch's evidence (who, when, why), an empty definition, a lifted hold, a campaign with no window, a notification's tenant and correlation id, - switching fleet closes the run that belonged to the other one; a paused job offers resume and posts the frozen route, - id encoding for keys with slashes and spaces, and `rerun`'s route + its throw on an unexpected status. The notification panel now RE-READS the open row by id (evidence moves: Requested → Sent/Failed), which also gave the contract's by-id route its first exercise. A coverage floor now runs in CI on every PR (kit 95/90, console 97/85), because these gaps were branches nobody thought to exercise — a number is the only thing that notices that happening again. kit 63 tests, console 101. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Owner
Author
|
Review agent v1 — 1 finding(s). The human decides; hard-stop labels need explicit resolution.
Calibration: mark each finding accepted/dismissed in a reply — dismiss rate >40%/class revises that class (strategy §5). |
The generated HTML report went in with the coverage work — ~10k lines that re-diff on every run because each file embeds its timestamp. Removed and ignored. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Owner
Author
|
R6 accepted — the generated report went in with the work; ~10k lines that re-diff on every run because each file embeds its timestamp. Removed from the tree and |
I ran `pnpm test` and skipped `pnpm typecheck` — CI caught what I had not: the AppShell case omitted a required prop and the RunProgress fixtures invented fields the type does not have. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Measured instead of guessed:
vitest --coverageover kit and console, then every uncovered branch read and judged. Most were real behaviour nobody had exercised.The bug a gap was hiding
deadlineVerdictjudged a live run only on its prediction. A run still going an hour past its deadline reported "on track" — the one thing that is certainly false. It now judges the clock first, and takesnowso the verdict is testable instead of reading the wall clock behind the caller's back.Newly covered — all of it behaviour an operator depends on
unexpected 503 — check the service logs), which tells a different story from "never left the browser".rerun's route and its throw on an unexpected status.One behaviour change
The notification panel now re-reads the open row by id — evidence moves (Requested → Sent/Failed), so a row captured minutes ago is not what an operator should judge. It also gives the contract's by-id route its first exercise.
The floor
pnpm testin both packages now runs under coverage thresholds (kit 95/90, console 97/85 statements/branches), so CI enforces them on every PR. These gaps were branches nobody thought to exercise — a number is the only thing that notices that happening again.kit 63 tests, console 101. Coverage on source: kit 100% statements / 97% branches, console 99.9% / 88%.
🤖 Generated with Claude Code