{
  "notes": "Credit: Taylor (gtmcknight), github.com/gtmcknight/amm-sim@4812a6382311624e1506aca131ca35c378f930d9, research/solved.\n\nEPISODE3 FACTS: Read all pinned inputs and b02 reports. Trunk https://github.com/identity-md-launches/goal-3178-build-shared-evaluation-kit.git at57ce0df30e24784fb9d0537de55e5b7f8521ecd7. Plane shows e02 merged/5 accepted, but ammfast explicitly delivered no code/tests/parity/benchmarks after infrastructure failure. No ammfast or replica banks to depend on. All other e02 items delivered. 7/20 items used,13 available; episodes3,4,5. No active work, refusals or requester notes.\n\nREAD EVIDENCE: engine-bank completed512 qt1 rows9700000..9700511, with per-seed gas and unrounded audit;16 unit tests pass, five exact real reruns, zero native errors. qt1 compile13.902s, initial seed simulation6.400s; Vanilla candidate integration1.354s. Engine bank SHA256 f1031aae649d2ad8e871ee1cc055770a4c6b329ff3e71afb4500fca3c8621f90. Native singleton calls use worker8, reset per-seed gas, exclude initialization/Baseline gas. Config48-field equality uses construction only. Preserve bank absent a concrete defect.\nHA bank2048 rows from explicit kind==HA and seed in Taylor calibration; source SHA fdf24c7aa2b604d770336a5783276da8ed4d50bca9dbcc02e98b4da58f608d26, bank09719da22be28598e9c1d0bb1eb935d7b0b4eeafef3321e0fabe4f3ec9e2b7a9. 15 tests pass, every2048 value checked against source. Historical generation runtime unknown.\nScore delivered35 passing fixture/spy tests and CLI, no live backend integration; candidate identity may differ from baseline. It validates explicit backend/metric but cannot certify all market/runtime provenance. Do not introduce an incompatible universal fingerprint or require policy names to match.\nFoundation read-only audit covered ONLY4a02cd145745a9d1c45d2ca8d669b650dce619f8:35 envelopes and17 Taylor originals verified, GateP real/cache passed,24 GateP tests and24/25 setup tests (macOS execution skipped). GateP~8.34s fresh/.31s cached. Two reproducible defects: D1 deadline not enforced during cached hashes/fetch-only/long child/final success (warm --deadline1 exited0 after1.573s; fetch-only --deadline0 exited0 after.609s). D2 engine->replica env sourcing leaves engine-only task settings. No fixes applied. Existing README/contracts/reference status is stale. None of these checks certify missing ammfast.\n\nPUBLIC SOURCE REVIEW: verified current setup_fast.sh, docs/contracts.md, bootstrap/verify_env.py, docs/setup.md and score.py at the trunk raw URL; script still unconditionally invokes uname despite explicit --platform. This conflicts with the no-host-inspection rule: do not run it unchanged. Setup worker removes probe. Other workers cannot see that patch: copy installer+bootstrap into scratch and change only the probe assignment to the declared platform; preserve pins/hash checks. This runtime aid does not certify the original installer. Source: https://raw.githubusercontent.com/identity-md-launches/goal-3178-build-shared-evaluation-kit/57ce0df30e24784fb9d0537de55e5b7f8521ecd7/setup_fast.sh\n\nREPLICA RECOVERY: public numba-rng artifact contains usable fastsim.py, already committed in reference envelopes (SHA4d3d2187b5dcbcd979a0775e431d30421b0e376d3c582afc60fbb4d6a052596b); do not rewrite kernel. Earlier artifact reported baseline max~1.2e-11 but used1e-6 gate, NOT our acceptance. Reproduce1e-9. Do not execute archived driver: it unconditionally imports absent head/head8 even for parity. Port preserves CPython3.12 compensated summation and pre-clamp residual correction. 18-weight residual hook is an interface, not permission to invent trained weights. Head zero==COMBO, validate nonzero against transparent CPython equivalent.\nOne item owns replica API/generator/banks, matching the earlier engine-bank pattern. This leaves two episodes for integration/publication. Benchmark first, reuse verified kernel, bounded concurrency only if beneficial; report one-worker throughput separately. First64 of each bank are valid spot samples under objective: parity384 also checks two windows, so only192 additional CPython runs are needed,576 distinct checks total, instead of960. Nine full banks total12288 rows. Evidence schema is shared with validator via both briefs: baselines/replica/validation.json _credit,complete,bindings relative-path->sha256 covering code/reference inventory/banks,gates384,spots576; each comparison policy,seed,cpython_edge,ammfast_edge,abs_error; timings runs_per_second_per_core per policy and cold_jit_seconds. No evidence self-hash cycle. Full values for errors; .6f only bank serialization. If measured55min cannot fit, worker prioritizes verified API/gates, exports honest coverage and resumable generator; missing data is NOT accepted as goal completion.\n\nDECISION: one code wave e03-recovery with4 disjoint items: replica-kit, setup-repair, score-integration, kit-validator. After dispatch11/20 used,9 remain. No other code wave now: e01 proved concurrent spawn is REFUSED, not queued. Read all4; wake on merged batch with1440min fallback (plane scheduling, no local wait). cancel empty, finish false. Setup fixes runtime code/tests/docs only, preserves manifest/pins. Score item benchmarks real Vanilla then checks128-seed worse stop with no later execution; short qt1 subset avoids an800s sequential128-qt1 command. Validator builds stdlib structural/hash checks, requires all14848 bank rows and384/576 replica evidence, tests negative fixtures. Its real run on starting trunk MUST fail for missing replica files; it cannot certify simultaneous work. Preserve engine/HA banks. Commands<=470s, scratch state/cache only, no machine diagnostics. macOS execution unverified.\n\nEPISODE4 PLAN: inspect actual merged files/reports, not accepted counters. If replica complete and setup/scorer tests pass, run ONE wave with two independent items: (1) publication docs only (README.md, docs/contracts.md, docs/reference.md as needed) uses actual e03 merged payload commit, explains pieces/exact bounded commands, all source and11 bank raw URLs at that commit, measured rates/limits; (2) scope[] independent payload audit starting at same e03 commit. Audit must run new validator against full merged payload, all suites, setup cold/cached/offline and D1/D2 regressions, GateP fresh/cache, bounded real replica parity/spot checks, engine validator, HA exporter --check, real replica+engine scorer early-stop/execution counts. No assertions about concurrently edited docs. Verify source/evidence digests match and source bundle has no runtime state; macOS untested explicitly. Candidate-vs-rounded-baseline differences can be ~5e-7 even for identical policy; do not require exact zero. Published banks are screening aids, no holdout claims.\nIf e03 replica partial, use measured rates to shard ONLY missing windows/policies in e04 after API gate passes, with fresh complete validation; no same-wave kernel changes under bank generators. Add narrowly scoped repairs only for real findings. If sources change, invalidate bound bank/evidence and regenerate as necessary. Never claim audit covered unseen patches.\n\nEPISODE5: inspect publication/audit and actual new trunk commit. Finish only with required code, all banks, passing substantive checks and final README raw links. A README cannot contain its own commit hash: accepted design is docs-only successor pointing to actual sealed e03 payload; final write-up names actual docs/trunk pin AND payload pin. If payload changes in e04, refresh publication with its real commit and ensure audit covers it; never guess hashes or mark pending work done. Preserve remaining budget for concrete repairs; if max episodes force closure enumerate any missing work. No requester input is missing.",
  "spawn": [
    {
      "name": "e03-recovery",
      "mode": "code",
      "brief": "Credit Taylor (gtmcknight), amm-sim@4812a6382311624e1506aca131ca35c378f930d9 research/solved in every header; JSON first _credit. One scoped code item. Benchmark FIRST; total<=55min, each command<=470s; checkpoint/resume in scratch/. No host/home inspection, secrets, tuning, Rust or changed pins. Engine seeds only9700000..9700511, screening only. {{setup}}\n{{task}}{{task2}}{{task3}}\nResult: paths/hashes, commands, test totals, timings, exact complete/missing coverage, failures, limitations and resume; no claims about unseen parallel changes.",
      "items": [
        {
          "key": "replica-kit",
          "scope": [
            "ammfast/**",
            "baselines/replica/**",
            "tests/test_ammfast.py",
            "tests/test_replica_banks.py",
            "docs/ammfast.md",
            "docs/replica-banks.md"
          ],
          "vars": {
            "setup": "Copy setup_fast.sh and bootstrap/ to scratch/bootstrap-copy/. In the COPY replace the sole literal HOST_HAVE=$(uname -sm) by HOST_HAVE=$HOST_WANT; retain SHA checks and record this temporary delta. Run copy with --platform linux-x86_64 --cache \"$PWD/scratch/cache\" --scratch \"$PWD/scratch\" (replica: --replica-only); source scratch/env.sh. Materialize: python3 -B reference/materialize.py --out scratch/reference. Never run the original host probe or archived driver.",
            "task": "Recover replica backend and banks; prior item delivered no code. Reuse verified numba/fastsim.py envelopes. Follow docs/contracts.md: ammfast.run(seed,policy,head_params=None), run_batch ordered/duplicates/empty, finite unrounded edges, IDs qt1-ref/TwoComp/COMBO. One compiled whole-run call includes RNG/market/callbacks, default10000 steps, no Python per-trade dispatch. COMBO residual: document/validate18 finite weights; zero equals COMBO; test nonzero vs transparent CPython equivalent. No trained weights invented; preserve compensated sums/pre-clamp correction.\nBenchmark CPython and cold/warm full runs for all3; size chunks/concurrency to fit. Gate384 pairs: all3 x10000..10063+64000..64063 vs actual CPython replica2, abs error<=1e-9, unrounded; isolate policy state.\nAfter gate PASS generate all3 x inclusive60000..61023,64000..65023,10000..12047: nine ",
            "task2": "baselines/replica/{policy}-{start}-{end}.json,12288 rows, contract schema, .6f only at serialization. Check first64 of EACH bank vs CPython<=1e-9; reuse matching gates (576 distinct comparisons total). Bind checkpoints to code/reference/runtime digests; reject stale state.\nDeliver generator/validator, tests/docs and baselines/replica/validation.json with _credit, complete boolean, bindings {repo-relative path:sha256} covering implementation/reference inventory/all banks; gates384 and spots576 arrays of {policy,seed,cpython_edge,ammfast_edge,abs_error}; timings {runs_per_second_per_core:{policy:number},cold_jit_seconds:number}. Rates are single-worker end-to-end. No self-hash cycle. Test real score.py replica adapter with bank data, without editing scorer.\nPrioritize API/gates then banks. If budget cannot fit all, deliver exact coverage and resumable generator; no false completion or ",
            "task3": "substitutes. macOS execution unverified unless tested."
          }
        },
        {
          "key": "setup-repair",
          "scope": [
            "setup_fast.sh",
            "bootstrap/deadline.sh",
            "tests/test_setup_fast.py",
            "tests/test_setup_deadline.py",
            "docs/setup.md"
          ],
          "vars": {
            "setup": "Benchmark reference materialization first. Before any installer execution remove its unconditional host probe in scope; explicit --platform selects artifacts, executable failure can reject an incompatible runtime. Test only scratch caches and runtimes. Never call uname/platform.machine or inspect the surrounding machine.",
            "task": "Repair the existing installer, preserving all bootstrap pins/manifest bytes and download verification. Audit at foundation4a02cd145745a9d1c45d2ca8d669b650dce619f8 reproduced:\nD1: warm replica setup --offline --deadline 1 exited0 after1.573s; warm --offline --fetch-only --deadline 0 exited0 after0.609s. Deadline checks miss cache hashing/fetch-only/final success; extraction, pip, verify and smokes lack remaining-time bounds.\nD2: sourcing engine env.sh then replica env.sh retains IMD_AMM_ENGINE, IMD_AMM_HARNESS and SOLCX_BINARY_PATH.\nFix D1 with an overall deadline/watchdog covering cached paths and every child, exit75/resume hint on expiry, kill/reap only owned children without process discovery, atomic resumable state and no success after expiry. Preserve Linux and macOS replica bootstrap without GNU-timeout-only dependencies or new unpinned downloads; bootstrap/deadline.sh is available ",
            "task2": "if needed. Test zero deadline, delayed cached hashing/fetch-only, interrupted install/verify, descendant cleanup via scratch markers, resumption and unexpired success. Use short deterministic delays.\nFix D2 by clearing engine-only settings in generated replica env; test sequential sourcing using fabricated task values without dumping ambient environment.\nRemove unconditional uname inspection and update its tests/docs; selected-platform metadata suffices. Inspect tests statically before execution, replacing host-probe-based skips with explicit test platform inputs. Retain unsupported macOS engine rejection, no Rust, default user cache, cold/cached/offline timings, SHA corruption/missing-cache tests. Run real Linux cold/cached/offline replica and engine setup, bounded existing suites, GateP fresh/cache; disclose macOS execution untested if so. Source/data/compiler/wheel pins may not ",
            "task3": "change. Record reproductions, fixes and exact final suite totals in docs/setup.md and result."
          }
        },
        {
          "key": "score-integration",
          "scope": [
            "score.py",
            "tests/test_score.py",
            "tests/test_score_integration.py",
            "docs/score.md"
          ],
          "vars": {
            "setup": "Copy setup_fast.sh and bootstrap/ to scratch/bootstrap-copy/. In the COPY replace the sole literal HOST_HAVE=$(uname -sm) by HOST_HAVE=$HOST_WANT; retain SHA checks and record this temporary delta. Run copy with --platform linux-x86_64 --cache \"$PWD/scratch/cache\" --scratch \"$PWD/scratch\" (replica: --replica-only); source scratch/env.sh. Materialize: python3 -B reference/materialize.py --out scratch/reference. Never run the original host probe or archived driver.",
            "task": "Complete real engine integration of the paired scorer; existing 35 tests used spies only. Read committed engine_eval.py, engine bank/provenance and docs. Benchmark pinned Vanilla candidate on one allowed seed first. Build candidate from pinned VanillaStrategy source, changing only the required contract name; preserve hash/source trace. Score its real next128 seeds against qt1 bank and assert emitted {n,mean_diff,se,worst5}, sample SE, strict mean+3se<0 stop and zero requests for later rounds. Instrument calls without replacing computed edges. If projection exceeds400s, use bounded resumable collection and explicitly distinguish offline replay from live128 integration.\nCheck qt1 on a small actual bank subset (at most8 seeds) against unrounded audit values and six-decimal rows; keep each call below budget. Exercise above-bar and exact-boundary cases with existing tests and real saved rows ",
            "task2": "where appropriate. No expensive qt1 128-seed sequential command.\nFix only reproduced scorer integration defects; add a real optional integration test command, preserve default stdlib suite, ordering/duplicate/missing/nonfinite rejection, n<2, policy names allowed to differ, strict thresholds and requested-only calls. Document real source/adapter hashes, runtime provenance and remaining compatibility limits; no new mandatory fingerprint incompatible with existing banks. Do not edit engine_eval.py, banks or foundation.\nNo ammfast exists in starting trunk; do not claim simultaneous replica work tested. Expose a later real replica integration check using public API and specified bank paths if useful, explicitly unrun now. Keep coverage report honest: live calls vs fixtures vs replay, exact seeds, counts and every failure. Engine/HA data remain unchanged.",
            "task3": ""
          }
        },
        {
          "key": "kit-validator",
          "scope": [
            "validate_kit.py",
            "tests/test_validate_kit.py",
            "docs/validation.md"
          ],
          "vars": {
            "setup": "This item is stdlib/offline: no installer or simulator needed. Benchmark parsing/hashing committed engine+HA banks first. Do not import unseen parallel implementations.",
            "task": "Build one reproducible whole-kit structural/provenance validator for the final merged tree. Standard-library CLI, deterministic JSON findings/nonzero on missing or invalid required evidence, no downloads or simulations. Read existing reference inventory, engine bank/audit/validation, HA export and docs/contracts.md.\nRequire ammfast API sources, score.py, setup_fast.sh, gatep.py; nine baselines/replica/{policy}-{start}-{end}.json for qt1-ref,TwoComp,COMBO x60000..61023,64000..65023,10000..12047 (12288 rows), HA2048 and engine512 (total14848). Check exact sorted unique ranges/policy/backend, finite .6f strings, first _credit with Taylor/full pin; reject duplicate JSON keys and nonfinite numbers. Verify available source/bank hashes, engine qt1/wheel/config/gas provenance against actual committed evidence, all engine gas nonnegative integer and error counters zero, and HA source mapping by ",
            "task2": "explicit kind/seed. Audit files are evidence, not extra banks.\nReplica worker contract: baselines/replica/validation.json has _credit, complete, bindings {repo-relative path:sha256} for implementation/reference inventory/all nine banks, gates and spots arrays of {policy,seed,cpython_edge,ammfast_edge,abs_error}; gates384 exactly all3 x10000..10063+64000..64063, spots576 exactly all3 xfirst64 of each required window. Recompute errors<=1e-9 from full values; compare spot bank formatting, reject changed bindings or path escape. Expect timings {runs_per_second_per_core:{policy:number},cold_jit_seconds:number}, finite positive rates and nonnegative JIT; no speed threshold. No self-hash cycle.\nAdd adversarial fixture tests incl missing bank/row, stale digest, invalid evidence and boundaries. Make all temporary fixture/runtime writes under scratch/. Running on starting trunk MUST report ",
            "task3": "missing ammfast/banks honestly; pass only fixture tests and existing-part checks now. Full PASS waits for merged wave. Document exact validation commands, scientific-check limits and future actual simulator integration commands; never certify concurrently authored code or treat structural checks as independent parity proof."
          }
        }
      ],
      "output": {
        "format": "markdown",
        "maxBytes": 16000
      }
    }
  ],
  "read": [
    "e03-recovery/replica-kit",
    "e03-recovery/setup-repair",
    "e03-recovery/score-integration",
    "e03-recovery/kit-validator"
  ],
  "cancel": [],
  "wake": {
    "batches": [
      "e03-recovery"
    ],
    "afterMinutes": 1440
  },
  "finish": false
}
