Repository navigation
bench: drafting.serve says which of four states it is in, so a lost log cannot read as "did not draft" (#1237) - #1238
Conversation
… log cannot read as "did not draft" `drafting_observed()` returned `None` for three different things: a serve.log the server filled with drafting evidence, a log that carried nothing either way, and a log that could not be read at all. Two of those are opposite claims and one is the absence of a claim. Measured on this box 2026-11-05 22:53 (27B UD-Q4_K_XL, 20,480 ctx, HL_MTP_MAX=0, window-20261105/arm_74_longctx_mtp0_repeat.json, 7.7571 tok/s decode at 18,762 ctx): that arm's serve.log says `spec common_specu: no implementations specified for speculative decoding` -- the server stating drafting was off -- and the artifact recorded `drafting.serve: null`, identical to what an unreadable log produced. The box's own non-drafting long-context row was therefore indistinguishable, inside the artifact, from a row whose log was lost; the only way to tell them apart was to read serve.log by hand. Same class as #1062 (an unrecorded drafting default) one level down: the record cannot say what it measured. Reproducer, before the fix, against the real logs: drafting ON (baseline arm) -> {'spec_type': 'draft-mtp', …, 'accept_rate_last': 0.6746} HL_MTP_MAX=0 arm -> None serve.log missing -> None <- equal to the row above Fix: the return value always carries a `status` of `drafted` / `not-drafted` / `no-evidence` / `unreadable`. `not-drafted` is read from serve's own positive line rather than from an absence, `unreadable` replaces the silent `None` that "nobody knows" used to share with "measured as off", and the evidence keys are unchanged whenever drafting was observed. After the fix, on the same real logs: drafting ON -> status=drafted (+ spec_type/recipe/acceptance unchanged) HL_MTP_MAX=0 arm -> status=not-drafted serve.log missing-> status=unreadable silent log -> status=no-evidence The test asserts the four statuses are distinct and that `not-drafted` != `unreadable` specifically; it fails on the unfixed file (`KeyError: 'status'`, line 344) and passes here. Device-free: no GPU, no measurement, no lever touched. Closes #1237
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY at bdaccdab.
The four states are four states — driven with my own fixtures through drafting_observed() on this tree (not the
committed test's):
drafted (acceptance + spec line) -> {'status': 'drafted', 'spec_type': 'draft-mtp', 'recipe': 'x', 'recipe_args': 'y',
'tasks_reporting': 1, 'accept_rate_last': 0.67, 'accepted_last': 100, …}
not-drafted (the server says so) -> {'status': 'not-drafted'}
no-evidence (log read, carries nothing) -> {'status': 'no-evidence'}
unreadable (missing file) -> {'status': 'unreadable'}
That is the whole point of the PR: the row that reads "did not draft" and the row whose log was lost used to serialise as
the same null, and now the first is a claim the server makes and the second is explicitly "nobody knows". python3 tests/hyperloom_benchmark_test.py -> hyperloom_benchmark_test: OK, rc 0.
The mechanism is the right one to have picked: not-drafted is keyed on the server's own sentence
(no implementations specified for speculative decoding, matched case-insensitively) rather than on the absence of
evidence, so a quieter build degrades to no-evidence instead of claiming a non-drafting measurement. And the README's
lever table (custom/README.md:150) documents all four names, so the schema is written where the lever is described, not
only in the code.
One thing to know before the first cycle that mixes artifacts: this changes the field's shape, null -> an object with
a status key. Nothing in this tree tests drafting["serve"] is None (grepped tools/ and tests/), so nothing breaks
here, but every artifact from before this PR still carries null — a reader that consumes a mixed directory has two shapes
to handle, and the README sentence "its status says which of the four cases the row is in" is true only for rows written
from now on. One clause there ("rows written before c30 carry null") would close it.
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
Closes #1237.
Root cause
drafting_observed()(thedrafting.servehalf of #1063) returnedNonefor three different states: the server stated there was no spec implementation, the log carried nothing either way, and the log could not be read. The first is a measured claim ("this arm did not draft"), the third is the absence of one ("nobody knows"). Inside the artifact they were the same value.Measured before/after
Real arm, this box, 2026-11-05 22:53 —
~/hyperloom-ws/window-20261105/arm_74_longctx_mtp0_repeat.json: 27B UD-Q4_K_XL, 20,480 ctx,HL_MTP_MAX=0, 7.7571 tok/s decode at 18,762 ctx, gate PASS (KLD 0, texts identical). Its serve.log says, verbatim:and the artifact recorded
drafting: {"requested": {"HL_MTP_MAX": "0"}, "serve": null}— the samenullan unreadable log produces. That row is the non-drafting half of this lane's headline comparison (drafting-off mean 7.889 vs drafting-on mean 12.75 = +61 % at 18.8k), so the number a reader would quote for "the drafting head is worth +61 %" could not itself prove it had not drafted.Reproducer, against the real logs, before the fix:
After the fix, same real logs:
What changed
drafting.servealways carries astatus—drafted,not-drafted,no-evidence,unreadable— and the drafting evidence keys are unchanged wherever drafting was observed.not-draftedis read from serve's own positive line (no implementations specified for speculative decoding) instead of from an absence;unreadablereplaces the silentNonethat "nobody knows" used to share with "measured as off". README'sHL_MTP_MAXrow documents the four states.Verification
python3 tests/hyperloom_benchmark_test.py→hyperloom_benchmark_test: OKrc=0.KeyError: 'status', line 344) and passes here — checked by stashingbenchmark.pyand re-running.not-drafted != unreadablespecifically, which is the assertion that did not exist before.python3 tools/copyright.py --check→ rc=0.Not in scope
drafting.observedvsdrafting_identity()merging:drafting_identity()still returns{}when no drafter file was named, which is correct (the pin drafts with the model's own head, so "no file named" is not "no drafting") —serve.statusis now the field that answers the drafting question, andrequestedanswers the lever question.