Dashboard › institutional-transition-lab › Distillation
fee5d2c9-65be-4722-bca1-1d133611768a["lore_tm_v1_Qbz1iPKRB7a8jV3VnmW-xhUSmbEV8L9AaeT545d-ruA","lore_tm_v1_elrAwRglpuIsatWCiCkH10aUPTj7g62vzKEwuP0wMCM","lore_tm_v1_-sjWdKBzQbKv7X43oqb-_Uw610TsPXfLo9a198flD8E","lore_tm_v1_BajeAjM3-wc4SvfHbqHFUuBFoXPKk0TUHTpjDTQ0DA4","lore_tm_v1_ZVRSmzL-jyai07qyEt7MSY3bVmnn-_ZfJavnROxrjVk"]
validate_adjudication_fragment references at /home/byk/Code/institutional-transition-lab/tests/test_governance_adjudication.py lines 986 and 998, with the implementation at /home/byk/Code/institutional-transition-lab/src/institution_lab/governance_adjudication.py line 659.validate_adjudication_fragment() in /home/byk/Code/institutional-transition-lab/src/institution_lab/governance_adjudication.py lines 659–767. It builds a fragment-specific Draft 2020-12 schema requiring only schema_version, design_status, reviewers, and records; fragment records uses minItems: 1 and has no 40-record maximum.validate_adjudication_fragment() calls validate_against_schema(), applies _validate_reviewer(), reports duplicate reviewer IDs, and requires each valid fragment record to list at least one reviewer whose role is source_adjudicator.document_ids, coding_ids, and string-only fragment_ids; it requires coding IDs to match frozen-document IDs exactly once and in order, fragment IDs to be unique, and fragment IDs to be a known subset in frozen-document order.validate_adjudication_fragment(): _duplicates(coding_ids) receives raw record_id values that may be unhashable; coding_package.get("summary", {}).get("documents_sha256") assumes summary is a mapping rather than None; and dictionaries at lines 733–742 use raw row["record_id"] values as keys.validate_against_schema() in /home/byk/Code/institutional-transition-lab/src/institution_lab/governance_adjudication.py lines 770–776 uses Draft202012Validator(schema, format_checker=FormatChecker()) and formats errors as schema <path>: <message>, sorting by JSON path./home/byk/Code/institutional-transition-lab/schema/governance-adjudication-v1.schema.json, a Draft 2020-12 schema with $id https://institutional-transition-lab.local/schema/governance-adjudication-v1.schema.json and title Performance-blinded governance adjudication v1.schema_version, adjudication_id, design_status, transition_dates_excluded, outcome_data_used, inputs, reviewers, records; it disallows additional properties, fixes schema_version to 1, design_status to performance_blinded_llm_assisted_source_adjudication, transition_dates_excluded to true, and outcome_data_used to false.records must contain exactly 40 items (minItems: 40, maxItems: 40), whereas reviewers requires at least 1 item.$defs.inputs requires 9 fields: workflow_run_id, artifact_id, artifact_sha256, documents_sha256, documents_file_sha256, coding_package_file_sha256, protocol_sha256, coding_schema_sha256, and adjudication_schema_sha256. IDs are integers with minimum 1; SHA-256 values must match ^[0-9a-f]{64}$.reviewer_id, reviewer_type, model, role, and assistance. reviewer_type allows human, llm, or human_llm_assisted; role allows source_adjudicator, evidence_auditor, or synthesizer; reviewer_id and assistance must be non-empty strings; model is a non-empty string or null.source_id and quote; claim evidence additionally requires field, restricted to record_class, event_kind, title, announced_on, effective_on, affected_scope, or body_patch_relation.actor, right_kind, target, direction, change_status, scope, and evidence_refs. direction allows added, removed, or modified; change_status allows effective, announced, proposed, rejected, or unclear; evidence_refs requires at least 1 item.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.record_class, event_kind, title, announced_on, effective_on, affected_scope, body_patch_relation, power_changes, confidence, and ambiguity. record_class allows effective_institutional_change, announced_institutional_change, proposal_only, control_event, no_event, or abstain; confidence ranges from 0 through 1.basis, added, and removed; basis allows luna_a, luna_b, terra_advisory, or null, while added and removed are arrays of power changes.inspected_before_codings: true, at least 1 unique non-empty source_id, and evidence_bounds. Evidence bounds require source_text_truncated, files_listing_complete, patch_selection_truncated, and nonnegative integer patch_unavailable_count.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. Decisions are accept, revise, reject, or abstain; accepted_from is luna_a, luna_b, terra_advisory, or null; reviewer IDs must be unique and non-empty; rationale must be a non-empty string./home/byk/Code/institutional-transition-lab/src/institution_lab/governance_coding.py lines 100–324, including _hash(), _valid_date(), _nonempty(), prepare_coding_bundle(), parse_response(), and validate_response().prepare_coding_bundle() joins enriched records to source documents, emits a mandatory body source, optionally adds pr_metadata plus patch:{index} sources for pull_request_state_and_patch, and computes evidence bounds including source_text_truncated, files_listing_complete, patch_selection_truncated, and exact patch_unavailable_count.prepare_coding_bundle() emits schema_version: 1, coding_id: "oss-governance-enriched-coding-v1", design_status: "performance_blinded_model_informed_development", transition_dates_excluded: True, outcome_data_used: False, model_input_fields: MODEL_INPUT_FIELDS, and the prepared documents.validate_response() requires the response key set to equal RESPONSE_KEYS, validates allowed record classes/event kinds/body-patch relations, requires optional text fields to be nonblank when present, checks ISO dates with date.fromisoformat(), and rejects Boolean, nonnumeric, nonfinite, or out-of-range confidence values.validate_response() builds source_map from each document source’s source_id to text; each power change must have exactly POWER_KEYS, nonblank actor, target, and scope, allowed right_kind, direction, and change_status, plus nonempty evidence references whose quotes occur verbatim in the selected source text.validate_response() requires power changes for effective_institutional_change, announced_institutional_change, and proposal_only; forbids power changes for other record classes; and requires non-null ambiguity when record_class == "abstain".