File size: 38,848 Bytes
0f9a8e2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1a4adbb
c49778a
 
 
05f0744
7edfa8f
17c38d5
c49778a
e3f9da9
 
3506172
e3f9da9
 
 
3506172
3a3e7ac
e3f9da9
79ed47f
 
3506172
79ed47f
0f9a8e2
 
d96f266
ca4ac1c
0f9a8e2
2c5b88c
0f9a8e2
cca436c
9d58132
31e3087
46f443b
a6472b6
a6a6bb0
0f9a8e2
91b502e
627e5d7
7cc9dbe
0f9a8e2
c325020
a49986a
c325020
0f9a8e2
c4212da
98cf463
f45f1a0
c433b73
08a4bf0
518399e
149cadc
0f9a8e2
b7a466b
60a2fc8
d735235
0f9a8e2
 
 
697d349
29331c9
0f9a8e2
d8565bc
 
fe4bbfa
35e1215
 
d9be7c0
7c58b77
4173e02
0f9a8e2
ac3e830
13d3eec
5331178
f7fd361
c614c4e
2ebe45d
0f9a8e2
b5c6bbb
94a5118
0f9a8e2
 
 
ca4ac1c
dd6be91
d8565bc
 
c614c4e
2ebe45d
635eda3
2c5b88c
 
 
 
 
 
 
0f9a8e2
 
635eda3
0f9a8e2
635eda3
f7fd361
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c96262b
 
 
 
 
d919f06
 
01f57c3
d9e465e
 
 
0f9a8e2
 
 
 
 
 
 
518399e
09d199c
518399e
09d199c
518399e
09d199c
518399e
09d199c
518399e
09d199c
518399e
09d199c
0f9a8e2
 
 
91b502e
67eb791
09da36c
627e5d7
98cf463
b5c6bbb
e904452
c49778a
e3f9da9
 
79ed47f
09da36c
 
a6a6bb0
98cf463
e904452
a6a6bb0
e3f9da9
 
09da36c
13d3eec
e904452
a6a6bb0
e3f9da9
79ed47f
09da36c
d0f5abd
627e5d7
a3929d0
09da36c
a3929d0
e904452
a6a6bb0
e3f9da9
 
79ed47f
c0ec867
13d3eec
a07660e
7c58b77
09da36c
 
ca4ac1c
0f9a8e2
2c5b88c
cca436c
9d58132
08a4bf0
f45f1a0
c4212da
149cadc
60a2fc8
a6a6bb0
67eb791
596ac86
697d349
13d3eec
d735235
635eda3
 
 
 
 
 
 
d9be7c0
2ebe45d
697d349
11fb2f4
0f9a8e2
 
5331178
0f9a8e2
29331c9
4173e02
0f9a8e2
349da51
c614c4e
b871266
0f9a8e2
 
03b872c
1b83f19
2c5b88c
 
03b872c
60a2fc8
697d349
2c5b88c
03b872c
 
697d349
ca4ac1c
 
 
 
 
697d349
 
 
 
 
 
 
 
 
91b502e
 
 
 
 
 
 
a07660e
 
 
7c58b77
 
 
 
 
 
 
627e5d7
67eb791
 
98cf463
c433b73
98cf463
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
627e5d7
13d3eec
 
98cf463
 
 
 
 
 
 
 
67eb791
 
 
 
 
 
 
627e5d7
 
 
 
697d349
 
08a4bf0
a6a6bb0
 
 
 
 
 
 
91b502e
 
08a4bf0
cca436c
9d58132
31e3087
46f443b
d96f266
fe4bbfa
35e1215
 
f45f1a0
7cc9dbe
a49986a
149cadc
b7a466b
c325020
a3929d0
7c58b77
b5c6bbb
13d3eec
ac3e830
d9be7c0
c4212da
635eda3
d735235
29331c9
635eda3
94a5118
08a4bf0
 
0f9a8e2
 
 
 
 
 
 
 
 
40360ea
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0f9a8e2
40360ea
0f9a8e2
 
 
 
 
 
 
 
 
 
 
627e5d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c614c4e
965d0da
d9be7c0
 
 
c614c4e
 
 
 
 
 
 
 
 
 
 
948bb27
 
 
 
 
 
 
 
 
 
 
 
 
09b6435
 
 
f135706
09b6435
 
 
 
 
 
 
 
 
b5c6bbb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c0ec867
 
 
 
 
 
 
 
 
 
 
 
 
1a4adbb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c49778a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e3f9da9
 
 
 
 
 
 
 
 
 
 
 
3506172
e3f9da9
 
 
 
 
 
 
 
 
 
3a3e7ac
 
 
 
 
 
 
 
e3f9da9
 
 
 
 
 
 
 
 
 
 
 
 
 
79ed47f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40360ea
 
 
0f9a8e2
 
40360ea
0f9a8e2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9a6db6f
0f9a8e2
9a6db6f
 
0f9a8e2
 
40360ea
0f9a8e2
 
 
 
 
 
 
 
 
 
 
 
 
 
40360ea
0f9a8e2
 
 
 
 
 
 
 
 
 
 
 
40360ea
0f9a8e2
 
 
03b872c
 
 
 
 
 
 
eb6a05d
03b872c
2d48107
eb6a05d
03b872c
40360ea
03b872c
 
 
948bb27
 
 
 
 
09b6435
b5c6bbb
c0ec867
1a4adbb
c49778a
e3f9da9
 
79ed47f
948bb27
627e5d7
697d349
 
 
 
 
 
 
 
 
 
 
 
bdeb981
1f975ab
 
 
bdeb981
 
e3f9da9
 
79ed47f
bdeb981
 
 
 
 
 
 
 
 
 
 
 
 
08a4bf0
 
 
 
 
 
 
 
 
 
40360ea
08a4bf0
 
 
0f9a8e2
 
 
 
 
 
 
 
 
 
 
 
40360ea
0f9a8e2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
03b872c
 
 
 
 
 
697d349
 
 
 
 
 
08a4bf0
 
 
 
 
 
0f9a8e2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
#!/usr/bin/env python3
"""Validate parity between the repo and prepared Hugging Face mirrors.

This is a publisher-side check. It compares critical website data, figures, and
validator scripts across the local repo, prepared HF Space bundle, prepared HF
artifact dataset bundle, and prepared HF model bundle before upload.
"""

from __future__ import annotations

import argparse
import hashlib
import json
from datetime import datetime, timezone
from pathlib import Path


ROOT = Path(__file__).resolve().parents[1]
DEFAULT_HF_ROOT = ROOT.parent / "hf_publish"
DEFAULT_OUTPUT = ROOT / "docs/data/mirror_parity.json"
QWEN3_FUTURE_TASK_PROBE_RUN_ID = "xperience10m_qwen3_omni_v6_future_task_probes_a100_20260616T143608Z"
QWEN3_RETRIEVAL_TASK_PROBE_RUN_IDS = [
    "xperience10m_qwen3_omni_v6_retrieval_task_probes_a100_20260617T175919Z",
    "xperience10m_qwen3_omni_v6_cross_modal_retrieval_probe_a100_20260618T000000Z",
    "xperience10m_qwen3_omni_v6_camera_view_sync_mosaic_tile_a100_20260619T0305Z",
    "xperience10m_qwen3_omni_v6_sensor_target_probes_a100_20260619T000000Z",
    "xperience10m_qwen3_omni_v6_interaction_text_task15_a100_20260620T010305Z",
]
COSMOS3_SUPER_RETRIEVAL_TASK_PROBE_RUN_IDS = [
    "xperience10m_cosmos3_super_retrieval_task_probes_a100_textonly_prompatch_v2_20260620",
    "xperience10m_cosmos3_nano_retrieval_task_probes_a100_patched_textonly_20260621",
]
COSMOS3_SUPER_FUTURE_TASK_PROBE_RUN_IDS = [
    "xperience10m_cosmos3_super_future_task_probes_a100_textonly_v1_20260620",
    "xperience10m_cosmos3_nano_future_order_misalignment_patched_textonly_20260621",
    "xperience10m_cosmos3_nano_current_subtask_object_relevance_patched_textonly_20260621",
]
COSMOS3_SUPER_INTERACTION_TEXT_TASK_PROBE_RUN_IDS = [
    "xperience10m_cosmos3_super_interaction_text_task15_textonly_v1_20260620T1558Z",
    "xperience10m_cosmos3_nano_interaction_text_task15_patched_textonly_20260621",
]

DATA_FILES = [
    "additional_development_directions.json",
    "audio_ablation_summary.json",
    "artifact_index.json",
    "brand_assets.json",
    "evidence_contract.json",
    "evaluation_protocol.json",
    "figure_index.json",
    "foundation_model_plan.json",
    "glossary.json",
    "live_publication_status.json",
    "language_versions.json",
    "modality_atlas.json",
    "omni_finetune_verified_result.json",
    "omni_model_comparison.json",
    "project_brief.json",
    "project_manifest.json",
    "project_packet.json",
    "public_reader_map.json",
    "project_status.json",
    "publication_audit.json",
    "public_surface_qa.json",
    "qwen3_full_parameter_gates.json",
    "qwen3_omni_run_lineage.json",
    "qwen3_v5_v6_comparison.json",
    "quality_gates.json",
    "raw_sample_files.json",
    "rendered_site_check.json",
    "reproducibility_matrix.json",
    "research_roadmap.json",
    "research_roadmap_interactive.json",
    "research_takeaways.json",
    "research_direction_extensions.json",
    "research_directions.json",
    "scope_claims_audit.json",
    "single_episode_explorer.json",
    "source_alignment_audit.json",
    "summary_metrics.json",
    "single_episode_task_model_radar.json",
    "episode128_task_model_radar.json",
    "three_foundation_pipelines.json",
    "two_evidence_lines.json",
    "two_evidence_line_result_summary.json",
    "task_suite_20.json",
    "task_suite_enhancement_128.json",
    "task_surface_integrity.json",
    "task_walkthroughs.json",
    "task_method_20_result_matrix.json",
    "task_method_20_gap_audit.json",
    "task_method_20_source_audit.json",
    "task_icon_manifest.json",
    "tier2_task_suite.json",
    "unified_task_model_radar.json",
    "website_integrity.json",
    "xperience10m_128_episode_feature_index.json",
    "xperience10m_dataset_card_alignment.json",
]

ASSET_FILES = [
    "charts/audio_ablation_delta.svg",
    "charts/two_evidence_line_map.svg",
    "charts/single_episode_task_model_radar.svg",
    "charts/episode128_task_model_radar.svg",
    "charts/tier2_task_suite.svg",
    "charts/unified_task_model_radar.svg",
    "charts/research_direction_coverage.svg",
    "brand/xperience10m-logo-apple-touch.png",
    "brand/xperience10m-logo-favicon-32.png",
    "brand/xperience10m-logo-favicon-64.png",
    "brand/xperience10m-logo-mark.png",
    "brand/xperience10m-logo-mark-192.png",
    "brand/xperience10m-logo-mark-512.png",
    "brand/xperience10m-logo-social-card.png",
    "task_suite_infographic.png",
    "pipeline_diagram.png",
    "pipeline_diagram.svg",
    "task_architectures.png",
    "task_architectures.svg",
    "task-icons/01_timeline_action.svg",
    "task-icons/02_timeline_subtask.svg",
    "task-icons/03_transition_detection.svg",
    "task-icons/04_next_action.svg",
    "task-icons/05_hand_trajectory_forecast.svg",
    "task-icons/06_contact_prediction.svg",
    "task-icons/07_object_relevance.svg",
    "task-icons/08_caption_grounding.svg",
    "task-icons/09_cross_modal_retrieval.svg",
    "task-icons/10_modality_reconstruction.svg",
    "task-icons/11_temporal_order.svg",
    "task-icons/12_misalignment_detection.svg",
    "task-icons/13_long_horizon_next_action.svg",
    "task-icons/14_next_subtask_forecast.svg",
    "task-icons/15_interaction_text_prediction.svg",
    "task-icons/16_action_object_relation.svg",
    "task-icons/17_object_set_forecast.svg",
    "task-icons/18_imu_to_hand_pose.svg",
    "task-icons/19_camera_view_sync_retrieval.svg",
    "task-icons/20_time_to_transition.svg",
    "task-icons/task-icon-atlas.png",
    "foundation-pipelines/spatial-intelligence-pipeline.png",
    "foundation-pipelines/human-video-world-model-pipeline.png",
    "foundation-pipelines/vision-language-action-pipeline.png",
    "foundation-pipelines/README.md",
    "foundation-pipelines/prompts.md",
    "foundation-pipelines/source-slides/spatial-intelligence-slide.png",
    "foundation-pipelines/source-slides/human-video-world-model-slide.png",
    "foundation-pipelines/source-slides/vision-language-action-slide.png",
    "foundation-pipelines/source-photos/spatial-intelligence-source.jpg",
    "foundation-pipelines/source-photos/human-video-world-model-source.jpg",
    "foundation-pipelines/source-photos/vision-language-action-source.jpg",
    "modalities/audio.png",
    "modalities/depth.jpg",
    "modalities/inertial.png",
    "modalities/language.png",
    "modalities/motion_capture.png",
    "modalities/pose_slam.png",
    "modalities/video.jpg",
    "raw-sample-preview/fisheye_cam0_preview.mp4",
    "raw-sample-preview/fisheye_cam0_poster.jpg",
    "raw-sample-preview/fisheye_cam1_preview.mp4",
    "raw-sample-preview/fisheye_cam1_poster.jpg",
    "raw-sample-preview/fisheye_cam2_preview.mp4",
    "raw-sample-preview/fisheye_cam2_poster.jpg",
    "raw-sample-preview/fisheye_cam3_preview.mp4",
    "raw-sample-preview/fisheye_cam3_poster.jpg",
    "raw-sample-preview/stereo_left_preview.mp4",
    "raw-sample-preview/stereo_left_poster.jpg",
    "raw-sample-preview/stereo_right_preview.mp4",
    "raw-sample-preview/stereo_right_poster.jpg",
]

SCRIPT_FILES = [
    "omni/analyze_qwen3_omni_errors.py",
    "omni/audit_staged_xperience10m_content.py",
    "omni/audit_cosmos3_super_training_contract.py",
    "omni/build_omni_model_comparison.py",
    "omni/build_qwen3_full_parameter_gate_summary.py",
    "omni/build_128_episode_feature_index.py",
    "omni/collect_qwen3_future_task_probe_results.sh",
    "omni/collect_qwen3_retrieval_task_probe_results.sh",
    "omni/collect_cosmos3_super_retrieval_task_probe_results.sh",
    "omni/collect_cosmos3_super_future_task_probe_results.sh",
    "omni/eval_cosmos3_super_interaction_text_task.py",
    "omni/collect_qwen3_v4_release_artifacts.py",
    "omni/defer_cosmos3_super_after_qwen_v4.sh",
    "omni/defer_qwen3_retrieval_after_order_sync.sh",
    "omni/defer_qwen3_fullparam_after_verified_qwen.sh",
    "omni/eval_qwen3_omni_future_task_probes.py",
    "omni/eval_qwen3_omni_retrieval_task_probes.py",
    "omni/eval_cosmos3_super_future_task_probes.py",
    "omni/eval_cosmos3_super_retrieval_task_probes.py",
    "omni/export_cosmos3_camera_pose_targets.py",
    "omni/launch_all_task_model_scoring_when_free.sh",
    "omni/merge_qwen3_omni_future_task_probe_shards.py",
    "omni/merge_qwen3_omni_retrieval_task_probe_shards.py",
    "omni/merge_cosmos3_super_future_task_probe_shards.py",
    "omni/merge_cosmos3_super_interaction_text_task_shards.py",
    "omni/pack_cosmos3_super_action_batch.py",
    "omni/prepare_cosmos3_super_lora_hf_package.py",
    "omni/prepare_qwen3_lora_hf_package.py",
    "omni/patch_qwen3_omni_video_features.py",
    "omni/probe_cosmos3_super_training_readiness.py",
    "omni/run_private_gpu_qwen3_v6_repro_smoke.sh",
    "omni/run_qwen3_omni_future_task_probes_sharded.sh",
    "omni/run_qwen3_omni_retrieval_task_probes_sharded.sh",
    "omni/run_cosmos3_super_future_task_probes_sharded.sh",
    "omni/run_cosmos3_super_retrieval_task_probes_sharded.sh",
    "omni/run_cosmos3_super_interaction_text_task_sharded.sh",
    "omni/score_existing_model_output_task_probes.py",
    "omni/score_model_output_probes.py",
    "omni/run_128_task_baselines.py",
    "omni/build_task_suite_enhancement_128.py",
    "omni/run_cosmos3_super_forward_dynamics_lora.sh",
    "omni/train_cosmos3_super_forward_dynamics_lora.py",
    "audio_ablation_and_raw_upgrade.py",
    "build_artifact_index.py",
    "build_brand_assets.py",
    "build_evaluation_protocol.py",
    "build_figure_index.py",
    "build_quality_gates.py",
    "build_qwen3_omni_run_lineage.py",
    "build_public_surface_qa.py",
    "build_rendered_site_check.py",
    "build_interactive_research_roadmap.py",
    "build_multilingual_public_readmes.py",
    "build_two_evidence_line_result_summary.py",
    "render_foundation_pipeline_diagrams.py",
    "build_single_episode_explorer.py",
    "build_task_method_20_gap_audit.py",
    "build_research_takeaways.py",
    "export_modality_atlas_assets.py",
    "generate_visualizations.py",
    "render_overview_figures.py",
    "render_task_suite_infographic.py",
    "research_direction_taxonomy.py",
    "task_display.py",
    "task_walkthroughs.py",
    "build_unified_task_suite.py",
    "build_unified_task_model_radar.py",
    "single_episode_diagnostics.py",
    "verify_live_publication.py",
    "validate_mirror_parity.py",
    "validate_publication_package.py",
    "validate_task_method_matrix_sources.py",
    "validate_scope_claims.py",
    "validate_source_alignment.py",
    "validate_task_surface.py",
    "validate_website_integrity.py",
    "sync_hf_publish_mirrors.py",
    "tier2_task_suite.py",
    "publish_hf_bundles.py",
]

WEBSITE_FILES = [
    "404.html",
    "apple-touch-icon.png",
    "favicon.png",
    "index.html",
    "research_roadmap.html",
    "single_episode_explorer.html",
    "site.webmanifest",
]

RESULT_FILES = [
    "audio_ablation/AUDIO_ABLATION_SUMMARY.md",
    "audio_ablation/audio_ablation_metrics.csv",
    "audio_ablation/audio_ablation_summary.json",
    "audio_ablation/audio_delta_summary.csv",
    "audio_ablation/raw_logmel_fisheye_cam0_sr16000_mels64_fft512_hop160.npz",
    "single_episode_diagnostics/provenance.json",
    "single_episode_diagnostics/README.md",
    "single_episode_diagnostics/modality_ablation/ablation_metrics.csv",
    "single_episode_diagnostics/modality_ablation/ablation_summary.json",
    "single_episode_diagnostics/object_labels/object_vocab.json",
    "single_episode_diagnostics/object_labels/window_object_labels.csv",
    "single_episode_diagnostics/timeline_overlay/timeline_overlay.csv",
    "single_episode_diagnostics/alignment_stress/alignment_shift_metrics.csv",
    "single_episode_diagnostics/alignment_stress/alignment_stress_summary.json",
    "omni_finetune/verified_public/xperience10m_qwen3_omni_128ep_96train_16val_16test_valmon_20260605_eval/analysis/ERROR_ANALYSIS.md",
    "omni_finetune/verified_public/xperience10m_qwen3_omni_128ep_96train_16val_16test_valmon_20260605_eval/analysis/error_analysis_summary.json",
    "omni_finetune/verified_public/xperience10m_qwen3_omni_128ep_96train_16val_16test_valmon_20260605_eval/analysis/episode_error_analysis.csv",
    "omni_finetune/verified_public/xperience10m_qwen3_omni_128ep_96train_16val_16test_valmon_20260605_eval/analysis/action_family_error_analysis.csv",
    "omni_finetune/verified_public/xperience10m_qwen3_omni_128ep_96train_16val_16test_valmon_20260605_eval/analysis/train_seen_error_analysis.csv",
    "omni_finetune/verified_public/xperience10m_qwen3_omni_128ep_96train_16val_16test_valmon_20260605_eval/analysis/missing_modality_error_analysis.csv",
    "omni_finetune/verified_public/xperience10m_qwen3_omni_128ep_96train_16val_16test_valmon_20260605_eval/analysis/object_category_error_analysis.csv",
    "omni_finetune/multi_episode_128_task_baselines/BASELINE_ALIGNMENT_REPORT.md",
    "omni_finetune/multi_episode_128_task_baselines/summary_report.json",
    "omni_finetune/multi_episode_128_task_baselines/task_metrics.csv",
    "omni_finetune/task_suite_enhancement_128_v1_20260608/ENHANCEMENT_REPORT.md",
    "omni_finetune/task_suite_enhancement_128_v1_20260608/dense_window_scenarios.csv",
    "omni_finetune/task_suite_enhancement_128_v1_20260608/enhancement_plan.json",
    "omni_finetune/task_suite_enhancement_128_v1_20260608/experiment_backlog.json",
    "omni_finetune/task_suite_enhancement_128_v1_20260608/hierarchical_target_contract.json",
    "omni_finetune/task_suite_enhancement_128_v1_20260608/qwen_action_family_error_summary.csv",
    "omni_finetune/task_suite_enhancement_128_v1_20260608/task_bottlenecks.csv",
    "omni_finetune/OMNI_MODEL_COMPARISON.md",
    "omni_finetune/MULTI_EPISODE_ACCESS_STATUS.md",
    "omni_finetune/XPERIENCE10M_128_DATA_PREPARATION_AND_FINETUNE_PLAN.md",
    "omni_finetune/QWEN3_FULL_PARAMETER_GATES_20260609.md",
    "omni_finetune/QWEN3_V5_V6_COMPARISON_20260614.md",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_smoke_preemptible_8gpu_20260609/fullparam_feasibility_summary.json",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_smoke_preemptible_8gpu_20260609/progress.jsonl",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_smoke_preemptible_8gpu_20260609/training_metadata.json",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_smoke_preemptible_8gpu_20260609/RUN_REPORT.md",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_shorttrain8_preemptible_8gpu_20260609/fullparam_shorttrain8_summary.json",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_shorttrain8_preemptible_8gpu_20260609/progress.jsonl",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_shorttrain8_preemptible_8gpu_20260609/launch_status.jsonl",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_pilot32_preemptible_8gpu_20260609/fullparam_pilot32_summary.json",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_pilot32_preemptible_8gpu_20260609/progress.jsonl",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_pilot32_preemptible_8gpu_20260609/launch_status.jsonl",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_pilot64_preemptible_8gpu_20260609/fullparam_pilot64_summary.json",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_pilot64_preemptible_8gpu_20260609/progress.jsonl",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_pilot64_preemptible_8gpu_20260609/training_metadata.json",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_pilot64_preemptible_8gpu_20260609/RUN_REPORT.md",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_pilot64_preemptible_8gpu_20260609/config.yaml",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_pilot64_preemptible_8gpu_20260609/launch_status.jsonl",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_pilot128_preemptible_8gpu_20260609/fullparam_pilot128_summary.json",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_pilot128_preemptible_8gpu_20260609/progress.jsonl",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_pilot128_preemptible_8gpu_20260609/launch_status.jsonl",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_pilot128_after_qwen_v5_preemptible_8gpu_20260609/progress.jsonl",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_pilot128_after_qwen_v5_preemptible_8gpu_20260609/config.yaml",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_pilot128_after_qwen_v5_preemptible_8gpu_20260609/training_metadata.json",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_pilot128_after_qwen_v5_preemptible_8gpu_20260609/RUN_REPORT.md",
    "omni_finetune/xperience10m_qwen3_omni_128ep_fullparam_pilot128_after_qwen_v5_preemptible_8gpu_20260609/launch_status.jsonl",
    "omni_finetune/HF_UPLOAD.md",
    "omni_finetune/model_output_probe_readiness/model_output_probe_readiness.json",
    "omni_finetune/model_output_probe_readiness/RUN_REPORT.md",
    "omni_finetune/xperience10m_cosmos3_super_training_readiness_20260607/training_readiness.json",
    "omni_finetune/xperience10m_cosmos3_super_training_readiness_20260607/RUN_REPORT.md",
    "omni_finetune/xperience10m_cosmos3_super_training_readiness_metadata_a100_20260609/training_readiness.json",
    "omni_finetune/xperience10m_cosmos3_super_training_readiness_metadata_a100_20260609/RUN_REPORT.md",
    "omni_finetune/xperience10m_cosmos3_super_training_contract_audit_camera_pose_20260608/training_contract_audit.json",
    "omni_finetune/xperience10m_cosmos3_super_training_contract_audit_camera_pose_20260608/RUN_REPORT.md",
    "omni_finetune/xperience10m_cosmos3_super_action_packer_schema_smoke_20260608/packer_summary.json",
    "omni_finetune/xperience10m_cosmos3_super_action_packer_schema_smoke_20260608/RUN_REPORT.md",
    "omni_finetune/xperience10m_cosmos3_camera_pose_targets_20260608/target_manifest.json",
    "omni_finetune/xperience10m_cosmos3_super_training_contract_audit_20260608/RUN_REPORT.md",
    "omni_finetune/xperience10m_cosmos3_super_training_contract_audit_20260608/training_contract_audit.json",
    "omni_finetune/xperience10m_cosmos3_super_training_contract_audit_20260608/training_metadata.json",
    "omni_finetune/xperience10m_cosmos3_super_training_contract_audit_camera_pose_20260608/training_metadata.json",
    "omni_finetune/xperience10m_qwen3_omni_128ep_structured_json_v3_strict_label_prompt_reuse_lora_eval_test_full/analysis/ERROR_ANALYSIS.md",
    "omni_finetune/xperience10m_qwen3_omni_128ep_structured_json_v3_strict_label_prompt_reuse_lora_eval_test_full/analysis/error_analysis_summary.json",
    "omni_finetune/verified_public/xperience10m_cosmos3_nano_128ep_future_window_h5_compat_adapter_eval_test_full/verified_result_summary.json",
    "omni_finetune/verified_public/xperience10m_cosmos3_nano_128ep_future_window_h5_compat_adapter_eval_test_full/PUBLIC_RESULT_SUMMARY.md",
    "omni_finetune/verified_public/xperience10m_cosmos3_nano_128ep_future_window_h5_compat_adapter_eval_test_full/eval/metrics.json",
    "omni_finetune/verified_public/xperience10m_cosmos3_nano_128ep_future_window_h5_compat_adapter_eval_test_full/eval/RUN_REPORT.md",
]

DOC_FILES = [
    "README.zh.md",
    "README.es.md",
    "README.fr.md",
    "README.de.md",
    "README.ja.md",
    "README.ko.md",
    "README.pt.md",
    "ARTIFACT_GUIDE.md",
    "OMNI_MODEL_EXTENSION_CONTRACT.md",
    "QUALITY_GATES.md",
    "EVALUATION_PROTOCOL.md",
    "FIGURE_INDEX.md",
    "FOUNDATION_MODEL_PLAN.md",
    "GLOSSARY.md",
    "ADDITIONAL_DEVELOPMENT_DIRECTIONS.md",
    "THREE_FOUNDATION_PIPELINES.md",
    "TWO_EVIDENCE_LINES.md",
    "TWO_EVIDENCE_LINE_RESULT_SUMMARY.md",
    "QWEN3_OMNI_RUN_LINEAGE.md",
    "PROJECT_BRIEF.md",
    "PUBLIC_READER_MAP.md",
    "RENDERED_SITE_CHECK.md",
    "RESEARCH_ROADMAP.md",
    "PROJECT_STATUS.md",
    "REPRODUCIBILITY.md",
    "TASK_SUITE_ENHANCEMENT_128.md",
    "XPERIENCE10M_128_EPISODE_FEATURE_INDEX.md",
    "TASK_METHOD_20_GAP_AUDIT.md",
    "TASK_METHOD_20_RESULT_MATRIX.md",
    "TASK_SUITE_20.md",
    "PUBLIC_SURFACE_QA.md",
    "EVIDENCE_CONTRACT.md",
    "RESEARCH_TAKEAWAYS.md",
    "SOURCE_ALIGNMENT_AUDIT.md",
    "XPERIENCE_EMBODIED_FOUNDATION_MODEL_PRETRAINING.md",
    "XPERIENCE10M_DATASET_CARD_ALIGNMENT.md",
]


def sha256(path: Path) -> str:
    digest = hashlib.sha256()
    with path.open("rb") as handle:
        for chunk in iter(lambda: handle.read(1024 * 1024), b""):
            digest.update(chunk)
    return digest.hexdigest()


def display_path(path: Path, hf_root: Path) -> str:
    resolved = path.resolve()
    bases = [
        ("hf_space", hf_root / "space"),
        ("hf_artifacts", hf_root / "artifacts"),
        ("hf_model", hf_root / "model"),
        ("repo", ROOT),
        ("hf_publish", hf_root),
    ]
    for label, base in bases:
        try:
            return f"{label}:{resolved.relative_to(base.resolve()).as_posix()}"
        except ValueError:
            continue
    return path.name


def file_record(path: Path, hf_root: Path) -> dict:
    record = {
        "path": display_path(path, hf_root),
        "exists": path.exists(),
    }
    if path.exists() and path.is_file():
        record["bytes"] = path.stat().st_size
        record["sha256"] = sha256(path)
    else:
        record["bytes"] = 0
        record["sha256"] = None
    return record


def verified_public_result_files() -> list[str]:
    """Return every public-safe file from verified model packages.

    Verified packages are already sanitized by the package audit; mirroring the
    whole package prevents final model results from being silently omitted when a
    new run lands under results/omni_finetune/verified_public.
    """

    verified_root = ROOT / "results/omni_finetune/verified_public"
    if not verified_root.exists():
        return []
    files: list[str] = []
    for path in verified_root.rglob("*"):
        if not path.is_file():
            continue
        files.append(path.relative_to(ROOT / "results").as_posix())
    return sorted(files)


def tier2_result_files() -> list[str]:
    """Return every generated public-safe artifact for the historical provenance bundle.

    The directory name is historical and kept for stable public links.
    """

    tier2_root = ROOT / "results/episode_task_suite/tier2_task_suite"
    if not tier2_root.exists():
        return []
    files: list[str] = []
    for path in tier2_root.rglob("*"):
        if path.is_file():
            files.append(path.relative_to(ROOT / "results").as_posix())
    return sorted(files)


def a100_128_metadata_result_files() -> list[str]:
    """Return the public-safe 128-episode metadata baseline rerun artifacts."""

    result_root = ROOT / "results/omni_finetune/a100_128_metadata_task_baselines_20260616_v2"
    if not result_root.exists():
        return []
    files: list[str] = []
    for path in result_root.rglob("*"):
        if path.is_file():
            files.append(path.relative_to(ROOT / "results").as_posix())
    return sorted(files)


def a100_128_raw20_result_files() -> list[str]:
    """Return public-safe 128-episode raw-feature 20-task baseline artifacts."""

    result_root = ROOT / "results/omni_finetune/a100_128_raw20_task_baselines_complete20_proxy_20260616T091500Z"
    if not result_root.exists():
        return []
    files: list[str] = []
    for path in result_root.rglob("*"):
        if path.is_file():
            files.append(path.relative_to(ROOT / "results").as_posix())
    return sorted(files)


def xperience10m_128_data_feature_files() -> list[str]:
    """Return selected 128-episode source and processed-feature artifacts."""

    explicit = [
        ROOT / "results/omni_finetune/xperience10m_128_episode_selection.json",
        ROOT / "results/omni_finetune/xperience10m_128_episode_selection.csv",
        ROOT / "results/omni_finetune/xperience10m_128_episode_download_files.txt",
        ROOT / "results/omni_finetune/episode_manifest.json",
        ROOT / "results/omni_finetune/dataset_manifest.json",
        ROOT / "results/omni_finetune/multi_episode_128_task_baselines/metadata_feature_matrix.npz",
        ROOT / "results/omni_finetune/a100_128_metadata_task_baselines_20260616_v2/metadata_feature_matrix.npz",
    ]
    dense_root = ROOT / "results/omni_finetune/xperience10m_128ep_dense_multiscale_hierarchical_v1_20260608"
    files: list[str] = []
    for path in explicit:
        if path.is_file():
            files.append(path.relative_to(ROOT / "results").as_posix())
    if dense_root.exists():
        for path in dense_root.rglob("*"):
            if path.is_file():
                files.append(path.relative_to(ROOT / "results").as_posix())
    return sorted(set(files))


def model_output_task_probe_result_files() -> list[str]:
    """Return task-specific scores derived from existing verified model outputs."""

    result_root = ROOT / "results/omni_finetune/model_output_task_probes_20260616"
    if not result_root.exists():
        return []
    files: list[str] = []
    for path in result_root.rglob("*"):
        if path.is_file():
            files.append(path.relative_to(ROOT / "results").as_posix())
    return sorted(files)


def qwen3_future_task_probe_result_files() -> list[str]:
    """Return public-safe Qwen3 future-task probe outputs from the shard run."""

    result_root = ROOT / "results/omni_finetune" / QWEN3_FUTURE_TASK_PROBE_RUN_ID
    files: list[str] = []
    if result_root.exists():
        for path in result_root.rglob("*"):
            if path.is_file():
                files.append(path.relative_to(ROOT / "results").as_posix())

    launcher_log = (
        ROOT
        / "results/omni_finetune/deferred_launchers"
        / f"{QWEN3_FUTURE_TASK_PROBE_RUN_ID}.launcher.log"
    )
    if launcher_log.is_file():
        files.append(launcher_log.relative_to(ROOT / "results").as_posix())
    return sorted(files)


def qwen3_retrieval_task_probe_result_files() -> list[str]:
    """Return public-safe Qwen3 retrieval probe outputs from task 08/09 runs."""

    files: list[str] = []
    for run_id in QWEN3_RETRIEVAL_TASK_PROBE_RUN_IDS:
        result_root = ROOT / "results/omni_finetune" / run_id
        if result_root.exists():
            for path in result_root.rglob("*"):
                if path.is_file():
                    files.append(path.relative_to(ROOT / "results").as_posix())

        launch_log = ROOT / "results/omni_finetune/deferred_launchers" / f"{run_id}.launch.log"
        if launch_log.is_file():
            files.append(launch_log.relative_to(ROOT / "results").as_posix())
        direct_launch_log = ROOT / "results/omni_finetune/deferred_launchers" / f"{run_id}.launcher.log"
        if direct_launch_log.is_file():
            files.append(direct_launch_log.relative_to(ROOT / "results").as_posix())
    return sorted(set(files))


def cosmos3_super_retrieval_task_probe_result_files() -> list[str]:
    """Return public-safe Cosmos3-Super retrieval probe outputs."""

    files: list[str] = []
    compact_names = {"RUN_REPORT.md", "collection_validation.json", "metrics.json", "server_info.json", "summary.json"}
    for run_id in COSMOS3_SUPER_RETRIEVAL_TASK_PROBE_RUN_IDS:
        result_root = ROOT / "results/omni_finetune" / run_id
        if result_root.exists():
            for path in result_root.rglob("*"):
                if path.is_file() and (path.name in compact_names or path.name.endswith(".progress.jsonl")):
                    files.append(path.relative_to(ROOT / "results").as_posix())

        for suffix in ("launch", "launcher", "retrieval", "runner"):
            launch_log = ROOT / "results/omni_finetune/deferred_launchers" / f"{run_id}.{suffix}.log"
            if launch_log.is_file():
                files.append(launch_log.relative_to(ROOT / "results").as_posix())
    return sorted(set(files))


def cosmos3_super_future_task_probe_result_files() -> list[str]:
    """Return public-safe Cosmos3-Super future-task probe outputs."""

    files: list[str] = []
    compact_names = {
        "RUN_REPORT.md",
        "collection_validation.json",
        "metrics.json",
        "per_class_metrics.csv",
        "server_info.json",
        "summary.json",
    }
    for run_id in COSMOS3_SUPER_FUTURE_TASK_PROBE_RUN_IDS:
        result_root = ROOT / "results/omni_finetune" / run_id
        if result_root.exists():
            for path in result_root.rglob("*"):
                if path.is_file() and (path.name in compact_names or path.name.endswith(".progress.jsonl")):
                    files.append(path.relative_to(ROOT / "results").as_posix())

        for suffix in ("launch", "launcher", "runner"):
            launch_log = ROOT / "results/omni_finetune/deferred_launchers" / f"{run_id}.{suffix}.log"
            if launch_log.is_file():
                files.append(launch_log.relative_to(ROOT / "results").as_posix())
    return sorted(set(files))


def cosmos3_super_interaction_text_task_probe_result_files() -> list[str]:
    """Return public-safe Cosmos3-Super task-15 interaction-text probe outputs."""

    files: list[str] = []
    compact_names = {
        "RUN_REPORT.md",
        "collection_validation.json",
        "confusion_matrix.csv",
        "launch_env.txt",
        "metrics.json",
        "per_class_metrics.csv",
        "server_info.json",
        "summary.json",
    }
    for run_id in COSMOS3_SUPER_INTERACTION_TEXT_TASK_PROBE_RUN_IDS:
        result_root = ROOT / "results/omni_finetune" / run_id
        if result_root.exists():
            for path in result_root.rglob("*"):
                if path.is_file() and (path.name in compact_names or path.name.endswith(".progress.jsonl")):
                    files.append(path.relative_to(ROOT / "results").as_posix())

        for suffix in ("launch", "launcher", "runner"):
            launch_log = ROOT / "results/omni_finetune/deferred_launchers" / f"{run_id}.{suffix}.log"
            if launch_log.is_file():
                files.append(launch_log.relative_to(ROOT / "results").as_posix())
    return sorted(set(files))


def parity_group(name: str, local_path: Path, mirrors: dict[str, Path], hf_root: Path) -> dict:
    local = file_record(local_path, hf_root)
    mirror_records = {surface: file_record(path, hf_root) for surface, path in mirrors.items()}
    failures = []
    if not local["exists"]:
        failures.append({"surface": "repo", "kind": "missing", "path": local["path"]})
    for surface, record in mirror_records.items():
        if not record["exists"]:
            failures.append({"surface": surface, "kind": "missing", "path": record["path"]})
            continue
        if local["exists"] and record["sha256"] != local["sha256"]:
            failures.append(
                {
                    "surface": surface,
                    "kind": "hash_mismatch",
                    "path": record["path"],
                    "expected_sha256": local["sha256"],
                    "actual_sha256": record["sha256"],
                }
            )
    return {
        "name": name,
        "status": "pass" if not failures else "fail",
        "local": local,
        "mirrors": mirror_records,
        "failures": failures,
    }


def build_report(hf_root: Path) -> dict:
    groups = []

    for filename in DATA_FILES:
        groups.append(
            parity_group(
                f"data/{filename}",
                ROOT / "docs/data" / filename,
                {
                    "hf_space": hf_root / "space/data" / filename,
                    "hf_artifacts_data": hf_root / "artifacts/data" / filename,
                    "hf_artifacts": hf_root / "artifacts/docs/data" / filename,
                    "hf_model_data": hf_root / "model/data" / filename,
                    "hf_model_docs_data": hf_root / "model/docs/data" / filename,
                    "hf_model": hf_root / "model/metrics" / filename,
                },
                hf_root,
            )
        )

    for filename in ASSET_FILES:
        groups.append(
            parity_group(
                f"assets/{filename}",
                ROOT / "docs/assets" / filename,
                {
                    "hf_space": hf_root / "space/assets" / filename,
                    "hf_artifacts_docs": hf_root / "artifacts/docs/assets" / filename,
                    "hf_artifacts_card": hf_root / "artifacts/assets" / filename,
                    "hf_model": hf_root / "model/assets" / filename,
                },
                hf_root,
            )
        )

    for filename in SCRIPT_FILES:
        groups.append(
            parity_group(
                f"scripts/{filename}",
                ROOT / "scripts" / filename,
                {
                    "hf_artifacts": hf_root / "artifacts/scripts" / filename,
                    "hf_model": hf_root / "model/scripts" / filename,
                },
                hf_root,
            )
        )

    for filename in WEBSITE_FILES:
        groups.append(
            parity_group(
                f"website/{filename}",
                ROOT / "docs" / filename,
                {
                    "hf_space": hf_root / "space" / filename,
                    "hf_artifacts_root": hf_root / "artifacts" / filename,
                    "hf_artifacts_docs": hf_root / "artifacts/docs" / filename,
                    "hf_model": hf_root / "model" / filename,
                    "hf_model_docs": hf_root / "model/docs" / filename,
                },
                hf_root,
            )
        )

    result_files = sorted(
        set(RESULT_FILES)
        | set(verified_public_result_files())
        | set(tier2_result_files())
        | set(a100_128_metadata_result_files())
        | set(a100_128_raw20_result_files())
        | set(xperience10m_128_data_feature_files())
        | set(model_output_task_probe_result_files())
        | set(qwen3_future_task_probe_result_files())
        | set(qwen3_retrieval_task_probe_result_files())
        | set(cosmos3_super_retrieval_task_probe_result_files())
        | set(cosmos3_super_future_task_probe_result_files())
        | set(cosmos3_super_interaction_text_task_probe_result_files())
    )
    for filename in result_files:
        groups.append(
            parity_group(
                f"results/{filename}",
                ROOT / "results" / filename,
                {
                    "hf_artifacts": hf_root / "artifacts/results" / filename,
                    "hf_model": hf_root / "model/results" / filename,
                },
                hf_root,
            )
        )

    space_result_files = sorted(
        set(RESULT_FILES)
        | set(tier2_result_files())
        | set(model_output_task_probe_result_files())
        | set(qwen3_future_task_probe_result_files())
        | set(qwen3_retrieval_task_probe_result_files())
        | set(cosmos3_super_retrieval_task_probe_result_files())
        | set(cosmos3_super_future_task_probe_result_files())
        | set(cosmos3_super_interaction_text_task_probe_result_files())
    )
    for filename in space_result_files:
        groups.append(
            parity_group(
                f"space_results/{filename}",
                ROOT / "results" / filename,
                {
                    "hf_space": hf_root / "space/results" / filename,
                },
                hf_root,
            )
        )

    for filename in DOC_FILES:
        groups.append(
            parity_group(
                f"docs/{filename}",
                ROOT / filename,
                {
                    "hf_space": hf_root / "space" / filename,
                    "hf_artifacts": hf_root / "artifacts" / filename,
                    "hf_model": hf_root / "model" / filename,
                },
                hf_root,
            )
        )

    failures = [
        {"group": group["name"], **failure}
        for group in groups
        for failure in group["failures"]
    ]
    by_surface: dict[str, int] = {}
    for failure in failures:
        by_surface[failure["surface"]] = by_surface.get(failure["surface"], 0) + 1

    return {
        "status": "pass" if not failures else "fail",
        "generated_at_utc": datetime.now(timezone.utc).isoformat(timespec="seconds"),
        "hf_root": "hf_publish",
        "summary": {
            "group_count": len(groups),
            "failure_count": len(failures),
            "failures_by_surface": by_surface,
        },
        "checks": [
            {
                "name": "repo_hf_space_artifact_model_data_parity",
                "status": "pass"
                if not any(failure["group"].startswith("data/") for failure in failures)
                else "fail",
            },
            {
                "name": "repo_hf_visual_asset_parity",
                "status": "pass"
                if not any(failure["group"].startswith("assets/") for failure in failures)
                else "fail",
            },
            {
                "name": "repo_hf_validator_script_parity",
                "status": "pass"
                if not any(failure["group"].startswith("scripts/") for failure in failures)
                else "fail",
            },
            {
                "name": "repo_hf_website_html_parity",
                "status": "pass"
                if not any(failure["group"].startswith("website/") for failure in failures)
                else "fail",
            },
            {
                "name": "repo_hf_diagnostic_result_parity",
                "status": "pass"
                if not any(failure["group"].startswith("results/") for failure in failures)
                else "fail",
            },
            {
                "name": "repo_hf_quality_doc_parity",
                "status": "pass"
                if not any(failure["group"].startswith("docs/") for failure in failures)
                else "fail",
            },
        ],
        "groups": groups,
        "failures": failures,
    }


def main() -> int:
    parser = argparse.ArgumentParser()
    parser.add_argument("--hf-root", type=Path, default=DEFAULT_HF_ROOT)
    parser.add_argument("--output", type=Path, default=DEFAULT_OUTPUT)
    args = parser.parse_args()

    report = build_report(args.hf_root.resolve())
    args.output.parent.mkdir(parents=True, exist_ok=True)
    args.output.write_text(json.dumps(report, indent=2) + "\n", encoding="utf-8")
    print(f"{report['status'].upper()}: wrote {args.output}")
    if report["status"] != "pass":
        for failure in report["failures"][:40]:
            print(f"- {failure['group']}: {failure['surface']} {failure['kind']} {failure['path']}")
        if len(report["failures"]) > 40:
            print(f"- ... {len(report['failures']) - 40} more failures")
        return 1
    return 0


if __name__ == "__main__":
    raise SystemExit(main())