Dashboard › institutional-transition-lab › Distillation
c9a0b7dc-914a-48bc-aab2-2d868f058a96["lore_tm_v1_RFJkD4zzU8xxkyw-eACXD34NwDrgYbiLhhRfcYFwQzE","lore_tm_v1_rIs6on57SuRn1ua2fI18nptPbgXIq_0b5P3uKBYT-ps","lore_tm_v1_73kwp0dU0Yuz4J4mSu5EwN3JIrcto_9Tw_y8wNTau9g","lore_tm_v1_MAytTKT4c7RemlOzY0G7CPF37UdRbZe0sw6GKBnGr0I","lore_tm_v1_RUlqCeNtcVIsSYpNKjqYCxlB4puJuOW3i_vv4KB3I0A"]
cases/review/oss-governance-adjudication-v1.inputs.json pins 9 provenance values: adjudication_schema_sha256=6181f5cb60a0462f83be00be301763daa89f11581e68ee1c46a84e8bf4e5be31, artifact_id=9642983578, artifact_sha256=1f6be91fcd98e43e99d82d5f274536f6c23616e7e6c711e26324a2cc4b06ef06, coding_package_file_sha256=14644759f53071adfe1173d4e25bb01931b8c1591fa8a48295dbd0556a754769, coding_schema_sha256=bfc735a7d8602d1f236a88c2d23b195f0600a8bae86fb8c8936afe7883a41b8e, documents_file_sha256=2a62ab05687982c112a29f6126227c26c3ff8defc89ca64662753aaf85c3c0ce, documents_sha256=d70f7f795847968339a645b6dbd6d4428af6bd6044de44fa2602d4c4343b0ee9, protocol_sha256=06d4b3407677fe7fb23046f70164a366db06638e8a29af3daf7661f00d565933, and workflow_run_id=33063470968 (lines 1-11).src/institution_lab/governance_coding.py is a 598-line module implementing preparation, parsing, validation, comparison/routing, Markdown rendering, and CLI handling for performance-blinded governance coding.governance_coding.py defines 6 RECORD_CLASSES: effective_institutional_change, announced_institutional_change, proposal_only, control_event, no_event, and abstain; 12 EVENT_KINDS: leadership, board_or_steering, control_rights, reorganization, foundation_transfer, license, fork, reunification, strategy, product, and external; 22 RIGHT_KINDS: 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; DIRECTIONS={"added","removed","modified"}; and CHANGE_STATUSES={"effective","announced","proposed","rejected","unclear"} (lines 14-59).BODY_PATCH_RELATIONS contains consistent, patch_supersedes_body, body_only, patch_only, conflict, not_applicable, and unclear; RESPONSE_KEYS requires exactly record_class, event_kind, title, announced_on, effective_on, affected_scope, body_patch_relation, power_changes, confidence, and ambiguity; each power change requires exactly actor, right_kind, target, direction, change_status, scope, and evidence_refs; each evidence reference requires exactly source_id and quote (lines 60-90).MODEL_INPUT_FIELDS is ordered as entity_id, publisher, published_on, source_type, sources, and evidence_bounds; CODING_DOCUMENT_KEYS adds record_id and source_url (lines 91-99).prepare_coding_bundle() joins enriched records to source documents by document_id, rejects malformed/missing records, documents, source records, source text, or enrichment, and always creates a body source with kind github_body (lines 122-150).pull_request_state_and_patch, prepare_coding_bundle() adds a pr_metadata source containing sorted JSON for state, draft, merged, merged_at, merge_commit_sha, base_sha, head_sha, and changed_files; it then adds each usable patch as patch:{index} with kind github_pr_patch, preserving the fileβs filename (lines 151-183).source_text_truncated, files_listing_complete, patch_selection_truncated, and the count of relevant files with patch_unavailable; non-PR records use files_listing_complete=None, patch_selection_truncated=False, and patch_unavailable_count=0 (lines 184-203).prepare_coding_bundle() outputs schema_version=1, coding_id="oss-governance-enriched-coding-v1", the supplied coding_schema_sha256, design_status="performance_blinded_model_informed_development", transition_dates_excluded=True, outcome_data_used=False, the exact MODEL_INPUT_FIELDS allowlist, and prepared documents (lines 204-225).parse_response() strips whitespace, accepts a triple-backtick fenced payload only when it has at least 3 lines and a closing fence, parses JSON, and requires the resulting value to be an object; an unclosed fence raises ValueError("unterminated JSON code fence") (lines 228-238).validate_response() enforces exact top-level keys; ontology membership; nonempty-or-null title, affected_scope, and ambiguity; exact ISO dates or null; finite non-boolean confidence from 0 through 1; an array of power changes with exact keys; nonempty actor, target, and scope; allowed right/direction/status values; and nonempty, exactly shaped evidence references whose quote occurs verbatim in the referenced source text (lines 241-303).validate_response() requires at least one power_changes entry for effective_institutional_change, announced_institutional_change, and proposal_only; forbids power changes for all other classes; and requires non-null ambiguity for abstain (lines 304-315)._validate_run() requires a nonempty document list and one unique raw response per document ID; checks coding_id, coding_schema_sha256, run_id, source_url, exact MODEL_INPUT_FIELDS, model, reasoning effort, and nonnegative integer/non-boolean elapsed_ms; malformed response JSON becomes a validation error rather than aborting the run (lines 318-374)._edge_signature() canonicalizes each power edge from trimmed actor, right_kind, target, direction, change_status, and scope, plus sorted trimmed (source_id, quote) references serialized as compact JSON; it sorts the resulting edge tuples so comparison is order-insensitive (lines 377-405).compare_codings() validates luna-a and luna-b using model gpt-5.6-luna with reasoning_effort="medium"; optional routed Terra responses use run ID terra-advisory, model gpt-5.6-terra, and reasoning_effort="xhigh" (lines 408-420, 473-489).compare_codings() routing reasons are invalid_response, class_disagreement, edge_disagreement, event_field_disagreement for differences in event_kind, announced_on, or effective_on, body_patch_relation_disagreement, abstention, low_confidence when either Luna confidence is below 0.8, bounded_evidence when source text or patch selection is truncated, and missing_patch when patch_unavailable_count is nonzero; reasons are deduplicated and sorted (lines 421-460).record_id, source_url, both Luna validation results, sorted route_reasons, provisional_core_agreement=not reasons, exact full-response equality, and canonical_ledger_eligible=False; Terra advisory output is attached only to routed records present in Terra results (lines 461-489)._hash(bundle) as documents_sha256, record count, Luna class and strict-edge agreement ratios, adjudication and provisional-core counts, exact full-response agreement count, Terra completion/invalid counts, each Luna invalid count, sorted route-reason counts, and hard-coded canonical_ledger_records=0 (lines 490-519).render_markdown() emits heading ## Performance-blinded governance coding, record count, class and strict-edge percentages formatted to 1 decimal place, provisional/full/routed counts, Terra completion, hard-coded Canonical ledger records: **0**., and a two-column route-reason table (lines 522-540).governance_coding.py CLI has prepare and compare subcommands. prepare requires --enriched, --documents, and --output, defaults --schema to schema/governance-coding-v1.schema.json, hashes schema bytes, and writes sorted indented JSON. compare requires --documents, --raw-a, --raw-b, --package-output, --route-output, --summary-output, and --markdown-output, with optional --raw-terra; it creates output parents, writes 3 sorted indented JSON files and Markdown, then prints the Markdown (lines 543-598)./home/byk/Code/institutional-transition-lab contains 23 entries: .git/, .github/, .gitignore, .lore.md, .pytest_cache/, .ruff_cache/, .venv/, AGENTS.md, cases/, data/, docs/, node_modules/, package-lock.json, package.json, PROTOCOL.md, pyproject.toml, README.md, research/, schema/, scripts/, src/, tests/, and uv.lock.pyproject.toml diff adds base dependency jsonschema>=4.23,<5 and script institution-lab-governance-adjudication = "institution_lab.governance_adjudication:main"; both additions are currently uncommitted.pyproject.toml and 4 untracked files: cases/review/oss-governance-adjudication-v1.inputs.json, schema/governance-adjudication-v1.schema.json, src/institution_lab/governance_adjudication.py, and tests/test_governance_adjudication.py.