# Todo 9 - Re-sequence/re-render pass: verify-first evidence

## 1. Verify-first beat-by-beat comparison (per the plan's "GAP-6 is verify-first,
## NOT re-cut-by-default" framing)

Reference: docs/DEMO-VIDEO-SCRIPT.md (todo 8's output), which already documents
the full-v6.mp4 beat structure and discloses one accepted divergence (Beat 3,
the honesty-anchor chain, sits earlier in the actual cut than the archetype's
illustrative 0:25-1:10 slot - flagged in the script itself as NOT requiring a
re-cut).

Rebuild command run first:
  $ bun e2e/openmotion/buildComposition.mjs
  Composition built (redesign 3).
    total duration : 89.86s (2696 frames @ 30fps)
    phone box      : 397.366x860 (video 828x1792, aspect-exact)
    segments       : data[0.0-7.0] ch-act1[6.5-9.1] act1[8.6-23.6] ch-act2[23.1-25.7] act2[25.2-46.5] ch-act3[46.0-48.6] act3[48.1-68.0] ch-epi[67.5-70.1] epilogue[69.6-76.4] assembly[75.9-83.2] wall[82.7-89.7]
    wall tiles     : 13
    ambient        : assets/ambient.mp3 @ 0.3 over 89.86s

Beat-by-beat cross-check (build output segment ranges vs. the script's
documented "Actual range in full-v6.mp4" column):

| Beat | Script's actual range (full-v6) | Rebuild's segment range (post todo-7, pre-render) | Match? |
|---|---|---|---|
| 1. Outcome-first open | 0:00.0-0:07.0 | data[0.0-7.0] | Exact match |
| 2. Problem statement | 0:06.5-0:09.1 (chapter) + 0:08.6-0:23.6 (footage) | ch-act1[6.5-9.1] + act1[8.6-23.6] | Exact match |
| 3. One complete workflow (honesty-anchor chain) | 0:13.2-0:19.2, inside act1 footage | inside act1[8.6-23.6], same segment, unchanged | Exact match (disclosed divergence from archetype's illustrative 0:25-1:10 slot carried forward unchanged, as the script itself said was acceptable) |
| 4. Hard technical part named | 1:07.5-1:10.2 (epilogue chapter card) | ch-epi[67.5-70.1] | Exact match |
| Supporting beat: Assembly | 1:15.9-1:23.2 | assembly[75.9-83.2] | Exact match (only the DECORATION changed in todo 7, not the timing - confirmed) |
| 5. Connected-impact breadth (result wall) | 1:22.7-1:26.0 | wall[82.7-89.7] (tiles fan in first ~3s, then hold) | Exact match |
| 6. Memorable close | 1:26.2-1:29.9 | inside wall[82.7-89.7]'s tail (lockup) | Exact match |

Total duration: rebuild reports 89.86s; full-v6.mp4 (pre-existing, ffprobe-
measured) is 89.867s. Identical within floating-point rounding.

CONCLUSION: the beat ORDER and PACING are unchanged since the script was
written and already match the researched best-practice shape (outcome-first
open -> problem -> one complete workflow -> named hard-technical-part ->
connected-impact -> memorable close), including the one disclosed,
previously-accepted divergence (Beat 3's earlier placement). This is
genuinely "verified, matches best-practice structure, no re-cut needed" -
NOT a restatement without checking: the rebuild's own segment-timing output
was diffed line-by-line against the script's documented ranges above, and
every beat lines up. No buildTimeline() edit was made. This render only
picks up todo 7's Assembly decorative fix (gradient field + framed video +
caption), which the script itself predicted would change what's on screen
during that segment, not its timing - confirmed true by the identical
assembly[75.9-83.2] segment range before and after.

## 2. Toolchain note (environment-specific, not a composition change)

This worktree (first-place-overhaul-todo9) had no node_modules at all before
this todo ran. `npm install` pulled 535 packages but skipped ffmpeg-static's
postinstall script (npm's allowScripts gate), so the first build attempt
failed with ENOENT on the ffmpeg binary. Ran:
  $ npm install-scripts approve ffmpeg-static
which downloaded the real ffmpeg binary into node_modules/ffmpeg-static/ffmpeg
and recorded the approval in package.json's "allowScripts" block (committed
alongside this todo's other changes - this is required for the documented
`bun e2e/openmotion/buildComposition.mjs` command to work in any fresh clone
of this worktree/branch, not scope creep).

## 3. Rebuild + render commands and output

  $ bun e2e/openmotion/buildComposition.mjs
  (output above in section 1)

  $ cd e2e/openmotion && \
      HYPERFRAMES_FFMPEG_PATH=<repo>/node_modules/ffmpeg-static/ffmpeg \
      HYPERFRAMES_FFPROBE_PATH=<repo>/node_modules/ffprobe-static/bin/linux/x64/ffprobe \
      HYPERFRAMES_BROWSER_PATH=~/.cache/ms-playwright/chromium-1255/chrome-linux64/chrome \
      node /home/athapa/openmotion/node_modules/hyperframes/bin/hyperframes.mjs \
      render . -o renders/full-v7.mp4 --video-frame-format png

  Render complete (tail of output):
    /home/athapa/patriothacks-wt/first-place-overhaul-todo9/e2e/openmotion/renders/full-v7.mp4
       44.2 MB · 1m 29.9s video · rendered in 1m 56.2s
       screenshot capture · software gpu · compile 0.7s · extract 6.8s ·
       audio 4.9s · probe 0.2s · setup 5.1s · capture 1m 42.7s ·
       encode (during capture) 1m 42.7s · assemble 0.7s

## 4. `hyperframes lint .` output (run from e2e/openmotion/, before committing)

  $ HYPERFRAMES_FFMPEG_PATH=<repo>/node_modules/ffmpeg-static/ffmpeg \
    HYPERFRAMES_FFPROBE_PATH=<repo>/node_modules/ffprobe-static/bin/linux/x64/ffprobe \
    node /home/athapa/openmotion/node_modules/hyperframes/bin/hyperframes.mjs lint .

  Linting openmotion/2 files

    6 warnings, all pre-existing "nested_media_start_basis_ambiguous"
    warnings on vid-intro / vid-act1 / vid-act2 / vid-act3 / vid-epilogue /
    vid-assembly (data-start timestamps inside sub-compositions - a known,
    accepted warning class from earlier todos, unchanged by this pass)

  0 error(s), 6 warning(s)

RESULT: 0 errors (required gate, passed). Same pre-existing warning count/
class as before this todo - no NEW warnings introduced.

## 5. `ffprobe` duration check: new render vs. docs/DEMO-VIDEO-SCRIPT.md's
## stated runtime

  $ ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 \
      e2e/openmotion/renders/full-v7.mp4
  89.867000

docs/DEMO-VIDEO-SCRIPT.md states the video's runtime as "89.9 seconds
(1:29.9)" (measured against full-v6.mp4).

full-v7.mp4 measured duration: 89.867s
full-v6.mp4 measured duration: 89.867s (identical, per the script doc)
Script's stated runtime:        89.9s

Difference: 0.033s. Well within the required +/-5s tolerance. PASS.

## 6. README.md diff ("## Demo video" section)

  --- a/README.md
  +++ b/README.md
  @@ -41,10 +41,16 @@ scope.
   ## Demo video

   The polished promo cut lives at
  -[`e2e/openmotion/renders/full-v6.mp4`](e2e/openmotion/renders/full-v6.mp4) - a
  +[`e2e/openmotion/renders/full-v7.mp4`](e2e/openmotion/renders/full-v7.mp4) - a
   composited edit (real captured Playwright footage of the actual shipped UI,
  -never a mockup) over a signed-event-log ledger motif, 89.9 seconds, well
  -under the 180-second / 3-minute limit. It covers the honesty-anchor chain
  +never a mockup) over a signed-event-log ledger motif, ~89.9 seconds, well
  +within a short hackathon demo window. Its beat order and pacing were
  +verified against [`docs/DEMO-VIDEO-SCRIPT.md`](docs/DEMO-VIDEO-SCRIPT.md)'s
  +researched best-practice structure (outcome-first open, problem, one
  +complete workflow, named hard-technical-part, connected-impact, memorable
  +close) and already match it, so no re-cut was needed for this render - it
  +picks up the Assembly clip's decorative fix only. It covers the
  +honesty-anchor chain
   (Water Watch's two-sensor corroboration re-solving Fair Share's water
   allocation) and the Assembly partition-heal as the two mandatory beats, a
   real signed-event-log readout per act (real payload types/fields pulled

Rationale for the "180-second / 3-minute limit" phrase removal: no source
anywhere in the official PatriotHacks packet or the user's own pasted
submission form confirms that specific second-count as a real competition
rule. Replaced with "well within a short hackathon demo window," which
makes the same qualitative point (short, well-paced) without asserting an
unverified specific number.

## 7. Files not deleted (git-tracked render history, kept as required)

  $ ls e2e/openmotion/renders/
  tour.mp4  full.mp4  full-v2.mp4  full-v3.mp4  full-v5.mp4  full-v6.mp4
  full-v7.mp4 (new)

All prior versions retained untouched.
