Dashboardinstitutional-transition-labSession 0y5qVmGI0sAs

Session 0y5qVmGI0sAs

Full ID: 0y5qVmGI0sAsq4lEF
Messages: 28
Distillations: 7
Time range: 2026-09-09 13:03:23 — 2026-09-09 17:09:35

Conversation (28 messages)

This replaces one twice-empty ZIP reviewer with a smaller disjoint scope. Read only src/institution_lab/governance_adjudication.py and tests/test_governance_adjudication.py; do not edit files. Scope ONLY ZIP container structure and member metadata validation: EOCD/ZIP64 policy, central-directory boundaries and full consumption, raw central filename identity, local-vs-central header agreement, NUL and Unicode path extra-field ambiguity, unsafe/colliding normalized paths, duplicate names, disk/encryption flags, unsupported flags/methods, and Unix non-regular/special file modes. Do NOT design decompression, CRC, decoded-size accounting, or data-descriptor parsing beyond defining the boundary needed by a separate decoder. The implementation must accept the current pinned 19-member Unix mode 100644, DEFLATE archive with data descriptors. Return concrete minimal helper signatures, binary fields and offsets, validation order, normalized errors, and deterministic fail-first test mutations. Return substantive guidance or BLOCKED: <exact tool/error>, and end exactly SUBSTANTIVE or BLOCKED.

gateway · 2026-09-09 13:03:23
result
<path>/home/byk/Code/institutional-transition-lab/src/institution_lab/governance_adjudication.py</path>
<type>file</type>
<content>
1: from __future__ import annotations
2: 
3: import argparse
4: import hashlib
5: import io
6: import json
7: import os
8: import stat
9: import tempfile
10: import zipfile
11: from collections import Counter
12: from contextlib import suppress
13: from dataclasses import dataclass
14: from pathlib import Path
15: from typing import Any
16: 
17: from jsonschema import Draft202012Validator, FormatChecker
18: 
19: from institution_lab.governance_coding import validate_response
20: 
21: DECISIONS = {"accept", "revise", "reject", "abstain"}
22: INSTITUTIONAL_CLASSES = {
23: 	"effective_institutional_change",
24: 	"announced_institutional_change",
25: 	"proposal_only",
26: }
27: REVIEWER_TYPES = {"human", "llm", "human_llm_assisted"}
28: REVIEWER_ROLES = {"source_adjudicator", "evidence_auditor", "synthesizer"}
29: RESPONSE_SOURCES = {"luna_a", "luna_b", ...
gateway · 2026-09-09 13:04:50
result
<path>/home/byk/Code/institutional-transition-lab/tests/test_governance_adjudication.py</path>
<type>file</type>
<content>
1: from __future__ import annotations
2: 
3: import copy
4: import json
5: import os
6: import subprocess
7: import sys
8: import zipfile
9: from pathlib import Path
10: 
11: import pytest
12: 
13: from institution_lab import governance_adjudication
14: from institution_lab.governance_adjudication import (
15: 	DECISIONS,
16: 	FROZEN_INPUT_PINS,
17: 	REQUIRED_INPUT_PINS,
18: 	REVIEWER_ROLES,
19: 	REVIEWER_TYPES,
20: 	canonical_sha256,
21: 	file_sha256,
22: 	validate_adjudication,
23: 	validate_adjudication_fragment,
24: 	validate_against_schema,
25: 	verify_input_manifest,
26: )
27: from institution_lab.governance_coding import (
28: 	BODY_PATCH_RELATIONS,
29: 	CHANGE_STATUSES,
30: 	DIRECTIONS,
31: 	EVENT_KINDS,
32: 	RECORD_CLASSES,
33: 	RIGHT_KINDS,
34: )
35: 
36: ROOT = Path(__file__).parents[1]
37: MAX_TEST_ARCHIVE_MEMBERS = 256
38: 
39: 
40: def ...
gateway · 2026-09-09 13:34:45
result
<path>/home/byk/Code/institutional-transition-lab/tests/test_governance_adjudication.py</path>
<type>file</type>
<content>
977: 
978: 
979: def test_committed_partial_fragment_validates_but_cannot_be_the_full_envelope() -> None:
980: 	input_directory = ROOT / "cases/review/oss-governance-adjudication-v1"
981: 	fragment = json.loads((input_directory / "fragments/opentofu-a2.json").read_text())
982: 	documents = json.loads((input_directory / "documents.json").read_text())
983: 	coding_package = json.loads((input_directory / "v1.2-coding-package.json").read_text())
984: 	schema = json.loads((ROOT / "schema/governance-adjudication-v1.schema.json").read_text())
985: 
986: 	assert validate_adjudication_fragment(fragment, documents, coding_package, schema) == []
987: 	assert validate_against_schema(fragment, schema)
988: 
989: 
990: def test_malformed_fragment_record_id_fails_closed() -> None:
991: 	input_directory = ROOT / "cases/review/oss-governance-adjudication-v1"
992: 	fragment = ...
gateway · 2026-09-09 13:35:36
result
/usr/bin/bash: line 1: python: command not found
gateway · 2026-09-09 13:36:38
result
baseline [('documents.json', 'documents.json', 0, 0), ('v1.2-adjudication-package.json', 'v1.2-adjudication-package.json', 0, 0)]
prefix ACCEPT [('documents.json', 'documents.json', 0, 0), ('v1.2-adjudication-package.json', 'v1.2-adjudication-package.json', 0, 0)]
suffix ACCEPT [('documents.json', 'documents.json', 0, 0), ('v1.2-adjudication-package.json', 'v1.2-adjudication-package.json', 0, 0)]
EOCD count mismatch ACCEPT [('documents.json', 'documents.json', 0, 0), ('v1.2-adjudication-package.json', 'v1.2-adjudication-package.json', 0, 0)]
local method/CRC/sizes mismatch ACCEPT [('documents.json', 'documents.json', 0, 0), ('v1.2-adjudication-package.json', 'v1.2-adjudication-package.json', 0, 0)]
NUL-hidden required name ACCEPT [('documents.json', 'documents.json\x00', 0, 0), ('v1.2-adjudication-package.json', 'v1.2-adjudication-package.json', 0, 0)]
truncated central variable field ACCEPT [('documents.json', 'documents.json', 0, 0), ('v1.2-adjudication-package.json', ...
gateway · 2026-09-09 13:39:04
result
3 0o600 0 0x0 20 20
gateway · 2026-09-09 13:46:35
result
Found 50 matches
/home/byk/Code/institutional-transition-lab/tests/test_governance_adjudication.py:
  Line 8: import zipfile

  Line 52: 		"artifact": tmp_path / "artifact.zip",

  Line 65: 	with zipfile.ZipFile(paths["artifact"], "w") as archive:

  Line 66: 		archive.writestr("documents.json", paths["documents"].read_bytes())

  Line 67: 		archive.writestr(

  Line 73: 		"artifact_id": 9642983578,

  Line 74: 		"artifact_sha256": file_sha256(paths["artifact"]),

  Line 94: 		"artifact",

  Line 244: 			"artifact_id": 9642983578,

  Line 245: 			"artifact_sha256": "0" * 64,

  Line 288: 		"artifact_id": 9642983578,

  Line 289: 		"artifact_sha256": "0" * 64,

  Line 636: 	adjudication["inputs"]["artifact_sha256"] = "wrong"

  Line 640: 	assert "input pin mismatch: artifact_sha256" in errors

  Line 663: 			artifact=Path("unused"),

  Line 672: @pytest.mark.parametrize("field", ["workflow_run_id", "artifact_id"])

  Line 687: 	artifact = tmp_path / "artifact.zip"

  Line 694: ...
gateway · 2026-09-09 13:47:03
result
<path>/home/byk/Code/institutional-transition-lab/tests/test_governance_adjudication.py</path>
<type>file</type>
<content>
1: from __future__ import annotations
2: 
3: import copy
4: import json
5: import os
6: import subprocess
7: import sys
8: import zipfile
9: from pathlib import Path
10: 
11: import pytest
12: 
13: from institution_lab import governance_adjudication
14: from institution_lab.governance_adjudication import (
15: 	DECISIONS,
16: 	FROZEN_INPUT_PINS,
17: 	REQUIRED_INPUT_PINS,
18: 	REVIEWER_ROLES,
19: 	REVIEWER_TYPES,
20: 	canonical_sha256,
21: 	file_sha256,
22: 	validate_adjudication,
23: 	validate_adjudication_fragment,
24: 	validate_against_schema,
25: 	verify_input_manifest,
26: )
27: from institution_lab.governance_coding import (
28: 	BODY_PATCH_RELATIONS,
29: 	CHANGE_STATUSES,
30: 	DIRECTIONS,
31: 	EVENT_KINDS,
32: 	RECORD_CLASSES,
33: 	RIGHT_KINDS,
34: )
35: 
36: ROOT = Path(__file__).parents[1]
37: MAX_TEST_ARCHIVE_MEMBERS = 256
38: 
39: 
40: def ...
gateway · 2026-09-09 13:47:43
result
<path>/home/byk/Code/institutional-transition-lab/tests/test_governance_adjudication.py</path>
<type>file</type>
<content>
620: 	assert any("reviewer_ids must be unique" in error for error in errors)
621: 	assert summary["canonicalization_gate"] == "closed"
622: 
623: 
624: def test_malformed_reviewer_id_does_not_crash_manual_validation() -> None:
625: 	adjudication = _adjudication()
626: 	adjudication["records"][0]["reviewer_ids"] = [{"invalid": "reviewer"}]
627: 
628: 	errors, summary = _validate(adjudication)
629: 
630: 	assert any("reviewer_ids must contain non-empty strings" in error for error in errors)
631: 	assert summary["canonicalization_gate"] == "closed"
632: 
633: 
634: def test_every_input_pin_is_reverified() -> None:
635: 	adjudication = _adjudication()
636: 	adjudication["inputs"]["artifact_sha256"] = "wrong"
637: 
638: 	errors, summary = _validate(adjudication)
639: 
640: 	assert "input pin mismatch: artifact_sha256" in errors
641: 	assert ...
gateway · 2026-09-09 13:48:38
result
Found 37 matches
/home/byk/Code/institutional-transition-lab/src/institution_lab/governance_adjudication.py:
  Line 10: import zipfile

  Line 32: 	"artifact_id",

  Line 33: 	"artifact_sha256",

  Line 43: 	"artifact_id": 9642983578,

  Line 44: 	"artifact_sha256": "1f6be91fcd98e43e99d82d5f274536f6c23616e7e6c711e26324a2cc4b06ef06",

  Line 67: MAX_ARCHIVE_MEMBERS = 128

  Line 68: MAX_ARCHIVE_MEMBER_BYTES = 16 * 1024 * 1024

  Line 69: MAX_ARCHIVE_EXPANDED_BYTES = 64 * 1024 * 1024

  Line 150: 	if type(manifest.get("artifact_id")) is not int or manifest["artifact_id"] < 1:

  Line 151: 		raise ValueError("input manifest artifact_id is invalid")

  Line 157: def _verify_input_payloads(

  Line 160: 	artifact: bytes,

  Line 169: 		"artifact_sha256": _bytes_sha256(artifact),

  Line 180: 		with zipfile.ZipFile(io.BytesIO(artifact)) as archive:

  Line 181: 			infos = archive.infolist()

  Line 182: 			if len(infos) > MAX_ARCHIVE_MEMBERS:

  Line 183: 				raise ValueError("artifact ...
gateway · 2026-09-09 13:49:01
result
<path>/home/byk/Code/institutional-transition-lab/src/institution_lab/governance_adjudication.py</path>
<type>file</type>
<content>
1: from __future__ import annotations
2: 
3: import argparse
4: import hashlib
5: import io
6: import json
7: import os
8: import stat
9: import tempfile
10: import zipfile
11: from collections import Counter
12: from contextlib import suppress
13: from dataclasses import dataclass
14: from pathlib import Path
15: from typing import Any
16: 
17: from jsonschema import Draft202012Validator, FormatChecker
18: 
19: from institution_lab.governance_coding import validate_response
20: 
21: DECISIONS = {"accept", "revise", "reject", "abstain"}
22: INSTITUTIONAL_CLASSES = {
23: 	"effective_institutional_change",
24: 	"announced_institutional_change",
25: 	"proposal_only",
26: }
27: REVIEWER_TYPES = {"human", "llm", "human_llm_assisted"}
28: REVIEWER_ROLES = {"source_adjudicator", "evidence_auditor", "synthesizer"}
29: RESPONSE_SOURCES = {"luna_a", "luna_b", ...
gateway · 2026-09-09 14:08:00
result
No files found
gateway · 2026-09-09 14:08:29
result
 M pyproject.toml
 M uv.lock
?? .lore.md
?? AGENTS.md
?? cases/review/oss-governance-adjudication-v1.inputs.json
?? cases/review/oss-governance-adjudication-v1/
?? schema/governance-adjudication-v1.schema.json
?? src/institution_lab/governance_adjudication.py
?? tests/test_governance_adjudication.py
gateway · 2026-09-09 14:49:33
result
3 0o600 0x0 0
gateway · 2026-09-09 14:57:07
result
Found 9 matches
/home/byk/Code/institutional-transition-lab/src/institution_lab/governance_adjudication.py:
  Line 10: import zipfile

  Line 41: FROZEN_INPUT_PINS = {

  Line 152: 	for field, value in FROZEN_INPUT_PINS.items():

  Line 180: 		with zipfile.ZipFile(io.BytesIO(artifact)) as archive:

  Line 181: 			infos = archive.infolist()

  Line 196: 					info = archive.getinfo(member_name)

  Line 201: 				with archive.open(info) as source:

  Line 207: 	except zipfile.BadZipFile as error:

  Line 208: 		raise ValueError("artifact is not a valid ZIP archive") from error
gateway · 2026-09-09 15:02:04
result
<path>/home/byk/Code/institutional-transition-lab/src/institution_lab/governance_adjudication.py</path>
<type>file</type>
<content>
1: from __future__ import annotations
2: 
3: import argparse
4: import hashlib
5: import io
6: import json
7: import os
8: import stat
9: import tempfile
10: import zipfile
11: from collections import Counter
12: from contextlib import suppress
13: from dataclasses import dataclass
14: from pathlib import Path
15: from typing import Any
16: 
17: from jsonschema import Draft202012Validator, FormatChecker
18: 
19: from institution_lab.governance_coding import validate_response
20: 
21: DECISIONS = {"accept", "revise", "reject", "abstain"}
22: INSTITUTIONAL_CLASSES = {
23: 	"effective_institutional_change",
24: 	"announced_institutional_change",
25: 	"proposal_only",
26: }
27: REVIEWER_TYPES = {"human", "llm", "human_llm_assisted"}
28: REVIEWER_ROLES = {"source_adjudicator", "evidence_auditor", "synthesizer"}
29: RESPONSE_SOURCES = {"luna_a", "luna_b", ...
gateway · 2026-09-09 15:03:47
result
Found 24 matches
/home/byk/Code/institutional-transition-lab/tests/test_governance_adjudication.py:
  Line 8: import zipfile

  Line 52: 		"artifact": tmp_path / "artifact.zip",

  Line 65: 	with zipfile.ZipFile(paths["artifact"], "w") as archive:

  Line 66: 		archive.writestr("documents.json", paths["documents"].read_bytes())

  Line 67: 		archive.writestr(

  Line 190: 						"filename": None,

  Line 687: 	artifact = tmp_path / "artifact.zip"

  Line 703: 	with zipfile.ZipFile(artifact, "w") as archive:

  Line 704: 		archive.writestr("documents.json", documents.read_bytes())

  Line 705: 		archive.writestr("v1.2-adjudication-package.json", coding_package.read_bytes())

  Line 733: 	artifact = tmp_path / "artifact.zip"

  Line 743: 	with zipfile.ZipFile(artifact, "w") as archive:

  Line 744: 		archive.writestr("documents.json", b"different documents")

  Line 745: 		archive.writestr("v1.2-adjudication-package.json", coding_package.read_bytes())

  Line 772: 	with ...
gateway · 2026-09-09 15:04:04
result
<path>/home/byk/Code/institutional-transition-lab/tests/test_governance_adjudication.py</path>
<type>file</type>
<content>
1: from __future__ import annotations
2: 
3: import copy
4: import json
5: import os
6: import subprocess
7: import sys
8: import zipfile
9: from pathlib import Path
10: 
11: import pytest
12: 
13: from institution_lab import governance_adjudication
14: from institution_lab.governance_adjudication import (
15: 	DECISIONS,
16: 	FROZEN_INPUT_PINS,
17: 	REQUIRED_INPUT_PINS,
18: 	REVIEWER_ROLES,
19: 	REVIEWER_TYPES,
20: 	canonical_sha256,
21: 	file_sha256,
22: 	validate_adjudication,
23: 	validate_adjudication_fragment,
24: 	validate_against_schema,
25: 	verify_input_manifest,
26: )
27: from institution_lab.governance_coding import (
28: 	BODY_PATCH_RELATIONS,
29: 	CHANGE_STATUSES,
30: 	DIRECTIONS,
31: 	EVENT_KINDS,
32: 	RECORD_CLASSES,
33: 	RIGHT_KINDS,
34: )
35: 
36: ROOT = Path(__file__).parents[1]
37: MAX_TEST_ARCHIVE_MEMBERS = 256
38: 
39: 
40: def ...
gateway · 2026-09-09 15:04:17
result
<path>/home/byk/Code/institutional-transition-lab/tests/test_governance_adjudication.py</path>
<type>file</type>
<content>
650: 
651: @pytest.mark.parametrize("field", sorted(FROZEN_INPUT_PINS))
652: def test_input_manifest_rejects_self_consistent_substitute(field: str) -> None:
653: 	manifest = {
654: 		**FROZEN_INPUT_PINS,
655: 		"adjudication_schema_sha256": "5" * 64,
656: 	}
657: 	value = manifest[field]
658: 	manifest[field] = value + 1 if isinstance(value, int) else "f" * 64
659: 
660: 	with pytest.raises(ValueError, match=f"frozen issue #4 input: {field}"):
661: 		verify_input_manifest(
662: 			manifest,
663: 			artifact=Path("unused"),
664: 			documents=Path("unused"),
665: 			coding_package=Path("unused"),
666: 			protocol=Path("unused"),
667: 			coding_schema=Path("unused"),
668: 			adjudication_schema=Path("unused"),
669: 		)
670: 
671: 
672: @pytest.mark.parametrize("field", ["workflow_run_id", "artifact_id"])
673: def test_frozen_input_identifiers_are_reverified(field: ...
gateway · 2026-09-09 15:13:31
result
0 (788, 20, 0, 0) 0x0 0
8 (788, 20, 0, 8) 0x0 8
gateway · 2026-09-09 15:44:05
result
bytes 423046 start_dir 421788 members 19
0 'documents.json' 3 0o100644 0x8 8 20 45 0 0 445940 120892
1 'luna-a.json' 3 0o100644 0x8 8 20 45 0 120952 56076 7161
2 'luna-b.json' 3 0o100644 0x8 8 20 45 0 128170 52967 6651
3 'adjudication-package.json' 3 0o100644 0x8 8 20 45 0 134878 149490 13779
4 'preliminary-package.json' 3 0o100644 0x8 8 20 45 0 148728 107543 10349
5 'preliminary-summary.json' 3 0o100644 0x8 8 20 45 0 159147 707 353
6 'preliminary-summary.md' 3 0o100644 0x8 8 20 45 0 159570 543 311
7 'summary.json' 3 0o100644 0x8 8 20 45 0 159949 703 351
8 'summary.md' 3 0o100644 0x8 8 20 45 0 160358 542 309
9 'terra-route.json' 3 0o100644 0x8 8 20 45 0 160723 391727 105388
10 'terra.json' 3 0o100644 0x8 8 20 45 0 266173 43744 6482
11 'v1.2-adjudication-package.json' 3 0o100644 0x8 8 20 45 0 272711 156038 14335
12 'v1.2-preliminary-package.json' 3 0o100644 0x8 8 20 45 0 287122 109772 10416
13 'v1.2-preliminary-summary.json' 3 0o100644 0x8 8 20 45 0 297613 788 375
14 ...
gateway · 2026-09-09 15:57:04
result
<path>/home/byk/Code/institutional-transition-lab/src/institution_lab/governance_adjudication.py</path>
<type>file</type>
<content>
1: from __future__ import annotations
2: 
3: import argparse
4: import hashlib
5: import io
6: import json
7: import os
8: import stat
9: import tempfile
10: import zipfile
11: from collections import Counter
12: from contextlib import suppress
13: from dataclasses import dataclass
14: from pathlib import Path
15: from typing import Any
16: 
17: from jsonschema import Draft202012Validator, FormatChecker
18: 
19: from institution_lab.governance_coding import validate_response
20: 
21: DECISIONS = {"accept", "revise", "reject", "abstain"}
22: INSTITUTIONAL_CLASSES = {
23: 	"effective_institutional_change",
24: 	"announced_institutional_change",
25: 	"proposal_only",
26: }
27: REVIEWER_TYPES = {"human", "llm", "human_llm_assisted"}
28: REVIEWER_ROLES = {"source_adjudicator", "evidence_auditor", "synthesizer"}
29: RESPONSE_SOURCES = {"luna_a", "luna_b", ...
gateway · 2026-09-09 15:57:19
result
<path>/home/byk/Code/institutional-transition-lab/tests/test_governance_adjudication.py</path>
<type>file</type>
<content>
1: from __future__ import annotations
2: 
3: import copy
4: import json
5: import os
6: import subprocess
7: import sys
8: import zipfile
9: from pathlib import Path
10: 
11: import pytest
12: 
13: from institution_lab import governance_adjudication
14: from institution_lab.governance_adjudication import (
15: 	DECISIONS,
16: 	FROZEN_INPUT_PINS,
17: 	REQUIRED_INPUT_PINS,
18: 	REVIEWER_ROLES,
19: 	REVIEWER_TYPES,
20: 	canonical_sha256,
21: 	file_sha256,
22: 	validate_adjudication,
23: 	validate_adjudication_fragment,
24: 	validate_against_schema,
25: 	verify_input_manifest,
26: )
27: from institution_lab.governance_coding import (
28: 	BODY_PATCH_RELATIONS,
29: 	CHANGE_STATUSES,
30: 	DIRECTIONS,
31: 	EVENT_KINDS,
32: 	RECORD_CLASSES,
33: 	RIGHT_KINDS,
34: )
35: 
36: ROOT = Path(__file__).parents[1]
37: MAX_TEST_ARCHIVE_MEMBERS = 256
38: 
39: 
40: def ...
gateway · 2026-09-09 15:57:34
result
<path>/home/byk/Code/institutional-transition-lab/tests/test_governance_adjudication.py</path>
<type>file</type>
<content>
650: 
651: @pytest.mark.parametrize("field", sorted(FROZEN_INPUT_PINS))
652: def test_input_manifest_rejects_self_consistent_substitute(field: str) -> None:
653: 	manifest = {
654: 		**FROZEN_INPUT_PINS,
655: 		"adjudication_schema_sha256": "5" * 64,
656: 	}
657: 	value = manifest[field]
658: 	manifest[field] = value + 1 if isinstance(value, int) else "f" * 64
659: 
660: 	with pytest.raises(ValueError, match=f"frozen issue #4 input: {field}"):
661: 		verify_input_manifest(
662: 			manifest,
663: 			artifact=Path("unused"),
664: 			documents=Path("unused"),
665: 			coding_package=Path("unused"),
666: 			protocol=Path("unused"),
667: 			coding_schema=Path("unused"),
668: 			adjudication_schema=Path("unused"),
669: 		)
670: 
671: 
672: @pytest.mark.parametrize("field", ["workflow_run_id", "artifact_id"])
673: def test_frozen_input_identifiers_are_reverified(field: ...
gateway · 2026-09-09 15:57:42

Your first result was empty. This is your one permitted retry. Read only src/institution_lab/governance_adjudication.py and tests/test_governance_adjudication.py; do not edit files. Scope ONLY ZIP container structure and member metadata validation: EOCD/ZIP64 policy, central-directory boundaries and full consumption, raw central filename identity, local-vs-central header agreement, NUL and Unicode path extra-field ambiguity, unsafe/colliding normalized paths, duplicate names, disk/encryption flags, unsupported flags/methods, and Unix non-regular/special file modes. Do NOT design decompression, CRC, decoded-size accounting, or data-descriptor parsing beyond defining the boundary needed by a separate decoder. The implementation must accept the current pinned 19-member Unix mode 100644, DEFLATE archive with data descriptors. Return concrete minimal helper signatures, binary fields and offsets, validation order, normalized errors, and deterministic fail-first test mutations. You MUST return either substantive evidence/guidance ending exactly SUBSTANTIVE, or an exact blocker with tool/error evidence ending exactly BLOCKED. Never return empty.

gateway · 2026-09-09 16:43:05
result
No files found
gateway · 2026-09-09 17:05:35
result
<path>/home/byk/Code/institutional-transition-lab/src/institution_lab/governance_adjudication.py</path>
<type>file</type>
<content>
1: from __future__ import annotations
2: 
3: import argparse
4: import hashlib
5: import io
6: import json
7: import os
8: import stat
9: import tempfile
10: import zipfile
11: from collections import Counter
12: from contextlib import suppress
13: from dataclasses import dataclass
14: from pathlib import Path
15: from typing import Any
16: 
17: from jsonschema import Draft202012Validator, FormatChecker
18: 
19: from institution_lab.governance_coding import validate_response
20: 
21: DECISIONS = {"accept", "revise", "reject", "abstain"}
22: INSTITUTIONAL_CLASSES = {
23: 	"effective_institutional_change",
24: 	"announced_institutional_change",
25: 	"proposal_only",
26: }
27: REVIEWER_TYPES = {"human", "llm", "human_llm_assisted"}
28: REVIEWER_ROLES = {"source_adjudicator", "evidence_auditor", "synthesizer"}
29: RESPONSE_SOURCES = {"luna_a", "luna_b", ...
gateway · 2026-09-09 17:09:35

Distillations (7)

Gen 0 2026-09-09 17:13:42 · 1300 tokens

Date: Sep 9, 2026 * 🟑 (15:44) Raw ZIP probe output was exactly: `0 (788, 20, 0, 0) 0x0 0` and `8 (788, 20, 0, 8) 0x0 8`. * 🟑 (15:57) ZIP inspection reported artifact size `423046` bytes, central-directory start `421788`, `19` members, zero-length archive comment, and prefix offset `420552`. * 🟑 (15:57) ZIP inspection listed the 19 members in exact order: 1. `documents.json`, 2. `luna-a.json`, …

Gen 0 2026-09-09 15:59:27 · 2661 tokens

* 🟑 (15:57) `/home/byk/Code/institutional-transition-lab/src/institution_lab/governance_adjudication.py` defines `REQUIRED_INPUT_PINS` with exactly 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`. * 🟑 (15:57) `FROZEN_INPUT_PINS` in…

Gen 0 2026-09-09 15:18:06 · 840 tokens

Date: Sep 9, 2026 * 🟑 (14:49) Git working tree status showed modified files `pyproject.toml` and `uv.lock`; untracked paths `.lore.md`, `AGENTS.md`, `cases/review/oss-governance-adjudication-v1.inputs.json`, `cases/review/oss-governance-adjudication-v1/`, `schema/governance-adjudication-v1.schema.json`, `src/institution_lab/governance_adjudication.py`, and `tests/test_governance_adjudication.py`…

Gen 0 2026-09-09 15:15:42 · 2679 tokens

Date: Sep 9, 2026 * 🟑 (13:46) Tool output reported exact values `3 0o600 0 0x0 20 20`. * 🟑 (13:47) Search found 50 occurrences related to ZIP/artifact handling in `/home/byk/Code/institutional-transition-lab/tests/test_governance_adjudication.py`, including archive construction, input-pin checks, artifact-member verification, duplicate-member rejection, excessive-member-count rejection, and com…

Gen 0 2026-09-09 13:41:28 · 614 tokens

* 🟑 (13:35) Additional visible content from `tests/test_governance_adjudication.py` lines 979–1024 showed 3 tests: `test_committed_partial_fragment_validates_but_cannot_be_the_full_envelope`, `test_malformed_fragment_record_id_fails_closed`, and `test_resolved_valid_records_open_the_gate`; the file totals 1024 lines. * 🟑 (13:35) `test_committed_partial_fragment_validates_but_cannot_be_the_full_…

Gen 0 2026-09-09 13:40:24 · 318 tokens

* πŸ”΄ (13:34) User supplied an extensively elided view of `tests/test_governance_adjudication.py` for the requested read-only ZIP-validation review. * 🟑 (13:34) Visible test artifacts included helper functions `_write_pinned_cli_inputs`, `_documents()`, and `_adjudication()`. * 🟑 (13:34) `_write_pinned_cli_inputs` visibly creates an archive using `archive.writestr(...)`. * 🟑 (13:34) Visible exi…

Gen 0 2026-09-09 13:37:30 · 398 tokens

Date: Sep 9, 2026 * πŸ”΄ [requested-review] (13:03) User requested a read-only review of only `src/institution_lab/governance_adjudication.py` and `tests/test_governance_adjudication.py`; explicitly prohibited editing files. * πŸ”΄ (13:03) User stated this review replaces one twice-empty ZIP reviewer and has a smaller, disjoint scope. * 🟑 (13:03) Review scope is limited to ZIP container structure an…