Skip to content

[AUTOMATED] campaign(decbench): round-2 outcomes, and the traps that cost this round - #256

Merged
mahaloz merged 1 commit into
mainfrom
campaign/decbench-round2-outcomes
Aug 3, 2026
Merged

mahaloz merged 1 commit into
mainfrom
campaign/decbench-round2-outcomes

Conversation

@mahaloz

@mahaloz mahaloz commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

Docs-only. No .rs, no phases.toml, no docs/baseline*.json, no tests/.
Rebased onto origin/main 4c2b59bb (after #254, #255 and #257).

Round 2 of the decbench campaign shipped, and the benchmark signal was refreshed on
2026-08-03 (all three optimisation levels re-decompiled from a pinned kuna 9623dc2 and
re-scored). Several documented claims were provably stale, and several hard-won operational
facts existed only in agent transcripts. Every number below was re-verified against the
live tree, not copied from a brief.

docs/decbench-loop.md — the stale claims

claim was is (verified)
standings ida 36.67 · kuna 35.41 · angr 33.93 · ghidra 25.57 · binja 20.76 (GED only) GED ida 36.06 · kuna 35.93 · angr 34.20 · ghidra 25.13 · binja 20.42; overall ida 38.01 · kuna 37.91 · angr 36.98 · ghidra 27.07 · binja 23.26; byte_match kuna 3.41 (1st) · ida 1.77 · angr 0.53
recall pool 6,540 functions (7.3%) 1,420 vs --base angr (966 base-perfect) / 1,552 vs --base ida, 0 whole-binary failures
--mode auto warns it degrades to fast at ≥ 2 MiB largest stripped binary is O0 bash at 1,513,904 B (1.44 MiB) → 768 aggressive / 35 reliable / 0 fast across all 803
aggressive preset "21 of the 24 default-off options" 20 of the 26, with the six exclusions named (recounted after #255 added ptrentry)

Source of truth: ~/github/decbench/results/full_run/scoreboard.toml (generated_at 2026-08-03T09:55:11), the regenerated docs/decbench/cases-missing*.json, and a direct
os.path.getsize sweep over the 803 evaluated/*.toml binaries against
modes.rs::AUTO_RELIABLE_MIN_BYTES / AUTO_FAST_MIN_BYTES.

The standings table now says in the file itself that kuna's column is current while every
rival's is from its own last run
, so the tree is a mining instrument, not a publishable
cross-tool leaderboard
.

The three named recall causes were all wrong or fixed

  • "u-boot 100%, freertos 100%" was never a kuna discovery failure. Neither project
    appears in either pool — because angr and ida score nothing at all there. decbench's
    raw backends keep only functions inside .text; u-boot's .text is 936 bytes and
    freertos is built -ffunction-sections. Past the filter kuna covers 261/265 freertos and
    1,833/2,968 u-boot (recall-measurement.md).
  • "betaflight 22%" → 575 rows, 6.0% of the 11,070 betaflight functions any non-LLM
    rival scored.
  • The coreutils main empty-body/panic is fixed. comm/join/timeout/uniq main
    produce full bodies (97 / 230 / 134 / 176 lines) at their DWARF addresses on today's
    build, decompile-all on comm exits 0, and zero coreutils rows remain in either pool.

Two operational traps that cost this round real time

(a) byte_match recompiles, and this box has no cross toolchains.
reeval_bytematch.py reuses any checkpoint that exists (never auto-invalidated), so
refreshing a decompiler's byte_match means deleting its checkpoints first. But byte_match
recompiles the decompiled C with an architecture-matched toolchain
(decbench/metrics/byte_match.py:267 — PE → MinGW, ARM → arm-none-eabi, x86 → gcc), and
this machine has only gcc. For ARM/PE the metric returns {"skipped": True}, the
re-scorer drops it, and an empty checkpoint is written — so deleting kuna's checkpoints
destroys kuna's ARM/PE byte_match while every rival keeps theirs. finalize_results.py's
coverage guard caught it (34 slices; betaflight 2,848 → 0, crazyflie 2,128 → 0) and it was
repaired from backup. kuna's ARM/PE byte_match at O2 and O2-noinline is still missing —
an earlier session hit the same trap and published with DECBENCH_ALLOW_DROPS=1, and no
local copy survives. The rule is now written down plainly: never pass
DECBENCH_ALLOW_DROPS=1 without reading every [guard] line.

(b) rescore cannot touch a PE case. The pools store a PE address as an RVA where
kuna uses the VA, and rescore.py passes case["address_hex"] straight to
--addr. Demonstrated:

$ kuna decompile .../mydoom.exe --addr 0x41e2      # the pool's address
error: no C output for "0x41e2"
$ kuna decompile .../mydoom.exe --addr 0x4041e2    # ImageBase + RVA
void sub_4041e2(int4 a0) { ...

Silently blocks 119 PE cases across the three pools. Recorded as a known limitation with
a fix direction.

Also documented: the durable refresh recipe now living at ~/decbench-campaign-state/, its
two pinning rules (decbench must not move off its pinned commit; the refresh must run a
snapshotted kuna binary + specs), and the non-obvious one — the GED baseline must drop
kuna's published scores for EVERY re-decompiled opt level, not just the one being
refreshed
, because the audit replays the published evaluator against the on-disk artifact
(an O0-only baseline died with cannot reproduce published fallback 58.0 on an O2 slice).

Two METHOD corrections (decbench-loop.md + improvement-pipeline.md)

The most valuable output of the round, stated where a future agent will hit them:

  • "Not a no-op" is not the same as "correct." On paramcopyhoist a refuter proved the
    proposed hook reached the printer — and it was still the wrong site: implementing it
    silently deleted an assignment (ext2fs_read_inode2 lost v10 = a3;, leaving an empty
    if body and a memcpy reading a never-assigned value), lost an early return, and made
    another function return the wrong parameter. The refute brief now carries an explicit
    "would this produce WRONG output?" axis.
  • Diff every changed function, not the witness. Those designs all passed on their
    witness. Round 2's PRs swept 3,031 / 12,241 / 14,720 / 15,386 functions; two caught
    real problems that way. Now a standing requirement for any pass that moves, deletes or
    re-anchors statements.

The tally is recorded honestly: round 1's filed mechanisms were 2-for-5; round 2's
refuters overturned the filed diagnosis on 3 of 8
— and the symptom stood in every case.
A symptom is evidence; a diagnosis is a hypothesis.

docs/decbench/features.md — round-2 outcomes

Same shape, same rank-by-correctness thesis, round-1 menu replaced by what shipped:

PR slug measured
#248 cortexmvectors +96 GT entries (81.4% precision, 0 lost); listing off +393 (94.7%, 0 lost); betaflight 1 → 57
#249 funcptralign crazyflie masks 264 → 15, (code *) 255 → 46, (code **) 0 → 205; x86-64/i386 byte-identical; −12.99% time
#250 paramcopyhoist GED 29 → 17 (measured GED-optimal); sunk copies 200 → 108; default-OFF
#251 subright raw SUBnn 1,912 → 95 (95% removed), functions 733 → 20; 0/675
#252 returncopysplit 112 phantom statements → 0; exactly 3 of 15,386 functions change
#253 itecondlist N-sweep ceil(N/2) → N; GED 46 → 24 on bash shell_initialize
#254 peimportcall (DIV-57, default-ON, tier = transform despite being P1) 927 unnamed Win32 call sites → 8; GED 37 → 0 and 39 → 0 (both perfect); dexter Uninstall 152 → 19 lines
#255 ptrentry (default-OFF) Cortex-M recall 38,238 (92.4%) → 39,851 (96.3%); +1,694 new, 1,613 GT (95.2%), 0 splits, 0 lost
#257 undefname (DIV-58) $$undef occurrences 2,142 → 0 over 116 binaries / 90,808 functions; blast radius 162 changed, 0 unexplained

Plus the structural finding that outlives them: three separate ported passes were dead —
RuleSubRight (stub body), RuleFuncPtrEncoding (live body, stubbed input) and
ActionDeindirect (live body, a gate bit set nowhere in the workspace). Each was invisible
to every existing test and each had large breadth, so "grep for registered-but-unreachable
passes"
is named as a mining route that needs no benchmark at all.

Carried forward as the one still-open candidate: catalog-upstream-options (38
upstream-inherited ArchOptions absent from kuna catalog — invisible to any agent sweeping
options by symptom, which matters because the LLM control surface is the product).

The dead-pass finding is now three distinct shapes to grep for, not one anecdote —
stub body (RuleSubRight), live body with a permanently-zero input
(RuleFuncPtrEncoding's hard-coded funcptr_align() = 0), and live body with a gate bit
that has no writer anywhere (ActionDeindirect / varnode_flags::externref). The third
had a second gap in the same chain: GlobalEntry::func_no_return never copied the
callee's no-return flag into the snapshot, so even a named import would have kept no flow
effect. One dead gate can hide another.

New: shared counters in a busy queue

Round 2 ran up to four output-changing PRs concurrently over the same hard-coded counters,
and produced three failure shapes, only one of which announced itself:

shape what happened
a conflict #257's DIV number raced 55 → 56 → 57 → 58 as #252/#253/#254 claimed each in turn
silent identical-edit auto-merge catalog_bytecompat.rs kept 86 because both sides made the identical 85 → 86 edit — clean merge, wrong number, caught only by running the suite
silent keep-both auto-merge a docs/baseline-stages.json merge left a stale data_footer (375 vs a real 381); and five rounds of keep-both duplicated a row in tests/stages/README.md

Rules written down: derive every shared counter from a fresh capture and a green run on
the rebased tree, never by arithmetic
; diff every keep-both resolution against main
asserting you removed nothing and added nothing twice
; DIV numbers are claimed on merge;
and re-run the gates after the rebase, because none of this is visible in the conflict.
Mirrored into docs/improvement-pipeline.md §3.4 and as standing requirement 9
(re-measure after every rebase, never carry a number forward).

Re-mined pool tables

Regenerated in this branch so the committed tables match the tree exactly:

python3 -m scripts.decbench.mine --select 30              # 3,596 cases / 1,813 groups; 1,420 missing, 0 whole-binary failures
python3 -m scripts.decbench.mine --base ida --select 20   # 6,057 cases / 2,687 groups; 1,552 missing, 0 whole-binary failures
python3 -m scripts.decbench.novel --select 16             # 4,842 cases / 2,301 groups

backlog.md, backlog-ida.md, novel.md and triage-queue*.json are included (snapshot
2026-08-03); the cases*.json / novel.json pools stay gitignored.

Gates

make check-spec   check-spec OK (lenient mode)  /  check-spec OK (strict mode)
make test         datatests: 675/675 assertions passed  ->  PARITY OK
make test-stages  datatests: 394/394 assertions passed  ->  PARITY OK

Run on the rebased base 4c2b59bb. make rust-test is unaffected — no Rust file,
phases.toml row, catalog count, baseline or test is touched by this branch
(git diff --name-only origin/main is nine files, all under docs/).

Note on the round's own moving target

#257 merged while this rebase was in progress, so its entry went from "open, awaiting
merge" to a merged row and the item counts moved (eight → nine merged PRs) inside a
single editing session. That is the same hazard this PR documents, applied to the PR that
documents it: re-verify at the moment of writing, not at the moment of briefing.

🤖 Generated with Claude Code

https://claude.ai/code/session_017dPFaKJanfLSf7mWGhkzkL

@mahaloz
mahaloz force-pushed the campaign/decbench-round2-outcomes branch from 67ada12 to 84c3368 Compare August 3, 2026 14:30
…cost this round

Docs-only. No .rs, no phases.toml, no baselines, no tests.
Rebased onto origin/main 4c2b59b (after #254, #255 and #257).

Round 2 shipped, and the benchmark signal was refreshed on 2026-08-03 (all three
opt levels re-decompiled from pinned kuna 9623dc2). Several documented claims
were provably stale and several hard-won operational facts existed only in agent
transcripts. Both fixed, every number re-verified against the live tree.

docs/decbench-loop.md
- Standings replaced and widened: GED ida 36.06 / kuna 35.93 / angr 34.20,
  overall ida 38.01 / kuna 37.91 / angr 36.98, byte_match kuna 3.41 (first).
  Stated plainly that kuna's column is current while the rivals' are from their
  own last runs, so the tree is a MINING INSTRUMENT, not a leaderboard.
- Recall pool: 6,540 (7.3%) -> 1,420 vs angr / 1,552 vs ida, 0 whole-binary
  failures, now almost entirely embedded ARM Cortex-M. All three named causes
  corrected: "u-boot 100% / freertos 100%" was a decbench .text-filter artifact
  and never a kuna discovery failure (angr and ida score nothing there);
  "betaflight 22%" is 6.0%; the coreutils `main` empty-body/panic is fixed
  (comm/join/timeout/uniq all produce full bodies today).
- The `--mode auto` degrades-to-fast warning is moot for this corpus: the
  largest stripped binary is O0 bash at 1,513,904 B (1.44 MiB), so all 803
  binaries resolve 768 aggressive / 35 reliable / 0 fast. The aggressive-vs-
  reliable distinction is kept and sharpened; the stale 21-of-24 default-off
  count is now 20 of 25, with the five exclusions named.
- Two operational traps recorded for the first time:
  (a) byte_match RECOMPILES with an arch-matched toolchain and this box has
      neither arm-none-eabi-gcc nor MinGW, so deleting kuna's (never
      auto-invalidated) checkpoints destroys kuna's ARM/PE scores while every
      rival keeps theirs. The coverage guard caught 34 slices; O2 and
      O2-noinline are still damaged from an earlier DECBENCH_ALLOW_DROPS=1 run
      with no surviving copy. Rule: never pass DECBENCH_ALLOW_DROPS=1 without
      reading every [guard] line.
  (b) The pools store a PE address as an RVA where kuna uses the VA, so
      scripts.decbench.rescore fails on every PE case (119 across the three
      pools). Recorded with a fix direction.
- Pointed at the durable refresh recipe at ~/decbench-campaign-state/ and its
  two pinning rules, plus the non-obvious one: the GED baseline must drop kuna's
  published scores for EVERY re-decompiled opt level, not just the one being
  refreshed (an O0-only baseline died with "cannot reproduce published fallback
  58.0" on an O2 slice).

Method corrections (decbench-loop.md + improvement-pipeline.md standing rules)
- "Not a no-op" is not "correct". On paramcopyhoist a refuter proved the
  proposed hook reached the printer and it was still the wrong site: it deleted
  an assignment, lost an early return, and made another function return the
  wrong parameter. The refute brief now carries an explicit "would this produce
  WRONG output?" axis.
- Diff every changed function, not the witness. Those designs all passed on
  their witness. Round 2's PRs swept 3,031 / 12,241 / 14,720 / 15,386 functions;
  two caught real problems that way.
- The tally, honestly: round 1's filed mechanisms were 2-for-5, round 2's
  refuters overturned the filed diagnosis on 3 of 8, and the symptom stood in
  every case.

Shared counters in a busy queue (decbench-loop.md + improvement-pipeline.md)
- Round 2 ran up to four output-changing PRs over the same hard-coded counters
  and produced three failure shapes, only one of which announced itself: a
  conflict (#257's DIV number raced 55 -> 56 -> 57 -> 58); a SILENT
  identical-edit auto-merge (catalog_bytecompat.rs kept 86 because both sides
  made the same 85 -> 86 edit); and a SILENT keep-both auto-merge (a stale
  baseline-stages.json data_footer, and five rounds of keep-both duplicating a
  row in tests/stages/README.md).
- Rules written down: derive every shared counter from a fresh capture and a
  green run on the rebased tree, never by arithmetic; diff every keep-both
  resolution against main asserting you removed nothing and added nothing twice;
  DIV numbers are claimed on merge; re-run the gates AFTER the rebase.
- New standing requirement 9: re-measure after every rebase, never carry a
  number forward. #257's placeholder count moved 2,143 -> 2,142 because #254
  landed underneath it, caught only by re-measuring.

docs/decbench/features.md
- Round-1 menu replaced by round-2 outcomes, keeping the file's shape and its
  rank-by-correctness thesis. NINE merged PRs: #248 cortexmvectors,
  #249 funcptralign, #250 paramcopyhoist, #251 subright, #252 returncopysplit,
  #253 itecondlist, #254 peimportcall (DIV-57), #255 ptrentry and #257 undefname
  (DIV-58) -- seven of the eight round-2 candidates plus steps 1 and 2 of the
  ARM entry-recall sequence (#239). Only three of the nine move GED on a mined
  case; four are correctness fixes the metric cannot see and two are recall.
- The dead-pass finding is now three DISTINCT shapes to grep for, not one
  anecdote: stub body (RuleSubRight), live body with a permanently-zero input
  (RuleFuncPtrEncoding's hard-coded funcptr_align() = 0), and live body with a
  gate bit that has no writer anywhere (ActionDeindirect / externref). The third
  had a second gap in the same chain -- GlobalEntry::func_no_return never copied
  the callee's no-return flag into the snapshot -- so one dead gate can hide
  another.
- The ARM sequence is cross-referenced to the live table on PR #239 rather than
  duplicated here, so it cannot go stale in-repo.
- Carried forward as the one still-open candidate: catalog-upstream-options
  (38 upstream-inherited ArchOptions invisible to `kuna catalog`).

Re-mined pool tables regenerated against the refreshed tree (snapshot
2026-08-03): backlog.md, backlog-ida.md, novel.md, triage-queue*.json.

Gates on the rebased base: make check-spec OK (lenient and strict);
make test 675/675 PARITY OK; make test-stages 394/394 PARITY OK.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_017dPFaKJanfLSf7mWGhkzkL
@mahaloz
mahaloz force-pushed the campaign/decbench-round2-outcomes branch from 84c3368 to fb3bffc Compare August 3, 2026 14:32
@mahaloz
mahaloz merged commit 8533cf3 into main Aug 3, 2026
9 checks passed
@mahaloz
mahaloz deleted the campaign/decbench-round2-outcomes branch August 3, 2026 14:40
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