{
  "component": "receipt-hardening",
  "baseCommit": "aebd9183af6a4b1643ddd1e71277f0e8166f3eda",
  "files": [
    "receipt-check/audit.py",
    "receipt-check/README.md",
    "receipt-check/receipt-v1.schema.json",
    "receipt-check/tests/test_audit.py",
    "receipt-check/tests/synthetic_pass.json",
    "receipt-check/tests/regtest_synthetic_pass.json"
  ],
  "commands": [
    {
      "command": "python3 -B -m unittest discover -s receipt-check/tests -v",
      "exitCode": 0,
      "result": "17 tests passed"
    },
    {
      "command": "python3 -B receipt-check/audit.py --mode synthetic receipt-check/tests/synthetic_pass.json",
      "exitCode": 0,
      "result": "PASS for byte integrity, 300000 sats in, 299000 sats paid, 1000 sats fee"
    },
    {
      "command": "python3 -B receipt-check/audit.py --mode regtest receipt-check/tests/regtest_synthetic_pass.json",
      "exitCode": 0,
      "result": "PASS for byte integrity, 300000 sats in, 299000 sats paid, 1000 sats fee"
    },
    {
      "command": "python3 -B receipt-check/audit.py --mode regtest regtest-payment/receipt.json",
      "exitCode": 1,
      "result": "Expected INSUFFICIENT. Raw spend, raw funding and valued snapshot are absent."
    },
    {
      "command": "git diff --check",
      "exitCode": 0,
      "result": "No whitespace errors in tracked changes"
    },
    {
      "command": "git add -- receipt-check/README.md receipt-check/audit.py receipt-check/receipt-v1.schema.json receipt-check/tests/synthetic_pass.json receipt-check/tests/regtest_synthetic_pass.json receipt-check/tests/test_audit.py",
      "exitCode": 128,
      "result": "Git metadata is read-only; creating .git/index.lock failed. Source is available in the working tree."
    }
  ],
  "tests": {
    "implemented": [
      "Offline receipt-check/v1 parser and strict JSON CLI with legacy and SegWit transaction decoding, canonical CompactSize, and non-witness txid recomputation.",
      "Exact input and funding sets, indexed P2PKH script and value checks, fixed mainnet Taproot recipient, output exclusivity, and integer accounting with an inclusive 100000-sat maximum fee.",
      "Explicit synthetic and regtest modes, default mainnet label checks, and a versioned JSON schema."
    ],
    "tested": [
      "17 unittest cases covering both known answers, mode separation, legacy insufficiency, wire encoding, mismatched txids, duplicate or wrong inputs, indexed values and scripts, payment and fee policy, strict JSON and CLI exit codes.",
      "Baseline reproduced five unsafe passes using its synthetic fixture: invented txids plus authenticated=true, a one-sat funding-value change, 299999-sat fee on 300000 sats of inputs, a labeled regtest document through the default mode, and an extra funding record."
    ],
    "untested": [
      "Live isolated regtest and real mainnet evidence, signatures, and active-chain confirmation. Runtime enforcement and fixtures were tested without an external JSON Schema validator."
    ],
    "unavailable": [
      "Legacy regtest receipt has no raw spend or funding transaction bytes and no valued pre-spend snapshot.",
      "No real v1 receipt, pre-spend UTXO observation or confirmed payment evidence was supplied."
    ]
  },
  "measurements": {
    "device": "unknown",
    "unitTestElapsed": {"value": 0.280, "unit": "seconds", "source": "unittest elapsed time"},
    "fixtureInput": {"value": 300000, "unit": "satoshis"},
    "fixturePayment": {"value": 299000, "unit": "satoshis"},
    "fixtureFee": {"value": 1000, "unit": "satoshis"},
    "spending": {"value": 0, "unit": "IMD"}
  },
  "blockers": [
    "Git staging is blocked by read-only Git metadata.",
    "A real confirmation requires the full raw spend and every funding transaction, a complete valued source-outpoint inventory independently reproduced at a named mainnet pre-spend tip, and the spend's block inclusion independently checked against a fully validating node's active mainnet chain with observed tip hash, heights and confirmation depth. The README specifies the block or Merkle proof and witness evidence."
  ],
  "restartCommand": "python3 -B -m unittest discover -s receipt-check/tests -v",
  "mainnetReceiptCommand": "python3 -B receipt-check/audit.py /path/to/public-mainnet-v1-receipt.json",
  "objectiveStatus": "INCOMPLETE"
}
