Dashboard › institutional-transition-lab › Distillation
Distillation
ID: 7a70aed2-4192-490b-a901-a1547a21e97f
Generation: 0
Tokens: 3769
R_compression: 29.820
C_norm: 0.004
Archived: Yes
Created: 2026-09-09 02:04:41
Source IDs:
["lore_tm_v1_fZIXhqVIZ4RsD2AznocO4SxovDOCCuXVMmtjT-tv_Tg","lore_tm_v1_umfQs2TrjnujKqnvR0y-72bxqiotdHLoJT75iCRFLPA","lore_tm_v1_tk3Mz8HMV-5r9MlUw8HUhbUlK9L54yCm4UvO19M7SPc","lore_tm_v1_DQX4xlmPG96ZN_kt2eC1S_eq8gz1XeTKFWaF8YNBK1I","lore_tm_v1_ARUb3VfvfonDYKvToFuNw_9C5OTqOnLRQUEJ1nbPs4c"]
Observations
- 🟡 (01:42) schema/governance-adjudication-v1.schema.json is a JSON Schema Draft 2020-12 document with $id="https://institutional-transition-lab.local/schema/governance-adjudication-v1.schema.json", title="Performance-blinded governance adjudication v1", type=object, and additionalProperties=false.
- 🟡 (01:42) The governance adjudication envelope requires schema_version, adjudication_id, design_status, transition_dates_excluded, outcome_data_used, inputs, reviewers, and records; schema_version is const 1, design_status is const "performance_blinded_llm_assisted_source_adjudication", transition_dates_excluded is const true, and outcome_data_used is const false.
- 🟡 (01:42) The full governance adjudication schema requires records to contain exactly 40 items (minItems=40, maxItems=40), while reviewers requires at least 1 item.
- 🟡 (01:42) schema/governance-adjudication-v1.schema.json $defs.inputs requires workflow_run_id and artifact_id as integers ≥1 plus artifact_sha256, documents_sha256, documents_file_sha256, coding_package_file_sha256, protocol_sha256, coding_schema_sha256, and adjudication_schema_sha256; every hash must match ^[0-9a-f]{64}$.
- 🟡 (01:42) Reviewer schema fields are reviewer_id, reviewer_type, model, role, and assistance. reviewer_type permits "human", "llm", or "human_llm_assisted"; role permits "source_adjudicator", "evidence_auditor", or "synthesizer"; model is a non-empty string or null.
- 🟡 (01:42) Evidence references require non-empty 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.
- 🟡 (01:42) Power-change objects require actor, right_kind, target, direction, change_status, scope, and at least 1 evidence_ref. right_kind permits 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; direction permits added, removed, or modified; change_status permits effective, announced, proposed, rejected, or unclear.
- 🟡 (01:42) Coding objects require record_class, event_kind, title, announced_on, effective_on, affected_scope, body_patch_relation, power_changes, confidence, and ambiguity. record_class permits effective_institutional_change, announced_institutional_change, proposal_only, control_event, no_event, or abstain.
- 🟡 (01:42) Coding event_kind permits leadership, board_or_steering, control_rights, reorganization, foundation_transfer, license, fork, reunification, strategy, product, external, or null. body_patch_relation permits consistent, patch_supersedes_body, body_only, patch_only, conflict, not_applicable, or unclear. confidence is constrained to 0–1.
- 🟡 (01:42) edge_revision requires basis, added, and removed; basis permits "luna_a", "luna_b", "terra_advisory", or null, and added/removed are arrays of power_change objects.
- 🟡 (01:42) evidence_bounds requires source_text_truncated:boolean, files_listing_complete:boolean|null, patch_selection_truncated:boolean, and patch_unavailable_count:integer ≥0. source_audit requires inspected_before_codings=true, at least 1 unique non-empty source_id, and evidence_bounds.
- 🟡 (01:42) Each adjudication record requires 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. source_url must be a URI matching ^https://github\.com/[^\s]+$; decision permits accept, revise, reject, or abstain; accepted_from permits luna_a, luna_b, terra_advisory, or null; reviewer_ids must be a non-empty unique array; final_coding and graph_edge_revision may each be null.
- 🟡 (01:42) tests/test_governance_adjudication.py defines ROOT=Path(file).parents[1] and MAX_TEST_ARCHIVE_MEMBERS=256.
- 🟡 (01:42) _write_pinned_cli_inputs() creates adjudication.json, inputs.json, documents.json, coding-package.json, artifact.zip, protocol.md, coding-schema.json, adjudication-schema.json, summary.json, and summary.md. artifact.zip contains documents.json and v1.2-adjudication-package.json; its manifest uses workflow_run_id=33063470968 and artifact_id=9642983578 and hashes all frozen inputs.
- 🟡 (01:42) _run_cli() constructs sys.argv beginning with "institution-lab-governance-adjudication" and passes --adjudication, --input-manifest, --documents, --coding-package, --artifact, --protocol, --coding-schema, --adjudication-schema, --summary-json, and --summary-markdown.
- 🟡 (01:42) _stub_cli_validation() replaces validate_against_schema() with an empty-error result, validate_adjudication() with ([], {"canonicalization_gate": "open"}), and render_markdown() with "gate: open\n".
- 🟡 (01:42) test_adjudication_schema_matches_validator_ontology() asserts schema enums exactly match DECISIONS, REVIEWER_TYPES, REVIEWER_ROLES, RECORD_CLASSES, EVENT_KINDS | {None}, BODY_PATCH_RELATIONS, RIGHT_KINDS, DIRECTIONS, and CHANGE_STATUSES.
- 🟡 (01:42) test_schema_enforces_uri_and_date_formats() checks that source_url="not a URI" and announced_on="2024-02-30" produce schema-validation errors at records.0.source_url and records.0.final_coding respectively.
- 🟡 (01:42) Test fixtures use record_id="example-1", source_url="https://github.com/acme/example/issues/1", source_id="body", and source text "The council may approve releases." The default coding is record_class="no_event", event_kind/title/dates/affected_scope=null, body_patch_relation="not_applicable", power_changes=[], confidence=1.0, and ambiguity=null.
- 🟡 (01:42) The default adjudication fixture uses adjudication_id="oss-governance-adjudication-v1" and reviewer opencode-gpt-5.6-sol-primary with reviewer_type="llm", model="openai/gpt-5.6-sol", role="source_adjudicator", and assistance="Primary source review and synthesis".
- 🟡 (01:42) test_one_abstention_keeps_canonicalization_gate_closed() expects an abstain decision with accepted_from=null, unresolved_reason="Required source evidence is incomplete.", final_coding=null, and graph_edge_revision=null to have no validation errors, record_count=1, unresolved_record_ids=["example-1"], and canonicalization_gate="closed".
- 🟡 (01:42) test_record_ids_must_match_frozen_documents_exactly_once() tests both duplicate and missing adjudication records; each must emit an error containing "record IDs must match frozen documents exactly once" and close the canonicalization gate.
- 🟡 (01:42) test_accept_must_equal_the_named_frozen_response() changes accepted final_coding confidence from 1.0 to 0.5 and expects "accepted coding does not equal luna_a" with a closed gate.
- 🟡 (01:42) test_resolved_decision_cannot_leave_final_coding_abstained() verifies a revise decision cannot use final record_class="abstain"; expected error includes "resolved decision cannot use abstain final class".
- 🟡 (01:42) test_source_audit_must_match_complete_frozen_document() separately tests inspected_before_codings=false, source_ids=[], and evidence_bounds={"source_text_truncated": True}; each must produce a source_audit error and close the gate.
- 🟡 (01:42) test_institutional_class_and_dates_must_agree() covers: effective_institutional_change with announced_on="2024-04-01" and effective_on=null → "requires effective_on"; announced_institutional_change with both dates null → "requires announced_on"; announced_institutional_change with announced_on="2024-04-01" and effective_on="2024-05-01" → "must not set effective_on"; proposal_only with the same two dates → "must not set effective_on".
- 🟡 (01:42) test_bounded_source_requires_explicit_evidence_limitation() sets frozen source_text_truncated=true and expects "bounded evidence requires evidence_limitations" and a closed gate.
- 🟡 (01:42) test_accept_edge_revision_uses_the_accepted_response() changes graph_edge_revision.basis from luna_a to luna_b for an accepted luna_a response and expects "accept revision basis must equal accepted_from".
- 🟡 (01:42) test_institutional_claims_require_grounded_claim_and_edge_evidence() uses quote="invented" in claim_evidence_refs and power-change evidence_refs and expects an error containing "not grounded".
- 🟡 (01:42) _institutional_adjudication() maps effective_institutional_change→effective, announced_institutional_change→announced, and proposal_only→proposed. It creates a revise decision titled "Council gains release approval", event_kind="control_rights", announced_on="2024-04-01", affected_scope="releases", body_patch_relation="body_only", and an added approve edge from "The council" to "releases" in scope "project releases", grounded by "The council may approve releases.".
- 🟡 (01:42) test_institutional_class_and_edge_status_must_agree() tests effective_institutional_change/proposed, announced_institutional_change/effective, and proposal_only/effective; each must emit "does not permit edge status" and close the gate.
- 🟡 (01:42) test_gemini_cannot_adjudicate_or_assist() sets model="google/gemini-3.7-flash" and expects "Gemini is restricted to event triage".
- 🟡 (01:42) test_each_record_requires_a_source_adjudicator() changes the only reviewer role to "synthesizer" and expects "requires a source_adjudicator".
- 🟡 (01:42) test_record_reviewer_ids_must_be_unique() duplicates opencode-gpt-5.6-sol-primary and expects "reviewer_ids must be unique"; test_malformed_reviewer_id_does_not_crash_manual_validation() uses {"invalid": "reviewer"} and expects "reviewer_ids must contain non-empty strings".
- 🟡 (01:42) test_every_input_pin_is_reverified() changes artifact_sha256 to "wrong" and expects exact error "input pin mismatch: artifact_sha256". test_frozen_input_identifiers_are_reverified() increments workflow_run_id or artifact_id and expects the corresponding "input pin mismatch: {field}".
- 🟡 (01:42) test_frozen_pins_include_the_versioned_adjudication_schema() asserts set(FROZEN_INPUT_PINS)==REQUIRED_INPUT_PINS and adjudication_schema_sha256="6181f5cb60a0462f83be00be301763daa89f11581e68ee1c46a84e8bf4e5be31".
- 🟡 (01:42) test_input_manifest_rejects_self_consistent_substitute() parameterizes every sorted FROZEN_INPUT_PINS field and expects verify_input_manifest() to raise an error matching "frozen issue #4 input: {field}" even when the manifest is internally self-consistent.
- 🟡 (01:42) test_input_manifest_rejects_changed_file_bytes() mutates documents.json after manifest creation and expects a documents_file_sha256 failure.
- 🟡 (01:42) test_input_manifest_rejects_files_not_from_pinned_artifact() places b"different documents" in artifact.zip while the external documents file contains "documents", expecting "artifact member mismatch: documents.json".
- 🟡 (01:42) test_cli_validates_the_same_bytes_it_verifies() attempts a verification-time documents.json swap and expects "input manifest mismatch: documents_file_sha256", guarding against validating bytes different from those verified.
- 🟡 (01:42) test_cli_rejects_output_aliases_to_frozen_inputs() covers all 8 input paths—adjudication, input_manifest, documents, coding_package, artifact, protocol, coding_schema, adjudication_schema—and alias kinds direct, symlink, and hardlink. Each must raise "output path aliases an input" and preserve the original input bytes.
- 🟡 (01:42) test_cli_rejects_aliased_outputs() points summary_markdown and summary_json to the same path and expects "output paths alias each other".
- 🟡 (01:44) test_cli_rejects_duplicate_manifest_keys() injects duplicate artifact_sha256 keys, including a forged first value, expects "duplicate JSON key: artifact_sha256", and verifies a preexisting summary JSON is overwritten to canonicalization_gate="closed".
- 🟡 (01:44) test_input_manifest_rejects_non_object() passes [] and expects "input manifest must be an object".
- 🟡 (01:44) test_input_manifest_rejects_duplicate_artifact_members() appends a second documents.json ZIP member and expects "artifact member is not unique: documents.json".
- 🟡 (01:44) test_input_manifest_rejects_excessive_artifact_member_count() appends 256 padding/{index} members to the existing 2-member archive and expects "artifact member count exceeds limit".
- 🟡 (01:44) test_regular_file_reader_rejects_fifo_without_blocking() creates input.fifo with os.mkfifo(), invokes _read_regular_file() in a subprocess with timeout=1, and expects a nonzero return code plus "input path is not a regular file" in stderr.
- 🟡 (01:44) test_canonical_sha256_rejects_non_finite_numbers() verifies float("nan"), float("inf"), and float("-inf") each raise ValueError matching "Out of range float values".
- 🟡 (01:44) test_committed_frozen_input_manifest_verifies() verifies cases/review/oss-governance-adjudication-v1.inputs.json against cases/review/oss-governance-adjudication-v1/artifact-9642983578.zip, documents.json, v1.2-coding-package.json, research/oss-governance-coding-protocol-v1.2.md, schema/governance-coding-v1.schema.json, and schema/governance-adjudication-v1.schema.json, then asserts the result equals FROZEN_INPUT_PINS.
- 🟡 (01:44) test_committed_partial_fragment_validates_but_cannot_be_the_full_envelope() asserts cases/review/oss-governance-adjudication-v1/fragments/opentofu-a2.json has no fragment-validation errors but does have errors under the full 40-record envelope schema.
- 🟡 (01:44) test_malformed_fragment_record_id_fails_closed() changes the first fragment record_id to {"invalid": "record ID"} and expects errors mentioning both "record_id" and "known subset".
- 🟡 (01:44) test_resolved_valid_records_open_the_gate() expects the default single-record fixture to produce no errors, decision_counts={"accept": 1}, class_counts={"no_event": 1}, unresolved_record_ids=[], one record_decisions entry for example-1 accepted as no_event by opencode-gpt-5.6-sol-primary with evidence_limitations=null, one empty luna_a graph-edge revision, reviewer_provenance equal to the adjudication reviewers, and canonicalization_gate="open".
- 🟡 (01:45) Search results locate _edge_key() at src/institution_lab/governance_adjudication.py:298 and claim_evidence_refs validation around lines 474–479; governance-coding evidence_refs validation is around src/institution_lab/governance_coding.py:291–302, while _edge_signature() is at lines 377–405 and its comparison is used around line 431.
- 🟡 (01:48) src/institution_lab/governance_coding.py _edge_signature(response) returns () for a falsey response; otherwise it canonicalizes each power_change as actor, right_kind, target, direction, change_status, scope, plus JSON-serialized sorted (source_id, quote) evidence-reference pairs, strips values, sorts all edges, and returns a tuple of tuples.
- 🟡 (01:48) compare_codings(bundle, raw_a, raw_b, raw_terra=None) validates luna-a and luna-b using model="gpt-5.6-luna" and reasoning_effort="medium", then compares each document’s valid responses. It counts class agreement when record_class matches and edge agreement when _edge_signature() matches.
- 🟡 (01:48) compare_codings() routing reasons shown are: "invalid_response" if either coding is schema-invalid; "class_disagreement" if classes differ; "edge_disagreement" if canonical edge signatures differ; "event_field_disagreement" if event_kind, announced_on, or effective_on differs; and "body_patch_relation_disagreement" if body_patch_relation differs.