Repository navigation
Report the import outcome to the first-run flow - #685
Conversation
The outcome is also how the screen learns the run is over, so a refusal and an empty choice are reported rather than left silent. A run that lost a pass reports nothing at all: its sessions are unaccounted, and three counts cannot say so without claiming a clean import. Retryable statuses now retry where a lost call is counted, opt-in per call site because every hook, watch and daemon path shares that helper.
PR Summary by QodoReport first-run import outcomes and retry transient upload failures
AI Description
Diagram
High-Level Assessment
Files changed (16)
|
Code Review by Qodo
1.
|
…eport-import-outcome # Conflicts: # docs/CHANGES.md
Also drops a plan coordinate from the JSON registration block this change adds to.
|
NO FINDINGS |
AI-2307
What & why
The flow's
import-outcomeroute folded a report intoFirstRunFlowState.ImportOutcomeand had nocaller, so the Done screen's counts caption was unreachable — and since the outcome is also the signal
that the run finished, the screen cannot tell a working import from a stalled one. This is the caller.
The route itself is still open as kcap-server#1671, so this is written against the contract on that
branch and degrades on a 404 like any other newer-server route.
Where to look
(0,0,0). A run that lost a pass reports nothing — its sessions are unaccounted andthree counts cannot say so, while the surviving pass's figures alone would state a clean import. An
empty
Choiceslikewise has two causes, andIsDeclineseparates a real decline from a decisionwhose every level was unreadable here.
the import: it runs every tick for as long as the report is refused, so crediting it would let a
server that never accepts it stretch the 30-minute backstop into hours.
SendWithRetryAsyncand their budgets assume one attempt. An exhausted budget returns the statusrather than throwing, because those call sites catch
HttpRequestExceptiononly.Verification
Core 2459, Cli 3727, App 1161 — all pass.
dotnet publish -c Releaseclean, no IL2026/IL3050. Thedaemon suite fails 12–29 in this container on both this branch and an untouched
origin/mainworktree(three runs each, overlapping ranges): contention between subprocess-heavy classes, left to CI.
Sixteen mutations, fifteen killed and one shown equivalent — swapping
answer.DecidedAtforview.ImportDecidedAt, which are the same value by construction. The retry predicate is pinned fromboth sides: retrying a 4xx kills six tests, not retrying a 429 kills two, defaulting the flag on kills
the opt-in test.
The wire shape is round-tripped through the source-generated context against WireMock, present and
absent. Nothing else covered it — every other test in that file builds the request object directly, so
a naming or AOT-binding slip would leave the screen waiting for ever with the suite green.