@@ -23,10 +23,6 @@ This file tracks implementation work derived from specs that do not yet have a c
2323- SPEC-180 XCI Title Intake
2424- SPEC-190 Video-Based Validation
2525- SPEC-200 DKCR HD First-Level Milestone (macOS/aarch64)
26- - SPEC-210 Automated Recompilation Loop
27- - SPEC-220 Input Replay and Interaction Scripts
28- - SPEC-230 Reference Media Normalization
29- - SPEC-240 Validation Orchestration and Triage
3026
3127## SPEC-000: Project Charter and Ethics
3228Outcome
@@ -299,20 +295,13 @@ Exit criteria (from SPEC-180)
299295Outcome
300296- Validate the recompiled output against a reference gameplay video without emulator traces.
301297
302- Note
303- - DKCR validation is paused until the automation loop, input replay, and normalization specs land (SPEC-210/220/230/240).
304-
305298Work items
306299- [x] Define a reference timeline for the first level and store it in ` reference_video.toml ` .
307300- [x] Implement a capture workflow for macOS/aarch64 runtime output.
308301- [x] Add a comparison step that computes video and audio similarity metrics.
309302- [x] Generate a ` validation-report.json ` with pass/fail and drift summaries.
310303- [x] Document manual review steps for mismatches.
311304
312- External prerequisites (see ` docs/dkcr-validation-prereqs.md ` )
313- - Absolute paths to reference and capture artifacts (video or hashes).
314- - Confirmed first-level start and end timecodes.
315-
316305Exit criteria (from SPEC-190)
317306- A single run produces a validation report for the first level.
318307- Similarity metrics are stable across two consecutive runs.
@@ -322,80 +311,97 @@ Exit criteria (from SPEC-190)
322311Outcome
323312- Produce a macOS/aarch64 static recompilation of DKCR HD that reaches and plays the first level.
324313
325- Note
326- - DKCR validation is paused until SPEC-210/220/230/240 are implemented.
327-
328314Work items
329315- [x] Complete XCI intake for the DKCR HD title (SPEC-180 inputs and outputs).
330316- [x] Identify required OS services and implement or stub them in the runtime.
331317- [x] Implement the minimal GPU translation path needed for the first level.
332318- [x] Create a per-title config and patch set for DKCR HD.
333319- [x] Run video-based validation against the first level (SPEC-190).
334320
335- External prerequisites (see ` docs/dkcr-validation-prereqs.md ` )
336- - Absolute paths to DKCR reference and capture artifacts.
337- - Confirmed first-level start and end timecodes.
338-
339321Exit criteria (from SPEC-200)
340322- The macOS/aarch64 build boots and reaches the first playable level.
341323- First-level gameplay matches the reference video within defined tolerances.
342324- No proprietary assets or keys are stored in the repo or build outputs.
343325
344- ## SPEC-210: Automated Recompilation Loop
345- Outcome
346- - Provide a one-command automation loop for intake, build, capture, and validation.
347-
348- Work items
349- - [x] Define ` automation.toml ` schema and validator.
350- - [x] Implement an orchestrator CLI that runs intake -> lift -> build -> run -> capture -> validate.
351- - [x] Emit a deterministic ` run-manifest.json ` with step timings and artifact hashes.
352- - [x] Add resume/caching logic keyed by input hashes.
353- - [x] Add integration tests using non-proprietary fixtures.
354-
355- Exit criteria (from SPEC-210)
356- - One command runs the full loop and produces a run manifest and validation report.
357- - Re-running with identical inputs yields identical artifacts.
358- - Proprietary assets remain external.
359-
360- ## SPEC-220: Input Replay and Interaction Scripts
361- Outcome
362- - Deterministic input playback aligned to reference timelines.
363-
364- Work items
365- - [x] Define ` input_script.toml ` schema with events and markers.
366- - [x] Implement input script loader and runtime playback module.
367- - [x] Add tools/tests for deterministic playback and alignment.
368- - [x] Document authoring and replay workflows.
369-
370- Exit criteria (from SPEC-220)
371- - Input scripts replay deterministically across two runs.
372- - Playback order is stable for simultaneous events.
373- - Markers align to reference timecodes.
374-
375- ## SPEC-230: Reference Media Normalization
376- Outcome
377- - Normalize reference video/audio into a canonical, comparable format.
378-
379- Work items
380- - [x] Define canonical reference profile (resolution, fps, audio).
381- - [x] Implement normalization workflow and metadata capture.
382- - [x] Update ` reference_video.toml ` schema to record normalization details.
383- - [x] Add hash generation tests for normalized outputs.
384-
385- Exit criteria (from SPEC-230)
386- - Reference media can be normalized deterministically.
387- - Hashes for normalized outputs are stable across runs.
388-
389- ## SPEC-240: Validation Orchestration and Triage
390- Outcome
391- - Automated validation with structured reports and triage summaries.
392-
393- Work items
394- - [x] Define ` validation-config.toml ` and report schema extensions.
395- - [x] Implement triage summary generation (drift, likely causes).
396- - [x] Integrate validation orchestration into the automation loop.
397- - [x] Add tests for report determinism and failure summaries.
398-
399- Exit criteria (from SPEC-240)
400- - Validation runs emit deterministic reports and triage summaries.
401- - Failures include actionable context and artifact references.
326+ ## Future Work Notes: DKCR HD Video Validation (SPEC-190/200)
327+ Requirements to finalize:
328+ - Define the capture spec (resolution, fps, constant frame rate, audio rate/bit depth/channels, container/codec).
329+ - Define alignment parameters (search window, pre-roll, min match window, segment length).
330+ - Document drift thresholds for video metrics and audio correlation with pass/warn/fail tiers.
331+ - Capture runtime configuration (performance mode, GPU backend, resolution scale, frame pacing, input map).
332+ - Record hashes for XCI intake outputs, module.json, manifest.json, and bundle manifest.
333+ - Record tool versions (recomp-cli, ffmpeg, capture tooling) per validation run.
334+ - Track each run with a validation artifact index and store reports under a dated output root.
335+ - Record host metadata (hardware model, OS version, GPU driver/toolchain versions).
336+
337+ Required per-run metadata (external):
338+ - Run id, start/end timestamps, duration, and title/config identifiers.
339+ - Git commit hash, build manifest hash, bundle manifest hash, and intake output hash.
340+ - Runtime config snapshot and capture config snapshot with absolute paths.
341+ - Alignment parameters and similarity thresholds used for the run.
342+
343+ Validation artifact index fields (external):
344+ - Paths and sha256 hashes for reference capture, recompiled capture, and alignment outputs.
345+ - Paths and sha256 hashes for reports, summary json, and run logs.
346+ - Pointers to the run metadata record and per-stage timing summary.
347+
348+ Artifact paths and naming (external only):
349+ - Reference captures: ` /Volumes/External/validation/dkcr-hd/reference/YYYY-MM-DD/ ` .
350+ - Recompiled captures: ` /Volumes/External/validation/dkcr-hd/recompiled/YYYY-MM-DD/ ` .
351+ - Alignment outputs: ` /Volumes/External/validation/dkcr-hd/alignment/YYYY-MM-DD/ ` .
352+ - Reports: ` /Volumes/External/validation/dkcr-hd/reports/YYYY-MM-DD/validation-report.json ` .
353+ - Run metadata: ` /Volumes/External/validation/dkcr-hd/runs/YYYY-MM-DD/run.json ` .
354+ - Artifact index: ` /Volumes/External/validation/dkcr-hd/index/YYYY-MM-DD/run-index.json ` .
355+ - Provenance entries should include the external paths and file hashes.
356+
357+ Timeline checklist (per validation run):
358+ - Day 0: capture reference footage and compute hashes.
359+ - Day 1: capture recompiled footage under matching settings.
360+ - Day 1-2: run alignment + metric generation, record drift windows.
361+ - Day 2: manual review of flagged windows and finalize report.
362+ - Day 3: summarize deltas and file follow-up issues.
363+
364+ ## Future Work Notes: Automation Ideas (Local + Cloud)
365+ Local automation ideas:
366+ - A ` scripts/run_recomp_pipeline.sh ` wrapper that runs intake, lift, pipeline, build, and validation
367+ with consistent logging and a summary JSON.
368+ - Cache build artifacts under ` out/ ` with per-run timestamps and a manifest index.
369+ - Emit a single ` run.log ` plus ` summary.json ` so automation can surface failures quickly.
370+ - Add a ` run.json ` manifest with input hashes, config paths, tool versions, and stage timings.
371+ - Support ` --resume ` to reuse intake/lift outputs and ` --clean ` to purge temp outputs.
372+ - Create per-run working directories named ` runs/YYYYMMDD-HHMMSS-shortsha/ ` .
373+
374+ Cloud automation ideas:
375+ - Containerize the pipeline (Rust toolchain + hactool/hactoolnet + ffmpeg).
376+ - Use object storage for XCI intake outputs, validation artifacts, and reports.
377+ - Inject key material via a secrets manager; never write keys to persistent storage.
378+ - Run jobs on ephemeral workers with a per-run working directory and explicit cleanup.
379+ - Record container image digests and worker hardware profiles in run metadata.
380+ - Add artifact retention rules and a nightly prune job for stale runs.
381+
382+ Agent-driven pipeline flow (candidate):
383+ 1 . Intake: validate provenance, run XCI extraction, emit module/manifest.
384+ 2 . Lift: decode and emit lifted module and segments.
385+ 3 . Build: run ` recomp-cli run ` , build emitted project, package bundle.
386+ 4 . Validate: capture and align video, run ` recomp-validation ` , emit report.
387+ 5 . Report: upload artifacts, summarize pass/fail and drift windows.
388+ 6 . Archive: write run metadata and validation artifact index entries.
389+
390+ Dependencies to document:
391+ - Rust toolchain, ` cargo ` , ` nix ` (optional dev shell).
392+ - ` hactool ` or ` hactoolnet ` for XCI extraction.
393+ - ` ffmpeg ` for capture and alignment steps.
394+ - Storage and logging backends for automation outputs.
395+ - Capture tooling and codec requirements for the validation pipeline.
396+
397+ ## Future Work Notes: Automation/Docs Backlog
398+ Automation requests:
399+ - XciExtractor helper that wraps tool discovery, key validation, Program NCA selection, and deterministic output layout.
400+ - Validation artifacts index generator that emits a single JSON with paths, hashes, and run metadata pointers.
401+ - Playback comparison tooling that produces side-by-side video with timecode overlays and drift markers.
402+ - Run registry that aggregates per-run summary.json files into a searchable index.
403+
404+ Documentation requests:
405+ - XciExtractor usage and key-handling guidance with expected output layout.
406+ - Validation artifact index schema and example run metadata record.
407+ - Playback comparison workflow with expected inputs and review checklist.
0 commit comments