{
 "notes": "EPISODE 8 (2026-11-10, about 01:05Z). State before: 79 of 150 items used; this is the last planned episode (maxEpisodes 8). NOTHING LANDED since episode 7: this episode was woken by requester note 7 (01:00Z) about ten minutes after episode 7's decisions were accepted, and all 15 of episode 7's items were still queued (r6-confirm-qm-a qa1-qa4, r6-confirm-qm-b qb1-qb4, r6-qm-trim qtr1-qtr2, r6-rerun-blocks tb3r/pb1r, r6-arb ar1-ar3), plus r5-qm-t2 qt1/qt2, r4-qm-port qm-1, r4-confirm-p2-a pa1, r4-confirm-p2-b pb3 and r3-gate-q (3) still running. DECISION: finish=false, because the goal's answer (the qm policy's 2,048-seed score and a gas-fit qm contract) is exactly what the queued items produce; finishing now would write up without them. Spawned r7-qm-trim (qtr3, qtr4), copies 3-4 of the qm-2 gas trim the requester asked for in note 7 (3 copies, engine peak <= 240,000, fees unchanged, cheaper spline evaluation, shared ask/bid basis, trim-1's math trims; truncation only as a declared last resort), engine seeds 9539000..9539127 and 9540000..9540127 vs trim-1 and t03. Wake on the five r6/r7 batches or after 300 minutes. If the plane allows no episode 9, the write-up is made from these notes and the reads listed (25 results). Budget after this episode: 69 items.\nWRITE-UP PLAN (whoever writes it). Submission rule (note 7): >= +0.3 over trim-1 on 2,048 fresh engine seeds, afterSwap peak <= 245,000, 0 OOG, complete code + sha256. (1) Pool qm-2's eight blocks qa1-qa4 (9613312..9614335) and qb1-qb4 (9614336..9615359): qm-2 minus trim-1 directly (mean of all 2,048 diffs, se = sd/sqrt(n)), also minus t03 and IB; gas verdict = max per-chunk peak over all blocks and total OOG. Expected about +0.8 over trim-1 (128 seeds: +2.137 se 0.113 vs t03, 124/128 wins). (2) From r6-qm-trim qtr1/qtr2, r7-qm-trim qtr3/qtr4, r5-qm-t2 qt1/qt2 and qm-1: a contract with runtime <= 24,576 B, engine peak <= 245,000 (ideally <= 240,000), 0 OOG, gate F passed. A trim whose fees are BIT-IDENTICAL to qm-2 (0 differing callbacks, equal trace digests) inherits qm-2's 2,048-seed confirmation (the engine is deterministic given the fees): name it the submission with its code URL and sha256 and say why the score transfers. A contract only within 0.01 bps (qt1/qt2, or a declared last-resort trim) gets qm-2's pooled score as the policy's score plus its own 128-seed run as direct evidence, saying plainly which seeds ran on which contract. If no gas-fit qm contract lands, the submission stays trim-1 (on the board at 524.1189) and qm-2 is reported as beating it by the pooled margin at peak 245,140 with 0 OOG in 1.4M calls, for the requester to judge (net-1 at 245,377 also ran with 0 OOG, so the engine's real limit is above the printed cap; the requester's rule is the number). (3) Block items blocked on platform: list them as missing, do not pretend.\nCANDIDATES (engine, paired, n=256 per block unless said). trim-1 (sha256 d849c5f15d69499560b5c3ea08f55ad27153b393eba7abb7dd186f451ad46a24, 16,077 B, TaylorGaussianPlainNet2, Solidity block of artifact fce772b9...): ta1-ta4 +1.317/+1.435/+1.345/+1.352, tb1 +1.245, tb2 +1.180, tb4 +1.407 vs t03 (se 0.082-0.091) -> n=1,792 +1.326 se ~0.033, +2.055 vs IB, max peak 238,704, 0 OOG in 19.4M calls; tb3 (9608704..9608959) = r6-rerun-blocks/tb3r. port-3 (62930b8e68277c69fc1acfba18de781e684d7fc6daac8dc562b8210dc3932ac1, 18,466 B, artifact 0dbcc10a...): n=2,048 +0.630 se ~0.032 vs t03, ~+1.40 vs IB, peak 207,453, on the board 523.3369. port-2 (7e2d9c157a7725c2875eea31e5741938fb9eafef5a3442710573f1b1a87faf17, 18,484 B, artifact e8c967d6...): n=1,280 +1.251 se ~0.041, peak 227,141; pa1, pb3 running, pb1 = r6-rerun-blocks/pb1r; dropped (not above trim-1). spline-1 final (27ad2a5f..., 21,106 B): 128 seeds +1.278 se 0.129, peak 231,131; dropped. trim-2 (6157028022f7f2151781ea3a772e4a99956ab9c38c8fbabf4995887d05564b27, 11,680 B, artifact 22560aac...): same fees as trim-1, peak 130,711, 128 seeds +1.407 se 0.117; never confirmed on 2,048 (its r5 confirms were refused). net-1 +1.228 (128, peak 245,377), net-2 +1.469 (128, 13,568 B, peak 209,552); net-1, net-2, trim-1, trim-2 are one policy (equal gate-F trace hash 69a29538...). qm-2 (50a741b97a7ed79237ecbd34a4bc20b5c70b7872d8916f31dc3fe3f72b4fe859, runtime 19,346 B, TaylorGaussianQmSpline, '## Strategy.sol' of artifact e50ab7b92163d8589bb2f75c49d6cda2a1012bb96a0f4a52620b887668f63264): gate P pass on the qm column, gate F 5.83e-6 bps on 50x2,000, gate Q = qm-spline 0.063 se 0.007, 128 seeds 9534000..9534127 +2.137 se 0.113 vs t03, +2.912 vs IB, pyrevm peak 215,414, engine peak 245,140, 0 OOG.\nGATES FOR THE WRITE-UP. P: every item reproduced gates.py (gaussian+plain 443.455598/571.463409/525.168028; qm 443.522608/571.623551/525.865859; lattice 443.663520/571.977293/526.411631) and real.py plain:soft=1 = +2.828 vs HA. Q (replica, full minus compressed, report set n=2,048): smooth-2d spline 2,665 B -0.0097 se 0.009; fixed-net 2,730 B -0.040 se 0.011 (net2 2-pass on the choose set +0.005 se 0.016, partial report +0.019 se 0.014); sym-int8 10,024 B -0.009; svd +0.46 and fewer-cols +0.75 failed; rows-10bps 71,484 B too big; port-2's aggregated filter alone -0.035 se 0.010 plus its table -0.083 se 0.010; qm-spline 10,167 B 0.063 se 0.007; qm-net 3,076 B failed (+0.589). F (max |contract - reference| bps): port-3 1.4e-8, net-1 3e-9, trim-1 5.05e-9, trim-2 3.18e-9, spline-1 0.0089, port-2 5.6e-4, qm-2 5.83e-6. Lattice does not fit (exact port: mean 453k, peak 10.5M gas, 64% of callbacks over 245k; best reduction still 258-269k and -0.18). Arb line: arb-2 +0.024 se 0.008, arb-3 +0.049 se 0.012 on the report set (about 2% of the 2.7 at stake), r6-arb ar1-ar3 pending; nothing from it is ported. Board: IB 522.00, port-3 523.3369, trim-1 524.1189 (11th; 10th 524.658, 7th 525.377). Baseline: t03 minus IB +0.745 se 0.084 on n=144. MISSING to state: IB dropped where time ran short; six r3 and three r5 confirm spawns refused (asked for printed output) so trim-2 was never confirmed; qm-net; lattice; any block still blocked on platform.\nLESSONS: never ask a worker for a command's printed text; every Linux brief says blocked at once on a non-Linux seat; the setup script is the '### setup.sh' block of port-2's result e8c967d6...; 256 seeds x 4 arms fits one item (about 0.7 s/seed/arm on 6-8 cores); briefs 2,700-2,900 chars raw and filled; results are public at https://api.imdnotdead.fun/artifacts/<sha256 of result.md>; a result carrying qm-2's 40 KB source needs output.maxBytes 64000.\nSEED REGISTRY (engine, fresh from 9500000, never reuse): 9500000..9501023 r1-baseline (only ..9500143 run); 9510000..9510191 r1-port; 9520000..9520127 spline-1; 9521000..9521127 spline-2; 9522000..9522127 net-1; 9523000..9523127 net-2; 9524000..9524063 lattice-1; 9525000..9525063 lattice-2; 9530000..9530127 trim-1; 9531000..9531127 trim-2; 9532000..9532127 spl-128; 9533000..9533127 qm-1; 9534000..9534127 qm-2; 9535000..9535127 qt1; 9536000..9536127 qt2; 9537000..9537127 qtr1; 9538000..9538127 qtr2; 9539000..9539127 qtr3; 9540000..9540127 qtr4; 9600000..9602047 port-3; 9602048..9607167 burned; 9607168..9609215 trim-1 (tb3r = 9608704..9608959); 9609216..9611263 port-2 (pb1r = 9610240..9610495); 9611264..9613311 burned; 9613312..9614335 qm-a; 9614336..9615359 qm-b. NEXT FREE: 9541000 and 9615360. Replica: choose 60000..61023, report 10000..12047, gate F replays 70000..70049.",
 "spawn": [
  {
   "name": "r7-qm-trim",
   "brief": "Take gas out of qm-2 (Taylor's (gtmcknight) qm tables in trim-1's shell), fees unchanged, copy {{copy}} of 4; lead with {{focus}}. Linux x86_64 only: on any other platform return blocked={step:'platform',error:why} at once, without setup. SETUP (in your workspace, never /tmp): clone https://github.com/benedictbrady/amm-challenge at 6b6921f8d463314aa7c96234e1be25a25245f704; save the goal's 8-line setup script (the '### setup.sh' block of https://api.imdnotdead.fun/artifacts/e8c967d6358da0fd53117891357f19a1d684225bd71a5e302b6e299c85f1286c) as scratch/setup.sh, run `sh scratch/setup.sh` once from the checkout root, prefix later commands with `. scratch/env.sh && `; on failure blocked={step,error}. READ qm-2, https://api.imdnotdead.fun/artifacts/e50ab7b92163d8589bb2f75c49d6cda2a1012bb96a0f4a52620b887668f63264: Strategy.sol under '## Strategy.sol' (sha256 50a741b97a7ed79237ecbd34a4bc20b5c70b7872d8916f31dc3fe3f72b4fe859, runtime 19,346 B), its reference, replay and harness. Engine peak 245,140, pyrevm 215,414; a lookup 72,700 gas mean, 95,800 peak; the two interp calls redo the row bases. TASK: rewrite lookup and shell so the returned fees are BIT-IDENTICAL to qm-2's (same value on all 100,000 replayed callbacks, seeds 70000..70049, equal digests) with engine peak <= 240,000, pyrevm peak <= 185,000, runtime <= 24,576 B. Also: one basis shared by ask and bid (the bid is the point mirror (-w,-R) of the ask: reverse the w and R basis vectors); per-interval precomputed coefficients where they fit; Horner, stack variables, unchecked, one pass for both lanes; trim-1's math trims. Keep `contract Strategy is AMMStrategyBase`, Taylor credited in the header, `amm-match validate` passing, the QMS1 tables unchanged. If bit-identical cannot reach 240,000, report its best peak, then as a declared last resort the nearest contract within 0.01 bps of qm-2 (differing callbacks counted, max bps). ENGINE: new contract, then trim-1 (Solidity block of https://api.imdnotdead.fun/artifacts/fce772b9057867b241350b8e44c05298c6c877871a26b58702a5af431726f6c5), then t03 (`code_zb64` of https://api.imdnotdead.fun/artifacts/2333ecf28d4356bd232b85c1e55842e94e1ada05e1cd067830b5625dfdbc5336), each alone vs the 30 bps VanillaStrategy, amm_sim_rs.run_batch(X, VanillaStrategy, configs, 8), configs per MatchRunner._build_configs, seeds {{first}}..{{last}} in chunks of 32 (no command over 8 minutes). RESULT (markdown): the complete Strategy.sol in one solidity code block with sha256 and runtime bytes; each change and its pyrevm saving; gate F: max |contract - reference| bps over the replay, digests equal to qm-2's or not; per-seed CSV (seed, new, trim-1, t03); paired n, mean_diff, se, worst5, best5 vs trim-1 and vs t03; gas_stats per chunk and overall (afterSwap calls, OOG, reverts, peak, mean); verdict on 240,000 and 245,000. Measured facts only, never a command's printed text.",
   "items": [
    {
     "key": "qtr3",
     "vars": {
      "copy": "3",
      "focus": "the shared ask/bid basis and one two-lane pass",
      "first": "9539000",
      "last": "9539127"
     }
    },
    {
     "key": "qtr4",
     "vars": {
      "copy": "4",
      "focus": "per-interval precomputed coefficients with Horner evaluation",
      "first": "9540000",
      "last": "9540127"
     }
    }
   ],
   "output": {
    "format": "markdown",
    "maxBytes": 64000
   }
  }
 ],
 "read": [
  "r6-confirm-qm-a/qa1",
  "r6-confirm-qm-a/qa2",
  "r6-confirm-qm-a/qa3",
  "r6-confirm-qm-a/qa4",
  "r6-confirm-qm-b/qb1",
  "r6-confirm-qm-b/qb2",
  "r6-confirm-qm-b/qb3",
  "r6-confirm-qm-b/qb4",
  "r6-qm-trim/qtr1",
  "r6-qm-trim/qtr2",
  "r7-qm-trim/qtr3",
  "r7-qm-trim/qtr4",
  "r6-rerun-blocks/tb3r",
  "r6-rerun-blocks/pb1r",
  "r5-qm-t2/qt1",
  "r5-qm-t2/qt2",
  "r4-qm-port/qm-1",
  "r4-confirm-p2-a/pa1",
  "r4-confirm-p2-b/pb3",
  "r3-gate-q/net2-report-a",
  "r3-gate-q/net2-report-b",
  "r3-gate-q/agg-report-a",
  "r6-arb/ar1",
  "r6-arb/ar2",
  "r6-arb/ar3"
 ],
 "cancel": [],
 "wake": {
  "batches": [
   "r6-confirm-qm-a",
   "r6-confirm-qm-b",
   "r6-qm-trim",
   "r7-qm-trim",
   "r6-rerun-blocks"
  ],
  "afterMinutes": 300
 },
 "finish": false
}
