fix(wave_args): refuse targets banked since the draw — the session's biggest throughput leak

Measured against corpus.stubs at gate time on this session's own waves:
  w2  80 drawn / 12 still open  -> 85% of its agents re-derived already-banked functions
  w3  80 drawn / 39 still open  -> 51%
  x1  80 drawn / 71 still open  -> 11%
~109 of 240 agents in w2+w3 spent full budgets on work that was already banked, by the concurrent
parallel_gate commit or by sibling propagation from a twin remap. The agents DID notice ('stale
pack', 'target .s no longer exists') but only after reading the pack, and several reconstructed the
banked body just to have something to submit.

draw_waves filters against the DRAWN ledger, which stops drawing a target twice but says nothing
about whether it is still OPEN. In a campaign where gates land continuously, a wave drawn at T and
launched at T+2h is stale by construction. Openness is the same class of assertion wave_args already
makes about the .s and the pack, so it belongs here, where it costs nothing.

Negative control (both extremes): x1 drops exactly its 9 closed targets and keeps 71; w2 drops 68
and keeps 12 — matching the independent corpus.stubs measurement.
This commit is contained in:
Drew T
2026-08-30 10:59:01 -06:00
parent 11b818d6c3
commit f0553e9ce5
+35
View File
@@ -20,6 +20,7 @@ and REFUSES to emit anything if a single target fails — a partly-correct args
mode this tool exists to delete.
"""
import argparse, json, os, sys
sys.path.insert(0, os.path.join(os.path.dirname(os.path.abspath(__file__))))
REPO = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
FIELDS = ('name', 'binary', 'nins', 'sub', 'arm')
@@ -36,6 +37,40 @@ def main():
sys.exit('REFUSED: no %s' % tgt_path)
targets = json.load(open(tgt_path))
# OPENNESS IS AN ASSERTION, NOT A CONVENTION (P31 S66, measured — see F14).
# A wave drawn at T and launched at T+2h is stale by construction: gates land continuously, and
# sibling propagation banks targets nobody drafted. Measured on this session's own waves,
# against corpus.stubs at gate time: w2 80 drawn / 12 still open (85% wasted), w3 80/39 (51%),
# x1 80/71 (11%). ~109 of 240 agents in w2+w3 re-derived already-banked functions; they detected
# it themselves only AFTER reading the pack and burning their budget. So refuse a closed target
# here, where it costs nothing.
import importlib
corpus = importlib.import_module('corpus')
closed, open_cache = [], {}
for t in targets:
b = t.get('binary')
if not b:
continue
if b not in open_cache:
try:
open_cache[b] = {v.symbol for v in corpus.stubs(b).values()}
except Exception as e: # a refusing oracle is reported, never silently trusted
print('WARN: stub oracle refused %s (%s) — openness unchecked for it'
% (b, str(e)[:80]), file=sys.stderr)
open_cache[b] = None
live = open_cache[b]
if live is not None and t['name'] not in live:
closed.append('%s:%s' % (b, t['name']))
if closed:
print('SKIPPING %d of %d target(s) already banked since the draw: %s%s'
% (len(closed), len(targets), ', '.join(closed[:8]),
' …' if len(closed) > 8 else ''), file=sys.stderr)
targets = [t for t in targets
if open_cache.get(t.get('binary')) is None
or t['name'] in open_cache[t['binary']]]
if not targets:
sys.exit('REFUSED: every target in %s is already banked — nothing to draft.' % wave)
bad = []
for t in targets:
miss = [f for f in FIELDS if not t.get(f) and t.get(f) != 0]