Dashboard › institutional-transition-lab › Distillation
a437f7a9-92ea-4a29-b730-4c91fd7e9d1b["lore_tm_v1_VIXe167EAYm-VsXKsWwgCGBSTGrFT3fpErjIZ9EErp8","lore_tm_v1_57ft3EPwboMTRM49HDQrmZMMZFnGlmxYcborWMJZBHM","lore_tm_v1_-fQtZPm7viqTPHP4sYAtFxp_UvdSrjI4EryefyTjEoI","lore_tm_v1_nS3tMZBtBD1GsZ7bRR1U9L4iigVAG3RFSaK3y0Kz28U","lore_tm_v1_SYNsHzmQjfQqswri76HMg9jQqMLHl-zCy23AuLSiPE8"]
schema/governance-adjudication-v1.schema.json defines evidence_ref with exactly source_id and quote, both non-empty strings; claim_evidence_ref additionally requires field, restricted to record_class, event_kind, title, announced_on, effective_on, affected_scope, or body_patch_relation.schema/governance-adjudication-v1.schema.json defines power_change with required fields actor, right_kind, target, direction, change_status, scope, and evidence_refs; evidence_refs must have at least 1 item. direction is one of added, removed, modified; change_status is one of effective, announced, proposed, rejected, unclear.right_kind options are appoint, remove, elect, vote, delegate, override, approve, merge, write, release, veto, own, license, steward, fund, set_budget, set_strategy, set_policy, set_membership, set_terms, and inform.schema/governance-adjudication-v1.schema.json defines coding classes effective_institutional_change, announced_institutional_change, proposal_only, control_event, no_event, and abstain; confidence must be numeric from 0 through 1, while power_changes may be an empty array at the schema level.schema/governance-adjudication-v1.schema.json defines edge_revision with required basis, added, and removed; basis may be luna_a, luna_b, terra_advisory, or null, and both edge arrays contain power_change objects.schema/governance-adjudication-v1.schema.json defines source_audit.inspected_before_codings as constant true; source_ids must be a unique non-empty array of non-empty strings; evidence_bounds requires source_text_truncated, files_listing_complete, patch_selection_truncated, and nonnegative integer patch_unavailable_count.schema/governance-adjudication-v1.schema.json are accept, revise, reject, or abstain; accepted_from may be luna_a, luna_b, terra_advisory, or null; final_coding and graph_edge_revision may each be an object or null.validate_response() in src/institution_lab/governance_coding.py lines 241–315 checks exact top-level keys, allowed record_class, event_kind, and body_patch_relation, non-empty-or-null title/affected_scope/ambiguity, ISO-or-null dates, and finite non-boolean confidence from 0 through 1.validate_response() constructs source_map using a dictionary comprehension keyed by source_id from document["sources"]; duplicate source IDs therefore overwrite earlier entries in this map, motivating investigation of source-ID collision behavior.validate_response() requires power_changes to be an array and each change to have exactly POWER_KEYS; it validates non-empty actor, target, and scope, allowed right_kind, direction, and change_status, and at least 1 evidence_ref.validate_response() requires each reference to have exactly REF_KEYS, resolve to string source text, contain a non-empty quote, and have that quote occur in the source text; malformed references emit power_changes[{index}].evidence_refs[{ref_index}] is malformed, while failed grounding emits ... is not grounded.effective_institutional_change, announced_institutional_change, and proposal_only to contain power_changes; all other classes must not contain them; abstain additionally requires non-null ambiguity.tests/test_governance_adjudication.py uses record example-1, source URL https://github.com/acme/example/issues/1, source ID body, and source text The council may approve releases.; its primary reviewer is opencode-gpt-5.6-sol-primary using model openai/gpt-5.6-sol with role source_adjudicator.test_one_abstention_keeps_canonicalization_gate_closed verifies that decision="abstain", accepted_from=None, an explicit unresolved_reason, final_coding=None, and graph_edge_revision=None produce no validation errors but yield record_count == 1, unresolved_record_ids == ["example-1"], and canonicalization_gate == "closed".test_record_ids_must_match_frozen_documents_exactly_once tests both duplicate and missing records and expects record IDs must match frozen documents exactly once; test_accept_must_equal_the_named_frozen_response changes accepted coding confidence to 0.5 and expects accepted coding does not equal luna_a.test_resolved_decision_cannot_leave_final_coding_abstained verifies that a revise decision with final class abstain fails with resolved decision cannot use abstain final class, closing canonicalization.test_source_audit_must_match_complete_frozen_document tests inspected_before_codings=False, source_ids=[], and incomplete evidence_bounds={"source_text_truncated": True}; each must produce a source_audit error and close the canonicalization gate.test_institutional_class_and_dates_must_agree covers 4 invalid combinations: effective_institutional_change without effective_on; announced_institutional_change without announced_on; announced_institutional_change with effective_on; and proposal_only with effective_on.test_bounded_source_requires_explicit_evidence_limitation marks source_text_truncated=True in both frozen documents and the record audit, then expects bounded evidence requires evidence_limitations and a closed canonicalization gate.test_accept_edge_revision_uses_the_accepted_response changes an accepted luna_a record’s graph basis to luna_b and expects accept revision basis must equal accepted_from.test_institutional_claims_require_grounded_claim_and_edge_evidence injects quote invented into both claim_evidence_refs and final edge evidence, expecting a not grounded error and closed canonicalization._institutional_adjudication() creates revised institutional records with all 7 claim fields grounded by source ID body and quote council; it models The council gaining approve rights over releases in scope project releases, grounded by The council may approve releases., with graph basis None and the final power change copied into added._institutional_adjudication() maps classes to statuses as follows: effective_institutional_change → effective, announced_institutional_change → announced, and proposal_only → proposed.test_institutional_class_and_edge_status_must_agree checks 3 mismatches—effective class with proposed, announced class with effective, and proposal class with effective—and expects does not permit edge status plus a closed canonicalization gate.