This repository has been archived on 2026-11-24. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
radiance-sycl/tests/js
Memoria (Noblistic) 638aa3a683 tests/js: drive poll()'s restart decision, and the two clauses nothing reached
An adversarial pass mutated this leg of the dashboard and found three mutants that survived
every committed check. All three were real gaps in my verification, and the reason was the
same each time: the tests called the helper directly, so the code that DECIDES whether to call
it was never exercised, and two clauses sat behind a guard that no test ever opened.

Drive poll() itself. A scripted /stats sequence and a fixed clock, with resetWindows,
newEngineRun and update replaced by counters, so the assertions are about what poll() decided
rather than what the helper does once called. Three cases: the first poll is a baseline and
clears nothing, a changed started_at clears, and a long quiet span takes the gap path without
being read as a restart -- the distinction the previous commit exists to make.

Re-sample a key after its extreme is set. The stamp records when the extreme was set, so a
worse sample must not refresh it; nothing used to sample the same key twice, so moving the
stamp to every sample -- which makes every age read about zero, wrong output rather than
missing output -- passed unnoticed.

Exercise acceptTriple with a live extreme. Its only previous call came from the restart case,
which clears extAt first, so it returned at its guard before reaching the age clause: the
clause was asserted zero times while triple's was asserted seven.

Use the shipped pctn rather than a re-typed one. The copy diverged from the real formatter for
small and non-finite values; nothing asserted on that output today, so it was a latent trap
rather than a live error. Pass the sampled value as a parameter instead of interpolating it
into the function source, so the null case is a real null and not the string "null".

Verified by mutation, which is the only thing that makes a green suite mean anything here:
disabling poll()'s detection line fails the suite, as does moving the stamp to every sample,
as does deadening acceptTriple's clause, as does removing the uptime comparison added in the
previous commit. extremes.test.js 27 checks, poll_spark.test.js 35, dashboard_test 241 over 8
cases, sched_test 62646 over 184, no failures.

Found by an adversarial review pass on the author's own commits.

Authored at: Memoria Qwen 3.8 Flash-Next 125B MoE (level not visible) via Open WebUI
2026-11-03 18:09:49 +01:00
..

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.