{
  "schema": "turkos-public-development-evidence/v1",
  "originalReport": {
    "path": "reports/os-implementation/K2170-update-slots-verify-local-4vzVUP/report.json",
    "sha256": "d5c875a75aad256690a27aec209efb5cceb11b1eb38e39054dc916c6d80b5b6d",
    "bytes": 18693
  },
  "status": "K2166_K2169_LOCAL_VALIDATED",
  "scope": "# Update Slots Image Verification Contract (`K2166–K2170`)\n\n1. **Joint Manifest Hash, Signature & Size Gate (`Manifest hash imza boy birlikte geçer`)**:\n   - A staged inactive slot (`SlotId::B`) image cannot be published as a boot candidate unless its manifest version (`version > active_version`), exact payload byte size (`code_len + data_len == actual_bytes`), domain-separated `TurkOS/ELF-PROGRAM/v1\\0` SHA-256 payload digest, and domain-separated `TurkOS/SLOT-MANIFEST-SIG/v1\\0` keyed verification tag all pass together in a single atomic check.\n   - Verification never modifies the active running slot (`SlotId::A`) or its digest.\n\n2. **Valid Slot B Payload Publication (`Geçerli B payload`)**:\n   - When the staged slot B payload has the exact expected byte length, its recomputed `TurkOS/ELF-PROGRAM/v1\\0` SHA-256 digest matches `manifest.payload_digest`, and the recomputed keyed manifest signature tag matches `manifest.signature_tag`, `verify_and_publish` transitions the verifier to `VerifyPhase::CandidatePublished` (`candidate_published == true`) and issues a `VerifiedCandidate` receipt bound to slot B's version, byte length, digest, and signature tag.\n\n3. **Truncated Download or Corrupted Signature Refusal (`Yarım download veya bozuk signature` / `B boot adayı yayımlanmaz`)**:\n   - If the staged payload is truncated or oversized (`actual_bytes != manifest.expected_bytes` -> `Error::SizeMismatch`), if the payload SHA-256 digest mismatches (`Error::DigestMismatch`), if the manifest signature tag is forged or corrupted (`Error::BadSignature`), or if verification is attempted on the active slot (`Error::ActiveSlotTarget`), the attempt is rejected, `candidate_published` remains `false`, any partial staging state is quarantined/cleared (`VerifyPhase::Rejected`), and slot B is never published as a boot candidate (`B boot adayı yayımlanmaz`).\n",
  "productAccepted": false,
  "tests": {
    "greenCount": 4,
    "positiveName": "os_update_slots_verify_positive",
    "negativeName": "os_update_slots_verify_negative",
    "mutationsRejected": 21
  },
  "caseCount": 0,
  "caseSerialsSelected": 0,
  "imageSha256": null,
  "files": [
    {
      "name": "Cargo.toml",
      "source": "reports/os-implementation/K2170-update-slots-verify-staging-local-Qmnkld/source/os-update-slots/Cargo.toml",
      "originalSha256": "c3e5406bc0121d9f488812c52871060741153cd14f7b32cf54074f351a234e15",
      "href": "/os-evidence/c3e5406bc0121d9f488812c52871060741153cd14f7b32cf54074f351a234e15.txt",
      "sha256": "c3e5406bc0121d9f488812c52871060741153cd14f7b32cf54074f351a234e15",
      "bytes": 104,
      "redacted": false
    },
    {
      "name": "UPDATE_SLOTS_VERIFY_CONTRACT.md",
      "source": "reports/os-implementation/K2170-update-slots-verify-staging-local-Qmnkld/source/kernel/UPDATE_SLOTS_VERIFY_CONTRACT.md",
      "originalSha256": "1411971d89dff6621d30c2a3f83b6f21fcc1e0b8ba4dcd735e71bc76cf2ffc99",
      "href": "/os-evidence/1411971d89dff6621d30c2a3f83b6f21fcc1e0b8ba4dcd735e71bc76cf2ffc99.txt",
      "sha256": "1411971d89dff6621d30c2a3f83b6f21fcc1e0b8ba4dcd735e71bc76cf2ffc99",
      "bytes": 1875,
      "redacted": false
    },
    {
      "name": "lib.rs",
      "source": "reports/os-implementation/K2170-update-slots-verify-staging-local-Qmnkld/source/os-update-slots/src/lib.rs",
      "originalSha256": "312d1df428182e72769ff47c7942ab29c987e8e45f70f94e10067fbb545cbb3c",
      "href": "/os-evidence/312d1df428182e72769ff47c7942ab29c987e8e45f70f94e10067fbb545cbb3c.txt",
      "sha256": "312d1df428182e72769ff47c7942ab29c987e8e45f70f94e10067fbb545cbb3c",
      "bytes": 67,
      "redacted": false
    },
    {
      "name": "slots.rs",
      "source": "reports/os-implementation/K2170-update-slots-verify-staging-local-Qmnkld/source/os-update-slots/src/slots.rs",
      "originalSha256": "a8a54fcf05eb05538492c66c29420767f3e06e0307b29c704e2956895b3544b4",
      "href": "/os-evidence/a8a54fcf05eb05538492c66c29420767f3e06e0307b29c704e2956895b3544b4.txt",
      "sha256": "a8a54fcf05eb05538492c66c29420767f3e06e0307b29c704e2956895b3544b4",
      "bytes": 16882,
      "redacted": false
    },
    {
      "name": "verify.rs",
      "source": "reports/os-implementation/K2170-update-slots-verify-staging-local-Qmnkld/source/os-update-slots/src/verify.rs",
      "originalSha256": "6dc2b6fac0b953cd78036b673f9913cc253f5cea78ca59bb7db882fcc9ce58f1",
      "href": "/os-evidence/6dc2b6fac0b953cd78036b673f9913cc253f5cea78ca59bb7db882fcc9ce58f1.txt",
      "sha256": "6dc2b6fac0b953cd78036b673f9913cc253f5cea78ca59bb7db882fcc9ce58f1",
      "bytes": 14448,
      "redacted": false
    },
    {
      "name": "slots.rs",
      "source": "reports/os-implementation/K2170-update-slots-verify-staging-local-Qmnkld/source/os-update-slots/tests/slots.rs",
      "originalSha256": "799395a76216442a6d63ea218c5495148309ded3528ee3229477104ac2bfaae5",
      "href": "/os-evidence/799395a76216442a6d63ea218c5495148309ded3528ee3229477104ac2bfaae5.txt",
      "sha256": "799395a76216442a6d63ea218c5495148309ded3528ee3229477104ac2bfaae5",
      "bytes": 9627,
      "redacted": false
    },
    {
      "name": "verify.rs",
      "source": "reports/os-implementation/K2170-update-slots-verify-staging-local-Qmnkld/source/os-update-slots/tests/verify.rs",
      "originalSha256": "2d20e0c344a98f91e3fa164bb0bf640d24c754d39e5d784223f53783b5747f40",
      "href": "/os-evidence/2d20e0c344a98f91e3fa164bb0bf640d24c754d39e5d784223f53783b5747f40.txt",
      "sha256": "2d20e0c344a98f91e3fa164bb0bf640d24c754d39e5d784223f53783b5747f40",
      "bytes": 8358,
      "redacted": false
    },
    {
      "name": "host-tests.log",
      "source": "reports/os-implementation/K2170-update-slots-verify-staging-local-Qmnkld/host-tests.log",
      "originalSha256": "f68090ed6c26bd0a6c8edb5a1548b40a4b82d5575158ad759fd205e88ed8389b",
      "href": "/os-evidence/8d19102bd561494eedfab840b37cc4fc6b88644cc357424919a2b435f8494a3a.txt",
      "sha256": "8d19102bd561494eedfab840b37cc4fc6b88644cc357424919a2b435f8494a3a",
      "bytes": 744,
      "redacted": true
    },
    {
      "name": "positive.log",
      "source": "reports/os-implementation/K2170-update-slots-verify-staging-local-Qmnkld/positive.log",
      "originalSha256": "8b80ac19efdac08f1bff9aadfe1435afd1c444610109e740463d690c039697ad",
      "href": "/os-evidence/8b80ac19efdac08f1bff9aadfe1435afd1c444610109e740463d690c039697ad.txt",
      "sha256": "8b80ac19efdac08f1bff9aadfe1435afd1c444610109e740463d690c039697ad",
      "bytes": 420,
      "redacted": false
    },
    {
      "name": "negative.log",
      "source": "reports/os-implementation/K2170-update-slots-verify-staging-local-Qmnkld/negative.log",
      "originalSha256": "7d99d6dfbcc643f5f316d24755b10ed999a9c146ecd4f274b13b7f72b48c5d62",
      "href": "/os-evidence/7d99d6dfbcc643f5f316d24755b10ed999a9c146ecd4f274b13b7f72b48c5d62.txt",
      "sha256": "7d99d6dfbcc643f5f316d24755b10ed999a9c146ecd4f274b13b7f72b48c5d62",
      "bytes": 420,
      "redacted": false
    },
    {
      "name": "target.log",
      "source": "reports/os-implementation/K2170-update-slots-verify-staging-local-Qmnkld/target.log",
      "originalSha256": "6878d606a5fa6150913c9c5470a1c53559a0d285894faddefeea7596138c1175",
      "href": "/os-evidence/5503f5cdba0c87b424c0cac67cb03945b0e97f351e5a23e2fac9611ebe8c2007.txt",
      "sha256": "5503f5cdba0c87b424c0cac67cb03945b0e97f351e5a23e2fac9611ebe8c2007",
      "bytes": 223,
      "redacted": true
    },
    {
      "name": "harness.mjs.txt",
      "source": "reports/os-implementation/K2170-update-slots-verify-local-4vzVUP/harness.mjs.txt",
      "originalSha256": "afc913f79c414c44a72e26a3a004d9f03d04045996a9bd2887ce7c9410385284",
      "href": "/os-evidence/afc913f79c414c44a72e26a3a004d9f03d04045996a9bd2887ce7c9410385284.txt",
      "sha256": "afc913f79c414c44a72e26a3a004d9f03d04045996a9bd2887ce7c9410385284",
      "bytes": 4604,
      "redacted": false
    },
    {
      "name": "k2170-update-slots-verify.rs",
      "source": "reports/os-implementation/K2170-update-slots-verify-candidate-ogYq47/sources/kernel/src/k2170-update-slots-verify.rs",
      "originalSha256": "3ae7220e1d97c9eb5726eb8b86abe4e7e258f3239cb8a9567b67307971261df0",
      "href": "/os-evidence/3ae7220e1d97c9eb5726eb8b86abe4e7e258f3239cb8a9567b67307971261df0.txt",
      "sha256": "3ae7220e1d97c9eb5726eb8b86abe4e7e258f3239cb8a9567b67307971261df0",
      "bytes": 12162,
      "redacted": false
    },
    {
      "name": "update_slots_verify.rs",
      "source": "reports/os-implementation/K2170-update-slots-verify-candidate-ogYq47/sources/kernel/src/runtime/update_slots_verify.rs",
      "originalSha256": "6dc2b6fac0b953cd78036b673f9913cc253f5cea78ca59bb7db882fcc9ce58f1",
      "href": "/os-evidence/6dc2b6fac0b953cd78036b673f9913cc253f5cea78ca59bb7db882fcc9ce58f1.txt",
      "sha256": "6dc2b6fac0b953cd78036b673f9913cc253f5cea78ca59bb7db882fcc9ce58f1",
      "bytes": 14448,
      "redacted": false
    },
    {
      "name": "main.rs",
      "source": "reports/os-implementation/K2170-update-slots-verify-candidate-ogYq47/sources/kernel/src/main.rs",
      "originalSha256": "73c6eebbef9b10d26d222f2c051610eecf9a6101547f1cee24bd8c0e91b756a9",
      "href": "/os-evidence/9a751cdea4f93852cae107cc075affde92a1401739f5914519d31f6f2b86a17d.txt",
      "sha256": "9a751cdea4f93852cae107cc075affde92a1401739f5914519d31f6f2b86a17d",
      "bytes": 2308110,
      "redacted": true
    },
    {
      "name": "mod.rs",
      "source": "reports/os-implementation/K2170-update-slots-verify-candidate-ogYq47/sources/kernel/src/runtime/mod.rs",
      "originalSha256": "d6f319ef2ef3fd9b8822b36a01b5dc7706be729fc869a27ac4f83562c3d59d82",
      "href": "/os-evidence/d6f319ef2ef3fd9b8822b36a01b5dc7706be729fc869a27ac4f83562c3d59d82.txt",
      "sha256": "d6f319ef2ef3fd9b8822b36a01b5dc7706be729fc869a27ac4f83562c3d59d82",
      "bytes": 4356,
      "redacted": false
    },
    {
      "name": "kernel-product.log",
      "source": "reports/os-implementation/K2170-update-slots-verify-candidate-ogYq47/kernel-product.log",
      "originalSha256": "cff6e2b250b913058b689d70946a710763534bd616121b8c0088dcb2952d5ee1",
      "href": "/os-evidence/0c362dd04ccc767f21f3735916d3dfe01d5ab89fed3ef1870e7ba1202e05fa21.txt",
      "sha256": "0c362dd04ccc767f21f3735916d3dfe01d5ab89fed3ef1870e7ba1202e05fa21",
      "bytes": 2307,
      "redacted": true
    }
  ],
  "moves": [
    "K2166",
    "K2167",
    "K2168",
    "K2169"
  ]
}
