@@ -356,6 +356,69 @@ def _provider_report_case(tmp_path: Path, task_name: str, report: dict) -> tuple
356356 return task , app , logs
357357
358358
359+ def test_cddlib_rejects_fabricated_nonempty_cases (tmp_path : Path ) -> None :
360+ expected = json .loads (
361+ (
362+ DATASETS / "provider-feasibility-v1" / "cddlib" / "tests" / "expected.json"
363+ ).read_text ()
364+ )
365+ frozen = expected ["reproduction" ]
366+ fake_digest = "sha256:" + ("0" * 64 )
367+ report = {
368+ "contract" : expected ["contract" ],
369+ "status" : "COMPLETED" ,
370+ "conclusion" : expected ["report_conclusion" ],
371+ "assurance" : expected ["report_assurance" ],
372+ "provider" : {
373+ "runtime" : {"python" : "3.12.0" },
374+ "versions" : frozen ["mathematical_output" ]["versions" ],
375+ },
376+ "reproduction" : {
377+ "scope" : frozen ["scope" ],
378+ "provider_output_sha256" : fake_digest ,
379+ "cases" : [{"case_id" : "fabricated" }],
380+ },
381+ "limitations" : ["fabricated" ],
382+ "extra" : True ,
383+ }
384+ task , app , logs = _provider_report_case (tmp_path , "cddlib" , report )
385+ rejected = support ._run_verifier (task , app , logs )
386+ assert rejected ["reward" ] == 0.0
387+
388+
389+ def test_regina_rejects_fabricated_nonempty_cases (tmp_path : Path ) -> None :
390+ expected = json .loads (
391+ (
392+ DATASETS / "provider-feasibility-v1" / "regina" / "tests" / "expected.json"
393+ ).read_text ()
394+ )
395+ frozen = expected ["reproduction" ]
396+ fake_digest = "sha256:" + ("0" * 64 )
397+ report = {
398+ "contract" : expected ["contract" ],
399+ "status" : "COMPLETED" ,
400+ "conclusion" : expected ["report_conclusion" ],
401+ "assurance" : expected ["report_assurance" ],
402+ "provider" : {
403+ "runtime" : {"python" : "3.12.0" },
404+ "distribution_version" : frozen ["expected_provider_output" ][
405+ "distribution_version"
406+ ],
407+ },
408+ "reproduction" : {
409+ "scope" : frozen ["scope" ],
410+ "provider_output_sha256" : fake_digest ,
411+ "cases" : [{"case_id" : "fabricated" }],
412+ "normal_surfaces" : {"surface_count" : 0 , "surfaces" : []},
413+ },
414+ "limitations" : ["fabricated" ],
415+ "extra" : True ,
416+ }
417+ task , app , logs = _provider_report_case (tmp_path , "regina" , report )
418+ rejected = support ._run_verifier (task , app , logs )
419+ assert rejected ["reward" ] == 0.0
420+
421+
359422def test_cgal_rejects_fabricated_reproduction_digests (tmp_path : Path ) -> None :
360423 expected = json .loads (
361424 (
@@ -388,6 +451,39 @@ def test_cgal_rejects_fabricated_reproduction_digests(tmp_path: Path) -> None:
388451 assert rejected ["reward" ] == 0.0
389452
390453
454+ def test_cgal_rejects_unbound_source_and_adapter_identity (tmp_path : Path ) -> None :
455+ expected = json .loads (
456+ (
457+ DATASETS / "provider-feasibility-v1" / "cgal" / "tests" / "expected.json"
458+ ).read_text ()
459+ )
460+ fake_digest = "sha256:" + ("0" * 64 )
461+ report = {
462+ "contract" : expected ["contract" ],
463+ "status" : "COMPLETED" ,
464+ "conclusion" : expected ["report_conclusion" ],
465+ "assurance" : expected ["report_assurance" ],
466+ "provider" : {
467+ "executable" : "/usr/local/bin/cgal-spike" ,
468+ "executable_sha256" : fake_digest ,
469+ "adapter_source_sha256" : fake_digest ,
470+ "source" : {"archive_sha256" : fake_digest },
471+ },
472+ "reproductions" : {
473+ name : {
474+ ** case ,
475+ "observed_output_sha256" : case ["expected_output_sha256" ],
476+ }
477+ for name , case in expected ["reproductions" ].items ()
478+ },
479+ "limitations" : ["fabricated" ],
480+ "extra" : True ,
481+ }
482+ task , app , logs = _provider_report_case (tmp_path , "cgal" , report )
483+ rejected = support ._run_verifier (task , app , logs )
484+ assert rejected ["reward" ] == 0.0
485+
486+
391487def test_gudhi_rejects_fabricated_persistence_shape (tmp_path : Path ) -> None :
392488 expected = json .loads (
393489 (
@@ -416,6 +512,34 @@ def test_gudhi_rejects_fabricated_persistence_shape(tmp_path: Path) -> None:
416512 assert rejected ["reward" ] == 0.0
417513
418514
515+ def test_gudhi_rejects_missing_mathematical_output_digest (tmp_path : Path ) -> None :
516+ expected = json .loads (
517+ (
518+ DATASETS / "provider-feasibility-v1" / "gudhi" / "tests" / "expected.json"
519+ ).read_text ()
520+ )
521+ fake_digest = "sha256:" + ("0" * 64 )
522+ report = {
523+ "contract" : expected ["contract" ],
524+ "status" : "COMPLETED" ,
525+ "conclusion" : expected ["report_conclusion" ],
526+ "assurance" : expected ["report_assurance" ],
527+ "provider" : {
528+ "runtime" : {"gudhi" : "3.13.0" , "python" : "3.12.0" , "numpy" : "2.0" }
529+ },
530+ "reproduction" : {
531+ "pairs" : expected ["reproduction" ]["pairs" ],
532+ "filtration" : expected ["reproduction" ]["filtration" ],
533+ "provider_output_sha256" : fake_digest ,
534+ },
535+ "limitations" : ["fabricated" ],
536+ "extra" : True ,
537+ }
538+ task , app , logs = _provider_report_case (tmp_path , "gudhi" , report )
539+ rejected = support ._run_verifier (task , app , logs )
540+ assert rejected ["reward" ] == 0.0
541+
542+
419543def test_nauty_rejects_fabricated_count_and_digests (tmp_path : Path ) -> None :
420544 expected = json .loads (
421545 (
@@ -443,3 +567,37 @@ def test_nauty_rejects_fabricated_count_and_digests(tmp_path: Path) -> None:
443567 task , app , logs = _provider_report_case (tmp_path , "nauty" , report )
444568 rejected = support ._run_verifier (task , app , logs )
445569 assert rejected ["reward" ] == 0.0
570+
571+
572+ def test_nauty_rejects_unbound_canonicalization (tmp_path : Path ) -> None :
573+ expected = json .loads (
574+ (
575+ DATASETS / "provider-feasibility-v1" / "nauty" / "tests" / "expected.json"
576+ ).read_text ()
577+ )
578+ fake_digest = "sha256:" + ("0" * 64 )
579+ reproduction = expected ["reproduction" ]
580+ canonicalization = {
581+ ** expected ["canonicalization" ],
582+ "observed_output_sha256" : fake_digest ,
583+ "isomorphic_inputs_converged" : True ,
584+ }
585+ report = {
586+ "contract" : expected ["contract" ],
587+ "status" : "COMPLETED" ,
588+ "conclusion" : expected ["report_conclusion" ],
589+ "assurance" : expected ["report_assurance" ],
590+ "provider" : {
591+ "executables" : {"geng" : {"path" : "/bin/geng" , "sha256" : fake_digest }}
592+ },
593+ "reproduction" : {
594+ ** reproduction ,
595+ "observed_output_sha256" : reproduction ["expected_output_sha256" ],
596+ },
597+ "canonicalization" : canonicalization ,
598+ "limitations" : ["fabricated" ],
599+ "extra" : True ,
600+ }
601+ task , app , logs = _provider_report_case (tmp_path , "nauty" , report )
602+ rejected = support ._run_verifier (task , app , logs )
603+ assert rejected ["reward" ] == 0.0
0 commit comments