# Update Slots Image Verification Contract (`K2166–K2170`) 1. **Joint Manifest Hash, Signature & Size Gate (`Manifest hash imza boy birlikte geçer`)**: - 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. - Verification never modifies the active running slot (`SlotId::A`) or its digest. 2. **Valid Slot B Payload Publication (`Geçerli B payload`)**: - 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. 3. **Truncated Download or Corrupted Signature Refusal (`Yarım download veya bozuk signature` / `B boot adayı yayımlanmaz`)**: - 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`).