Dashboard › institutional-transition-lab › Distillation
bf7fd0df-70b3-49b4-828f-2607d1bee971["lore_tm_v1_Gx2OnVFNLgtDqEfgzTQDhIT2rObRmqtD3w22jBY727Q","lore_tm_v1_yJimb2jzYDD0q5FRDgXr2NTvuPar0L6uU3MGc3byEIg","lore_tm_v1_pYvKpPY-EeCOB_J0DwlwqiGQ7SUFXnBHXZluix48sAA"]
/home/byk/Code/institutional-transition-lab/tests/test_governance_adjudication.py for schema/summary-related references; found 100 matches with additional matches available./home/byk/Code/institutional-transition-lab/tests/test_governance_adjudication.py lines 780–1024; the file has 1,024 total lines and covers manifest race protection, path-alias rejection, malformed inputs, archive limits, regular-file enforcement, canonical hashing, committed frozen inputs/fragments, and successful gate opening.test_cli_rejects_output_aliases_to_frozen_inputs parametrizes 8 input_name values—adjudication, input_manifest, documents, coding_package, artifact, protocol, coding_schema, adjudication_schema—and 3 alias_kind values—direct, symlink, hardlink; every combination must raise ValueError matching "output path aliases an input" and leave the input bytes unchanged.test_cli_rejects_aliased_outputs makes paths["summary_markdown"] equal paths["summary_json"] and expects ValueError matching "output paths alias each other".documents.json immediately before verify_input_manifest; _run_cli must raise ValueError matching "input manifest mismatch: documents_file_sha256".test_cli_rejects_duplicate_manifest_keys injects a second "artifact_sha256" key with value "forged", prewrites summary.json as {"canonicalization_gate":"open"}\n, expects ValueError matching "duplicate JSON key: artifact_sha256", and verifies the output gate is rewritten to "closed".test_input_manifest_rejects_non_object passes [] to verify_input_manifest and expects ValueError matching "input manifest must be an object".test_input_manifest_rejects_duplicate_artifact_members appends a second documents.json member to the ZIP, updates manifest["artifact_sha256"], patches FROZEN_INPUT_PINS, and expects ValueError matching "artifact member is not unique: documents.json".test_input_manifest_rejects_excessive_artifact_member_count appends MAX_TEST_ARCHIVE_MEMBERS padding entries named padding/{index} to the artifact, updates its SHA-256 pin, and expects ValueError matching "artifact member count exceeds limit".test_regular_file_reader_rejects_fifo_without_blocking creates input.fifo via os.mkfifo, invokes _read_regular_file in a subprocess with timeout=1, and asserts a nonzero return code plus "input path is not a regular file" in stderr.test_canonical_sha256_rejects_non_finite_numbers parametrizes float("nan"), float("inf"), and float("-inf"); canonical_sha256({"value": value}) must raise ValueError matching "Out of range float values".test_committed_frozen_input_manifest_verifies loads cases/review/oss-governance-adjudication-v1.inputs.json and verifies committed inputs: artifact-9642983578.zip, documents.json, v1.2-coding-package.json, research/oss-governance-coding-protocol-v1.2.md, schema/governance-coding-v1.schema.json, and schema/governance-adjudication-v1.schema.json; returned pins must equal FROZEN_INPUT_PINS.test_committed_partial_fragment_validates_but_cannot_be_the_full_envelope loads cases/review/oss-governance-adjudication-v1/fragments/opentofu-a2.json; validate_adjudication_fragment(...) must return [], while validate_against_schema(fragment, schema) must report errors because the partial fragment is not a valid full envelope.test_malformed_fragment_record_id_fails_closed replaces fragment["records"][0]["record_id"] with {"invalid": "record ID"} and requires validation errors containing both "record_id" and "known subset".test_resolved_valid_records_open_the_gate expects no errors, decision_counts == {"accept": 1}, class_counts == {"no_event": 1}, no unresolved record IDs, and canonicalization_gate == "open".record_decisions entry is {"record_id": "example-1", "decision": "accept", "final_class": "no_event", "reviewer_ids": ["opencode-gpt-5.6-sol-primary"], "evidence_limitations": None}.graph_edge_revisions entry is {"record_id": "example-1", "basis": "luna_a", "added": [], "removed": []}, and reviewer_provenance must equal _adjudication()["reviewers"]./home/byk/Code/institutional-transition-lab/tests/test_governance_adjudication.py lines 1–140, including imports, CLI-fixture construction, CLI argument assembly, validation stubs, ontology consistency checks, and URI/date format parametrization.DECISIONS, FROZEN_INPUT_PINS, REQUIRED_INPUT_PINS, REVIEWER_ROLES, REVIEWER_TYPES, canonical_sha256, file_sha256, validate_adjudication, validate_adjudication_fragment, validate_against_schema, and verify_input_manifest from institution_lab.governance_adjudication; it imports BODY_PATCH_RELATIONS, CHANGE_STATUSES, DIRECTIONS, EVENT_KINDS, RECORD_CLASSES, and RIGHT_KINDS from institution_lab.governance_coding.ROOT = Path(__file__).parents[1] and MAX_TEST_ARCHIVE_MEMBERS = 256._write_pinned_cli_inputs(tmp_path, monkeypatch) creates paths for adjudication.json, inputs.json, documents.json, coding-package.json, artifact.zip, protocol.md, coding-schema.json, adjudication-schema.json, summary.json, and summary.md._write_pinned_cli_inputs writes documents_value = {"documents": []}, coding_package_value = {"records": [], "summary": {}}, and adjudication_schema_value = {"type": "object"}; the ZIP contains documents.json and v1.2-adjudication-package.json.workflow_run_id = 33063470968, artifact_id = 9642983578, artifact_sha256, canonical documents_sha256, documents_file_sha256, coding_package_file_sha256, protocol_sha256, coding_schema_sha256, and adjudication_schema_sha256; it is written to inputs.json and copied into patched governance_adjudication.FROZEN_INPUT_PINS._run_cli builds sys.argv beginning with "institution-lab-governance-adjudication" and appends flags for --adjudication, --input-manifest, --documents, --coding-package, --artifact, --protocol, --coding-schema, --adjudication-schema, --summary-json, and --summary-markdown, then calls governance_adjudication.main()._stub_cli_validation patches validate_against_schema to return [], validate_adjudication to return ([], {"canonicalization_gate": "open"}), and render_markdown to return "gate: open\n".test_adjudication_schema_matches_validator_ontology requires schema decision enums to equal DECISIONS, reviewer-type enums to equal REVIEWER_TYPES, reviewer-role enums to equal REVIEWER_ROLES, coding record_class enums to equal RECORD_CLASSES, coding event_kind enums to equal EVENT_KINDS | {None}, coding body_patch_relation enums to equal BODY_PATCH_RELATIONS, and power-change right_kind, direction, and change_status enums to equal RIGHT_KINDS, DIRECTIONS, and CHANGE_STATUSES, respectively.("source_url", "not a URI") and ("announced_on", "2024-02-30").