Health box and summary update as each WAN check ends (closes #206) #217

Merged
clawbot merged 1 commits from issue-206-health-box-per-check into next 2026-11-11 22:40:55 +01:00
Collaborator

Closes #206

The health box and the summary now redraw each time a WAN host's check ends, in the same step that draws its row. Before, they waited for the round's slowest check, so a target that never answers (Local CPE off a cable modem, the Bahrain S3 region) kept them stale until the timeout: after the network came back the rows were green while the box still said OFFLINE.

  • Checks still counts finished rounds: it changes only at the end of a round.
  • The end of the round still redraws both, which undoes a pause's grey-out, as for the rows.
  • The Health: debug log line moved from updateHealthBox to the end of the round. Left in place, it would be written up to 26 times a round. As before, it is not written while every WAN host is still pending.
  • New unit tests:
    • Every WAN host failed last round; in this round all but one answer at 10 ms and one never does. Before that check times out, the box reads HEALTHY and Reachable reads 25/26.
    • The user pauses during the first recorded round while every WAN check ends, and resumes before the last check times out. The round writes no Health: line.
  • README.md: one sentence under Health and summary, and the code-map entry for tick.

Model: opus-5-5

Closes https://git.eeqj.de/sneak/netwatch/issues/206 The health box and the summary now redraw each time a WAN host's check ends, in the same step that draws its row. Before, they waited for the round's slowest check, so a target that never answers (`Local CPE` off a cable modem, the Bahrain S3 region) kept them stale until the timeout: after the network came back the rows were green while the box still said `OFFLINE`. - `Checks` still counts finished rounds: it changes only at the end of a round. - The end of the round still redraws both, which undoes a pause's grey-out, as for the rows. - The `Health:` debug log line moved from `updateHealthBox` to the end of the round. Left in place, it would be written up to 26 times a round. As before, it is not written while every WAN host is still `pending`. - New unit tests: - Every WAN host failed last round; in this round all but one answer at 10 ms and one never does. Before that check times out, the box reads `HEALTHY` and `Reachable` reads `25/26`. - The user pauses during the first recorded round while every WAN check ends, and resumes before the last check times out. The round writes no `Health:` line. - `README.md`: one sentence under Health and summary, and the code-map entry for `tick`. Model: opus-5-5
clawbot added the needs-review label 2026-11-11 21:29:33 +01:00
clawbot self-assigned this 2026-11-11 21:29:33 +01:00
Author
Collaborator

Verdict: FAIL
Head: c30e15c98f

needs-rework

  1. web/src/main.js, end of tick, the new Health: log lines after updateHealthBox(state): moving the line out of updateHealthBox dropped that function's early return for when no WAN host has a result yet. The user pauses during the first recorded round after the page loads or the interval changes. Every WAN check ends during the pause and is discarded. The user resumes before the last check (usually Local CPE) times out. The round then ends with every WAN host still pending, and the debug log writes Health: HEALTHY while the health box reads --- and Reachable reads --/--. Before this PR nothing was logged in that case. Acceptable: the end-of-round Health: line is written only when some WAN host's status is not pending, the check updateHealthBox makes, and a unit test covers this pause-and-resume round.

Model: opus-5-5

Verdict: FAIL Head: c30e15c98f68689c265a5477bbc6ab0282fd3226 `needs-rework` 1. `web/src/main.js`, end of `tick`, the new `Health:` log lines after `updateHealthBox(state)`: moving the line out of `updateHealthBox` dropped that function's early return for when no WAN host has a result yet. The user pauses during the first recorded round after the page loads or the interval changes. Every WAN check ends during the pause and is discarded. The user resumes before the last check (usually `Local CPE`) times out. The round then ends with every WAN host still `pending`, and the debug log writes `Health: HEALTHY` while the health box reads `---` and `Reachable` reads `--/--`. Before this PR nothing was logged in that case. Acceptable: the end-of-round `Health:` line is written only when some WAN host's status is not `pending`, the check `updateHealthBox` makes, and a unit test covers this pause-and-resume round. Model: opus-5-5
clawbot added 1 commit 2026-11-11 22:02:02 +01:00
The health box and the summary were drawn only once every check in a
round had ended, so a target that never answers held them back until
its timeout, after the rows already showed the network was back. tick
now redraws both with each WAN host's row. The "Health:" debug log line
moved from updateHealthBox to the end of the round, so it is still
written once per round, and still only once a WAN host's check is
recorded.

Model: opus-5-5
clawbot force-pushed issue-206-health-box-per-check from c30e15c98f to 2b2f035410 2026-11-11 22:02:02 +01:00 Compare
Author
Collaborator

Head: 2b2f035410, rebased onto next.

  1. Fixed: the end-of-round Health: line is skipped while every WAN host is pending; a new unit test pauses and resumes during the first recorded round and finds no Health: line.

Model: opus-5-5

Head: 2b2f03541023aaa2cbea563cb8f413ff02f44fb0, rebased onto `next`. 1. Fixed: the end-of-round `Health:` line is skipped while every WAN host is `pending`; a new unit test pauses and resumes during the first recorded round and finds no `Health:` line. Model: opus-5-5
Author
Collaborator

Verdict: PASS
Head: 2b2f035410

The health box and summary now redraw as each WAN host's check ends, Checks still counts finished rounds, the Health: log line keeps its once-per-round, not-while-pending behaviour, and the tests and README.md meet the definition of done in #206.

Model: opus-5-5

Verdict: PASS Head: 2b2f03541023aaa2cbea563cb8f413ff02f44fb0 The health box and summary now redraw as each WAN host's check ends, `Checks` still counts finished rounds, the `Health:` log line keeps its once-per-round, not-while-pending behaviour, and the tests and `README.md` meet the definition of done in https://git.eeqj.de/sneak/netwatch/issues/206. Model: opus-5-5
clawbot merged commit 7d1f4c6b13 into next 2026-11-11 22:40:55 +01:00
clawbot deleted branch issue-206-health-box-per-check 2026-11-11 22:40:56 +01:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/netwatch#217