#!/usr/bin/env python3 """Verify that the LakeIce evidence delta stays outside validation claims.""" import json from pathlib import Path import sys SCHEMA = "kiwerb-lakeice-external-validation-search-v2" STATUS = "no_exact_reproduction_found_adjacent_benchmark_integrity_issue_open" TASK = "lakeice-cleanroom-fold0-seed0-three-arm-check" TASK_HASH = "149e7e4b190a62966be869851f150c43efc006546c1969d2fa4937804615c88f" ISSUE_URL = "https://github.com/Navidfoumani/monster/issues/3" REPOSITORY_URL = "https://github.com/Navidfoumani/monster" ISSUE_COMMIT = "accc5b5" GATE = "KEEP_OPEN_FOR_OUTSIDE_CLEAN_ROOM_REPRODUCTION; RECORD_ADJACENT_BENCHMARK_WARNING; NO_EXTERNAL_VALIDATION_CLAIM" FALSE_LIMITS = { "search_exhaustive", "absence_of_all_external_work_proven", "private_or_unindexed_work_checked", "future_publications_checked", "official_author_response_requested", "automatic_contact_performed", } FALSE_CLAIMS = { "outside_submission_received", "reviewer_identity_verified", "reviewer_independence_verified", "method_reproduced_externally", "result_reproduced_externally", "issue_claim_independently_verified_by_kiwerb", "independent_validation", "scientific_discovery", } REQUIRED_DEPENDENCY_VALUES = { "task_definition": "lakeice_model_onefit_task.json", "task_definition_canonical_sha256": TASK_HASH, "uses_pinned_lakeice_arrays": True, "uses_pinned_fold_indices": True, "uses_monster_final_results_xlsx": False, "uses_issue_reported_fcn_metrics": False, "issue_changes_task_inputs_or_algorithm": False, } REQUIRED_ADJACENT_VALUES = { "kind": "upstream_repository_issue", "url": ISSUE_URL, "repository": REPOSITORY_URL, "issue_number": 3, "opened_on": "2026-10-17", "observed_state": "open", "subject_file": "monster_final_results.xlsx", "subject_file_commit_reported_by_issue": ISSUE_COMMIT, "kiwerb_reproduction_performed": False, "upstream_resolution_observed": False, "qualifies_as_exact_task_reproduction": False, "qualifies_as_kiwerb_validation": False, "qualifies_as_scientific_discovery": False, } def verify(value): if value.get("schema_version") != SCHEMA or value.get("status") != STATUS: raise ValueError("wrong evidence-delta status") if value.get("checked_on") != "2026-10-25" or value.get("task_slug") != TASK: raise ValueError("wrong check date or task binding") dependency = value.get("task_dependency_review", {}) if any(dependency.get(key) != expected for key, expected in REQUIRED_DEPENDENCY_VALUES.items()): raise ValueError("task dependency boundary drift") if not isinstance(dependency.get("review_result"), str) or not dependency["review_result"]: raise ValueError("task dependency review missing") adjacent = value.get("adjacent_benchmark_evidence", {}) if any(adjacent.get(key) != expected for key, expected in REQUIRED_ADJACENT_VALUES.items()): raise ValueError("adjacent issue evidence drift") expected_example = { "dataset": "LakeIce", "method": "FCN", "fold": 0, "accuracy_percent": 99.6, "balanced_accuracy_percent": 97.4, "accuracy_range_implied_by_balanced_accuracy_percent": [96.5, 98.2], } if adjacent.get("reported_lakeice_example") != expected_example: raise ValueError("reported LakeIce issue row drift") expected_counts = {"ConvTran": "0/50", "FCN": "26/50", "HInceptionTime": "22/50", "TempCNN": "16/50"} if adjacent.get("reported_univariate_counts_with_one_percentage_point_tolerance") != expected_counts: raise ValueError("reported issue aggregate drift") if set(value.get("limits", {})) != FALSE_LIMITS or any(value["limits"].values()): raise ValueError("bounded search cannot prove exhaustive absence or contact") if set(value.get("claims", {})) != FALSE_CLAIMS or any(value["claims"].values()): raise ValueError("external scientific claims require separate evidence") if value.get("gate_decision") != GATE: raise ValueError("wrong gate decision") channels = value.get("channels_checked", []) urls = {item.get("url") for item in channels if isinstance(item, dict)} if len(channels) < 5 or ISSUE_URL not in urls or REPOSITORY_URL not in urls: raise ValueError("search channels or issue source incomplete") if len(value.get("qualification_requires", [])) < 7: raise ValueError("qualification gates incomplete") return { "status": "external_evidence_delta_verified_no_validation_claim", "exact_task_reproduction_found": False, "task_uses_questioned_results_sheet": False, "adjacent_issue_open": True, "issue_independently_reproduced_by_kiwerb": False, "independent_validation": False, "scientific_discovery": False, } def main(): if len(sys.argv) > 2: raise SystemExit("usage: verify_external_validation_status.py [STATUS_JSON]") path = Path(sys.argv[1]) if len(sys.argv) == 2 else Path(__file__).with_name("external-validation-status.json") value = json.loads(path.read_text(encoding="utf-8")) print(json.dumps(verify(value), sort_keys=True)) if __name__ == "__main__": main()