# DISPATCH — Explorer 2 (Milestone M4: Assembly, Exports & E2E Test Strategy)

## Mission
Investigate and design the assembly pipeline and verification test suite for Milestone M4:
1. **Scene Master & Export Hierarchy**:
   - Inspect existing export targets in `06_Exports/` and `04_Assets/videos/`.
   - Map all 10 Scenes of Ep01: `ep01_scene01` to `ep01_scene10` (140 shots total).
   - Define exact output naming conventions for:
     * Raw Scene Masters: `04_Assets/videos/ep01_scene{NN}_master_v1.mp4`
     * Audio-Mastered Scene Masters: `06_Exports/ep01_scene{NN}_master_audio_v1.mp4`
     * Episode Feature Master: `06_Exports/ep01_full_feature_master_v1.mp4`
2. **E2E Test Architecture for Milestone M4 (`tests/test_production_pipeline_m4.py`)**:
   - Design automated tests that can execute in dry-run mode (using synthetic videos generated via FFmpeg `testsrc` + `sine` tones):
     * Test 1: Verify FFmpeg `filter_complex concat` preserves 100% AAC audio streams across multiple shots.
     * Test 2: Verify `audio_continuity_engine.py` loudnorm filter outputs audio conforming to EBU R128 (-14 LUFS ± 0.5, True Peak <= -1.0 dBTP).
     * Test 3: Verify Scene Gate validates scene masters before concatenation.
     * Test 4: Verify full episode assembly stitches all 10 scene masters into `06_Exports/ep01_full_feature_master_v1.mp4`.
     * Test 5: Verify negative tests (abort on missing scene, abort on unapproved scene, abort on missing audio stream).
3. **Draft Implementation Specification for Worker**:
   - Provide concrete drop-in code recipes for any missing or required helper functions in `production_orchestrator.py` and `audio_continuity_engine.py`.

## Mandatory Reading
- `c:\Projects\KieuStory\.agents\teamwork\ORIGINAL_REQUEST.md` (read completely first)
- `c:\Projects\KieuStory\.agents\teamwork\orchestrator_1\PROJECT.md`
- `c:\Projects\KieuStory\AGENTS.md`
- `c:\Projects\KieuStory\05_Production_Pipeline\audio_continuity_engine.py`

## Output
Write your findings and test specification to:
`c:\Projects\KieuStory\.agents\teamwork\explorer_m4_2\m4_assembly_test_blueprint.md`
and write your handoff report to:
`c:\Projects\KieuStory\.agents\teamwork\explorer_m4_2\handoff.md`.
Notify parent orchestrator when complete.


## 2026-10-09T07:45:04Z
[Message] sender=97faf5e5-a830-491c-b78c-2af12175badf priority=MESSAGE_PRIORITY_HIGH
You are Explorer 2 for Milestone M4 (Assembly, Exports & E2E Testing Strategy).

Your working directory is: c:\Projects\KieuStory\.agents\teamwork\explorer_m4_2

MANDATORY FIRST STEP:
Read c:\Projects\KieuStory\.agents\teamwork\ORIGINAL_REQUEST.md completely. Do not skip this.
Read c:\Projects\KieuStory\.agents\teamwork\orchestrator_1\PROJECT.md.
Read c:\Projects\KieuStory\.agents\teamwork\explorer_m4_2\DISPATCH.md.
Read AGENTS.md and 05_Production_Pipeline/audio_continuity_engine.py.

INVESTIGATION OBJECTIVES:
1. Export Directory & Naming Hierarchy:
   - Map all 10 Scenes of Ep01: ep01_scene01 to ep01_scene10 (140 shots total).
   - Define exact output paths: 04_Assets/videos/ for raw scene masters, 06_Exports/ for audio masters and episode feature master.
2. E2E Test Suite Architecture for M4 (tests/test_production_pipeline_m4.py):
   - Design automated tests executable in dry-run mode (< 30s):
     * Verify filter_complex concat retains AAC audio streams.
     * Verify loudnorm audio normalization achieves EBU R128 (-14 LUFS ± 0.5, TP <= -1.0 dBTP).
     * Verify Scene Gate pre-flight gating.
     * Verify multi-scene full episode assembly.
     * Negative test cases.
3. Deliver test specification and code recipes in c:\Projects\KieuStory\.agents\teamwork\explorer_m4_2\m4_assembly_test_blueprint.md and handoff report in c:\Projects\KieuStory\.agents\teamwork\explorer_m4_2\handoff.md.
4. Send message to parent orchestrator when complete.
