Interval change keeps unreported samples for the reporter (closes #124)
check / check (push) Waiting to run
check / check (push) Waiting to run
The interval menu cleared every host's history, and the reporter builds each report from that history, so the samples recorded since the last delivered report were never sent. The menu now resets each host with HostState.reset, which moves the history's entries to clearedHistory, keeping the last 100 it has cleared, and buildReport reads both. A host still pending after the reset is sent with the status of its last check. The per-host marks are unchanged, so a sample a delivered report had is not sent again, and the page's history still starts over. Reporter is exported for the new unit tests. Model: opus-5-5
This commit is contained in:
@@ -149,9 +149,11 @@ same-origin path `/api/v1/reports`: a random per-browser `clientId` kept in
|
||||
`localStorage`, `geo` sent as null, and each host's unreported, non-paused
|
||||
samples (timestamp, latency, error). A per-host high-water mark makes every
|
||||
report a delta, so only new samples are sent; the mark advances only on a
|
||||
delivered report, and while paused nothing is sent. Delivery failure is quiet —
|
||||
one debug-log line per outage, retried at the next interval, never blocking
|
||||
probing. The report-building step is a pure function of host state.
|
||||
delivered report, and while paused nothing is sent. Changing the interval clears
|
||||
each host's history on the page; the samples in it not yet reported still go in
|
||||
the next report. Delivery failure is quiet — one debug-log line per outage,
|
||||
retried at the next interval, never blocking probing. The report-building step
|
||||
is a pure function of host state.
|
||||
|
||||
### Backend
|
||||
|
||||
|
||||
Reference in New Issue
Block a user