{
  "notes": "EPISODE 2 (2026-11-09). 22 results read; a1-compress (5), b1-ideas posterior/twohyp/trained and b1-fresh/fresh-1 still running. 31 items used before this episode, 13 spawned now (44 of 240), 18 episodes left.\n\nHOW CODE TRAVELS: every result is served byte-for-byte at https://api.imd.fun/artifacts/<sha256 of the result file> (the sha the episode's input list gives; verified this episode for three results). A new item starts from an earlier result by fetching that URL and decoding code_zb64 (base64, then zlib, a tar). Briefs can therefore chain work without a code trunk. Keep that URL form; a fixture too big for a result still cannot travel.\n\nTRACK A FINDINGS. Gates: both copies match the README digits (gates.py 7 s). Bounds (from the amm-challenge checkout): 250,000 gas per afterInitialize and per afterSwap INCLUDING the 21,000 intrinsic cost (so the 245,000 target leaves ~224,000 of execution), getName 50,000, deploy 10,000,000; 32 storage slots; no inline assembly; runtime 24,576 bytes; solc 0.8.24, optimizer 200, viaIR, evmVersion paris; contract named Strategy inheriting AMMStrategyBase, imports only ./AMMStrategyBase.sol and ./IAMMStrategy.sol; bytecode scan rejects BALANCE, EXTCODE*, CREATE*, CALL*, DELEGATECALL, STATICCALL, SELFDESTRUCT; source regex bans .call/.send/.transfer/coinbase/custom interfaces. IB: 14,528 runtime bytes, afterInitialize 243,227 gas, afterSwap peak 234,958-237,009 on the engine, mean 135,200.\nIB ENGINE BASELINE: 768 of 1,024 seeds done. ib-12000000: n 256 sum 134918.570353 sumsq 73255977.563357 (mean 527.03); ib-12000512: sum 136071.26244 sumsq 74524616.540014 (531.53); ib-12000768: sum 136903.691024 sumsq 75420076.107479 (534.78). Pooled mean 531.11, sd across seeds 92.4: only PAIRED per-seed differences carry signal. ib-12000256 (seeds 12000256..12000511) returned nothing: the worker read \"Linux x86_64 only; elsewhere set engine unavailable\" as an order to inspect its machine and refused. NEVER write a platform condition in a brief: say \"run the setup; if a step fails report blocked{step,error}\". Those 256 seeds were not consumed.\nPORT: a1-port-full/port-2 = P2 (result sha 679e9ec3e69ce093fb9ba56944ad799079b2a311ad4bea0521c2f7b15aa626d6) is a complete plain-table port of real.py soft=1: 71 w knots, all 13/49 rival columns, mirrored bid, int16 residuals; parity max 3.4e-9 bps over 212,490 callbacks of seeds 10000..10019; peak 145,062 gas, mean 49,544 (pyrevm, engine accounting); runtime 22,567 bytes; validate pass; knot cost -0.008 se 0.009 on 60000..60255; stress 64 sequences 0 reverts. port-1 failed parity (58 bps) and is dropped. Parts: math-2 (sha 28f7ff6aca0c48b081f6c1461973a94721dd34429012d1f267450f5cdde7cba6, Q30, trunc moments 18k gas, 4,161 bytes) beats math-1 (truncNormal 147k gas); tables-1 (sha d5e0e4e9...) packer 19k gas/lookup, tables-2 (sha 1c57f8b7...) 42k. P2 already carries its own math and packer, so parts are spares. Plain tables expected on the engine: +2.83-0.59 = +2.24 over IB, below the +2.7 bar; the qm tables (+3.77 replica, +3.18 expected over IB) are needed and must be compressed from 8 sd levels x s/c modes into the ~2,000 bytes P2 leaves, or P2 must shrink.\nTRACK B FINDINGS. numba: all three match gates; b1-numba/numba-3 (sha 1134b0f83ff44cf484f8dc780a5c7f0e5d08d2cbbfad3d4ee2d3578ae6fa1ac6) is the one to use: whole replica + lattice + RNG in numba, bit-identical to pure Python on all 2,048 holdout seeds, 0.0086 s/run, modes perfect|lattice, fast_replica.py beside run.py, numpy+numba venv. It found ref/lattice_qm.json differs from pure Python by >1e-6 on 34/2048 seeds (max 0.074, another libm): pair.py against ref is still the rule, but a 0.07 single-seed wobble is noise. Ideas on holdout 10000..12047 vs ref/lattice_qm.json: perrun +0.022 se 0.0075 (drop); router alpha=0 only, 0.000 (nonzero alpha -15 on 8 seeds; drop); fresh-2 BRANCH-BLEND +0.183 se 0.011 (sha 80b9f00d0d387deabd812da152d935cf049fa6654ae5e1cf43a30e16e7dd6830: on ambiguous first trades quote the pi^2-weighted log-blend of the arb-branch and retail-branch quotes; +20-30k gas only on those calls; best so far, under the 0.3 bar); fresh-3 RouterEvidence +0.089 se 0.010 (0.3-1.5M gas, drop for ports). Misread diagnostics (three families agree): misreads are small fills near the quote edge (24.7% misread in the smallest size quartile, 5.4% in the largest; d<4 bps 24.8%, d>23 bps 4.5%; dt=2 worst at 20.6%); size, timing and exact-amount features add nothing (AUC 0.92 either way, 2D tables flip no cell); hindsight forking cuts misread to 11.8% but the forward price estimate does not improve (lattice mixture already holds it); the untested levers are revising rival clip/synced/phase when a later callback flips the label, and quotes that make the next arb separate the hypotheses (that is b1-ideas/idea-twohyp, still running).\n\nDECISIONS THIS EPISODE (13 items). Track A (7): a2-engine-plain, 4 items x 256 seeds on 12000000..12001023, BOTH arms (IB and P2) in the same item, 64-seed blocks, paired stats, and an ib_sum_check against the earlier IB sums (determinism check; seeds 12000256..12000511 have none). Expected: P2 over IB = +2.24 +-0.2 if replica gaps carry. a2-port-qm, 2 copies: P2 plus compressed qm tables, cost >= -0.2 on 60000..60255 vs gauss qm, full gate set. a2-latt-gas, 1 item: the lattice belief update alone in Solidity, gas by dt bucket, feasible if a variant peaks <= 170,000 with mean error <= 0.5 bps (decides whether the next port can be the lattice, +3.67 expected over IB). Track B (6): b2-blend/blend-tune (weight schedule, fee blend, per-branch modes) and blend-gauss (the blend on the Gaussian filter vs ref/gauss_qm.json: the B-to-A transfer test); b2-revise (state revision on label flip); b2-oracle-gap (oracle ablations on 60000..60511: flag, price, rival, phase, to locate the remaining +4.44); b2-fresh, 2 copies told to skip the README list and the episode-1 results.\n\nSEED LEDGER. Engine: 12000000..12001023 assigned (IB rows on 768 of them; a2-engine-plain reruns IB and runs P2 on all 1,024). Next free engine seed: 12001024. Replica: tuning 60000..60255, confirmation 60256..60511, diagnostics 60000..60511 and 61000..61255; holdout 10000..12047 scored once per idea.\n\nEPISODE 3 SHOULD: (1) Pool a2-engine-plain: sum the per-item paired sum/sumsq, mean_diff and se on up to 1,024 seeds; check ib_sum_check says equal on the three known ranges. If P2-IB is within 0.2 of +2.24 the engine pipeline is trusted; if not, spawn a diagnosis item (per-seed replica-vs-engine trace of P2 on the worst seeds) before any more engine work. Record port gas on the engine. (2) From a2-port-qm and a1-compress pick a qm port with complete:true; if none, combine the best compression (smallest set within -0.2) with P2 in a new 2-copy port batch, passing both result URLs. When one passes, run it on fresh seeds from 12001024 in 256-seed both-arm items (4 items first, then widen to 4,000 seeds over two episodes if the first 1,024 show >= +2.5). (3) Track B: holdout >= +0.3 vs its ref goes into the next port (blend-gauss tells whether branch-blend transfers to the Gaussian filter; if it does at >= +0.15 there, add it to the qm port as an option anyway, it is cheap); 0 to 0.3 gets one tuning item; read idea-posterior and idea-twohyp first, they are the two README ideas most likely to pay. (4) If a2-latt-gas says feasible, spawn a lattice port (2 copies) from P2 plus the lattice update code. (5) Budget: 196 items after this episode; keep ~12-20 per episode, widen only engine pairing of a port that passed its gates.\n\nWATCH FOR: items that fail because api.imd.fun was unreachable (give the line a spare next time); workers who refuse on platform grounds (brief wording); results over 60,000 bytes; the plane's 'sources flagged' marks on most results (no effect seen, nothing to do). a1-fixture was refused in episode 1 for asking for raw command output; the recorder now lives inside P2's tar, so no fixture batch is needed.",
  "spawn": [
    {
      "name": "a2-engine-plain",
      "brief": "Track A engine pairing: port P2 and IB, each alone against VanillaStrategy, on engine seeds {{from}}..{{to}} (256 seeds, yours alone; use no seed outside this range; never fill a missing seed). Engine: git clone https://github.com/benedictbrady/amm-challenge and check out 6b6921f8d463314aa7c96234e1be25a25245f704; from the checkout root: mkdir -p scratch && curl -LsSf https://raw.githubusercontent.com/gtmcknight/amm-sim/main/research/setup.sh -o scratch/setup.sh && sh scratch/setup.sh; prefix later commands with `. scratch/env.sh && `. If a setup step fails, set engine:\"unavailable\" and blocked:{step,error} (the step and its error message), report what you have and finish; do not test the machine first. Contracts: IB = field code_zb64 (base64, then zlib; one .sol, contract inputs_b) of https://api.imd.fun/artifacts/afd5183e9ff3235334e041c00b0cd19079599a2c6464db95f8c1586712105557. P2 = field code_zb64 (base64, then zlib; a tar whose README names its Strategy .sol) of https://api.imd.fun/artifacts/679e9ec3e69ce093fb9ba56944ad799079b2a311ad4bea0521c2f7b15aa626d6, a Gaussian-filter port with plain tables. Run amm-match validate on both; a failure is reported, not fixed. Configs per MatchRunner._build_configs with the loop index replaced by the seed: np.random.default_rng(seed=seed), uniform draws in order retail_mean_size, retail_arrival_rate, gbm_sigma from BASELINE_VARIANCE, other fields from the base config, SimulationConfig(seed=seed). For each arm run amm_sim_rs.run_batch(X, VanillaStrategy, configs, 8) in 64-seed blocks (32 on a slow seat), gas_stats_reset() before each block and gas_stats() after; score = result.edges['submission']. Both arms on exactly the same seeds; if time runs short, stop both arms at the same seed and report n. Scores vary by 90 across seeds, so only the per-seed difference matters. Result, one JSON object under 60,000 bytes: key \"{{key}}\", seeds{from,to}, ib{n,sum,sumsq,rows:[[seed,score],...]}, port{n,sum,sumsq,rows}, paired{n,mean_diff,se,sum,sumsq,worst5:[[seed,diff]x5]} over port minus IB per seed, gas{ib:{peak_afterswap,mean_afterswap,oog,reverts},port:{same}}, valid (false on any port OutOfGas or revert or a port afterSwap peak over 245,000), ib_sum_check (earlier IB sum on this range over six-decimal rows: {{ibsum}}; \"none\" means no earlier run; answer \"equal\", \"differs by <x>\" or \"none\"),block_seconds (per block), engine (\"ok\"|\"unavailable\"), blocked (null or {step,error}), notes (under 1,500 characters: what you ran, anything odd). Numbers only, no command output.",
      "items": [
        {
          "key": "eng-12000000",
          "vars": {
            "key": "eng-12000000",
            "from": "12000000",
            "to": "12000255",
            "ibsum": "134918.570353"
          }
        },
        {
          "key": "eng-12000256",
          "vars": {
            "key": "eng-12000256",
            "from": "12000256",
            "to": "12000511",
            "ibsum": "none"
          }
        },
        {
          "key": "eng-12000512",
          "vars": {
            "key": "eng-12000512",
            "from": "12000512",
            "to": "12000767",
            "ibsum": "136071.26244"
          }
        },
        {
          "key": "eng-12000768",
          "vars": {
            "key": "eng-12000768",
            "from": "12000768",
            "to": "12001023",
            "ibsum": "136903.691024"
          }
        }
      ],
      "output": {
        "format": "json",
        "maxBytes": 60000
      }
    },
    {
      "name": "a2-port-qm",
      "brief": "Track A, the qm port, copy {{copy}} of 2 (the other copy attempts the same; do all of it yourself). Get the solved folder: B=https://raw.githubusercontent.com/gtmcknight/amm-sim/e65314f88de945f6d055bfc2aab01c482ab6570e/research/solved; curl -LsSf $B/fetch.sh -o fetch.sh && sh fetch.sh $B scratch/solved; read scratch/solved/README.md (its scripts run as python3 -I from that folder). Start from P2, an accepted port of real.py soft=1 with plain tables: field code_zb64 (base64, then zlib; a tar with source, tests, recorder, table packer, README) of https://api.imd.fun/artifacts/679e9ec3e69ce093fb9ba56944ad799079b2a311ad4bea0521c2f7b15aa626d6 (parity 3e-9 bps on 212,490 callbacks, peak 145,062 gas, runtime 22,567 bytes). Make it the Gaussian + qm policy (run.py gauss with soft=1 qm=qm_k1e-5.json, +3.77 over HA): qm has 8 sd levels and s/c rival modes, so it must be compressed to fit. Choose w knots, an sd-level subset and a rival-mode treatment (ideas: P2's knots, the mirror ask(w,R)=bid(-w,-R), 3 or 4 sd levels with linear interpolation, one rival mode or c-minus-s residuals); expand the candidate back to the shipped grid in qm_k1e-5.json format and measure its cost: python3 -I run.py gauss 60000 256 cand.json soft=1 qm=<file> against run.py gauss 60000 256 base.json soft=1 qm=qm_k1e-5.json, then pair.py cand.json base.json; the cost must be mean_diff >= -0.2. Then port it. Gates: fees within 0.01 bps of real.py (soft=1, your expanded qm file) on every callback of replica seeds 10000..10019 recorded blind; afterSwap peak <= 245,000 gas counted as the engine does (21,000 intrinsic included); no revert on stress sequences (report, do not gate); runtime <= 24,576 bytes; solc 0.8.24, viaIR, Paris, optimizer 200, no assembly, 32 slots; amm-match validate if the engine installs (clone github.com/benedictbrady/amm-challenge at 6b6921f8d463314aa7c96234e1be25a25245f704; mkdir -p scratch && curl -LsSf https://raw.githubusercontent.com/gtmcknight/amm-sim/main/research/setup.sh -o scratch/setup.sh && sh scratch/setup.sh; if that fails, validate:\"not run\" and go on). Consume no engine seeds. If it will not fit, ship the best you reached with complete:false and say how many bytes over. Result, one JSON object under 60,000 bytes: key \"{{key}}\", tables:\"qm\", knots (w knots, sd levels, rival modes, residual format), knot_cost_paired{n,mean_diff,se,sum,sumsq}, parity{callbacks,max_fee_diff_bps,over_0_01_bps}, gas{peak_afterswap,mean_afterswap,oog,reverts}, validate (\"pass\"|\"fail\"|\"not run\"), stress{sequences,reverts,peak_gas}, bytes_runtime, complete (true only when every gate passed), code_zb64 (base64 of zlib of a tar: source, tests, packer, expanded-table generator, README; no table JSON), code_sha256 (of the tar), notes (under 1,500 characters: what changed, what failed, what to try next). Numbers only, no command output.",
      "items": [
        {
          "key": "qm-1",
          "vars": {
            "key": "qm-1",
            "copy": "1"
          }
        },
        {
          "key": "qm-2",
          "vars": {
            "key": "qm-2",
            "copy": "2"
          }
        }
      ],
      "output": {
        "format": "json",
        "maxBytes": 60000
      }
    },
    {
      "name": "a2-latt-gas",
      "brief": "Track A feasibility: can the lattice filter run in the contract? Get the solved folder: B=https://raw.githubusercontent.com/gtmcknight/amm-sim/e65314f88de945f6d055bfc2aab01c482ab6570e/research/solved; curl -LsSf $B/fetch.sh -o fetch.sh && sh fetch.sh $B scratch/solved; read scratch/solved/README.md (its scripts run as python3 -I from that folder). latt.py keeps probability mass on 121 cells of 2.5 bps and is worth +0.5 over the Gaussian filter on the replica. Contract bounds: 250,000 gas a callback including the 21,000 intrinsic cost, 32 storage slots, no inline assembly, 24,576 runtime bytes, solc 0.8.24 viaIR Paris optimizer 200. Write the lattice belief update alone in Solidity (no fee tables: it returns mean and sd in bps and pi): masses packed as fixed-point integers (16 or 21 bits a cell) in as few slots as possible; per callback: up to dt-1 silent steps (cap 12), each a convolution with the price-move kernel and zeroing of the cells where the arb would have traded, this step's convolution, the first-trade mixture (point mass at the arb reading plus the cut prior, pi as latt.py), renormalisation, mean and sd. Prove it against latt.py on callbacks recorded from replica seeds 10000..10004 run blind (timestamp, isBuy, reserves, and latt.py's mean, sd, pi at each): max abs error of mean and sd in bps and of pi. Measure gas with Foundry or pyrevm on those callbacks: peak, mean, and the peak by dt bucket (1, 2, 3-5, 6+). If the first peak is over 180,000 try at least two cheaper variants (fewer bits, a truncated kernel, a coarser silent-step update) and report each. Result, one JSON object under 60,000 bytes: key \"{{key}}\", slots_used, bits_per_cell, kernel_width_cells, gas{peak,mean,by_dt:{\"1\",\"2\",\"3-5\",\"6+\"}}, variants:[{name,bits,kernel,peak_gas,max_err_mean_bps,max_err_sd_bps,max_err_pi}], err{max_mean_bps,max_sd_bps,max_pi}, bytes_runtime, feasible (true if a variant has peak <= 170,000 and max_err_mean_bps <= 0.5), code_zb64 (base64 of zlib of a tar: Solidity, tests, recorder; no large data), code_sha256 (of the tar), notes (under 1,500 characters: where the gas goes, what a full port with tables would need). Numbers only, no command output.",
      "items": [
        {
          "key": "latt-gas-1",
          "vars": {
            "key": "latt-gas-1"
          }
        }
      ],
      "output": {
        "format": "json",
        "maxBytes": 60000
      }
    },
    {
      "name": "b2-blend",
      "brief": "Track B: the branch-blend idea, variant {{variant}}. Get the solved folder: B=https://raw.githubusercontent.com/gtmcknight/amm-sim/e65314f88de945f6d055bfc2aab01c482ab6570e/research/solved; curl -LsSf $B/fetch.sh -o fetch.sh && sh fetch.sh $B scratch/solved; read scratch/solved/README.md (its scripts run as python3 -I from that folder). Found in episode 1 (result at https://api.imd.fun/artifacts/80b9f00d0d387deabd812da152d935cf049fa6654ae5e1cf43a30e16e7dd6830; its code_zb64 is base64 of zlib of a tar holding bb.py, module bb:BB, options bl=1 bw=2 qm=qm_k1e-5.json, beside latt.py, real.py and replica2.py; if the fetch fails, re-implement from this): on an ambiguous first trade of a step (0.001 < pi < 0.999) the lattice makes the phase and rival choice hard at pi > 0.5. Branch-blend instead looks up quotes under each branch, arb (price = arb reading, sd 0, phase 0, rival band-clipped to it) and retail (cut posterior mean and sd, phase 1, rival from the router identity), and quotes the weighted average of the two log bid and ask prices with weight wA = pi^g/(pi^g+(1-pi)^g), g=2. Holdout 10000..12047 vs ref/lattice_qm.json: +0.183 se 0.011; misread 16.03% vs 16.24%. Your task: {{task}} Rules: blind (run.py only); tune on replica seeds 60000..60255, confirm the chosen setting on 60256..60511 before touching the holdout; freeze the code; score the holdout 10000..12047 once, in 512-seed run.py commands (PROCS=8), and pair against {{ref}}. A bit-identical numba lattice runner exists at https://api.imd.fun/artifacts/1134b0f83ff44cf484f8dc780a5c7f0e5d08d2cbbfad3d4ee2d3578ae6fa1ac6 (its code_zb64 is base64 of zlib of a tar; fast_replica.py goes beside run.py; numpy and numba in a venv) if you want speed; pure Python is acceptable. Result, one JSON object under 60,000 bytes: key \"{{key}}\", idea (one line), settings_tried:[{setting,n,mean_diff,se}] on tuning seeds, confirm_paired{n,mean_diff,se}, holdout_paired{n,mean_diff,se,sum,sumsq,worst5}, misread_rate{base,mine}, price_error_bps{base,mine}, gas_estimate (extra state and ops per callback, rough gas), code_zb64 (base64 of zlib of a tar of your module and a README), code_sha256 (of the tar), notes (under 1,500 characters: what failed first, what to try next). Numbers only, no command output.",
      "items": [
        {
          "key": "blend-tune",
          "vars": {
            "key": "blend-tune",
            "variant": "tune",
            "task": "improve the blend on the lattice: try the weight as a function of pi and of dt or of the fill size d (g by dt; a cap on wA when d is under 8 bps), blending the fees instead of the log prices, each branch with its own s/c table mode, and the blend applied to the retail-branch rival update too; keep the price belief update unchanged. Report the plain g=2 blend on your tuning seeds as the first setting so gains are read against it.",
            "ref": "ref/lattice_qm.json"
          }
        },
        {
          "key": "blend-gauss",
          "vars": {
            "key": "blend-gauss",
            "variant": "gauss",
            "task": "carry the blend to the Gaussian filter, the policy Track A ports (real.py soft=1 qm=qm_k1e-5.json): a policy class around real.py that on an ambiguous first trade quotes the blend of the arb-branch quote (lp, sd 0, phase 0) and the retail-branch quote (mt, sqrt(vt), phase 1), g tuned; report its gain over the plain Gaussian + qm policy and exactly what it adds to a port (table lookups, ln and exp calls, state).",
            "ref": "ref/gauss_qm.json"
          }
        }
      ],
      "output": {
        "format": "json",
        "maxBytes": 60000
      }
    },
    {
      "name": "b2-revise",
      "brief": "Track B: revise the state when a later callback flips the label. Get the solved folder: B=https://raw.githubusercontent.com/gtmcknight/amm-sim/e65314f88de945f6d055bfc2aab01c482ab6570e/research/solved; curl -LsSf $B/fetch.sh -o fetch.sh && sh fetch.sh $B scratch/solved; read scratch/solved/README.md (its scripts run as python3 -I from that folder). Episode-1 diagnostics (replica seeds 60000..60511 train, 61000..61255 test): the lattice misreads 16.2% of first trades of a step (9.7% retail read as arb, 6.5% arb read as retail). Forking the lattice at the first trade into an arb branch and a retail branch and scoring the next own callbacks (the log predictive-likelihood difference, AUC 0.86 alone, 0.95 with the filter's features) cuts the misread in hindsight to 14.9/13.1/12.0% after 1/2/3 callbacks. The forward price estimate gains nothing from that (the lattice mixture already carries it), but latt.py never revises what the hard read set: the rival spot clip and synced flag, the phase and the count. Your idea, measured alone: keep two branches after an ambiguous first trade (0.05 < pi < 0.95); at each later callback of the same step, and at the next step's first trade, update the branch posterior with the predictive likelihoods; when it crosses 0.5, recompute s2, synced, cnt and phase as if the first trade had been read the other way and quote from the revised state (optionally pi-weighted between the two states' quotes). The price belief update stays latt.py's. Rules: blind (run.py only); tune on replica seeds 60000..60255, confirm the chosen setting on 60256..60511 before touching the holdout; freeze the code; score the holdout 10000..12047 once, in 512-seed run.py commands (PROCS=8), and pair against ref/lattice_qm.json. A bit-identical numba lattice runner exists at https://api.imd.fun/artifacts/1134b0f83ff44cf484f8dc780a5c7f0e5d08d2cbbfad3d4ee2d3578ae6fa1ac6 (its code_zb64 is base64 of zlib of a tar; fast_replica.py goes beside run.py; numpy and numba in a venv) if you want speed; pure Python is acceptable. Result, one JSON object under 60,000 bytes: key \"{{key}}\", idea (one line), settings_tried:[{setting,n,mean_diff,se}] on tuning seeds, confirm_paired{n,mean_diff,se}, holdout_paired{n,mean_diff,se,sum,sumsq,worst5}, flips{share_of_ambiguous,share_right} on tuning seeds, misread_rate{base,mine}, price_error_bps{base,mine}, gas_estimate (extra state and ops per callback, rough gas), code_zb64 (base64 of zlib of a tar of your module and a README), code_sha256 (of the tar), notes (under 1,500 characters: what failed first, what to try next). Numbers only, no command output.",
      "items": [
        {
          "key": "revise-1",
          "vars": {
            "key": "revise-1"
          }
        }
      ],
      "output": {
        "format": "json",
        "maxBytes": 60000
      }
    },
    {
      "name": "b2-oracle-gap",
      "brief": "Track B diagnostic: where the +4.44 between the lattice policy (+4.26 over HA) and perfect information (+8.70) sits, so the next ideas aim at the largest piece. Get the solved folder: B=https://raw.githubusercontent.com/gtmcknight/amm-sim/e65314f88de945f6d055bfc2aab01c482ab6570e/research/solved; curl -LsSf $B/fetch.sh -o fetch.sh && sh fetch.sh $B scratch/solved; read scratch/solved/README.md (its scripts run as python3 -I from that folder). Known: the true arb/retail flag alone takes the same code to +6.98 (real.py flag:oraclearb=1); perfect price with the rival tracked from own trades +8.50. Build oracle variants of latt.py (qm=qm_k1e-5.json) that read one true quantity from the replica callback, labelled as diagnostics (run.py's blindness is bypassed only here): (a) true flag only, (b) true price at the first trade of a step only, the flag still inferred, (c) true price at every own callback, (d) true rival spot only, (e) true flag plus true rival, (f) true flag plus true phase and count, (g) lattice as is. Run each on replica seeds 60000..60511 (PROCS=8, 128-seed commands) and pair each against (g) on the same seeds; also pair (g) against run.py perfect there. A bit-identical numba lattice runner exists at https://api.imd.fun/artifacts/1134b0f83ff44cf484f8dc780a5c7f0e5d08d2cbbfad3d4ee2d3578ae6fa1ac6 (its code_zb64 is base64 of zlib of a tar; fast_replica.py goes beside run.py; numpy and numba in a venv) and exposes perfect and lattice modes; use it if it saves time; pure Python is acceptable. If 512 seeds do not fit the hour, run fewer and report n; never touch 10000..12047. Result, one JSON object under 60,000 bytes: key \"{{key}}\", n_seeds, variants:[{name,inputs,mean_vs_lattice,se,sum,sumsq,misread_rate,price_rms_bps}] for (a) to (f) and perfect, decomposition (one paragraph: how much of the gap is the flag, the price given the flag, the rival, the phase; which parts afterSwap inputs could reach and which they cannot), code_zb64 (base64 of zlib of a tar of the oracle module and runner script), code_sha256 (of the tar), notes (under 1,500 characters). Numbers only, no command output.",
      "items": [
        {
          "key": "gap-1",
          "vars": {
            "key": "gap-1"
          }
        }
      ],
      "output": {
        "format": "json",
        "maxBytes": 60000
      }
    },
    {
      "name": "b2-fresh",
      "brief": "Track B: arb or retail, from the question alone, copy {{copy}} of 2 (the other copy works independently; do not coordinate). Get the solved folder: B=https://raw.githubusercontent.com/gtmcknight/amm-sim/e65314f88de945f6d055bfc2aab01c482ab6570e/research/solved; curl -LsSf $B/fetch.sh -o fetch.sh && sh fetch.sh $B scratch/solved; read scratch/solved/README.md (its scripts run as python3 -I from that folder). The lattice filter (latt.py with qm_k1e-5.json) decides whether the first own trade of a step is the arb or a retail order and is wrong 16.2% of the time; with the true flag the same code scores +2.72 more (ref/flag_qm.json vs ref/lattice_qm.json), the distance from 7th to the top two. Skip the README's idea list and these, already measured: per-run sigma and rate estimates inside the classifier (+0.02), a router likelihood per price hypothesis (+0.09, about 1M gas), quoting a blend of the arb-branch and retail-branch quotes (+0.18, kept), trade size, timing and exact-amount features (redundant: AUC 0.92 with or without them; misreads are small fills under 8 bps near the quote edge, 24.7% misread in the smallest size quartile and 5.4% in the largest, worst at dt=2), hindsight relabelling (fixes the past estimate, not the forward one). Find one idea of your own that reads afterSwap inputs only, state it in one line, and measure it alone. Rules: blind (run.py only); tune on replica seeds 60000..60255, confirm the chosen setting on 60256..60511 before touching the holdout; freeze the code; score the holdout 10000..12047 once, in 512-seed run.py commands (PROCS=8), and pair against ref/lattice_qm.json. A bit-identical numba lattice runner exists at https://api.imd.fun/artifacts/1134b0f83ff44cf484f8dc780a5c7f0e5d08d2cbbfad3d4ee2d3578ae6fa1ac6 (its code_zb64 is base64 of zlib of a tar; fast_replica.py goes beside run.py; numpy and numba in a venv) if you want speed; pure Python is acceptable. Result, one JSON object under 60,000 bytes: key \"{{key}}\", idea (one line), settings_tried:[{setting,n,mean_diff,se}] on tuning seeds, confirm_paired{n,mean_diff,se}, holdout_paired{n,mean_diff,se,sum,sumsq,worst5}, misread_rate{base,mine}, price_error_bps{base,mine}, gas_estimate (extra state and ops per callback, rough gas), code_zb64 (base64 of zlib of a tar of your module and a README), code_sha256 (of the tar), notes (under 1,500 characters: what failed first, what to try next). Numbers only, no command output.",
      "items": [
        {
          "key": "fresh2-1",
          "vars": {
            "key": "fresh2-1",
            "copy": "1"
          }
        },
        {
          "key": "fresh2-2",
          "vars": {
            "key": "fresh2-2",
            "copy": "2"
          }
        }
      ],
      "output": {
        "format": "json",
        "maxBytes": 60000
      }
    }
  ],
  "read": [
    "b1-ideas/idea-posterior",
    "b1-ideas/idea-twohyp",
    "b1-ideas/idea-trained",
    "b1-fresh/fresh-1",
    "a1-ib-engine/ib-12000000",
    "a1-ib-engine/ib-12000512",
    "a1-ib-engine/ib-12000768"
  ],
  "cancel": [],
  "wake": {
    "batches": [
      "a2-engine-plain",
      "a2-port-qm",
      "a2-latt-gas",
      "b2-blend",
      "b2-revise",
      "b2-oracle-gap",
      "b2-fresh",
      "a1-compress",
      "b1-ideas",
      "b1-fresh"
    ],
    "afterMinutes": 180
  },
  "finish": false
}
