dashboard: fix the pooled ring's property names -- recent/now were NaN, never rendered

Two judge slices (Tasmania 27B, :8101) independently found what the auditor's
pass at 1505ef2 missed: accWindow pushes {ratio, dr, da} but acceptTriple read
d.r/d.a/last.r/last.a -- accPrev's names, a different object. Every pooled sum
was undefined, so the acceptance detail line was frozen at 'highest X% - recent
-' in the PRODUCTION page since 1505ef2. The headline was unaffected, which is
why it looked alive. Fixed to d.dr/d.da/last.dr/last.da.

Also from the judges: the Speculation 'Average' bullet printed 0% for an
undefined lifetime marginal (no drafts yet), breaking the panel's own rule that
0 reads as failure -- now a dash. The comment above it cited a 'GUIDE' that does
not exist; it now cites the README section, which is re-landed here (dropped in
the rebase onto v1.9.0) with the worked example corrected: 56/75/77 implies
43.4% marginal, not the 44% previously claimed.

New test the_pooled_acceptance_ring_reads_the_names_accWindow_writes holds both
sides of the ring contract to the same names -- it fails on the exact bug above,
which no C++ test could see because the page JS is never executed here.

Authored at: Memoria Qwen 3.8 Flash-Next 125B MoE (level not visible) via Open WebUI
This commit is contained in:
Memoria (Noblistic) authored and StillDeadcode committed 2026-10-21 09:27:48 +02:00
1 parent 7c18d8d1bb
commit 77f91a0240
3 files changed
+59 -5

No files matched your search

+7 -5
View File
@@ -1562,13 +1562,13 @@ function acceptTriple(c, showNow) {
const ring = accPool[c];
if (!e || !(c in e) || !ring || !ring.length) return "";
let R = 0, A = 0;
for (const d of ring) { R += d.r; A += d.a; }
for (const d of ring) { R += d.dr; A += d.da; }
if (R <= 0) return "";
const last = ring[ring.length - 1];
const tag = typeof c === "number" && c > 1 ? "@c" + c : "";
let out = "highest " + pct(e[c], 0) + " \u00b7 recent " + pct(A / R, 0);
if (showNow !== false && e[c] > 0 && last.r > 0)
out += " \u00b7 now " + Math.round(100 * (last.a / last.r) / e[c]) + "% of highest" + tag;
if (showNow !== false && e[c] > 0 && last.dr > 0)
out += " \u00b7 now " + Math.round(100 * (last.da / last.dr) / e[c]) + "% of highest" + tag;
return out;
}
@@ -1656,7 +1656,7 @@ const totals = kvPanel($("totals"), ["Requests", "Steps"]);
* panel used to carry as its headline. A bullet now rather than the big number: see the note at
* the accept tile. It divides by every token DRAFTED, so it is not comparable with the live
* figure above it, which divides by the positions actually REACHED -- the two bases are worked
* through in the GUIDE, and both are derivable from the log. Deliberately not spelled out on the
* through in README.md, section "Draft acceptance", and both are derivable from the log. Deliberately not spelled out on the
* face of the panel: the distinction is an analysis-time concern, and a tooltip is invisible on
* the phone anyway. */
const spec = kvPanel($("spec"), ["Drafter", "Depth", "Average"]);
@@ -2119,7 +2119,9 @@ function update(s, dt) {
$("specaside").textContent = "depth " + dp.length;
spec["Drafter"].textContent = drafterName;
spec["Depth"].textContent = dp.length;
spec["Average"].textContent = pctn(s.draft_accept, 0) + "%";
/* Undefined when nothing has been drafted yet -- dash, not 0%. The panel's own rule is
* that 0 reads as failure, and this bullet was the one writer breaking it. */
spec["Average"].textContent = s.draft_accept > 0 ? pct(s.draft_accept, 0) : DASH;
}
/* ---- devices, in the same panel as the cache meter: they are one question. */