Dashboard › institutional-transition-lab › Distillation
7d564d74-a21d-4be5-b720-5476cc5c5f2e["lore_tm_v1_XYKYkCbi52Tde9-Cox2yppHloB67mWFw2aqdE26Z-YU","lore_tm_v1_rAOroAu6cu-1NVBVxUM43YNOW9hZWUH9LEfPYLZgQUw","lore_tm_v1_s076fgz7dLGusiXXCNKFMsLFBFwWj8htl5FONRCFg_k","lore_tm_v1_exhcG2Hn-isND_iBOx5C-46lAwbQpCIqyX_UOEViPqU","lore_tm_v1_-M6-WRy1ZwKeppn9Dq8dnYtVrOpgE-1qUu8P7s8nkhA","lore_tm_v1_iif-moRpawbAa8CxQzbfF05zHVOHC7ONHWSbAxbGWbY","lore_tm_v1_PX3x72ZYJli5tslmwNWbOo6vchnTjBTjmZ_vkrYpWoI"]
src/institution_lab/governance_adjudication.py lines 779-825 define render_markdown(adjudication, summary): reports canonicalization_gate, decision/class counts, per-record decision/final class/reviewers/evidence limitations, unresolved IDs, frozen input pins, reviewer provenance, and graph-edge revision added/removed counts.src/institution_lab/governance_adjudication.py: _paths_alias() uses Path.samefile() with a non-strict resolved-path fallback; _validate_output_paths() rejects outputs aliasing any input and rejects the two output paths aliasing each other._atomic_write() in src/institution_lab/governance_adjudication.py lines 844-856 creates a temporary file in the destination directory with tempfile.mkstemp, writes and flushes the payload, calls os.fsync(), and atomically replaces the destination via os.replace(); exceptions trigger temporary-file cleanup before re-raising._write_failure_reports() writes fail-closed JSON with schema_version: 1, canonicalization_gate: "closed", and validation_errors: [str(error)], plus Markdown headed # OSS governance adjudication v1 with the same closed gate and validation error.main() requires 10 path arguments: --adjudication, --input-manifest, --documents, --coding-package, --artifact, --protocol, --coding-schema, --adjudication-schema, --summary-json, and --summary-markdown.ValueError("adjudication validation failed:\n" + ...) when validation errors remain._duplicates(values: list[str]) at src/institution_lab/governance_adjudication.py:242-244 directly constructs Counter(values) and therefore assumes every supplied value is hashable._source_index() at src/institution_lab/governance_adjudication.py:247-260 indexes source text by source_id only when both source_id and text are strings, then unconditionally adds synthetic source record_metadata containing compact, sorted JSON for record_id, source_url, published_on, publisher, and source_type._evidence_errors() requires exact evidence-reference keys: claims require field, source_id, and quote; other evidence requires source_id and quote. It validates claim fields against CLAIM_FIELDS, requires non-empty string IDs/quotes, requires the source ID in the frozen source map, and checks the quote is a substring of that source text._response_for() returns a response only when the named coding result is a dictionary, has schema_valid is True, and contains a dictionary-valued response.graph_edge_diff() canonicalizes each edge with sorted compact JSON via _edge_key(), builds baseline/final dictionaries keyed by that serialization, and returns deterministically sorted added and removed edges._validate_reviewer() requires exactly reviewer_id, reviewer_type, model, role, and assistance; validates non-empty identifiers/assistance and enum membership; requires model is None for human reviewers and a non-empty model string for non-human reviewers; any model string containing gemini case-insensitively is rejected because Gemini is restricted to event triage._validate_record() requires source_url equality with the frozen document, a decision in DECISIONS, a non-empty unique string-only reviewer list whose IDs are known, and a non-empty string rationale.inspected_before_codings is True, list source IDs exactly as they occur in the frozen document, and reproduce the documentβs evidence_bounds.source_text_truncated is True, files_listing_complete is False, patch_selection_truncated is True, or integer patch_unavailable_count > 0; bounded records require non-empty evidence_limitations._validate_record(): accept requires accepted_from in RESPONSE_SOURCES and final_coding exactly equal to that valid frozen response; only accept may set accepted_from; accept, revise, and reject require dictionary final_coding validated by validate_response(); abstain requires null final_coding and non-empty unresolved_reason; resolved decisions require null unresolved_reason.abstain; reject must resolve to a non-institutional class; effective_institutional_change requires effective_on; announced_institutional_change requires announced_on; announced_institutional_change and proposal_only must not set effective_on.effective_institutional_change β effective; announced_institutional_change β announced; proposal_only β proposed, rejected, or unclear.CLAIM_FIELDS must appear as a field in at least one claim reference; the grounded-field accounting includes any dictionary reference before considering whether _evidence_errors() found that reference invalid.graph_edge_revision; resolved decisions require an object; basis must be a response source or null; accepted decisions require basis == accepted_from; and added/removed must exactly match graph_edge_diff() from the selected frozen baseline to final_coding.validate_adjudication() requires transition_dates_excluded is True, outcome_data_used is False, and matching values for every REQUIRED_INPUT_PINS entry.canonical_sha256(documents) and then uses coding_package.get("summary", {}).get("documents_sha256"); a present-but-null summary is not normalized before the second .get().source_adjudicator.row.get("record_id") for every dictionary row without a string/hashability filter. They are compared for exact equality, set equality, uniqueness, and frozen order; documents_by_id and coding_by_id then use raw row["record_id"] as dictionary keys.record_count, sorted decision_counts, sorted class_counts, unresolved_record_ids, record_decisions, graph_edge_revisions, reviewer_provenance, and a gate that is "closed" when errors or unresolved records exist and "open" otherwise.validate_adjudication_fragment() builds a restricted schema requiring exactly the fragment-level fields schema_version, design_status, reviewers, and records, with schema_version: 1 and design_status: "performance_blinded_llm_assisted_source_adjudication".documents_by_id/coding_by_id dictionary keys still use raw record IDs.coding_package.get("summary", {}).get("documents_sha256"), so it has the same present-but-null summary dereference shape as full validation.src/institution_lab/governance_coding.py:268-302 builds source_map from every dictionary source using raw source.get("source_id") as a dictionary key and does not require source IDs or source text to be strings while constructing the map; evidence grounding later requires the looked-up source text to be a string and the quote to be non-empty and contained in it.confidence as a finite non-boolean integer/float in the inclusive range [0, 1].POWER_KEYS; actor, target, and scope must be non-empty; right_kind, direction, and change_status must belong to their respective enums; and evidence_refs must be a non-empty list whose items have exactly REF_KEYS and grounded quotes.effective_institutional_change, announced_institutional_change, or proposal_onlyβto contain power changes; non-institutional records must contain none; an abstain response requires non-null ambiguity.validate_against_schema() uses Draft202012Validator(schema, format_checker=FormatChecker()), sorts errors by list(error.path), and formats them as schema <path>: <message> with <root> for an empty path.schema/governance-adjudication-v1.schema.json defines SHA-256 pins as lowercase 64-character hexadecimal strings matching ^[0-9a-f]{64}$.human, llm, and human_llm_assisted; roles are source_adjudicator, evidence_auditor, and synthesizer; reviewer_id and assistance have minLength: 1, while model is a non-empty string or null.source_id and quote; claim references additionally require field, whose allowed values are record_class, event_kind, title, announced_on, effective_on, affected_scope, and body_patch_relation.actor, right_kind, target, direction, change_status, scope, and evidence_refs; evidence references have minItems: 1, but no uniqueItems constraint was shown.right_kind schema values, in order, 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.added, removed, and modified; edge statuses are effective, announced, proposed, rejected, and unclear.effective_institutional_change, announced_institutional_change, proposal_only, control_event, no_event, and abstain; event kinds are leadership, board_or_steering, control_rights, reorganization, foundation_transfer, license, fork, reunification, strategy, product, external, or null.title, affected_scope, and ambiguity are non-empty strings or null; announced_on and effective_on are date-formatted strings or null; confidence is a number from 0 through 1.body_patch_relation values are consistent, patch_supersedes_body, body_only, patch_only, conflict, not_applicable, and unclear.luna_a, luna_b, terra_advisory, or null; revisions require basis, added, and removed.evidence_bounds requires source_text_truncated, files_listing_complete, patch_selection_truncated, and patch_unavailable_count; files_listing_complete may be boolean or null, and patch_unavailable_count is a non-negative integer.inspected_before_codings: true, source_ids, and evidence_bounds; source_ids has minItems: 1, uniqueItems: true, and non-empty string items.record_id, source_url, decision, accepted_from, reviewer_ids, source_audit, rationale, evidence_limitations, unresolved_reason, claim_evidence_refs, final_coding, and graph_edge_revision.^https://github\\.com/[^\\s]+$; decisions are accept, revise, reject, or abstain; accepted_from is luna_a, luna_b, terra_advisory, or null; reviewer IDs have minItems: 1, uniqueItems: true, and non-empty string items.research/session-handover-2026-08-27.md, research/oss-governance-retrieval-development-v2.md, research/oss-governance-retrieval-development-v1.md, research/oss-governance-enriched-audit-envelope-v1.md, research/oss-governance-coding-results-v1.2.md, research/oss-governance-coding-protocol-v1.md, research/oss-governance-coding-protocol-v1.2.md, research/luna-terra-hard-case-comparison.md, and research/luna-event-extraction-development-benchmark.md, plus research/llm-event-triage-cost-frontier-protocol.md.mai-code-1.1-flash candidate achieved 75% decision accuracy and failed the strict bar.research/luna-event-extraction-development-benchmark.md report 96.0% announcement-date accuracy and state that event kind and announcement date were stable across runs.research/llm-event-triage-cost-frontier-protocol.md identify ordered candidate 2 as gemini-3.7-flash:default, priced at $0.75 and $3.75, described as the cheapest requested eligible candidate; the gate requires mean announcement-date accuracy of at least 90%.