8ee893e added `up < lastUp` beside the started_at comparison, to catch a restart landing in the same whole second as the one the page last read. It cannot catch that. uptime_s is derived, not independent: unix_now() - started_at_, both whole seconds, so started_at + uptime_s is exactly the wall clock at every poll. Two processes sharing a started_at are therefore read at increasing wall times and report INCREASING uptimes, so the comparison never fires in the case it was written for. It fires on genuine restarts, which started_at already catches, and on a backward NTP step, which is not a restart at all. Net effect: dead where it was needed, redundant elsewhere, and a false clear of the session extremes on every clock correction. The test that "proved" it worked was fed an impossible fixture: started_at 100 with uptime 40 implies the clock read 140, then started_at 100 with uptime 2 implies 102. Time running backwards is the only way to reach that pair, which is the same mistake the finding it answered was about -- reasoning from a state the instrument cannot produce. It now asserts the reachable behaviour instead: a backward uptime with an unchanged started_at is a clock step and must NOT clear the extremes, since they still belong to the running process. The collision the comparison tried to close needs a replacement process stamped in the same second as the one the page last read. The page can only learn started_at once /stats answers, startup_s after the old process began -- 69 s on this engine -- so a replacement starting after its predecessor stopped answering is stamped a later second. The bound is startup_s >= 1 s; a model that came up inside a second could collide, and would cost one stale extreme carrying a true age. That is documented where the comparison used to be. The acceptance window's use of the same signal is NOT redundant and is untouched: it has no started_at comparison, so for a tab that stopped polling while a new process drafted past the old totals, a falling uptime is the only thing that catches the restart. Verified: dashboard_test 241 checks over 8 cases, extremes.test.js 27, poll_spark.test.js 35, sched_test 62646 over 184, no failures. Mutation re-run after the revert: deleting poll()'s detection line, stamping extAtS on every sample, and deadening acceptTriple's age clause each fail the suite. Behavior is unchanged from the deployed build, which never had the comparison, so no restart is needed for this. Authored at: Memoria Qwen 3.8 Flash-Next 125B MoE (level not visible) via Open WebUI
Dashboard page tests
The dashboard is one C++ string: core/server/dashboard.cpp embeds the whole page,
so its JavaScript has no file of its own to test. These harnesses extract the page
from the translation unit (page.js) and execute the shipped functions, sliced
by line range, against mocked DOM. A retyped copy would test the copy, not the bytes
that ship — and a sliced function that is defined but never called proves nothing,
which has already happened once here.
node tests/js/poll_spark.test.js
node tests/js/extremes.test.js
Why these are not in ctest
They need node, which is not a build dependency of this project and will not be
present on a contributor's box or in the ROCm build image. Wiring them into ctest
would turn a missing optional tool into a red build, so they stay opt-in and are run
by hand when the page changes. dashboard_test covers the C++ side only.
History
Both files came out of the 2026-11-01 dashboard review. Commit 9cc237f claimed
"18 checks execute the shipped noteSample, triple, acceptTriple, resetWindows and
newEngineRun" while the harness lived only in /tmp — true when written, not
reproducible by anyone else, which an independent review correctly rejected. They are
in the tree so that claim can be re-run.