Commit graph

4 commits

Author SHA1 Message Date
Olaoluwa Osuntokun
8920b9e61c simulation: teach the harness the atomic-MPP arena rules
In this commit, we extend the reflection background with the atomic
arena's economics -- held shards reserve real liquidity, siblings
contend, traffic drifts one slice per attempt, and failed payments
release atomically -- so candidates design for the new costs instead
of rediscovering them from failure traces. The exploit grep gains the
new hold-ledger API names (HoldHtlc, SettleHold, ReleaseHold): the
ledger belongs to the runner, and a candidate that touches it is
reaching through the sealed view.
2026-07-25 17:40:23 -07:00
Olaoluwa Osuntokun
754894b14d simulation: apply the library audit to the evaluator and runner
In this commit, we act on the deep audit of our optimize_anything
usage against the library source. The evaluator gains a batch form:
one Go compile per unique candidate instead of one per (candidate,
example) pair, which turns an eight-file valset pass from eight
identical builds into one -- a several-fold wall-clock win the gepa
engine consumes through the batch_evaluator hook, now wired into both
runner paths. Crash paths that could abort an overnight run are
closed: a build timeout under host load and malformed routesim output
now score zero with feedback instead of raising through the engine,
and raise_on_exception is off as a backstop, with
max_candidate_proposals as the enforceable cap now that evaluation
caching makes max_evals count only misses.

The reward-hack guard moves from post-hoc greps into the evaluator
itself: the banned-token regex now covers the hidden-state surfaces
(LocalBalances, AssignLiquidity, BalanceNodeChannels, SendHtlc, and
*routing.SimGraph assertions), verified clean against the seed and
every archived candidate. Fence stripping also slices from the
package clause when an agentic proposer prepends prose. Finally, the
codex harness home moves reflection to high reasoning effort --
medium was an unexamined default for 300-800 line Go rewrites.
2026-07-25 03:05:41 -07:00
Olaoluwa Osuntokun
554c79cc7c simulation: adopt advisor corrections to measurement and validation
In this commit, we act on two independent advisor reviews that
reframed the program: the paradigm ceiling we have been attributing to
algorithm space is partly a measurement ceiling, and the validation
story has holes that would surface immediately upstream.

Measurement: the evaluator now emits separate objective axes
(success, retry efficiency with shards disentangled from retries, and
fee efficiency) so the engine's hybrid Pareto frontier can keep
specialists alive, and evaluation caching is enabled now that the
evaluator is verified deterministic. The split corpus generator gains
--split-leads, replacing the single ambitious payment -- which left
two thirds of every file's score as free probes and quantized
minibatch selection above the very signal being selected for -- with
a descending ladder of mandatory-split payments whose completion count
grades the score. The original --split output is regression-tested
byte-identical.

Validation: sweep_validate.py replaces ad-hoc sweeps with paired
per-file comparisons, bootstrap confidence intervals, and sign tests;
gen_mainnet_scenarios.py generates multi-vantage mainnet corpora with
log-spaced source degrees (2024 down to 2) so claims stop resting on a
single hub-resident vantage; and params_lnd_bimodal.json adds the
baseline arm reviewers will ask for first, since lnd ships a bimodal
estimator that our defaults-only comparisons never exercised. The
exp-010 writeup gains a pre-registered caveat, logged before the live
runs finish, that corpus resolution may mute their verdicts.
2026-07-25 02:58:52 -07:00
Olaoluwa Osuntokun
f7ad893bdd simulation: add GEPA optimization harness
In this commit, we add the Python harness that drives GEPA's
optimize_anything over the routesim evaluator. Two modes are supported:
parameter mode tunes the existing heuristic's knobs as a JSON candidate,
while code mode evolves the entire routing algorithm as the full Go
source of candidate_impl.go, compiled per-eval via go build -overlay
with compiler errors fed back to the proposer as reflection signal.

The evaluator scores success rate with small saturating penalties for
retry attempts and fees, and guards against reward hacking by rejecting
candidates that reach for unsafe, reflect, or exec surfaces. The
reflection LM runs through the Codex CLI in headless mode via a small
LM-protocol wrapper, and omni-style two-phase composition (parallel
explore, then a fresh engine seeded with the winner) is available
alongside plain and adaptive runs. The background prompt encodes the
insights discovered by prior champion runs so follow-up evolution builds
on them rather than rediscovering them.
2026-07-24 13:01:06 -07:00