Skip to content

feat(bench): parallel bench loop + MR7 targets wired, test contract aligned - #171

Closed
log0u7 wants to merge 3 commits into
mainfrom
bench/mr7-targets
Closed

log0u7 wants to merge 3 commits into
mainfrom
bench/mr7-targets

Conversation

@log0u7

@log0u7 log0u7 commented Nov 27, 2026

Copy link
Copy Markdown
Owner

Summary

Lands the two bench commits that sat unpushed on the local main clone
(27f6f08 MR7 targets wired, e1ef216 parallelized per-repetition loop)
and repairs what they broke:

  • The MR7 manifest regeneration had dropped ctf-lictor-ret2csu-001
    (restored in the normalized ingest format; the case file and the
    port-9992 wiring were already committed).
  • The parallel loop made the pilot launch order non-deterministic: the
    two call-order assertions compare sorted lists now (the recorded
    results order stays deterministic - executor.map preserves the
    input order), and the committed eval-set wiring test learns the
    46-target live set (7 MR7 technique targets + 10 restored eval2
    twins).
  • _attempt_one binds its loop variables as default arguments (ruff
    B023) and gains annotations (mypy).

Tests (mandatory)

Red-green flow: the four committed failures were the red state
(TestBenchAttemptWatchdog + orchestration call-order assertions in
tests/unit/test_bench_lab.py, the manifest-vs-cases guard in
tests/unit/test_ctf_ingest.py, and 2x committed wiring in
tests/unit/test_final_bench.py). Fixes: the manifest entry restored
(test_ctf_ingest green), the call-order assertions moved to the pool
contract (tests/unit/test_bench_lab.py), the live-set expectation
extended to the 46 targets (tests/unit/test_final_bench.py). Full
suite green: 907 passed, 11 skipped; lint (ruff) zero offenses; mypy
clean; build passes (dist/ artifacts).

Linked Issue

No issue: reconciliation of two unpushed local main commits (11 days
old, bench lane) with their broken test contract.

Quality Checklist

  • I wrote the failing test first (red), then made it pass (green)
  • I ran the lint check (zero offenses)
  • I ran the test suite (all green)
  • I ran the build
  • I updated CHANGELOG.md under [Unreleased]
  • This change is focused and avoids unrelated behavior changes
  • I updated docs when user-facing workflow, tool, or config behavior changed

Seven new lab targets (brop, one_gadget, got_partial_overwrite,
ret2partial_overwrite, jop, ret2vdso, setcontext_srop) join the bench:
one case file each, one manifest entry each, one port mapping each
(20100-20106, lictor feat/builder-nul-channel).

The regenerated manifest also restores the 10 eval2 twins, whose
corpus copies had been lost; their lictor lab sources are intact and
their flags unchanged. The regeneration normalizes every manifest
entry to the current ingest format (top-level expected_flag), so the
loader now sees all 45 ported challenges - the eval2 twins were
present in the old manifest but silently skipped by the old format.
None of the 28 clean challenges appears in any training dataset:
MR7 and eval2 are unseen classes for trained-mr10.
The pilot work is one Ruby process per challenge (CPU-bound on a
single core: the augure-profiler gadget scan) plus an LLM HTTP call.
The sequential loop pinned the whole bench to one core (measured:
100% of one core, 93% of the machine idle on a 24-thread host).
A ThreadPoolExecutor spreads the subprocess waits across cores -
the pilot is a subprocess, the GIL is not the bottleneck. The stats
update stays sequential in the main thread. BENCH_WORKERS tunes the
width (default 4).
…llel loop

The MR7 manifest regeneration (27f6f08) dropped ctf-lictor-ret2csu-001:
the case file is on disk and the committed wiring tests expect it on
port 9992, so the manifest-vs-cases guard caught the orphan. Restored
in the normalized ingest format.

The parallel per-repetition loop (e1ef216) made the pilot launch order
non-deterministic: the two call-order assertions now compare sorted
lists (the recorded results order stays deterministic - executor.map
preserves the input order), and the watchdog docstring matches the
pool semantics. _attempt_one binds its loop variables as default
arguments (ruff B023) and gains annotations (mypy).

The committed eval-set wiring test learns the 7 MR7 technique targets
and the 10 restored eval2 twins (46 live targets).
@log0u7

log0u7 commented Nov 27, 2026

Copy link
Copy Markdown
Owner Author

Closed: superseded by main itself. The two unpushed local commits this branch carried (27f6f08 MR7 wiring, e1ef216 parallel loop) landed on main through #169 in better form (explicit-params pool, no closure), and main's own test contract made deliberate choices this branch contradicted (ret2csu out of the eval set, corpus locally unverifiable). Branch content duplicated or diverged from main by 1300+ lines; nothing unique to salvage.

@log0u7 log0u7 closed this Nov 27, 2026
@log0u7
log0u7 deleted the bench/mr7-targets branch November 27, 2026 13:36
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