1 # FriiDump Native Report Requirements for the Compatibility Database
3 **Document version:** 1.0
4 **Target database baseline:** FriiDump Compatibility Database v1.2.0
5 **Audience:** FriiDump developers and maintainers
6 **Purpose:** Define the machine-readable evidence FriiDump must produce for future compatibility testing.
12 FriiDump must produce a self-contained JSON report for each test execution so that the compatibility database can preserve the exact drive, firmware, media, result, provenance, and measured performance of that run.
14 The report is evidence only. It must not claim or directly change a public compatibility status. Public compatibility assessments remain curated separately and may only become report-backed after an administrator accepts and links the report to the exact firmware and platform scope.
16 The current interchange schema is:
19 friidump-test-result.v1
22 The preferred filename suffix is:
30 ## 2. Required output behavior
32 For database-compatible operation, FriiDump must be able to emit **one report per execution**. Native reporting requires exactly one primary dump output; combined raw and ISO output is rejected so `dump.output_path`, byte count, hashes, and the `dump_output` artifact remain unambiguous.
34 A report represents exactly:
36 - one FriiDump invocation;
37 - one physical or emulated drive;
38 - one live firmware identity;
39 - one disc or diagnostic media state;
42 FriiDump must not place multiple runs inside one JSON document. Batch submission is performed by selecting multiple individual report files.
44 Native report generation is enabled by default for normal dump invocations. Without a report option, FriiDump writes the report beside the final FriiDump log and derives the filename from that log filename by replacing the final `.log` suffix with `.friidump.json`.
46 The command-line overrides are:
49 --report-json <file> Override the complete report pathname.
50 --report-dir <directory> Override only the destination directory.
51 --firmware-modified <note> Declare modified firmware and record the explanation.
54 `--report-json` and `--report-dir` may be combined. When combined, the filename from `--report-json` is retained while `--report-dir` replaces its directory. When `--firmware-modified` is omitted, stock firmware is assumed. FriiDump must not infer modified firmware from the selected drive profile.
56 The report should be written automatically when the run reaches a final state, including:
58 - successful complete dump;
60 - seed-retrieval failure;
61 - dump failure after successful seed retrieval;
62 - no-media diagnostic;
63 - wrong-media diagnostic;
64 - media-transition diagnostic;
65 - user cancellation or another interrupted run when enough state exists to describe it honestly.
67 An interrupted run must not be reported as successful.
69 ### Recommended write behavior
71 The final report should be written atomically:
73 1. Write the complete JSON to a temporary file.
74 2. Flush and close it.
75 3. Rename it to the final `.friidump.json` name.
77 This prevents an incomplete JSON file from appearing to be a finished report.
81 ## 3. Root format identity
83 Every report must contain this exact identity:
87 "schema": "friidump-test-result.v1",
89 "name": "FriiDump Interchange Format",
91 "serialization": "json"
96 The JSON document must be UTF-8.
98 The schema is strict. Unknown root fields and unknown fields inside defined objects are rejected. Compatible future additions require coordinated schema work; FriiDump must not add arbitrary fields to generation 1 reports.
102 ## 4. Required root objects
104 Every report must contain all of these root fields:
123 Fields that do not apply must still be present with an appropriate `null`, `false`, `not_attempted`, or `not_applicable` value.
127 ## 5. Run identity and timestamps
131 `run.run_id` must be a UUID generated once for the execution.
135 - Generate it at or before the start of the run.
136 - Preserve it throughout the run.
137 - A retry is a new run and receives a new UUID.
138 - Re-exporting the exact same stored run must preserve the original UUID.
139 - Never reuse a UUID for different report content.
141 The database uses the run UUID as part of duplicate and conflict detection. Reusing a UUID with changed content creates a review conflict.
145 All timestamps must be ISO-8601 UTC timestamps, preferably with a `Z` suffix.
153 For a native FriiDump run:
155 - `run.started_utc` should record the authoritative execution start time.
156 - `run.completed_utc` should record the authoritative final-state time.
157 - `generated_utc` records when the JSON report was generated.
158 - `completed_utc` must not precede `started_utc`.
159 - If a timestamp genuinely cannot be known, use `null`; do not invent one.
161 A reconstructed historical report may have unknown run timestamps, but native FriiDump should normally provide both.
165 ## 6. Generator identity
167 FriiDump must record the exact executable identity:
172 "version": "0.5.3.15-pf1",
173 "build_commit": "40-character-git-commit-or-null"
179 - `name` must be exactly `FriiDump`.
180 - `version` must identify the running build.
181 - `build_commit` should contain the full 40-character Git commit when available.
182 - Do not substitute a package date, branch name, or abbreviated commit for the full commit field.
186 ## 7. Exact drive and firmware identity
188 The `drive` object must describe the drive actually used by the run:
192 "vendor": "HL-DT-ST",
193 "model": "DVD-ROM GDR8163B",
194 "firmware_revision": "0M26",
195 "interface": "ATAPI",
197 "firmware_modified": false,
198 "modification_note": null
204 - Populate vendor, model, and firmware revision from the live device inquiry.
205 - Preserve the exact meaningful firmware revision.
206 - Do not substitute a label revision, expected revision, or profile revision for the live inquiry result.
207 - `firmware_modified` must always be a Boolean.
208 - When `firmware_modified` is `true`, `modification_note` must explain the relevant modification.
209 - Stock and modified firmware are separate compatibility identities.
210 - `device_path` is descriptive and may be `null` when unavailable.
212 A report can only be linked to an assessment with the same exact firmware identity and platform.
218 The `media.platform` value must be one of:
232 "platform": "gamecube",
233 "title": "Sonic Mega Collection",
241 - Use the actual tested platform.
242 - For unforced GameCube/Wii runs, classify the platform from the unscrambled
243 sector-0 platform magic after seed retrieval: Wii magic `0x5d1c9ea3` at
244 byte `0x18`, otherwise GameCube magic `0xc2339f3d` at byte `0x1c`.
245 - The sector-0 platform magic overrides a conflicting legacy capacity-probe
246 result. Explicit `-T` and `-S` selections remain authoritative.
247 - Include the disc title when media is present and it can be determined.
248 - Include region and disc ID when known.
249 - Use `null` rather than guessed values.
250 - Diagnostic no-media runs should normally use `platform: "unknown"` and null media identity fields.
252 The database maps GameCube and Wii reports into the shared `gcwii` assessment platform while retaining the original report platform.
256 ## 9. Test type and final result
258 ### 9.1 Allowed test types
265 diagnostic_wrong_media
270 ### 9.2 Allowed run results
279 ### 9.3 Required mappings
281 | Situation | `run.test_type` | `run.result` |
283 | Complete successful dump | `full_dump` | `pass` |
284 | Run stopped after producing valid partial progress | `partial_dump` | `partial` |
285 | Seed-only test succeeds | `seed_only` | `pass` |
286 | Seed retrieval fails | `seed_only` | `fail` |
287 | No disc inserted | `diagnostic_no_media` | `not_applicable` |
288 | Wrong media inserted | `diagnostic_wrong_media` | `not_applicable` |
289 | Media transition test | `media_transition` | normally `not_applicable` |
290 | Unclassified test | `other` | honest final result |
292 A no-media or wrong-media diagnostic is not evidence that the drive is incompatible.
296 ## 10. Seed-stage reporting
298 The `seed` object must always be present:
304 "duration_seconds": 6.0
308 Allowed seed results:
320 - `attempted` must reflect whether FriiDump actually attempted seed retrieval.
321 - `duration_seconds` must measure the seed stage only.
322 - Use a non-negative numeric duration when measured.
323 - Use `null` when no defensible measurement exists.
324 - Do not include seed time in `dump.duration_seconds`.
328 ## 11. Dump-stage reporting
330 The `dump` object must always be present:
336 "sector_count": 712880,
337 "byte_count": 1459978240,
338 "duration_seconds": 7241.31,
339 "failure_stage": null,
340 "failure_sector": null,
341 "output_path": "sonic.iso"
345 Allowed dump results:
355 ### Complete successful dump
357 A successful dump must include:
361 - `duration_seconds` when measured;
362 - at least one output hash for a warning-free report;
363 - `failure_stage: null`;
364 - `failure_sector: null`.
368 A partial dump should include:
370 - the number of sectors actually completed;
371 - the number of output or payload bytes actually completed;
372 - the measured elapsed dump time, when defensible;
373 - the stage where the run stopped;
374 - the failure or stopping sector, when known;
375 - the partial output path, when an output exists.
377 Do not report the planned final size as `byte_count` for a partial run.
381 A failed dump should identify `failure_stage`. Examples include:
388 reference_verification
392 Use the most specific stable machine-readable value available.
396 ## 12. Throughput and measurement scope
398 The database calculates measured throughput from the report:
401 MiB/hour = byte_count × 3600 ÷ duration_seconds ÷ 1,048,576
404 FriiDump must not provide an estimated or instantaneous progress rate as the completed-run average.
406 For a meaningful calculation:
408 - `dump.byte_count` must describe the bytes represented by the measurement.
409 - `dump.duration_seconds` must describe the time spent producing those same bytes.
410 - The duration should exclude seed retrieval.
411 - Post-dump hashing and reference matching should not be included unless the measurement is explicitly defined to include them.
412 - A zero or unknown duration must be represented as `null`, not as a fabricated small value.
414 ### 12.1 Required measurement scopes
416 The compatibility database recognizes:
425 The generation-1 JSON schema has no dedicated measurement-scope property. FriiDump must therefore place the scope in a controlled note using this exact form:
428 Measurement scope: full_optical_payload.
431 Other valid forms are:
434 Measurement scope: assembled_output.
435 Measurement scope: partial_progress.
436 Measurement scope: unknown.
439 The importer reads the `measurement scope:` token case-insensitively.
441 ### 12.2 Scope definitions
443 #### `full_optical_payload`
445 Use when `byte_count` and `duration_seconds` represent a complete optical payload read.
449 - complete GameCube optical dump;
450 - complete Wii optical dump;
451 - complete ordinary DVD optical read.
453 #### `assembled_output`
455 Use when the timed operation creates a final image by combining optical reads with copied, generated, synthetic, padded, or finalized regions.
457 This is required for the current Original Xbox assembled-output workflow when the reported bytes and time describe the final assembled image rather than only physical optical reads.
459 Assembled-output throughput must not be presented as directly comparable to optical-only throughput.
461 #### `partial_progress`
463 Use when the run did not complete and the byte/time pair describes only actual progress before failure or cancellation.
465 A partial-progress rate is not a completed-dump average.
469 Use when no defensible measurement classification exists.
471 ### 12.3 Native automatic inference
473 The database can infer `full_optical_payload` for a native successful GameCube, Wii, or DVD full dump, but FriiDump should still emit an explicit scope note. Explicit scope is mandatory for Xbox and any nonstandard output workflow.
479 The `hashes` object must always contain all four keys:
484 "md5": "85a525df1481d0ad67d8761f832dca12",
492 - Use lowercase or uppercase hexadecimal; the importer normalizes to lowercase.
493 - Hashes must describe the exact output represented by `dump.output_path`.
494 - A successful complete dump should provide at least one hash.
495 - Prefer recording every hash FriiDump already calculates.
496 - Do not hash a different file, temporary file, or logical payload while describing the final output file.
497 - Use `null` when a hash was not calculated.
502 CRC32 8 hexadecimal characters
503 MD5 32 hexadecimal characters
504 SHA-1 40 hexadecimal characters
505 SHA-256 64 hexadecimal characters
510 ## 14. Reference verification
512 The `reference` object describes software-side comparison results:
516 "provider": "redump",
533 - A `match` should identify the reference provider.
534 - Use `not_checked` when no comparison was performed.
535 - Use `not_applicable` for diagnostic runs where reference comparison has no meaning.
536 - Reference match or mismatch is report evidence, not a direct hardware compatibility status.
537 - FriiDump must not convert a Redump result into a published compatibility assessment.
541 ## 15. FriiDump profile identity
543 The `profile` object must always be present:
547 "support_tier": "known_supported_profile_hardening",
548 "cdb_offset": "0x5E0",
549 "gate_address": "0x90024FF7"
555 - Record the support tier actually selected by FriiDump.
556 - Record the selected CDB offset and firmware gate address when applicable.
557 - Hexadecimal addresses must begin with `0x`.
558 - Use `null` when the value does not apply or is not known.
559 - Do not report analyzer candidates as confirmed runtime values unless FriiDump actually selected them.
563 ## 16. Notes and evidence provenance
565 `notes` is an array of concise factual strings.
567 For a native FriiDump-generated report:
569 - Do not add `Evidence origin: reconstructed...`.
570 - Do not add a converter identity.
571 - Do not claim the report was reconstructed or imported.
572 - The database classifies a report as `native_report` by default.
573 - Include the controlled measurement-scope note.
574 - Include concise information that cannot be represented elsewhere.
575 - Do not place a compatibility status recommendation in the notes.
576 - Do not copy large portions of the text log into the notes.
582 "Measurement scope: full_optical_payload.",
583 "Complete optical dump; output hashes calculated after the timed read."
587 The phrases used by the historical converter are reserved for reconstructed evidence and must not be emitted by native FriiDump:
590 Evidence origin: reconstructed ...
592 Source artifact SHA-256: ...
598 ## 17. Artifact inventory
600 `artifacts` is an array. Each entry must contain:
615 "path": "docs/debug/gdr8163b_0m26.log",
617 "sha256": "64-hex-character-sha256"
620 "type": "dump_output",
621 "path": "Sonic Mega Collection.iso",
630 - Artifact paths are descriptive metadata.
631 - Use a stable type such as `log`, `dump_output`, or another documented FriiDump artifact type.
632 - Record artifact byte size and SHA-256 when FriiDump knows them.
633 - Use `null` when a path, size, or SHA-256 is unavailable.
634 - The report importer does not open arbitrary paths from the JSON.
635 - The report file itself is preserved separately by the database after acceptance.
639 ## 18. Native report versus reconstructed historical report
641 Future FriiDump output must be native evidence.
643 | Property | Native FriiDump report | Reconstructed historical report |
645 | Evidence origin | Inferred as `native_report` | Declared in controlled notes |
646 | Run timestamps | Normally authoritative | May be unknown |
647 | Converter identity | Not present | Present |
648 | Source-log identity | Optional normal artifact | Required reconstruction provenance |
649 | Measurement scope | Emitted by FriiDump | Recovered from historical evidence |
650 | Report generation | During or immediately after run | Later conversion from archived logs |
652 FriiDump must not imitate reconstruction provenance in new native reports.
656 ## 19. Database workflow implications
658 A generated report does not automatically change public compatibility data.
662 1. FriiDump generates one `.friidump.json` report.
663 2. The report is submitted or imported.
664 3. The report is validated and fingerprinted.
665 4. An administrator accepts or rejects it.
666 5. An accepted report becomes reviewed evidence.
667 6. An administrator may link it to an assessment with the same exact firmware and platform.
668 7. A tested compatibility status may be published only when accepted evidence is linked.
670 FriiDump therefore reports facts, not final compatibility conclusions.
674 ## 20. Duplicate and reproducibility requirements
676 The database evaluates duplicate identity using:
679 source system + run UUID
680 exact report-file SHA-256
681 normalized report SHA-256
684 FriiDump requirements:
686 - Each new execution gets a new UUID.
687 - The same stored execution must retain its UUID when exported again.
688 - FriiDump should serialize reports deterministically where practical.
689 - Do not regenerate the same run with a new `generated_utc` and changed content while preserving the old UUID.
690 - Do not reuse a report file as a template without replacing its run UUID.
691 - A resumed run should be clearly treated as either the same persisted execution or a new execution; it must not ambiguously reuse identity.
695 ## 21. Filename requirements
700 <disc title>.friidump.json
706 Sonic Mega Collection.friidump.json
707 Red Faction II [TQ00501A].friidump.json
708 friidump-diagnostic-no-media-<run-id>.friidump.json
713 - The `.friidump.json` suffix is required by the public submission workflow.
714 - Sanitize characters invalid on the host filesystem.
715 - Avoid overwriting an earlier report.
716 - Use a collision-safe suffix when two runs have the same title.
717 - The root `schema` field, not the filename alone, determines the format.
721 ## 22. Warning-free evidence policy
723 A report may be schema-valid while still generating quality warnings. FriiDump should produce warning-free reports whenever the information is available.
725 Avoid these warning conditions:
727 - modified firmware without `modification_note`;
728 - media present but no disc title;
729 - failed dump without `failure_stage`;
730 - successful dump with no output hash;
731 - reference match without a reference provider.
733 Warnings do not always invalidate a report, but they reduce evidence quality and require additional review.
737 ## 23. Minimum acceptance checklist for FriiDump
739 A FriiDump implementation is ready for database integration when all of the following pass:
741 - [ ] Emits exactly one UTF-8 `.friidump.json` file per finalized run.
742 - [ ] Uses `friidump-test-result.v1`.
743 - [ ] Emits every required root object and required child field.
744 - [ ] Rejects or prevents unknown schema fields.
745 - [ ] Generates a unique persistent UUID per run.
746 - [ ] Records authoritative UTC start and completion timestamps.
747 - [ ] Records exact FriiDump version and full build commit.
748 - [ ] Records exact live drive and firmware inquiry identity.
749 - [ ] Separates stock and modified firmware.
750 - [ ] Provides a modification note for modified firmware.
751 - [ ] Records platform and media identity without guessing.
752 - [ ] Uses correct test-type and result mappings.
753 - [ ] Separates seed duration from dump duration.
754 - [ ] Records actual sectors, bytes, and elapsed time.
755 - [ ] Does not report planned final bytes as partial progress.
756 - [ ] Emits an explicit `Measurement scope:` note.
757 - [ ] Uses `assembled_output` for the current Xbox assembled-image metric.
758 - [ ] Provides at least one output hash for successful dumps.
759 - [ ] Records reference verification separately from compatibility status.
760 - [ ] Records the selected runtime profile identity.
761 - [ ] Does not emit reconstruction provenance for native runs.
762 - [ ] Preserves exact report identity on re-export.
763 - [ ] Writes the final JSON atomically.
764 - [ ] Passes schema and semantic validation with zero errors.
765 - [ ] Produces warning-free successful-run fixtures.
766 - [ ] Includes automated fixtures for success, partial, seed failure, and diagnostics.
770 ## 24. Required test fixtures
772 FriiDump development should include at least these report-generation tests:
774 1. **Successful GameCube full dump**
775 - `full_dump` / `pass`
776 - `full_optical_payload`
777 - sectors, bytes, duration, hash
780 2. **Successful Xbox assembled output**
781 - `full_dump` / `pass`
783 - explicit non-comparable scope
784 - modified firmware when applicable
786 3. **Partial optical dump**
787 - `partial_dump` / `partial`
788 - actual progress bytes and sectors
790 - failure stage and sector
792 4. **Seed-retrieval failure**
793 - `seed_only` / `fail`
794 - dump `not_attempted`
795 - no fabricated dump size or throughput
797 5. **No-media diagnostic**
798 - `diagnostic_no_media` / `not_applicable`
799 - unknown media identity
800 - no compatibility conclusion
802 6. **Modified-firmware identity**
803 - `firmware_modified: true`
804 - non-empty modification note
806 7. **Duplicate export**
807 - same stored run exports with the same UUID and equivalent normalized content
810 - same drive and disc, but a new execution receives a new UUID
814 ## 25. Native successful-run template
818 "schema": "friidump-test-result.v1",
820 "name": "FriiDump Interchange Format",
822 "serialization": "json"
824 "generated_utc": "2026-07-21T20:15:00Z",
827 "version": "REPLACE_WITH_VERSION",
828 "build_commit": "REPLACE_WITH_FULL_40_CHARACTER_COMMIT_OR_NULL"
831 "run_id": "REPLACE_WITH_UUID",
832 "started_utc": "2026-07-21T18:00:00Z",
833 "completed_utc": "2026-07-21T20:14:31Z",
834 "test_type": "full_dump",
838 "vendor": "HL-DT-ST",
839 "model": "DVD-ROM GDR8163B",
840 "firmware_revision": "0M26",
841 "interface": "ATAPI",
843 "firmware_modified": false,
844 "modification_note": null
847 "platform": "gamecube",
848 "title": "Sonic Mega Collection",
855 "duration_seconds": 6.0
860 "sector_count": 712880,
861 "byte_count": 1459978240,
862 "duration_seconds": 7241.31,
863 "failure_stage": null,
864 "failure_sector": null,
865 "output_path": "Sonic Mega Collection.iso"
869 "md5": "85a525df1481d0ad67d8761f832dca12",
874 "provider": "redump",
879 "support_tier": "known_supported_profile_hardening",
880 "cdb_offset": "0x5E0",
881 "gate_address": "0x90024FF7"
884 "Measurement scope: full_optical_payload.",
885 "Complete optical dump; output hashes calculated after the timed read."
890 "path": "friidump.log",
900 ## 26. Validation target
902 During development, reports should be validated against:
905 schemas/friidump-test-result.v1.schema.json
908 The compatibility database package also provides semantic validation through:
911 bin/validate-report.php
922 The native-report implementation should be considered incomplete until its automated fixtures pass both JSON Schema validation and the database semantic validator.
926 ## 27. Summary of the new FriiDump obligations
928 The primary new obligation is not merely “write a JSON log.” FriiDump must produce durable, exact, reviewable evidence with:
930 - stable per-run identity;
931 - authoritative timestamps;
932 - exact live firmware identity;
933 - honest final-state semantics;
934 - defensible byte and duration measurements;
935 - explicit measurement scope;
937 - clear separation between native evidence, reference verification, and curated compatibility status.
939 This report becomes the long-term evidence record behind the public compatibility database. It must therefore favor exactness and honesty over optimistic inference.