Dashboard › institutional-transition-lab › Distillation
ce20add2-31ab-46c2-8f8a-c608b7fb8a65["lore_tm_v1_hPk9FcgnJcj1hTxG-Q-2_JUnm_Aux0ozTONVEM_a4cs","lore_tm_v1_sJ8ebQvvryMmvra2OgxtVvrRmWr_hAotQQqxOySAIbs","lore_tm_v1_OeZKG62vBSeX6Oxk5J7e3SstACXtDJ38afoc51XFB2c","lore_tm_v1_9AkMiZ4MhzIrfq_SSBlsbJKQkzcdAbZ289BdgFgRDvg","lore_tm_v1_w12w8uluxeIpu3opMi04i3GnWzUkpK-s_YX7vzsqqW8","lore_tm_v1_WZ6CFTKL0Omam9M-V8zv1z66nlnFjBjkAT0HZAMj-WY","lore_tm_v1_ZcJ7VWF_5nJXPmzKhkcQWwpJzSaW7dSvGTbmARpZdtk","lore_tm_v1_i7eFws8VvdooWR5fh98MMyt7mNiNudInmZGEReFcoRY"]
/home/byk/Code/institutional-transition-lab/src/institution_lab/governance_coding.py defines _hash(payload) as canonical compact sorted-key JSON encoded to bytes and hashed with SHA-256; _valid_date(value) accepts None or an exactly round-tripping ISO date via date.fromisoformat(value).isoformat() == value; _nonempty(value) requires a non-whitespace string.prepare_coding_bundle(enriched, documents_payload, *, schema_sha256="unversioned-test-schema") in src/institution_lab/governance_coding.py joins source bodies to the enriched envelope without model-side triage metadata.verify_input_manifest() in /home/byk/Code/institutional-transition-lab/src/institution_lab/governance_adjudication.py first calls _validate_manifest_identity(manifest), then _verify_input_payloads() using _read_regular_file() for artifact, documents, coding_package, protocol, coding_schema, and adjudication_schema; only artifact explicitly uses max_bytes=MAX_ARTIFACT_BYTES, and the function returns .pins.governance_adjudication._duplicates(values) uses Counter and returns values occurring more than once; _source_index(document) indexes valid string source_id/text pairs and adds a compact, sorted JSON record_metadata source containing record_id, source_url, published_on, publisher, and source_type.validate_adjudication_fragment(fragment, documents, coding_package, schema) constructs a fragment schema requiring schema_version, design_status, reviewers, and records; it fixes schema_version to 1, design_status to performance_blinded_llm_assisted_source_adjudication, requires at least 1 reviewer and 1 record, forbids additional top-level properties, and reuses schema["$defs"].validate_adjudication_fragment() combines validate_against_schema() with manual _validate_reviewer() checks, reports duplicate reviewer IDs, and builds reviewer-role mappings. It requires each adjudicated record to list at least one reviewer whose role is source_adjudicator.coding_package["summary"]["documents_sha256"] must equal canonical_sha256(documents).record_id, validate_adjudication_fragment() invokes _validate_record(record, documents_by_id[record_id], coding_by_id[record_id], reviewer_ids); non-object fragment records produce adjudication record must be an object.validate_against_schema(adjudication, schema) uses Draft202012Validator(schema, format_checker=FormatChecker()) and returns sorted error strings formatted as schema <path>: <message>, using <root> for an empty path.validate_response(response, document) in src/institution_lab/governance_coding.py requires exactly RESPONSE_KEYS; validates record_class against RECORD_CLASSES, event_kind against EVENT_KINDS or None, and body_patch_relation against BODY_PATCH_RELATIONS; requires title, affected_scope, and ambiguity to be non-empty strings or None; and requires announced_on and effective_on to be ISO dates or None.validate_response() rejects boolean, nonnumeric, non-finite, or out-of-range confidence values; valid confidence is numeric and between 0 and 1, inclusive.validate_response() requires power_changes to be an array. Each change must be a dict with exactly POWER_KEYS; actor, target, and scope must be non-empty; right_kind, direction, and change_status must belong to RIGHT_KINDS, DIRECTIONS, and CHANGE_STATUSES; and evidence_refs must be a non-empty list.REF_KEYS; its source_id must resolve to string source text in document["sources"], and its non-empty quote must occur in that source text, otherwise it is reported as ungrounded.validate_response() treats effective_institutional_change, announced_institutional_change, and proposal_only as institutional classes: they require power_changes; non-institutional classes must not contain them. A response with record_class == "abstain" requires non-null ambiguity./home/byk/Code/institutional-transition-lab/schema/governance-adjudication-v1.schema.json defines reviewer types human, llm, and human_llm_assisted; roles source_adjudicator, evidence_auditor, and synthesizer; reviewer objects require reviewer_id, reviewer_type, model, role, and assistance and forbid additional properties.source_id and quote; claim evidence references additionally require field, whose allowed values are record_class, event_kind, title, announced_on, effective_on, affected_scope, and body_patch_relation.power_change requires actor, right_kind, target, direction, change_status, scope, and non-empty evidence_refs. Allowed directions are added, removed, and modified; statuses are effective, announced, proposed, rejected, and unclear.right_kind values 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.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.consistent, patch_supersedes_body, body_only, patch_only, conflict, not_applicable, and unclear; confidence is a number from 0 through 1; coding objects require all 10 fields and forbid additional properties.edge_revision requires basis, added, and removed; basis is luna_a, luna_b, terra_advisory, or null, and both edge lists contain power_change objects.evidence_bounds requires boolean source_text_truncated, boolean-or-null files_listing_complete, boolean patch_selection_truncated, and nonnegative integer patch_unavailable_count.source_audit requires inspected_before_codings: true, at least 1 unique non-empty source_id, and evidence_bounds, with no additional properties.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; additional properties are forbidden.source_url must be a URI matching ^https://github\\.com/[^\\s]+$; decisions are accept, revise, reject, and abstain; accepted_from is luna_a, luna_b, terra_advisory, or null; reviewer_ids must contain at least 1 unique non-empty string; final_coding and graph_edge_revision may each be their defined object or null.