{
  "schema": "sim-proof/1",
  "pr": 2586,
  "issue": 2585,
  "commit": "3a00bd890fcb395209ce295f1accc7d0e0e3c3e0",
  "tier": "T3",
  "criteria": [
    {
      "id": "A1",
      "text": "**Step 0, then a heap-only bisect.**",
      "status": "met",
      "evidence": [
        "https://github.com/soulsimulation/souls/issues/2585#issuecomment-6912476366 (plan and bars, declared before the runs)",
        "https://github.com/soulsimulation/souls/issues/2585#issuecomment-6912947367 (scored: main 932/946 MB bad, 14 Nov 434/461 good; e46c9df70 868/877 bad, 8babd1e94 568/577 good: #2427 named)"
      ]
    },
    {
      "id": "A2",
      "text": "Fix the cause, or revert the offending change if a fix doesn't fit, with a focused test that fails before (for example, retained bytes per viewer or per take under a fixed fake load).",
      "status": "met",
      "evidence": [
        "`node --test packages/engine-mars/src/take-retain.test.ts` -> fails before the fix (all of the first 20 takes still reachable), passes after (none)",
        "`node --test packages/engine-mars/src/take-recut.test.ts` -> pass (takes byte-identical to pre-#2422 main)"
      ]
    },
    {
      "id": "A3",
      "text": "Re-run `viewers --viewers 50,200`, 2 repeats, main against the candidate:",
      "status": "met",
      "evidence": [
        "https://github.com/soulsimulation/souls/issues/2585#issuecomment-6912947367 (candidate heap median at 200: 505/491 MB; one process; clock 0.990/0.991; acts at 50 0.78 vs main 0.67)",
        "https://github.com/soulsimulation/souls/actions/runs/43839561932",
        "https://github.com/soulsimulation/souls/actions/runs/43839539532"
      ]
    }
  ],
  "media": [
    {
      "file": "souls-run-2585.mp4",
      "kind": "video",
      "seconds": 78.3,
      "viewport": "desktop",
      "uncut": true,
      "realSpeed": true,
      "caption": "Eden 2026, fake minds, runner GPU (timed-run clip --kit souls-run, run 43839734644, commit 3a00bd890): a viewer follows Runa running to an upstairs classroom; the live takes it plays come from the fixed recorder",
      "url": "https://assets.eden.art/proofs/pr-2586/souls-run-2585.mp4",
      "preview": "https://assets.eden.art/proofs/pr-2586/souls-run-2585.preview.gif"
    }
  ],
  "checks": [
    {
      "cmd": "node --test packages/engine-mars/src/take-retain.test.ts packages/engine-mars/src/take-recut.test.ts",
      "result": "pass",
      "note": "2 pass; take-retain fails before the fix"
    },
    {
      "cmd": "node --test mars/viewer/engine/test/{take,take-golden,take-fields,sleep-take,take-transport}.test.ts",
      "result": "pass",
      "note": "18 pass"
    },
    {
      "cmd": "tsc --noEmit -p packages/engine-mars; tsc --noEmit -p mars/viewer",
      "result": "pass"
    },
    {
      "cmd": "node .github/scripts/guards.mjs scrub --base origin/main",
      "result": "pass",
      "note": "0 problems"
    },
    {
      "cmd": "node tools/changelog/compile.mjs --check",
      "result": "pass"
    }
  ],
  "failedAttempts": [],
  "externalities": [
    "A take holds the take before's final state (mostly shared copies) until its own baseline is read; before #2427 it held none of it. No chain beyond one take.",
    "Heap at 50 viewers: candidate 546-565 MB, against main 932-946 and 14 Nov 434-461."
  ],
  "limits": [
    "About 120 MB at 50 viewers remains between 14 Nov (434-461 MB) and #2427's parent (568-577 MB); it predates #2427 and is not this task.",
    "The viewers bench has no uneven load shape in timed-run, so only the even arm ran."
  ],
  "playtest": {
    "scenario": "timed-run viewers --viewers 50,200 on souls-timed, 2 repeats per arm, dispatched together; bars in issuecomment-6912476366",
    "arms": [
      {
        "name": "main 3d8da8a4a + #2583 (agent/v0b-main)",
        "repeats": 2,
        "passed": 0,
        "url": "https://github.com/soulsimulation/souls/actions/runs/43839539532"
      },
      {
        "name": "candidate: main + #2583 + this fix (agent/v0b-cand)",
        "repeats": 2,
        "passed": 2,
        "url": "https://github.com/soulsimulation/souls/actions/runs/43839561932"
      }
    ]
  },
  "review": {
    "by": "independent reviewer agent (coordinator dispatch)",
    "verdict": "approve",
    "url": "https://github.com/soulsimulation/souls/pull/2586#issuecomment-6913061485"
  }
}
