Skip to content

docs(motoko): iteration 8 — the fmt −74% is one benchmark and one void pair - #742

Merged
sunholo-voight-kampff merged 2 commits into
devfrom
docs/motoko-iter8-fmt-instrument
Aug 17, 2026
Merged

docs(motoko): iteration 8 — the fmt −74% is one benchmark and one void pair#742
sunholo-voight-kampff merged 2 commits into
devfrom
docs/motoko-iter8-fmt-instrument

Conversation

@sunholo-voight-kampff

Copy link
Copy Markdown
Collaborator

Motoko mission iteration 8 — queue head item 6 (fmt re-measurement instrument)

The pick's own premise did not survive Gate 2, and that is the finding.

The −74% is one benchmark and one void pair

The −74% tokens-to-pass headline (AC5, m-fmt-dialect-alignment.md, 2026-07-31) is real, correctly
banked, and correctly attributed to the fmt extension. It is also not a target an instrument can be
built to reproduce. Five things, all re-derived first-party this session:

finding
a its own author rates it "direction, not proof" — n=1/pair, sign test p≈0.11
b 74.7% of the saving is ONE benchmark: six pairs → −74.2%; drop log_file_analyzer−47.1%; that pair alone is 3,125,933 of 4,182,882 saved tokens
c that benchmark is 3/30 lifetime, 0/10 over the last five nights in the rag_on opencode rotation lane (open #649) — tokens-to-pass is undefined when nothing passes
d ab2_fmt_on/emit_exact_bytes_varied banked zero fmt-hook events with validity={valid:False, reason:treatment_unproven} and was summed into the headline anyway; the other 5 ON rows carry exactly one status=formatted event, all 6 OFF rows clean
e the run was order-confounded: all six ON rows completed before the first OFF row started (16:42:37→17:00:10, then 17:01:28→17:36:49), and the within-arm benchmark order differs between arms

On the four pairs with both proven treatment and a currently-passable benchmark: −5.7% (ON
cheaper 3/4), not −74.2%.

What ships

design_docs/planned/m-motoko-fmt-remeasurement-instrument.md — replaces "re-prove −74%" with a
paired censored win-rate (a non-pass is right-censored at the 4M cap; null
P(ON wins | non-tied) = 0.5, defined even when nothing passes), a counterbalanced per-benchmark
schedule with an order-integrity gate that VOIDs a slot banked otherwise, ELO-banded selection,
~9.8 rig-hours priced off a measured 4.91 min/row anchor, and a pre-registered KEEP/RETIRE rule.

Confirmed live defect, found on the way

The Wednesday fmt A/B lane has banked nothing since AC5. Both the 2026-08-05 and 08-12 fires
died at internal/executor/motoko/healthcheck.go:64 — an unconditional OPENROUTER_API_KEY
refusal with no lane/model condition — whose own error text "motoko routes ALL models via
OpenRouter"
is false for both fmt arms, which declare provider: "ollama", env_var: ""
("No API key — local inference") and agent_model_name: "ollama/qwen3.6:35b-a3b-mxfp8"
(models.yml:1854, :1880).

Quorum

Two rounds, both external reviewers present both times, absent_reviewers empty in both
artifacts (neither verdict is an N−1 degrade). R1 BLOCKED → one revision → R2 BLOCKED. Metered
$0.1424. Every objection was classified premise-vs-design and every premise was measured
rather than forwarded
; three are answered and carried into the text:

PARKED needs-human-review on D-MOTOKO-FMT-1 alone. The narrow-refinement carve-out was
deliberately not taken: it requires every remaining objection to need no controller judgment, and
O4's remedy is an investigation (the mk-ast resolution path and/or a live motoko run under
rig.lock). No reviewer disputed the instrument's direction in either round.

D-MOTOKO-FMT-1 — is tracing motoko's resolved runtime provider a precondition of D1, or
does D1 need a redesign that leaves the preflight alone? (precondition / redesign)

Also in this PR

  • Weekly external-issue sweep (due — first fire past the 2026-08-17 07:00 local Monday
    boundary): 15 orphans of 75 enumerated open issues, per-issue table, controls firing, list
    length asserted. Batched into new queue row 6b; a sweep never outranks a pick.
  • Gate-5 skill fix (one edit, two frictions, same zsh-array class): rule 3a(i-c)'s own remedy
    prescribes an array, and zsh arrays are 1-indexed${counts[0]} is empty, so the sweep's
    first table shifted every column and dropped the 8th file while looking exactly like a correct
    table. Recorded at the remedy itself.
  • Gate 4 record: charter STATUS + rotation (arithmetic asserted; the moved stamp confirmed present
    in the archive with a firing control), log entry 8, dashboard overwrite, decision ledger.

🤖 Generated with Claude Code

sunholo-voight-kampff and others added 2 commits August 17, 2026 07:42
…mark and one void pair

Queue item 6 (motoko mission iteration 8): design HOW we re-prove the -74% tokens-to-pass
result on the new tree, and decide whether `motoko_ext_fmt` survives.

The controller's Gate-2 measurements reframed the item before the designer ran. The -74%
(AC5, 2026-07-31) is real and correctly attributed, but it is not a target an instrument
can be built to reproduce:

  - its own author rates it "direction, not proof" (n=1/pair, sign test p~0.11);
  - 74.7% of the token saving is ONE benchmark (log_file_analyzer): all six pairs give
    -74.2%, dropping it gives -47.1%;
  - that benchmark is 3/30 lifetime and 0/10 over the last five nights in the rag_on
    opencode rotation lane, with open issue #649 — tokens-to-pass is undefined when
    nothing passes;
  - one of the six pairs was quarantined by the harness itself
    (`emit_exact_bytes_varied` ON: zero fmt-hook events, validity treatment_unproven)
    and summed into the published total anyway;
  - the run was order-confounded: all six ON rows completed before the first OFF row
    started, so temporal drift is fully aliased with the treatment.

On the four pairs with both proven treatment and a currently-passable benchmark the
headline is -5.7%, not -74.2% (ON cheaper 3/4).

The doc replaces "re-prove -74%" with a paired censored win-rate that is defined when
arms fail, a counterbalanced execution schedule with an order-integrity gate, honest
rig pricing, and a decision rule pre-registered before any data.

Also surfaced and confirmed first-party: the Wednesday fmt A/B lane has banked nothing
since AC5 because `internal/executor/motoko/healthcheck.go:64` refuses unconditionally
on OPENROUTER_API_KEY, with no lane condition, while both fmt arms declare
provider: ollama / env_var: "" — its own error text ("motoko routes ALL models via
OpenRouter") is false for these entries.

PARKED needs-human-review on ONE bounded question (D-MOTOKO-FMT-1): is tracing motoko's
runtime provider resolution a precondition of D1, or does D1 need a redesign? Two quorum
rounds, both reviewers present both times, absent_reviewers empty; 3 of 4 objections
answered by controller measurement and carried into the text. No reviewer disputed the
instrument's direction in either round. Metered $0.1424.

Co-Authored-By: Claude Fable 5 (designer)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…and one void pair

Gate 4 record for motoko iteration 8 (queue head item 6, fmt re-measurement instrument):
charter STATUS + rotation, log entry 8, dashboard overwrite, queue tags, decision ledger.

STATUS rotation asserted before writing: charter 549 -> 549 lines
(after == before + 2 - 2*moved), exactly 3 stamps remain, and the moved ITERATION 4 stamp
was confirmed PRESENT in the archive afterwards with ITERATION 2 as a firing control --
the charter-side arithmetic alone passes identically for a move and for a deletion.

Queue: item 6 -> DESIGNED + PARKED needs-human-review on D-MOTOKO-FMT-1 alone; new row 6b
carries the weekly external-issue sweep's 15 orphans of 75 enumerated open issues (per-issue
table, controls firing, list length asserted). Decision ledger gains D-MOTOKO-FMT-1 (OPEN);
scripts/mission_decisions.sh --check passes at 3 rows, --open generates exactly that one.

Gate-5 skill fix (one edit, two frictions, same zsh-array class):

  1. iteration 140 -- FILES=$(...) plus unquoted $FILES does not word-split in zsh, which
     produced a VACUOUS mutation test (already recorded in rule 3a(i-c));
  2. this iteration -- the array that rule prescribes as the remedy is 1-INDEXED in zsh, so
     ${counts[0]} is empty. Gate 0's weekly-sweep table rendered all 8 per-issue counts under
     the wrong file's header and dropped mission-dashboard.md from every row, while looking
     exactly like a correct table. The orphan total survived only because the accumulator
     summed the loop variable rather than the display array -- a broken table beside a correct
     total, where the total certifies the table.

The gap is that rule 3a(i-c)'s own remedy carries the next footgun one line away: iterating
"${arr[@]}" is safe, indexing is not. Recorded at the remedy itself, with the general form --
a remedy is an instrument too, so a construct this skill prescribes brings its footguns with it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@sunholo-voight-kampff
sunholo-voight-kampff merged commit 22c74d7 into dev Aug 17, 2026
21 checks passed
@sunholo-voight-kampff
sunholo-voight-kampff deleted the docs/motoko-iter8-fmt-instrument branch August 17, 2026 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant