Dashboard › institutional-transition-lab › Distillation
Distillation
ID: af468178-197c-4f1f-84da-55a2aa7b93ff
Generation: 0
Tokens: 780
R_compression: 13.523
C_norm: 0.000
Archived: Yes
Created: 2026-09-09 01:41:29
Source IDs:
["lore_tm_v1_L-Lh9V2UrHZAKsL3ceKUVlSBLwuo5xHq48IbjJPr-NU"]
Observations
- 🟡 (01:39) In src/institution_lab/governance_adjudication.py, validate_adjudication_fragment() builds a strict fragment schema requiring schema_version=1, design_status="performance_blinded_llm_assisted_source_adjudication", at least 1 reviewer, and at least 1 record, with additionalProperties=False and $defs copied from the adjudication schema.
- 🟡 (01:39) validate_adjudication_fragment() validates each reviewer via _validate_reviewer(), rejects duplicate reviewer IDs, requires coding-package record IDs to match frozen-document record IDs exactly once and in order, requires fragment record IDs to be unique and form a known subset in frozen-document order, and checks coding_package["summary"]["documents_sha256"] against canonical_sha256(documents).
- 🟡 (01:39) For every known fragment record, validate_adjudication_fragment() requires reviewer_ids to include at least one reviewer whose role is "source_adjudicator", then invokes _validate_record() with the matching frozen document, coding record, and reviewer-ID set.
- 🟡 (01:39) validate_against_schema() uses Draft202012Validator with FormatChecker(), sorts validation errors by error.path, and formats each as "schema {absolute path or <root>}: {message}".
- 🟡 (01:39) render_markdown() produces sections in this order: 1. title "# OSS governance adjudication v1", 2. canonicalization gate, 3. Decisions, 4. Final classes, 5. Record decisions, 6. Unresolved records, 7. Frozen inputs, 8. Reviewer provenance, 9. Graph-edge revisions. Record decisions include record_id, decision, final_class (defaulting to "unresolved"), reviewer IDs, and an optional evidence limitation; graph revisions are listed only when added or removed counts are nonzero, otherwise "- None" is emitted.
- 🟡 (01:39) _atomic_write() creates the destination parent directories, writes through a tempfile named with prefix ".{path.name}." in the destination directory, flushes and os.fsync()s it, then atomically installs it with os.replace(); on any BaseException it suppresses FileNotFoundError while unlinking the tempfile and re-raises.
- 🟡 (01:39) _write_failure_reports() atomically writes summary JSON with schema_version=1, canonicalization_gate="closed", and validation_errors=[str(error)], plus Markdown containing the same closed-gate status and error message.
- 🟡 (01:39) governance_adjudication.py main() requires 10 CLI paths: --adjudication, --input-manifest, --documents, --coding-package, --artifact, --protocol, --coding-schema, --adjudication-schema, --summary-json, and --summary-markdown. It validates output aliases before entering its exception handler, then reads and parses the adjudication and manifest, verifies exact input payload bytes through _verify_input_payloads(), runs schema and semantic validation, atomically writes JSON and Markdown summaries, and raises ValueError("adjudication validation failed:\n...") when validation errors exist.
- 🟡 (01:39) In main(), exceptions during input parsing, payload verification, schema validation, or semantic validation trigger _write_failure_reports() and are re-raised; output-path alias failures occur before the try block and therefore do not invoke _write_failure_reports().
- 🟡 (01:39) When schema or semantic validation returns errors, main() changes summary["canonicalization_gate"] to "closed"; the JSON output includes {"schema_version": 1, "validation_errors": errors, **summary}, while render_markdown() receives adjudication and summary rather than the validation_errors list.