interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

GitHub aien-dev/aienux#334 (code only)

closed derived 84f3fdbc1ac3b05a #334

Imported from GitHub aien-dev/aienux#334 (code only)

GitHub's metadata for this pull request is unavailable: its state is DERIVED from the commits (merged: the head is reachable from this project's main; open: GitHub kept a merge ref; else closed).

Base 3c07242d54f7abfbbbef1ea1ad5d7689e4826f36 · Head 619189934447666691dd2b30901fed56f3d8f47a

Apply it

git checkout -b patch-84f3fdbc1ac3b05a 3c07242d54f7abfbbbef1ea1ad5d7689e4826f36
curl -fsSL https://interplane.io/drakestapleton/aienux/patches/84f3fdbc1ac3b05a.patch | git am

Raw patch (mbox) · Diff

Provenance

This proposal is imported from GitHub; it is not signed by its author. Its import statement and source record:

github-import 1
aien-dev/aienux
334
619189934447666691dd2b30901fed56f3d8f47a
{"kind":"github-import","owner":"aien-dev","repo":"aienux","number":334,"url":"https://github.com/aien-dev/aienux/pull/334","export_sha256":"967c79e26a893657b5cdaa45efd442be5dbd2ecfe68e25f9a8c1b5da4d60d452","imported_utc":"2026-11-18T16:36:13Z","metadata":"unavailable","state_derived":true}

Changes

diff --git a/.crumb b/.crumb
index b2a3f5e0..6e21ddcc 100644
--- a/.crumb
+++ b/.crumb
@@ -27,33 +27,33 @@
           "purpose": "Directory crates. Purpose not yet described by a human."
         },
         {
-          "digest": "cfef8fc0d5a18c271db0e0f2c4be218a349bfcbd6f9a787248d290e922cea11b",
-          "last_commit": "0fef154",
+          "digest": "8297c9aa81a1feb24ac4beb4ecca58003f3bec5b7f475e40ad237da2868caf01",
+          "last_commit": "44dc7ee",
           "name": "docs",
           "purpose": "Directory docs. Purpose not yet described by a human."
         },
         {
-          "digest": "4a8025437e443ba91c36713f71a2b722792f8c3d77339792fd07436e61ceb78e",
-          "last_commit": "0fef154",
+          "digest": "6e15607b232b76b439aa7f8c01de4d7f856d010713cd3f4b651ee43e62b24efe",
+          "last_commit": "44dc7ee",
           "name": "native",
           "purpose": "Directory native. Purpose not yet described by a human."
         },
         {
-          "digest": "fa53022eb88e3cb8dbbeae8d5da3a7601ba4ca51030d9169e4fefafa8db5ee29",
-          "last_commit": "0fef154",
+          "digest": "90ed142e7c24f44a6635cddb089b6e8b0ccdd3b6914f9992cab7635a82ab24a8",
+          "last_commit": "44dc7ee",
           "name": "scripts",
           "purpose": "Directory scripts. Purpose not yet described by a human."
         }
       ],
-      "children_root": "sha256:b6a5581321088ca3ffbcdcecb4d8381ea6dc573a037ff3c36d673901660b196a",
-      "compiled_at": "2026-10-12T17:55:37Z",
+      "children_root": "sha256:acc1913fb996e199512ca693d81248f8594ed62f2c41bb5eedf45f0ce03bc55f",
+      "compiled_at": "2026-10-12T19:04:55Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:03f6c70248a47ac956d0aed3c7d0f4d28a260453fa437eae7bb30d7c7cda102c",
+      "digest": "sha256:86ddfd1168530ca1766052a44c4e77f594d80df792db0b4db1ccee8527784855",
       "evidence_files": 156,
       "evidence_root": "sha256:cd53ab119be9de6ce28c4f5949b106c9622f1fe105611de3de21c3bce7932694",
-      "files": 3109,
-      "generated_at_commit": "0fef1545d535093462d69b9318a40c232debd709",
-      "source_tree": "sha256:92d07e2d236661e96b5d864bdf8650f5c9b3b4b8bb59b5d0d63857be41b3b5a9"
+      "files": 3113,
+      "generated_at_commit": "44dc7ee624d1b72eb3930cd35f55629c2c12a008",
+      "source_tree": "sha256:94cb7135c411c7a6cac83fbe03dc60a9834c249e0125e444eea160c0013d9abf"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/docs/.crumb b/docs/.crumb
index 71312aee..79272995 100644
--- a/docs/.crumb
+++ b/docs/.crumb
@@ -30,14 +30,14 @@
         }
       ],
       "children_root": "sha256:baea130f2c52779b57d90139beb66ac01b21ab499d113471a334be5500f3e369",
-      "compiled_at": "2026-10-12T17:55:37Z",
+      "compiled_at": "2026-10-12T19:04:55Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:cfef8fc0d5a18c271db0e0f2c4be218a349bfcbd6f9a787248d290e922cea11b",
+      "digest": "sha256:8297c9aa81a1feb24ac4beb4ecca58003f3bec5b7f475e40ad237da2868caf01",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
       "files": 74,
-      "generated_at_commit": "0fef1545d535093462d69b9318a40c232debd709",
-      "source_tree": "sha256:1b60cac45947f800b14ae5ac1c4c8cb99db6559c8c6ec4185bcb29bf5f0d9065"
+      "generated_at_commit": "44dc7ee624d1b72eb3930cd35f55629c2c12a008",
+      "source_tree": "sha256:dc7a15a49ce75b0c9c96fbafad653d3e6c0363fd2c89085379f4de89a13d8693"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/docs/NATIVE_IMAGE_SLOTS.md b/docs/NATIVE_IMAGE_SLOTS.md
index 7097fb85..4d7568a0 100644
--- a/docs/NATIVE_IMAGE_SLOTS.md
+++ b/docs/NATIVE_IMAGE_SLOTS.md
@@ -1,7 +1,8 @@
-# Native image slots: install, update and recovery without Linux (P11 cuts 1 and 2a)
+# Native image slots: install, update and recovery without Linux (P11 cuts 1, 2a and 2b)
 
-STATUS: cut 1 (format, rules, host tool) and cut 2a (SLOTLDR.EFI, a separate
-slot loader in front of the unchanged image, QEMU gate PASS) done; the owner
+STATUS: cut 1 (format, rules, host tool), cut 2a (SLOTLDR.EFI, a separate
+slot loader in front of the unchanged image, QEMU gate PASS) and cut 2b
+(kernel-side promote / abandon, section 8) done; the owner
 approved the loader on 2026-10-12 (section 2). Nothing here has run on
 hardware (hardware NOT_RUN). The kernel image and its stub are unchanged.
 SECURITY_IMPACT: PERSISTENT_FORMAT + RECOVERY (a new on-disk format and a new
@@ -215,7 +216,7 @@ nothing and to re-release anything.
    recovery media built by our tools, for the dual-invalid case. Then N7 is
    run on the physical candidate inside an attended window.
 
-   **Cut 2b (next): kernel-side promote.** After its health milestone the
+   **Cut 2b (done, QEMU; section 8): kernel-side promote.** After its health milestone the
    kernel writes the control record over its own NVMe path (promote the
    candidate, or mark it failed), so a good update becomes the active slot
    instead of only being tried three times.
@@ -280,3 +281,77 @@ Host tool additions for the gate: `ck_slot_tool slots-image` (writes the
 control record and both slots into a slots partition of a disk image),
 `ck_slot_tool keys-c`, `ck_slot_tool sign-test --test2` (a second,
 untrusted TEST key), and `ck_gpt_image` layout `slots`.
+
+## 8. Kernel promotion and abandon (cut 2b)
+
+Cut 2a left two things to the kernel: making a good candidate the active slot,
+and marking a candidate that ran out of tries as failed. Both are now done by
+the service kernel (`CK_SERVICE=1`), in `native/kernel/svc/slot_service.c`,
+with the loader's own rules and commit routine. There is no second
+implementation of the record format.
+
+**How the kernel learns which slot it is.** The control record alone cannot
+tell: "candidate on its last try" and "candidate out of tries, active booted"
+both read `tries=0`. Before `StartImage`, SLOTLDR.EFI therefore allocates
+one page of the OS-loader memory type `0x80000A1E` and writes a 256-byte boot
+record into it (`struct ck_slot_boot_record`, `slot_format.h`): booted slot,
+the loader's reason, tries, the control sequence it read or committed, the
+started manifest's generation, policy generation and image SHA-512, the
+loader commit, and a SHA-256 over the first 224 bytes. The page survives
+`ExitBootServices` and is listed in the memory map the unchanged stub already
+copies into the handoff, so neither the stub nor the handoff format changes.
+The kernel copies it in `ck_kernel_entry` right after `ck_handoff_check`,
+while the firmware identity map is still live (the kernel never maps that
+memory type afterwards, and its frame allocator only hands out conventional
+memory, so the page is never reused). The digest catches a torn or stray
+page; it is not a signature, because the record comes from inside the same
+firmware + loader trust boundary as the handoff itself.
+
+**What the kernel does** (`ck_slot_kernel_action`, `slot_select.c`, pure and
+self-tested):
+
+| Boot record and disk | Action | Write |
+|---|---|---|
+| no record (image not started by SLOTLDR), record fails its checks, no slots partition, no control record, the started slot's manifest on disk differs from the record, or the control sequence moved since the loader read it | refuse, say why | none |
+| reason `candidate_try`, control still names the slot, health reached | **promote**: active = this slot, candidate cleared, floor raised to the image's policy generation (never lowered) | one control commit |
+| reason `candidate_try`, health not reached | wait; at the stop order the kernel says the candidate was not promoted | none (the loader keeps counting tries down) |
+| reason `candidate_exhausted` or `candidate_invalid`, a candidate is set and the booted slot is the active one | **abandon**: candidate cleared, `CANDIDATE_FAILED` flag set, active slot unchanged | one control commit |
+| anything else (steady boot of the active slot) | nothing | none |
+
+Health is the service's own milestone, nothing new: the Store is open,
+continuity committed this boot (PROVISIONED or RESUMED, the self-test
+record the lifecycle already writes) and the lifecycle is READY. It is
+checked when the lifecycle starts and again after a successful `unlock`.
+Abandon is not gated on health: the loader already decided.
+
+**The write.** One control record commit through the torn-slot protocol
+(`ck_slot_control_commit`, `native/boot/slot_control.c`, shared with the
+loader and `ck_slot_tool`): body, flush, commit header, flush, then read back
+and compare. It goes over the kernel's own NVMe path, through a second
+bounded partition view of the slots partition (`ck_dev_slots_disk`, found
+with the same strict GPT validation as the AIENOS partition, primary and
+backup), never a whole-disk handle. A failed commit leaves the previous record
+authoritative and is reported.
+
+**Gate.** Rows 9-11 of `scripts/qemu_ck_slot_loader_test.sh` (GATES.md
+rows 195-197) boot SLOTLDR.EFI and the service image from one NVMe disk
+(`ck_gpt_image` layout `aienos-slots`: the Store partition and the slots
+partition):
+
+- row 9: a healthy candidate B is promoted by the kernel (control
+  `active=1 floor=2`), and the next boot is a steady boot of B with no write;
+- row 10: a candidate that never becomes healthy (the plain service image,
+  whose Store stays locked) spends its last try without promotion; the next
+  boot falls back to A and the kernel abandons B (`flags=0x01`), A stays
+  active and the host tool agrees the next decision is a steady boot of A;
+- row 11 (negative control): the service image started directly, without
+  SLOTLDR, finds no boot record and writes nothing although it is healthy.
+
+Both slots invalid stays row 7: `recovery_required`, no image started, the
+control record untouched. `make -C native/kernel slot-test` adds the boot
+record mutations (each refused with its reason), the kernel-action scenarios
+and the shared commit routine.
+
+Not here: the updater that writes a new candidate into the inactive slot
+(cut 3) and the recovery image for the dual-invalid case (cut 4). Hardware
+NOT_RUN.
diff --git a/native/.crumb b/native/.crumb
index ddff06e5..af232b98 100644
--- a/native/.crumb
+++ b/native/.crumb
@@ -55,8 +55,8 @@
           "purpose": "Directory native/argus. Purpose not yet described by a human."
         },
         {
-          "digest": "ac53ad497e153b30849f7064154f0dccedafe1af34a5b6de118327ee0e5c39d3",
-          "last_commit": "aa76c36",
+          "digest": "0b5769362a82f2b2d66ef490df93fc79eff8829ed6ee933bdedae2adecb8b240",
+          "last_commit": "44dc7ee",
           "name": "boot",
           "purpose": "Directory native/boot. Purpose not yet described by a human."
         },
@@ -79,8 +79,8 @@
           "purpose": "Directory native/disk. Purpose not yet described by a human."
         },
         {
-          "digest": "2da253b686dabae0b952913f09ed51793c89b9a993be9ad4b1251bc37caa8b82",
-          "last_commit": "0fef154",
+          "digest": "23f775c1088273409ab37249362083b84c3fea65cc0178e9ac39dcd9abf3add2",
+          "last_commit": "44dc7ee",
           "name": "kernel",
           "purpose": "Directory native/kernel. Purpose not yet described by a human."
         },
@@ -109,15 +109,15 @@
           "purpose": "Directory native/store. Purpose not yet described by a human."
         }
       ],
-      "children_root": "sha256:ec8ff1f5ee937605da49ef43f40bd0e62eeb7d9952d8aade9563852b916c3af8",
-      "compiled_at": "2026-10-12T17:55:37Z",
+      "children_root": "sha256:80b59a95a0eff1e198e8589417029c194341bf67bdbb9e4a65b0c50a10aae49a",
+      "compiled_at": "2026-10-12T19:04:55Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:4a8025437e443ba91c36713f71a2b722792f8c3d77339792fd07436e61ceb78e",
+      "digest": "sha256:6e15607b232b76b439aa7f8c01de4d7f856d010713cd3f4b651ee43e62b24efe",
       "evidence_files": 4,
       "evidence_root": "sha256:e410b845507e00568e15b51a5797af32a97e0e4b8ab4e8487bb7c98e7e0cf335",
-      "files": 482,
-      "generated_at_commit": "0fef1545d535093462d69b9318a40c232debd709",
-      "source_tree": "sha256:2323966cd83d45b38f315dd1e8a913fa44f995a03621c840ee8a37fc8f68e627"
+      "files": 486,
+      "generated_at_commit": "44dc7ee624d1b72eb3930cd35f55629c2c12a008",
+      "source_tree": "sha256:d6a0e29a0dfe978e87db2f3e5041dff070f666d8f60dadd0d1431c11c8c14506"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/native/boot/.crumb b/native/boot/.crumb
index 3418f814..08e4dce4 100644
--- a/native/boot/.crumb
+++ b/native/boot/.crumb
@@ -7,14 +7,14 @@
     "generated": {
       "children": [],
       "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "compiled_at": "2026-10-12T17:02:49Z",
+      "compiled_at": "2026-10-12T19:04:55Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:ac53ad497e153b30849f7064154f0dccedafe1af34a5b6de118327ee0e5c39d3",
+      "digest": "sha256:0b5769362a82f2b2d66ef490df93fc79eff8829ed6ee933bdedae2adecb8b240",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "files": 12,
-      "generated_at_commit": "d7c6c9c90f6711626732bcb168f95cbf45671685",
-      "source_tree": "sha256:a48e5625c27ed0138e01d42ca77c73f130946524729e8ec9470f8ba0379a4a54"
+      "files": 14,
+      "generated_at_commit": "44dc7ee624d1b72eb3930cd35f55629c2c12a008",
+      "source_tree": "sha256:eb2981689c1be6f556d1f70211b1d6fbba57daba2530b49257ea1fc72163ac1c"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/native/boot/slot_control.c b/native/boot/slot_control.c
new file mode 100644
index 00000000..9cdb9c7e
--- /dev/null
+++ b/native/boot/slot_control.c
@@ -0,0 +1,23 @@
+/* slot_control.c -- see slot_control.h. */
+#include "slot_control.h"
+
+static struct ck_slot_control g_back;
+
+int ck_slot_control_commit(ts_region *r, const struct ck_slot_control *c, uint64_t *seq_out)
+{
+    uint64_t seq = 0;
+    int rc = ts_commit(r, (const uint8_t *)c);
+    if (rc == TS_OK)
+        rc = ts_recover(r, (uint8_t *)&g_back, &seq, 0);
+    if (rc == TS_OK) {
+        const uint8_t *a = (const uint8_t *)&g_back, *b = (const uint8_t *)c;
+        uint8_t d = 0;
+        for (unsigned i = 0; i < sizeof g_back; i++)
+            d |= (uint8_t)(a[i] ^ b[i]);
+        if (d)
+            rc = TS_CORRUPT;
+    }
+    if (seq_out)
+        *seq_out = rc == TS_OK ? seq : 0;
+    return rc;
+}
diff --git a/native/boot/slot_control.h b/native/boot/slot_control.h
new file mode 100644
index 00000000..21ea6ee3
--- /dev/null
+++ b/native/boot/slot_control.h
@@ -0,0 +1,18 @@
+/* slot_control.h -- commit one AIENOS slot control record (slot_format.h)
+ * through the torn-slot protocol (native/store/torn_slot.c) and prove it
+ * landed: ts_commit (body, flush, commit header, flush), then ts_recover and
+ * a byte compare of what came back. The one control-commit routine shared by
+ * SLOTLDR.EFI (native/boot/slot_loader.c, candidate tries), the kernel
+ * (native/kernel/svc/slot_service.c, promote / abandon / stage) and the host
+ * tool (ck_slot_tool control-commit). Freestanding, no allocation. */
+#ifndef AIENOS_CK_SLOT_CONTROL_H
+#define AIENOS_CK_SLOT_CONTROL_H
+#include "slot_format.h"
+#include "../store/torn_slot.h"
+
+/* r must have been recovered (ts_recover) before the first commit. Returns
+ * TS_OK with *seq_out = the committed sequence, or the torn-slot error, or
+ * TS_CORRUPT when the record read back differs from the one committed. */
+int ck_slot_control_commit(ts_region *r, const struct ck_slot_control *c, uint64_t *seq_out);
+
+#endif
diff --git a/native/boot/slot_format.h b/native/boot/slot_format.h
index 70eaa453..eb8a04c1 100644
--- a/native/boot/slot_format.h
+++ b/native/boot/slot_format.h
@@ -6,8 +6,10 @@
  * (native/boot/slot_loader.c, P11 cut 2a, owner decision 2026-10-12), a
  * separate chain loader in FRONT of the unchanged stub + kernel image
  * (native/boot/efi_main.c is not modified). The loader writes the control
- * record only to consume a candidate try. The kernel-side writer (stage,
- * promote, abandon from the native NVMe path) is cut 2b. This header,
+ * record only to consume a candidate try. The service kernel
+ * (native/kernel/svc/slot_service.c, cut 2b) promotes a healthy candidate and
+ * abandons an exhausted or invalid one over its own NVMe path, told which slot
+ * it is by the loader's boot record (below). Staging is cut 3. This header,
  * slot_select.c and the host tool native/kernel/tools/ck_slot_tool.c pin
  * the format and the decision rules (mutation-tested in make slot-test).
  *
@@ -189,6 +191,84 @@ int ck_slot_promote(struct ck_slot_control *c, unsigned booted_slot, uint64_t ge
                     uint64_t policy_generation, const char **why);
 int ck_slot_abandon_candidate(struct ck_slot_control *c, const char **why);
 
+
+/* ---- boot record: what SLOTLDR.EFI hands the kernel (P11 cut 2b) ---------- */
+/* The control record alone cannot tell a kernel which slot it is: "candidate
+ * on its last try" and "candidate out of tries, active booted" both read
+ * tries=0. Before StartImage the loader therefore writes this record into one
+ * page it allocates with the memory type below, a UEFI OS-loader type (UEFI
+ * 2.10 section 7.2 AllocatePages: 0x80000000..0xFFFFFFFF are reserved for OS
+ * loaders). That page survives ExitBootServices and appears in the final
+ * memory map the unchanged stub already copies into the CHANDOF3 handoff, so
+ * neither the stub nor the handoff changes. The kernel's frame allocator only
+ * hands out EfiConventionalMemory, so the page is never reused.
+ *
+ * Trust: the record is written by the loader that verified the image, before
+ * ExitBootServices, i.e. inside the same firmware + loader trust boundary as
+ * the handoff itself. Its digest catches a torn or stray page, not an
+ * attacker inside that boundary. The kernel still cross-checks the slot's
+ * manifest on disk (generation, image_sha512) before it writes anything. */
+#define CK_SLOT_BOOT_MEMTYPE 0x80000A1Eu  /* OS-loader memory type of the boot record page */
+#define CK_SLOT_BOOT_MAGIC "AIENSLB1"
+#define CK_SLOT_BOOT_VERSION 1u
+#define CK_SLOT_BOOT_BYTES 256u
+#define CK_SLOT_BOOT_SIGNED 224u          /* digest = SHA-256 over bytes [0, 224) */
+
+struct ck_slot_boot_record {
+    uint8_t magic[8];                 /*   0 "AIENSLB1" */
+    uint32_t version;                 /*   8 1 */
+    uint8_t boot_slot;                /*  12 0 or 1: the slot whose image the loader started */
+    uint8_t reason;                   /*  13 enum ck_slot_reason of the loader's decision */
+    uint8_t tries;                    /*  14 tries_remaining on disk when the image started */
+    uint8_t control_present;          /*  15 1 = a valid control record was read (and committed when asked) */
+    uint64_t control_seq;             /*  16 torn-slot sequence of that record (0 without one) */
+    uint64_t generation;              /*  24 manifest generation of the started image */
+    uint64_t policy_generation;       /*  32 manifest policy_generation of the started image */
+    uint8_t image_sha512[64];         /*  40 manifest image_sha512 of the started image */
+    uint8_t loader_commit[40];        /* 104 loader build commit, ASCII, zero padded */
+    uint8_t reserved[80];             /* 144 zero */
+    uint8_t digest[32];               /* 224 SHA-256 over bytes [0, 224) */
+};
+_Static_assert(sizeof(struct ck_slot_boot_record) == CK_SLOT_BOOT_BYTES, "ck_slot_boot_record size");
+_Static_assert(offsetof(struct ck_slot_boot_record, digest) == CK_SLOT_BOOT_SIGNED, "boot record digest");
+
+/* Fill the digest (loader side). */
+void ck_slot_boot_seal(struct ck_slot_boot_record *b);
+/* Structure + digest + ranges (kernel side). 0 = ok, -1 with *why. */
+int ck_slot_boot_check(const struct ck_slot_boot_record *b, const char **why);
+
+/* ---- what the kernel does with its slot (P11 cut 2b) ---------------------- */
+/* Pure decision, shared by the kernel (svc/slot_service.c) and the host
+ * self-test. Inputs: the boot record (valid), the control record recovered
+ * from disk (NULL when absent or corrupt), the started slot's manifest from
+ * disk (structurally checked by the caller, NULL when unreadable) and whether
+ * the service reached its health milestone. Rules, in order:
+ *   - no control record, or the on-disk manifest of the started slot does
+ *     not match the boot record (generation, image_sha512): REFUSE, write
+ *     nothing (the disk changed under us or the record lies);
+ *   - reason CANDIDATE_TRY and control still names that slot as candidate:
+ *     healthy -> PROMOTE (ck_slot_promote with the manifest's generation and
+ *     policy_generation); not healthy -> WAIT (nothing written; tries keep
+ *     counting down in the loader);
+ *   - reason CANDIDATE_EXHAUSTED or CANDIDATE_INVALID, control has a
+ *     candidate and its active slot is the started slot -> ABANDON
+ *     (ck_slot_abandon_candidate: candidate cleared, FAILED flag set; the
+ *     active slot stays). This is slot_select.c rule 3's "abandoned by the
+ *     kernel later". Not gated on health: the loader already decided.
+ *   - anything else -> NONE.
+ * *out holds the record to commit for PROMOTE and ABANDON. */
+enum ck_slot_action {
+    CK_SLOT_A_NONE = 0,
+    CK_SLOT_A_PROMOTE,
+    CK_SLOT_A_ABANDON,
+    CK_SLOT_A_WAIT,
+    CK_SLOT_A_REFUSE,
+};
+enum ck_slot_action ck_slot_kernel_action(const struct ck_slot_boot_record *b, const struct ck_slot_control *ctl,
+                                          const struct ck_slot_manifest *booted, int healthy,
+                                          struct ck_slot_control *out, const char **why);
+const char *ck_slot_action_text(enum ck_slot_action a);
+
 /* Text for a reason code (static string). */
 const char *ck_slot_reason_text(enum ck_slot_reason r);
 
diff --git a/native/boot/slot_loader.c b/native/boot/slot_loader.c
index 2e9296c2..af13b5f4 100644
--- a/native/boot/slot_loader.c
+++ b/native/boot/slot_loader.c
@@ -27,6 +27,14 @@
  *      FlushBlocks, read it back, and only then boot the candidate. That is
  *      what bounds attempts when a candidate hangs or never promotes. If the
  *      commit fails the candidate is treated as invalid and selection reruns.
+ *   4b. (cut 2b) Hand the kernel one boot record (slot_format.h struct
+ *      ck_slot_boot_record: slot, reason, tries, control sequence, the
+ *      manifest's generation and digest) in one page of OS-loader memory type
+ *      CK_SLOT_BOOT_MEMTYPE. The page survives ExitBootServices and appears in
+ *      the memory map the unchanged stub hands over; the service kernel
+ *      (svc/slot_service.c) promotes or abandons from it. No page: the kernel
+ *      writes nothing. The control record is committed through
+ *      ck_slot_control_commit (slot_control.c), the routine the kernel uses.
  *   5. One decision line, then LoadImage(SourceBuffer = the verified bytes,
  *      DevicePath = this loader's own LoadedImageDevicePath, so the chained
  *      stub's LoadedImage->DeviceHandle is still the boot volume and its
@@ -35,13 +43,13 @@
  *   the firmware, which goes on to its next boot option.
  *
  * Never: UEFI variables, runtime services, ExitBootServices (the chained
- * stub leaves boot services itself), any write other than the control
+ * stub leaves boot services itself), any disk write other than the control
  * region, any write when the control record is missing or corrupt.
  * Freestanding C with the kernel's flags; no kernel objects are linked. */
 #include <stdarg.h>
 #include "efi.h"
 #include "slot_format.h"
-#include "../store/torn_slot.h"
+#include "slot_control.h"
 #include "../kernel/core/fmt.h"
 
 #ifndef AIENOS_COMMIT
@@ -85,7 +93,7 @@ static uint8_t hdr[4096];
 static uint8_t ents[GPT_ENT_MAX + 4096] __attribute__((aligned(4096)));
 static uint8_t bounce[CK_SLOT_UNIT] __attribute__((aligned(4096)));
 static struct ck_slot_manifest man[CK_SLOT_COUNT] __attribute__((aligned(4096)));
-static struct ck_slot_control ctl_rec, ctl_back;
+static struct ck_slot_control ctl_rec;
 
 /* ---- console -------------------------------------------------------------- */
 struct line {
@@ -335,6 +343,43 @@ static const char *unusable_why(const struct ck_slot_eval *e, const struct ck_sl
     return "not selectable";
 }
 
+/* ---- boot record for the kernel (P11 cut 2b, slot_format.h) ------------------ */
+/* One page of the OS-loader memory type CK_SLOT_BOOT_MEMTYPE: it survives
+ * ExitBootServices and shows up in the final memory map the unchanged stub
+ * copies into the handoff. If the allocation fails the image still boots;
+ * its kernel then finds no record and writes nothing (no promotion, no
+ * abandon): fail closed, the tries counter still bounds a candidate. */
+static void hand_over(unsigned b, const struct ck_slot_decision *d, const struct ck_slot_control *ctl,
+                      uint64_t seq, const struct ck_slot_manifest *m)
+{
+    uint64_t pa = 0;
+    struct ck_slot_boot_record *br;
+    const char *c = AIENOS_COMMIT;
+    EFI_STATUS s = bs->AllocatePages(AllocateAnyPages, CK_SLOT_BOOT_MEMTYPE, 1, &pa);
+    if (s != EFI_SUCCESS || !pa) {
+        say("slot_loader: boot record NOT handed over (AllocatePages status=0x%llx): the kernel will write nothing\n",
+            (unsigned long long)s);
+        return;
+    }
+    br = (struct ck_slot_boot_record *)(uintptr_t)pa;
+    memset(br, 0, PAGE);
+    memcpy(br->magic, CK_SLOT_BOOT_MAGIC, 8);
+    br->version = CK_SLOT_BOOT_VERSION;
+    br->boot_slot = (uint8_t)b;
+    br->reason = (uint8_t)d->reason;
+    br->tries = d->loader_write ? d->ctl_out.tries_remaining : (ctl ? ctl->tries_remaining : 0);
+    br->control_present = ctl ? 1 : 0;
+    br->control_seq = ctl ? seq : 0;
+    br->generation = m->generation;
+    br->policy_generation = m->policy_generation;
+    memcpy(br->image_sha512, m->image_sha512, 64);
+    for (unsigned i = 0; i < sizeof br->loader_commit && c[i]; i++)
+        br->loader_commit[i] = (uint8_t)c[i];
+    ck_slot_boot_seal(br);
+    say("slot_loader: boot record handed over type=0x%x slot=%c reason=%s seq=%llu\n", CK_SLOT_BOOT_MEMTYPE, 'A' + b,
+        ck_slot_reason_text(d->reason), (unsigned long long)br->control_seq);
+}
+
 EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *st)
 {
     static const EFI_GUID lidp_guid = LOADED_IMAGE_DEVICE_PATH_GUID_INIT;
@@ -428,12 +473,10 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *st)
 
     ck_slot_select(ctl, ev, &d);
     if (d.loader_write) {
-        int crc = ts_commit(&r, (const uint8_t *)&d.ctl_out);
         uint64_t bseq = 0;
+        int crc = ck_slot_control_commit(&r, &d.ctl_out, &bseq);
         if (crc == TS_OK)
-            crc = ts_recover(&r, (uint8_t *)&ctl_back, &bseq, 0);
-        if (crc == TS_OK && memcmp(&ctl_back, &d.ctl_out, sizeof ctl_back) != 0)
-            crc = TS_CORRUPT;
+            seq = bseq;
         if (crc != TS_OK) {
             unsigned c = (unsigned)d.boot_slot;
             say("slot_loader: control commit failed (rc=%d): the candidate is not booted\n", crc);
@@ -461,6 +504,7 @@ EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *st)
     if (img[b ^ 1u])
         bs->FreePages((uint64_t)(uintptr_t)img[b ^ 1u], pages[b ^ 1u]);
 
+    hand_over(b, &d, ctl, seq, &man[b]);
     void *dp = 0;
     if (bs->HandleProtocol(image, &lidp_guid, &dp) != EFI_SUCCESS)
         dp = 0;
diff --git a/native/boot/slot_select.c b/native/boot/slot_select.c
index c7495a2b..978ec9c1 100644
--- a/native/boot/slot_select.c
+++ b/native/boot/slot_select.c
@@ -358,3 +358,123 @@ const char *ck_slot_reason_text(enum ck_slot_reason r)
     }
     return "unknown";
 }
+
+/* ---- boot record (P11 cut 2b) ---------------------------------------------- */
+void ck_slot_boot_seal(struct ck_slot_boot_record *b)
+{
+    sha256_hash((const uint8_t *)b, CK_SLOT_BOOT_SIGNED, b->digest);
+}
+
+int ck_slot_boot_check(const struct ck_slot_boot_record *b, const char **why)
+{
+    static const uint8_t magic[8] = CK_SLOT_BOOT_MAGIC;
+    uint8_t d[SHA256_DIGEST_SIZE];
+    const char *w = 0;
+    if (!b)
+        w = "no boot record";
+    else if (!eq_bytes(b->magic, magic, 8))
+        w = "bad boot record magic";
+    else if (b->version != CK_SLOT_BOOT_VERSION)
+        w = "unsupported boot record version";
+    else {
+        sha256_hash((const uint8_t *)b, CK_SLOT_BOOT_SIGNED, d);
+        if (!eq_bytes(d, b->digest, sizeof d))
+            w = "boot record digest mismatch";
+        else if (b->boot_slot >= CK_SLOT_COUNT)
+            w = "boot record slot out of range";
+        else if (b->reason <= CK_SLOT_R_NONE || b->reason >= CK_SLOT_R_RECOVERY_REQUIRED)
+            w = "boot record reason out of range";
+        else if (b->control_present > 1)
+            w = "boot record control flag out of range";
+        else if (b->tries > CK_SLOT_MAX_TRIES)
+            w = "boot record tries above the bound";
+        else if (b->generation == 0 || b->policy_generation > b->generation)
+            w = "boot record generation fields";
+        else if (!all_zero(b->reserved, sizeof b->reserved))
+            w = "boot record reserved bytes nonzero";
+        else if (!b->control_present && (b->reason != CK_SLOT_R_NO_CONTROL || b->control_seq != 0))
+            w = "boot record claims a decision without a control record";
+        else if (b->control_present && b->reason == CK_SLOT_R_NO_CONTROL)
+            w = "boot record claims no control with a control record";
+    }
+    if (why)
+        *why = w;
+    return w ? -1 : 0;
+}
+
+enum ck_slot_action ck_slot_kernel_action(const struct ck_slot_boot_record *b, const struct ck_slot_control *ctl,
+                                          const struct ck_slot_manifest *booted, int healthy,
+                                          struct ck_slot_control *out, const char **why)
+{
+    const char *w = 0;
+    unsigned s;
+    if (ck_slot_boot_check(b, &w) != 0) {
+        if (why)
+            *why = w;
+        return CK_SLOT_A_REFUSE;
+    }
+    s = b->boot_slot;
+    if (!ctl || ck_slot_control_check(ctl, &w) != 0) {
+        if (why)
+            *why = ctl ? w : "no control record on disk";
+        return CK_SLOT_A_REFUSE;
+    }
+    if (!booted || ck_slot_manifest_check(booted, &w) != 0) {
+        if (why)
+            *why = booted ? w : "started slot's manifest unreadable";
+        return CK_SLOT_A_REFUSE;
+    }
+    if (booted->generation != b->generation || booted->policy_generation != b->policy_generation ||
+        !eq_bytes(booted->image_sha512, b->image_sha512, 64)) {
+        if (why)
+            *why = "started slot's manifest on disk differs from the boot record";
+        return CK_SLOT_A_REFUSE;
+    }
+    copy_bytes((uint8_t *)out, (const uint8_t *)ctl, sizeof *out);
+    if (b->reason == CK_SLOT_R_CANDIDATE_TRY) {
+        if (ctl->candidate_slot != s) {
+            if (why)
+                *why = "control no longer names the started slot as candidate";
+            return CK_SLOT_A_NONE;
+        }
+        if (!healthy) {
+            if (why)
+                *why = "health milestone not reached";
+            return CK_SLOT_A_WAIT;
+        }
+        if (ck_slot_promote(out, s, booted->generation, booted->policy_generation, &w) != 0) {
+            if (why)
+                *why = w;
+            return CK_SLOT_A_REFUSE;
+        }
+        if (why)
+            *why = 0;
+        return CK_SLOT_A_PROMOTE;
+    }
+    if ((b->reason == CK_SLOT_R_CANDIDATE_EXHAUSTED || b->reason == CK_SLOT_R_CANDIDATE_INVALID) &&
+        ctl->candidate_slot != CK_SLOT_NONE && ctl->active_slot == s) {
+        if (ck_slot_abandon_candidate(out, &w) != 0) {
+            if (why)
+                *why = w;
+            return CK_SLOT_A_REFUSE;
+        }
+        if (why)
+            *why = 0;
+        return CK_SLOT_A_ABANDON;
+    }
+    if (why)
+        *why = "nothing to write";
+    return CK_SLOT_A_NONE;
+}
+
+const char *ck_slot_action_text(enum ck_slot_action a)
+{
+    switch (a) {
+    case CK_SLOT_A_NONE: return "none";
+    case CK_SLOT_A_PROMOTE: return "promote";
+    case CK_SLOT_A_ABANDON: return "abandon";
+    case CK_SLOT_A_WAIT: return "wait";
+    case CK_SLOT_A_REFUSE: return "refuse";
+    }
+    return "unknown";
+}
diff --git a/native/kernel/.crumb b/native/kernel/.crumb
index f91f142a..4215a9f6 100644
--- a/native/kernel/.crumb
+++ b/native/kernel/.crumb
@@ -57,20 +57,20 @@
           "purpose": "Directory native/kernel/artifact. Purpose not yet described by a human."
         },
         {
-          "digest": "713ba40c584588b6328e0216f0b7fc3d70ad06679941b6401db3db1fc4222635",
-          "last_commit": "d60d904",
+          "digest": "1b408f5480b06385d8b4a11af66e90314ec075a906e70faa0947c78564e8c012",
+          "last_commit": "44dc7ee",
           "name": "core",
           "purpose": "Directory native/kernel/core. Purpose not yet described by a human."
         },
         {
-          "digest": "2dce85eb060adebc9b668fa932ad213985f63bf08b3738d6c8e02fe60db32a0f",
-          "last_commit": "98fbc3c",
+          "digest": "04dc7faae4e24952ed8c1b46c83a346f0be5a84828ea9e53c76611eec228bf45",
+          "last_commit": "44dc7ee",
           "name": "dev",
           "purpose": "Directory native/kernel/dev. Purpose not yet described by a human."
         },
         {
-          "digest": "b169dbabaac665af04845138be24e36fa9993a6ff761c6e4ea11f4dd81689657",
-          "last_commit": "d60d904",
+          "digest": "283a167327166bcfd270869cc04a1a03ea21366248471464db7ef1cf37058ada",
+          "last_commit": "44dc7ee",
           "name": "include",
           "purpose": "Directory native/kernel/include. Purpose not yet described by a human."
         },
@@ -81,33 +81,33 @@
           "purpose": "Directory native/kernel/mm. Purpose not yet described by a human."
         },
         {
-          "digest": "df0e798c909b72635d6b3aaba97462da29f468723857ee4fd055110c8eb07c1d",
-          "last_commit": "22eb360",
+          "digest": "1bac580f6739048716c499c005fba3b85be0092bbdef5ee37b3e32c72a878024",
+          "last_commit": "44dc7ee",
           "name": "svc",
           "purpose": "Directory native/kernel/svc. Purpose not yet described by a human."
         },
         {
           "digest": "9aa43b7cb6119b9cb8fe1fc72e35e2983048acb1c839695a12de88c230c5f580",
-          "last_commit": "d60d904",
+          "last_commit": "3c07242",
           "name": "tests",
           "purpose": "Directory native/kernel/tests. Purpose not yet described by a human."
         },
         {
-          "digest": "2443251e4e44b6fb0efc7889c87eb6fa5510eb06d7ed84f64ec487621a2b859e",
-          "last_commit": "aa76c36",
+          "digest": "45a1ebe4171bdacbfcf2b5a4e5ed93702953a91599cd216740a2f070a314d5a8",
+          "last_commit": "44dc7ee",
           "name": "tools",
           "purpose": "Hosted (Linux-built) checkers for the native kernel, run by `make -C native/kernel test`; nothin"
         }
       ],
-      "children_root": "sha256:cf0c34c19b5c82e7a014bca7bf392f6c5ad5ee559b4d4ee410783995aa6a64cf",
-      "compiled_at": "2026-10-12T17:55:37Z",
+      "children_root": "sha256:d65d85e110fe43eb1f3a9ecf9d628c1b7d5646289972cf7e4fb8d3918ed7b27e",
+      "compiled_at": "2026-10-12T19:04:55Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:2da253b686dabae0b952913f09ed51793c89b9a993be9ad4b1251bc37caa8b82",
+      "digest": "sha256:23f775c1088273409ab37249362083b84c3fea65cc0178e9ac39dcd9abf3add2",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "files": 315,
-      "generated_at_commit": "0fef1545d535093462d69b9318a40c232debd709",
-      "source_tree": "sha256:b5a9c2e9e1d09bb5f9f830c54ff2c84ff4be4ebf357d6ab697a11a65d5dd314b"
+      "files": 317,
+      "generated_at_commit": "44dc7ee624d1b72eb3930cd35f55629c2c12a008",
+      "source_tree": "sha256:522b71bab49eed64e19b91ede94444a357325aac1ba385c5f187fe0bb04ef780"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/native/kernel/GATES.md b/native/kernel/GATES.md
index cf9e2ba0..41df025f 100644
--- a/native/kernel/GATES.md
+++ b/native/kernel/GATES.md
@@ -886,5 +886,8 @@ Owner decision 2026-10-12 (Drake): slot loader approved, narrowly scoped to sign
 | 192 | both slots invalid: `slot_loader: recovery_required (A: image SHA-512 mismatch; B: signer_id names no trusted key)`, the loader returns `EFI_LOAD_ERROR` to the firmware, no slot started, no kernel ran, the control record untouched; QEMU is stopped by the row timeout (60 s) because the firmware falls through to its next boot option | SLOT_LOADER | QEMU PASS (hardware NOT_RUN) |
 | 193 | generation floor: B validly signed at gen 1 while the floor is 2: `slot B valid gen=1`, `(below the generation floor)`, `boot=A reason=candidate_invalid_active gen=2 tries=3 floor=2`, no try consumed | SLOT_LOADER | QEMU PASS (hardware NOT_RUN) |
 | 194 | build (`make -C native/kernel slot-loader-check`, part of `make test`): SLOTLDR.EFI links from its own object list (checked: none of the kernel symbols `ck_kernel_entry`, `kmain`, `ck_boot_model_load`, `ck_printf`), its source calls no runtime services, UEFI variables, `ExitBootServices` or `SetWatchdogTimer`; the TEST-key build prints the TEST-ONLY note and an owner-key build (`CK_SLOT_KEYS`, fixture keys) does not; refused (each with its message): no key source, both key options, an unreadable keys file, and `CK_HARDWARE_STAGING=1 CK_TEST_SLOT_KEY=1` | SLOT_LOADER (host) | PASS (`SLOT_LOADER_BUILD: PASS`) |
+| 195 | P11 cut 2b, promote on health: SLOTLDR.EFI and the TEST-key service image on one NVMe disk (ck_gpt_image `aienos-slots`: Store partition + slots partition), B staged (gen 2, policy 2, tries 3). The loader commits the try (`control committed seq=2 tries=2`) and hands over its boot record (`slot_loader: boot record handed over type=0x80000a1e slot=B reason=candidate_try seq=2`); the kernel reads it (`slot: booted slot B reason=candidate_try generation=2 tries=2 control_seq=2`), reaches health (Store open, `continuity: PROVISIONED` before the promotion, `lifecycle: ready state=ready store=open`) and commits the promotion through the shared torn-slot routine (`slot: promoted slot B to active generation=2 floor=2 seq=3`); the host tool reads `active=1 candidate=none tries=0 flags=0x00 floor=2 last_good=2` from the disk. Next boot: `boot=B reason=active gen=2 tries=0 floor=2`, no loader write, `slot: nothing to write`, control unchanged | SLOT_LOADER | QEMU PASS (hardware NOT_RUN) |
+| 196 | P11 cut 2b, health fail, exhausted tries, abandon and rollback: B is the plain service image (no production keys in QEMU: the Store stays LOCKED, never healthy), one try left. Boot 1: the last try is committed (`seq=2 tries=0`), `lifecycle: ready state=locked`, `slot: candidate B waiting for health (tries left 0)`, at the stop order `slot: candidate B NOT promoted this boot`, no `slot: promoted`; the disk keeps `candidate=1 tries=0`. Boot 2: `boot=A reason=candidate_exhausted_active`, the kernel abandons B (`slot: candidate abandoned (marked failed) active=A stays seq=3`), disk `active=0 candidate=none tries=0 flags=0x01`, and the host tool's next decision is a steady boot of A (`boot_slot=A reason=active loader_write=0`) | SLOT_LOADER | QEMU PASS (hardware NOT_RUN) |
+| 197 | P11 cut 2b, negative control: the TEST-key service image started directly (no SLOTLDR.EFI) over a disk with B staged: `slot: no boot record (not started by SLOTLDR.EFI): slot service idle, nothing written`, healthy (`lifecycle: ready state=ready store=open`) yet no `slot: promoted`, control untouched (`seq=1 ... candidate=1 tries=3`). Both slots invalid stays row 192 (no image started, nothing written). Host side (`make slot-test`, in `make test`): boot record mutations each refused with its reason, kernel-action scenarios (promote, wait, abandon, refuse on no control, corrupt control, unreadable manifest, manifest digest or generation differing from the record, damaged record; none on steady boots and on the non-active slot) and the shared control-commit routine | SLOT_LOADER | QEMU PASS (hardware NOT_RUN) |
 
 Run (2026-10-12, code commit bff20a1 on main ff5da2d, QEMU 8.2 aarch64 virt + AAVMF, TCG): `AIENOS_CK_SLOT_LOADER: PASS (8 rows, 11 boots, 76 checks; QEMU, not hardware)`, 126 s; each slot boot about 6 s, row 7 stopped at 60 s. SLOTLDR.EFI is 36864 bytes. The core `BOOTAA64.EFI` built from this tree is byte-identical to the one built from main ff5da2d (same `AIENOS_COMMIT`, sha256 643fdb5991cfe261). Also PASS in CI (aienos#326, ARM64 job of run 38274680333, `required gate SLOT_LOADER: PASS`). After the rebase onto main 22157e1 (aienos#324 and #325) neither the loader nor the gate script changed, so the gate was not rerun locally (the lock was held by another gate); CI reran it on the final tree. Hardware NOT_RUN.
diff --git a/native/kernel/Makefile b/native/kernel/Makefile
index 67bd89d6..510e69c5 100644
--- a/native/kernel/Makefile
+++ b/native/kernel/Makefile
@@ -702,6 +702,9 @@ STAGE_DMA_FLAGS += -I$(KDIR)/core
 STAGE_SRCS += $(KDIR)/svc/continuity_codec.c $(KDIR)/svc/continuity_resolve.c \
 	$(KDIR)/svc/continuity_resolve_sealed.c $(KDIR)/svc/continuity_commit.c \
 	$(KDIR)/svc/continuity_subject.c $(KDIR)/svc/continuity_subject_provision.c $(KDIR)/svc/continuity_service.c
+# P11 cut 2b: kernel-side slot promotion / abandon (svc/slot_service.c) over the shared
+# slot decision rules and control-commit routine of SLOTLDR.EFI (native/boot).
+STAGE_SRCS += $(KDIR)/svc/slot_service.c $(BOOT)/slot_select.c $(BOOT)/slot_control.c
 endif
 ifeq ($(strip $(CK_TEST_DISK_XLATE_BYPASS)),1)
 FULL_NAME := $(FULL_NAME)-test-xlate-bypass
@@ -1582,9 +1585,9 @@ gsp-rpc-test: $(GSP_RPC_TOOL)
 # freestanding flags and needs only the image's own digest/signature primitives.
 # No image code changes in this cut; the loader does not read slots yet.
 SLOT_TOOL := $(OUT)/host/ck_slot_tool
-SLOT_TOOL_SRCS := $(KDIR)/tools/ck_slot_tool.c $(BOOT)/slot_select.c $(NATIVE)/sig/sha512.c \
+SLOT_TOOL_SRCS := $(KDIR)/tools/ck_slot_tool.c $(BOOT)/slot_select.c $(BOOT)/slot_control.c $(NATIVE)/sig/sha512.c \
 	$(NATIVE)/sig/ed25519.c $(NATIVE)/sig/ct.c $(NATIVE)/argus/sha256.c $(NATIVE)/store/torn_slot.c
-$(SLOT_TOOL): $(SLOT_TOOL_SRCS) $(BOOT)/slot_format.h
+$(SLOT_TOOL): $(SLOT_TOOL_SRCS) $(BOOT)/slot_format.h $(BOOT)/slot_control.h
 	@mkdir -p $(dir $@)
 	$(HOSTCC) -std=gnu11 -O2 -Wall -Wextra -Werror -o $@ $(SLOT_TOOL_SRCS)
 slot-tool: $(SLOT_TOOL)
@@ -1624,13 +1627,13 @@ SLOTLDR_DIR := $(OUT)/slotldr
 SLOTLDR_ELF := $(SLOTLDR_DIR)/slotldr.elf
 SLOTLDR_EFI := $(OUT)/SLOTLDR.EFI
 SLOTLDR_KEYS_C := $(SLOTLDR_DIR)/slot_keys.c
-SLOTLDR_C := $(BOOT)/slot_loader.c $(BOOT)/slot_select.c $(NATIVE)/sig/sha512.c $(NATIVE)/sig/ed25519.c \
+SLOTLDR_C := $(BOOT)/slot_loader.c $(BOOT)/slot_select.c $(BOOT)/slot_control.c $(NATIVE)/sig/sha512.c $(NATIVE)/sig/ed25519.c \
 	$(NATIVE)/sig/ct.c $(NATIVE)/argus/sha256.c $(NATIVE)/store/torn_slot.c $(KDIR)/core/libc_min.c \
 	$(KDIR)/core/fmt.c
 SLOTLDR_OBJS := $(patsubst $(NATIVE)/%.c,$(SLOTLDR_DIR)/obj/%.o,$(SLOTLDR_C)) \
 	$(SLOTLDR_DIR)/obj/boot/efi_entry.o $(SLOTLDR_DIR)/obj/slot_keys.o
 SLOTLDR_CFLAGS := $(KCFLAGS) $(ART_INC) -I$(NATIVE)/store
-SLOTLDR_HDRS := $(BOOT)/slot_format.h $(BOOT)/efi.h $(NATIVE)/store/torn_slot.h $(KDIR)/core/fmt.h $(ART_HDRS)
+SLOTLDR_HDRS := $(BOOT)/slot_format.h $(BOOT)/slot_control.h $(BOOT)/efi.h $(NATIVE)/store/torn_slot.h $(KDIR)/core/fmt.h $(ART_HDRS)
 SLOTLDR_KEY_SRC := $(if $(strip $(CK_TEST_SLOT_KEY)),--test-key,$(if $(strip $(CK_SLOT_KEYS)),--keys $(abspath $(CK_SLOT_KEYS)),))
 $(SLOTLDR_DIR)/obj/%.o: $(NATIVE)/%.c $(SLOTLDR_HDRS)
 	@mkdir -p $(dir $@)
diff --git a/native/kernel/core/.crumb b/native/kernel/core/.crumb
index f57864ee..9d81fa20 100644
--- a/native/kernel/core/.crumb
+++ b/native/kernel/core/.crumb
@@ -7,14 +7,14 @@
     "generated": {
       "children": [],
       "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "compiled_at": "2026-10-12T16:18:21Z",
+      "compiled_at": "2026-10-12T19:04:55Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:713ba40c584588b6328e0216f0b7fc3d70ad06679941b6401db3db1fc4222635",
+      "digest": "sha256:1b408f5480b06385d8b4a11af66e90314ec075a906e70faa0947c78564e8c012",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
       "files": 45,
-      "generated_at_commit": "d60d904d6960d80246ce628332c1ed63971cb96f",
-      "source_tree": "sha256:dd1d5eb317ffda51458c26a7ca1b58898ea51534cb3605b89a0a4e9f6409680a"
+      "generated_at_commit": "44dc7ee624d1b72eb3930cd35f55629c2c12a008",
+      "source_tree": "sha256:8d5d029934305b49495e5b78fedd6eb8a4ef7883f549fda0ccf1171cec774386"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/native/kernel/core/kmain.c b/native/kernel/core/kmain.c
index d915d276..55aa4605 100644
--- a/native/kernel/core/kmain.c
+++ b/native/kernel/core/kmain.c
@@ -307,6 +307,7 @@ void ck_kernel_entry(struct ck_handoff *h)
     if (ck_handoff_check(h, &why) != 0)
         ck_panic("handoff: %s", why);
     sum_conventional(h);
+    if (ck_slot_boot_capture) ck_slot_boot_capture(h);
     ck_psci_configure(ck_acpi_find("FACP"));
     ck_set_stage("mm_build");
     uint64_t sp = ck_mm_build(h);
diff --git a/native/kernel/core/lifecycle.c b/native/kernel/core/lifecycle.c
index ae68c285..17c904c8 100644
--- a/native/kernel/core/lifecycle.c
+++ b/native/kernel/core/lifecycle.c
@@ -55,6 +55,7 @@
 #include "store_sealed.h"
 #include "continuity_service.h"
 #include "cortex_journal.h"
+#include "slot_service.h"
 
 #if !defined(CK_SERVICE)
 #error "lifecycle.c is only part of a CK_SERVICE=1 image"
@@ -77,6 +78,13 @@ int ck_store_service_unlock(const char *arg, size_t arg_len);
 int ck_store_service_rotate(const char *arg, size_t arg_len);
 
 static ck_lc g_lc;
+
+/* P11 cut 2b health milestone for slot promotion (svc/slot_service.h): Store open,
+ * continuity committed this boot, lifecycle READY. */
+static int slot_healthy(void)
+{
+    return ck_store_service_ready() && ck_cont_service_writable() && g_lc.state == CK_LC_READY;
+}
 static uint8_t g_last_id[32];
 static uint64_t g_last_gen;
 static unsigned g_overlong;
@@ -437,6 +445,7 @@ static void handle_line(const char *line, size_t len)
         int opened = ck_store_service_unlock(arg, arg_len);
         ck_lc_unlock_done(&g_lc, opened);
         if (opened) ck_printf("lifecycle: unlock ok state=%s\n", ck_lc_state_name(g_lc.state));
+        if (opened) ck_slot_service_health(slot_healthy());
         else ck_printf("lifecycle: REFUSED verb=unlock state=%s reason=\"%s\"\n", ck_lc_state_name(g_lc.state), g_lc.reason);
         return;
     }
@@ -548,6 +557,7 @@ int ck_lifecycle_run(void)
     ck_puts("lifecycle: TEST-ONLY service image (CK_SERVICE_TEST_KEYS=1: TEST Store keys; QEMU only, never a production boot)\n");
 #endif
     ck_lc_start(&g_lc, ck_store_service_ready());
+    ck_slot_service_start(slot_healthy());
     /* Operator input is the console UART the boot stub chose from the ACPI
      * SPCR (PL011/SBSA or 16550), POLLED: no interrupt is ever enabled. */
     const char *uname = ck_console_uart_name();
@@ -575,6 +585,7 @@ int ck_lifecycle_run(void)
     /* Stop order: Cortex journal closed (frames returned), inference session
      * closed (frames returned), Store closed, then NVMe released, then the
      * caller resets. */
+    ck_slot_service_stop();
     cortex_close();
     ck_infer_resident_close();
     int closed = ck_store_service_close();
diff --git a/native/kernel/dev/.crumb b/native/kernel/dev/.crumb
index 3cabeead..988ee6dd 100644
--- a/native/kernel/dev/.crumb
+++ b/native/kernel/dev/.crumb
@@ -7,14 +7,14 @@
     "generated": {
       "children": [],
       "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "compiled_at": "2026-10-09T02:37:36Z",
+      "compiled_at": "2026-10-12T19:04:55Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:2dce85eb060adebc9b668fa932ad213985f63bf08b3738d6c8e02fe60db32a0f",
+      "digest": "sha256:04dc7faae4e24952ed8c1b46c83a346f0be5a84828ea9e53c76611eec228bf45",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
       "files": 27,
-      "generated_at_commit": "23b2249dd1bbac3314e17b5d70357e71e226cf03",
-      "source_tree": "sha256:674f24cfa5d88e0b4f1c8834b6cdc9e991185b37242b0d2e75878cdbfeb6bcd6"
+      "generated_at_commit": "44dc7ee624d1b72eb3930cd35f55629c2c12a008",
+      "source_tree": "sha256:01f9f3ea8287a9b73b338c07bd3517694a1d03fa55f43c8a5f9ee934d8972a7a"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/native/kernel/dev/devices.c b/native/kernel/dev/devices.c
index 1a6ae3c8..526f1c10 100644
--- a/native/kernel/dev/devices.c
+++ b/native/kernel/dev/devices.c
@@ -9,6 +9,7 @@
 #include "net_bind.h"
 #include "xhci_fence.h"
 #include "usb_kbd.h"
+#include "../../boot/slot_format.h"
 
 static pci_system g_pci;
 static ck_nvme g_nvme;
@@ -17,6 +18,30 @@ static ck_nvme g_nvme;
  * whole namespace: every access they make goes through ck_part_xlate. */
 const disk_dev *ck_dev_boot_disk(void) { return g_nvme.bound && g_nvme.part.valid ? &g_nvme.part.dev : 0; }
 
+/* The AIENOS image slots partition (native/boot/slot_format.h, P11 cut 2b) on
+ * the same bound NVMe disk: a second bounded partition view, found with the
+ * same strict GPT validation as the AIENOS partition; never the whole
+ * namespace. Looked up once, on first use. *rc_out: 0, a CK_GPT_* code, or
+ * CK_DEV_NO_BOOT_DISK when no disk is bound (or it was released). */
+static ck_part g_slots;
+static int g_slots_rc = 1; /* 1: not looked up yet */
+const disk_dev *ck_dev_slots_disk(int *rc_out)
+{
+    static const uint8_t type[16] = CK_SLOT_PART_TYPE_BYTES;
+    int rc;
+    if (!g_nvme.bound || !g_nvme.part.valid) {
+        rc = CK_DEV_NO_BOOT_DISK;
+    } else {
+        if (g_slots_rc == 1) {
+            ck_gpt_info gi;
+            g_slots_rc = ck_gpt_find_type(&g_nvme.disk, type, &g_slots, &gi);
+        }
+        rc = g_slots_rc;
+    }
+    if (rc_out) *rc_out = rc;
+    return rc == 0 && g_slots.valid ? &g_slots.dev : 0;
+}
+
 void ck_dev_nvme_release(void)
 {
     if (!g_nvme.pf) { /* bind stopped before any device access: nothing to quiesce */
diff --git a/native/kernel/dev/devices.h b/native/kernel/dev/devices.h
index 5d2161ef..b9b14a0b 100644
--- a/native/kernel/dev/devices.h
+++ b/native/kernel/dev/devices.h
@@ -7,6 +7,11 @@
  * view, dev/disk_part.h), or NULL when the devices stage bound no disk or the
  * disk has no valid AIENOS partition. */
 const disk_dev *ck_dev_boot_disk(void);
+/* The AIENOS image slots partition of the same bound NVMe disk (a second
+ * bounds-checked partition view, P11 cut 2b), or NULL; *rc_out (optional) is
+ * 0, the CK_GPT_* refusal, or CK_DEV_NO_BOOT_DISK. */
+#define CK_DEV_NO_BOOT_DISK (-1)
+const disk_dev *ck_dev_slots_disk(int *rc_out);
 /* Revoke the NVMe function's bus mastering once the last disk user (the
  * Store stage) is done, or after a failed bind; prints the dma_gate line.
  * The boot disk is unavailable afterwards. */
diff --git a/native/kernel/dev/disk_part.c b/native/kernel/dev/disk_part.c
index 3d7815d2..cf8a2d21 100644
--- a/native/kernel/dev/disk_part.c
+++ b/native/kernel/dev/disk_part.c
@@ -80,8 +80,8 @@ typedef struct {
 } ent_geom;
 
 /* Stream the entry array at lba: CRC32 over num*esize bytes; when scan is
- * set, also check every used entry and find the AIENOS one. */
-static int scan_entries(const disk_dev *d, uint64_t lba, const ent_geom *g, int scan, uint32_t *crc_out,
+ * set, also check every used entry and find the one entry of `type`. */
+static int scan_entries(const disk_dev *d, const uint8_t *type, uint64_t lba, const ent_geom *g, int scan, uint32_t *crc_out,
                         uint64_t first_usable, uint64_t last_usable, int *sem_rc, ck_part *p, ck_gpt_info *info)
 {
     uint32_t crc = 0, left = g->bytes, idx = 0, used = 0, aienos = 0;
@@ -102,7 +102,7 @@ static int scan_entries(const disk_dev *d, uint64_t lba, const ent_geom *g, int
             g_used_first[used] = f;
             g_used_last[used] = l;
             used++;
-            if (same(e, ck_aienos_part_type, 16)) {
+            if (same(e, type, 16)) {
                 aienos++;
                 p->first_lba = f;
                 p->blocks = l - f + 1u; /* f <= l checked above before it is trusted */
@@ -161,9 +161,9 @@ static void part_invalid(ck_part *p, const disk_dev *d)
     p->dev.max_blocks_per_io = d ? d->max_blocks_per_io : 0;
 }
 
-int ck_gpt_find_aienos(const disk_dev *d, ck_part *p, ck_gpt_info *info)
+int ck_gpt_find_type(const disk_dev *d, const uint8_t type[16], ck_part *p, ck_gpt_info *info)
 {
-    if (!p || !info) return CK_GPT_EGEOM;
+    if (!p || !info || !type) return CK_GPT_EGEOM;
     part_invalid(p, d);
     for (size_t i = 0; i < sizeof *info; i++) ((uint8_t *)info)[i] = 0;
     if (disk_check(d) != DISK_OK || d->block_size > GPT_BUF || d->block_count < 8u) return CK_GPT_EGEOM;
@@ -196,7 +196,7 @@ int ck_gpt_find_aienos(const disk_dev *d, ck_part *p, ck_gpt_info *info)
 
     int sem = CK_GPT_OK;
     uint32_t crc = 0;
-    rc = scan_entries(d, ent_lba, &g, 1, &crc, first_u, last_u, &sem, p, info);
+    rc = scan_entries(d, type, ent_lba, &g, 1, &crc, first_u, last_u, &sem, p, info);
     if (rc) return rc;
     if (crc != get32(g_hdr + H_ECRC)) return CK_GPT_EENT_CRC;
 
@@ -210,7 +210,7 @@ int ck_gpt_find_aienos(const disk_dev *d, ck_part *p, ck_gpt_info *info)
         get32(g_bak + H_ECRC) != get32(g_hdr + H_ECRC) || bent <= last_u || bent >= last || g.blocks > last - bent)
         return CK_GPT_EBACKUP;
     uint32_t bcrc = 0;
-    rc = scan_entries(d, bent, &g, 0, &bcrc, first_u, last_u, &sem, p, info);
+    rc = scan_entries(d, type, bent, &g, 0, &bcrc, first_u, last_u, &sem, p, info);
     if (rc) return rc;
     if (bcrc != get32(g_hdr + H_ECRC)) return CK_GPT_EBACKUP;
 
@@ -268,3 +268,8 @@ const char *ck_gpt_strerror(int rc)
     default: return "error";
     }
 }
+
+int ck_gpt_find_aienos(const disk_dev *d, ck_part *p, ck_gpt_info *info)
+{
+    return ck_gpt_find_type(d, ck_aienos_part_type, p, info);
+}
diff --git a/native/kernel/dev/disk_part.h b/native/kernel/dev/disk_part.h
index 07b5b1b9..7a4f8176 100644
--- a/native/kernel/dev/disk_part.h
+++ b/native/kernel/dev/disk_part.h
@@ -89,6 +89,13 @@ uint32_t ck_crc32(uint32_t crc, const uint8_t *p, size_t n);
  * through p->dev refused) and the CK_GPT_* code is returned. */
 int ck_gpt_find_aienos(const disk_dev *d, ck_part *p, ck_gpt_info *info);
 
+/* The same strict validation for exactly one partition of an arbitrary type
+ * (on-disk byte order): CK_GPT_ENOPART / CK_GPT_EMULTI then mean "none" /
+ * "more than one" of THAT type. Used for the AIENOS image slots partition
+ * (native/boot/slot_format.h, svc/slot_service.c): a second bounded view
+ * over the same parent, never a whole-disk handle. */
+int ck_gpt_find_type(const disk_dev *d, const uint8_t type[16], ck_part *p, ck_gpt_info *info);
+
 /* The single translation layer: partition-relative lba/count -> absolute
  * LBA. DISK_ESTATE when p is not a valid partition, DISK_EARG for count 0,
  * DISK_ERANGE when any block of the transfer would fall outside the
diff --git a/native/kernel/include/.crumb b/native/kernel/include/.crumb
index fd0ebbb1..4328a95e 100644
--- a/native/kernel/include/.crumb
+++ b/native/kernel/include/.crumb
@@ -7,14 +7,14 @@
     "generated": {
       "children": [],
       "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "compiled_at": "2026-10-12T16:18:21Z",
+      "compiled_at": "2026-10-12T19:04:55Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:b169dbabaac665af04845138be24e36fa9993a6ff761c6e4ea11f4dd81689657",
+      "digest": "sha256:283a167327166bcfd270869cc04a1a03ea21366248471464db7ef1cf37058ada",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
       "files": 1,
-      "generated_at_commit": "d60d904d6960d80246ce628332c1ed63971cb96f",
-      "source_tree": "sha256:fcdd9d04df8c5b6d2db5379d9def85ff1056c9094617e403160634efdfa6c2ca"
+      "generated_at_commit": "44dc7ee624d1b72eb3930cd35f55629c2c12a008",
+      "source_tree": "sha256:84ac1b9b8674343ec32004b9f305a96323108208013ad5a67d0ddc32aa17da8b"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/native/kernel/include/ck.h b/native/kernel/include/ck.h
index 31e7b3a2..9c91fb91 100644
--- a/native/kernel/include/ck.h
+++ b/native/kernel/include/ck.h
@@ -201,6 +201,12 @@ __attribute__((weak)) void ck_stage_quiesce(void);
  * CK_CONSOLE_SESSION=1): the operator console session. kmain calls it after every
  * other boot step and before the final report; absent in every default image. */
 __attribute__((weak)) int ck_stage_console_session(void);
+/* Optional slot hook (svc/slot_service.c, only in a CK_SERVICE=1 image):
+ * ck_kernel_entry calls it right after ck_handoff_check, while the firmware
+ * identity map is still live, to copy SLOTLDR.EFI's boot record (P11 cut 2b).
+ * It only reads; absent (weak) in every diagnostic image. */
+struct ck_handoff;
+__attribute__((weak)) void ck_slot_boot_capture(const struct ck_handoff *h);
 /* Resident production lifecycle (core/lifecycle.c, only in a CK_SERVICE=1 image):
  * serves bounded operator requests after every boot stage until its stop order,
  * then returns 0 so kmain prints the final report and resets. Absent (weak) in
diff --git a/native/kernel/svc/.crumb b/native/kernel/svc/.crumb
index 47186434..f938a303 100644
--- a/native/kernel/svc/.crumb
+++ b/native/kernel/svc/.crumb
@@ -24,20 +24,20 @@
         },
         {
           "digest": "44ea8525d341bcebcb307fb1743de084b124745bd7c46d85761e554183ee02cc",
-          "last_commit": "56d125f",
+          "last_commit": "22eb360",
           "name": "tests",
           "purpose": "Directory native/kernel/svc/tests. Purpose not yet described by a human."
         }
       ],
       "children_root": "sha256:d835471b1405ca482a41beb34ed339d21e11064a59138599ee5754d198926878",
-      "compiled_at": "2026-10-12T10:28:17Z",
+      "compiled_at": "2026-10-12T19:04:55Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:df0e798c909b72635d6b3aaba97462da29f468723857ee4fd055110c8eb07c1d",
+      "digest": "sha256:1bac580f6739048716c499c005fba3b85be0092bbdef5ee37b3e32c72a878024",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "files": 41,
-      "generated_at_commit": "56d125f12abf2b8ba2886d6da4d86fda8dd244b3",
-      "source_tree": "sha256:47a0244de9d55e4ffee6978121c7b9df86fe8d0bbd55ac7971ec7f519c41212f"
+      "files": 43,
+      "generated_at_commit": "44dc7ee624d1b72eb3930cd35f55629c2c12a008",
+      "source_tree": "sha256:0abe2554113bf606fd07efe3f958e50c3d741a51f1bababe5bca79f9b8d22ab9"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/native/kernel/svc/slot_service.c b/native/kernel/svc/slot_service.c
new file mode 100644
index 00000000..4de9f00b
--- /dev/null
+++ b/native/kernel/svc/slot_service.c
@@ -0,0 +1,177 @@
+/* slot_service.c -- kernel-side promotion and abandon of AIENOS image slots
+ * (P11 cut 2b). Contract in slot_service.h. Freestanding. */
+#include "ck.h"
+#include "handoff.h"
+#include "devices.h"
+#include "disk.h"
+#include "disk_part.h"
+#include "store_sealed.h"
+#include "slot_service.h"
+#include "../../boot/slot_control.h"
+
+#ifndef CK_SERVICE
+#error "slot_service.c is only part of a CK_SERVICE=1 image"
+#endif
+
+/* Mirrors mm/frames.h struct ck_efi_desc (UEFI EFI_MEMORY_DESCRIPTOR). */
+struct slot_efi_desc {
+    uint32_t type;
+    uint32_t pad;
+    uint64_t phys;
+    uint64_t virt;
+    uint64_t pages;
+    uint64_t attr;
+};
+
+static struct ck_slot_boot_record g_rec;
+static int g_rec_state;            /* 0: none found, 1: valid, -1: refused */
+static const char *g_rec_why;
+static int g_wait;                 /* 1: candidate waits for health */
+static int g_done;                 /* 1: decided for this boot (written or refused) */
+static uint8_t g_unit[CK_SLOT_UNIT] __attribute__((aligned(4096)));
+/* 4 KiB each: static, never on the kernel stack. */
+static struct ck_slot_control ctl, out;
+static struct ck_slot_manifest man;
+
+/* Called from ck_kernel_entry after ck_handoff_check, while the firmware's
+ * identity map is still live: the record page is not a RAM type the kernel
+ * maps (mm/mmu.c ram_type), so it is read here or never. */
+void ck_slot_boot_capture(const struct ck_handoff *h)
+{
+    unsigned found = 0;
+    const struct slot_efi_desc *hit = 0;
+    if (!h || !h->memory_map || h->desc_size < sizeof(struct slot_efi_desc)) return;
+    for (uint64_t off = 0; off + h->desc_size <= h->map_size; off += h->desc_size) {
+        const struct slot_efi_desc *d = (const struct slot_efi_desc *)(uintptr_t)(h->memory_map + off);
+        if (d->type == CK_SLOT_BOOT_MEMTYPE) {
+            found++;
+            hit = d;
+        }
+    }
+    if (found == 0) return;
+    if (found != 1 || !hit->pages || !hit->phys || (hit->phys & 4095u)) {
+        g_rec_state = -1;
+        g_rec_why = found != 1 ? "more than one boot record page" : "boot record page geometry";
+        return;
+    }
+    const uint8_t *src = (const uint8_t *)(uintptr_t)hit->phys;
+    uint8_t *dst = (uint8_t *)&g_rec;
+    for (unsigned i = 0; i < sizeof g_rec; i++) dst[i] = src[i];
+    g_rec_state = ck_slot_boot_check(&g_rec, &g_rec_why) == 0 ? 1 : -1;
+}
+
+static void say_refuse(const char *why)
+{
+    ck_printf("slot: REFUSED %s: control record not written\n", why);
+}
+
+/* One evaluation: read the control record and the started slot's manifest
+ * from the slots partition, decide, commit PROMOTE / ABANDON. */
+static void evaluate(int healthy)
+{
+    int prc = 0;
+    const disk_dev *d = ck_dev_slots_disk(&prc);
+    if (!d) {
+        g_done = 1;
+        say_refuse(prc == CK_DEV_NO_BOOT_DISK ? "no bound boot disk" : ck_gpt_strerror(prc));
+        return;
+    }
+    if (d->block_size != 512 && d->block_size != 4096) {
+        g_done = 1;
+        say_refuse("slots partition block size");
+        return;
+    }
+    uint32_t bpu = CK_SLOT_UNIT / d->block_size;
+    uint64_t units = d->block_count / bpu, cap = ck_slot_cap_units(units);
+    if (cap < CK_SLOT_MIN_CAP_UNITS) {
+        g_done = 1;
+        say_refuse("slots partition too small");
+        return;
+    }
+    ts_device tdev;
+    ts_region r;
+    ts_slot_state tss[2];
+    uint64_t seq = 0;
+    ss_ts_device(d, &tdev);
+    int trc = ts_open(&r, &tdev, 0);
+    if (trc == TS_OK) trc = ts_recover(&r, (uint8_t *)&ctl, &seq, tss);
+    int have_ctl = trc == TS_OK;
+    if (have_ctl && seq != g_rec.control_seq) {
+        g_done = 1;
+        ck_printf("slot: REFUSED control record moved since the loader read it (seq %llu on disk, %llu in the boot "
+                  "record): control record not written\n",
+                  (unsigned long long)seq, (unsigned long long)g_rec.control_seq);
+        return;
+    }
+    uint64_t mlba = ck_slot_manifest_unit(g_rec.boot_slot, cap) * bpu;
+    int have_man = disk_read(d, mlba, bpu, g_unit) == DISK_OK;
+    if (have_man) {
+        uint8_t *m = (uint8_t *)&man;
+        for (unsigned i = 0; i < sizeof man; i++) m[i] = g_unit[i];
+    }
+    const char *why = 0;
+    enum ck_slot_action a =
+        ck_slot_kernel_action(&g_rec, have_ctl ? &ctl : 0, have_man ? &man : 0, healthy, &out, &why);
+    g_wait = a == CK_SLOT_A_WAIT;
+    if (a == CK_SLOT_A_WAIT) {
+        ck_printf("slot: candidate %c waiting for health (tries left %u): not promoted yet\n",
+                  'A' + g_rec.boot_slot, (unsigned)ctl.tries_remaining);
+        return;
+    }
+    g_done = 1;
+    if (a == CK_SLOT_A_REFUSE) {
+        say_refuse(why ? why : "refused");
+        return;
+    }
+    if (a == CK_SLOT_A_NONE) {
+        ck_printf("slot: nothing to write (%s) active=%c\n", why ? why : "steady", 'A' + ctl.active_slot);
+        return;
+    }
+    uint64_t nseq = 0;
+    int crc = ck_slot_control_commit(&r, &out, &nseq);
+    if (crc != TS_OK) {
+        ck_printf("slot: %s FAILED control commit rc=%d (the previous record stays authoritative)\n",
+                  ck_slot_action_text(a), crc);
+        return;
+    }
+    if (a == CK_SLOT_A_PROMOTE)
+        ck_printf("slot: promoted slot %c to active generation=%llu floor=%llu seq=%llu (health: store open, "
+                  "continuity committed, lifecycle READY)\n",
+                  'A' + out.active_slot, (unsigned long long)out.last_good_generation,
+                  (unsigned long long)out.generation_floor, (unsigned long long)nseq);
+    else
+        ck_printf("slot: candidate abandoned (marked failed) active=%c stays seq=%llu\n", 'A' + out.active_slot,
+                  (unsigned long long)nseq);
+}
+
+void ck_slot_service_start(int healthy)
+{
+    if (g_rec_state == 0) {
+        g_done = 1;
+        ck_puts("slot: no boot record (not started by SLOTLDR.EFI): slot service idle, nothing written\n");
+        return;
+    }
+    if (g_rec_state < 0) {
+        g_done = 1;
+        say_refuse(g_rec_why ? g_rec_why : "boot record invalid");
+        return;
+    }
+    ck_printf("slot: booted slot %c reason=%s generation=%llu tries=%u control_seq=%llu\n", 'A' + g_rec.boot_slot,
+              ck_slot_reason_text((enum ck_slot_reason)g_rec.reason), (unsigned long long)g_rec.generation,
+              (unsigned)g_rec.tries, (unsigned long long)g_rec.control_seq);
+    evaluate(healthy);
+}
+
+void ck_slot_service_health(int healthy)
+{
+    if (g_done || !g_wait || !healthy) return;
+    evaluate(healthy);
+}
+
+void ck_slot_service_stop(void)
+{
+    if (g_wait && !g_done)
+        ck_printf("slot: candidate %c NOT promoted this boot (health milestone not reached); the loader counts "
+                  "its tries down\n",
+                  'A' + g_rec.boot_slot);
+}
diff --git a/native/kernel/svc/slot_service.h b/native/kernel/svc/slot_service.h
new file mode 100644
index 00000000..1cf80367
--- /dev/null
+++ b/native/kernel/svc/slot_service.h
@@ -0,0 +1,32 @@
+/* slot_service.h -- the kernel side of the AIENOS image slots (native v1
+ * plan P11 cut 2b, gate N7; docs/NATIVE_IMAGE_SLOTS.md "Kernel promotion").
+ *
+ * Linked only into a CK_SERVICE=1 image. SLOTLDR.EFI hands the kernel one
+ * boot record (native/boot/slot_format.h, struct ck_slot_boot_record) in a
+ * page of memory type CK_SLOT_BOOT_MEMTYPE; ck_slot_boot_capture copies it in
+ * ck_kernel_entry, before the kernel builds its own page tables. The
+ * lifecycle then calls:
+ *   ck_slot_service_start(healthy)   once, after the lifecycle reached its
+ *                                     first state: abandons an exhausted or
+ *                                     invalid candidate, promotes a healthy one;
+ *   ck_slot_service_health(healthy)  after a successful `unlock`: promotes a
+ *                                     candidate that was waiting for health;
+ *   ck_slot_service_stop()           at the stop order: says when a candidate
+ *                                     was never promoted (its tries keep
+ *                                     counting down in the loader).
+ * healthy = the service health milestone: Store open + continuity committed
+ * this boot (PROVISIONED or RESUMED: the self-test record) + lifecycle READY.
+ *
+ * Every write is one control record commit through the torn-slot protocol
+ * (ck_slot_control_commit, the same routine as the loader) over the slots
+ * partition view (dev/devices.c ck_dev_slots_disk); the decision is the pure
+ * ck_slot_kernel_action (native/boot/slot_select.c). No boot record, an
+ * invalid one, no slots partition, no control record, a manifest on disk
+ * that differs from the record, or a control record whose sequence moved
+ * since the loader read it: the kernel writes nothing and says why. */
+#ifndef CK_SLOT_SERVICE_H
+#define CK_SLOT_SERVICE_H
+void ck_slot_service_start(int healthy);
+void ck_slot_service_health(int healthy);
+void ck_slot_service_stop(void);
+#endif
diff --git a/native/kernel/tools/.crumb b/native/kernel/tools/.crumb
index 53b94860..c47abe59 100644
--- a/native/kernel/tools/.crumb
+++ b/native/kernel/tools/.crumb
@@ -7,14 +7,14 @@
     "generated": {
       "children": [],
       "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "compiled_at": "2026-10-12T17:02:49Z",
+      "compiled_at": "2026-10-12T19:04:55Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:2443251e4e44b6fb0efc7889c87eb6fa5510eb06d7ed84f64ec487621a2b859e",
+      "digest": "sha256:45a1ebe4171bdacbfcf2b5a4e5ed93702953a91599cd216740a2f070a314d5a8",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
       "files": 18,
-      "generated_at_commit": "d7c6c9c90f6711626732bcb168f95cbf45671685",
-      "source_tree": "sha256:b535e6d5085aa3b6122ad018540624319ae809928b63bbab47464f6f8e81c149"
+      "generated_at_commit": "44dc7ee624d1b72eb3930cd35f55629c2c12a008",
+      "source_tree": "sha256:1f863d5dcc33d9b1bf0781d0c6b3a6ecae3c889291a6934945670723834fb91f"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/native/kernel/tools/ck_gpt_image.c b/native/kernel/tools/ck_gpt_image.c
index 230fd5cf..ce329de4 100644
--- a/native/kernel/tools/ck_gpt_image.c
+++ b/native/kernel/tools/ck_gpt_image.c
@@ -18,6 +18,8 @@
  *                         CK_SLOT_PART_TYPE_TEXT, native/boot/slot_format.h), left
  *                         zero; prints "gpt_image bs=B blocks=N slots_first_lba=F
  *                         slots_last_lba=L" (slot loader gate)
+ *         aienos-slots    AIENOS [1,41) all zero + slots [41,M-1) (MIB >= 48;
+ *                         P11 cut 2b service boot disk); prints both ranges
  *       CORRUPTION: bad-primary-crc bad-backup-crc bad-primary-entries
  *         bad-backup-entries no-pmbr
  *       Prints one line: "gpt_image bs=B blocks=N aienos_first_lba=F
@@ -127,6 +129,19 @@ static int cmd_create(int argc, char **argv)
                (unsigned long long)blocks, (unsigned long long)sp.first, (unsigned long long)sp.last);
         return 0;
     }
+    if (!strcmp(lay, "aienos-slots")) {
+        /* P11 cut 2b: the service boot disk with its image slots (one NVMe disk). */
+        static const uint8_t slots_type[16] = CK_SLOT_PART_TYPE_BYTES;
+        gw_part sp[2] = {{ck_aienos_part_type, 1 * per, 41 * per - 1u, "AIENOS", 0},
+                         {slots_type, 41 * per, (mib - 1u) * per - 1u, "AIENOS-SLOTS", 0}};
+        if (argc != 6 || mib < 48) return usage();
+        if (gw_write(argv[2], bs, blocks, sp, 2, flags)) return 1;
+        printf("gpt_image bs=%u blocks=%llu aienos_first_lba=%llu aienos_last_lba=%llu slots_first_lba=%llu "
+               "slots_last_lba=%llu\n",
+               bs, (unsigned long long)blocks, (unsigned long long)sp[0].first, (unsigned long long)sp[0].last,
+               (unsigned long long)sp[1].first, (unsigned long long)sp[1].last);
+        return 0;
+    }
     for (int i = 6; i < argc; i++) {
         if (!strcmp(argv[i], "bad-primary-crc")) flags |= GW_BAD_PRIMARY_CRC;
         else if (!strcmp(argv[i], "bad-backup-crc")) flags |= GW_BAD_BACKUP_CRC;
diff --git a/native/kernel/tools/ck_slot_tool.c b/native/kernel/tools/ck_slot_tool.c
index 99358a00..3f2575a0 100644
--- a/native/kernel/tools/ck_slot_tool.c
+++ b/native/kernel/tools/ck_slot_tool.c
@@ -44,6 +44,7 @@
 #include "../../sig/aienos_sig.h"
 #include "../../argus/sha256.h"
 #include "../../store/torn_slot.h"
+#include "../../boot/slot_control.h"
 
 /* RFC 8032 section 7.1 TEST 1: seed and public key (the key ck_owner_gen refuses). */
 static const uint8_t TEST1_SEED[32] = {
@@ -685,6 +686,157 @@ static int selftest(void)
         check(ck_slot_control_check(&back, &why) == 0, "recovered control is structurally valid");
     }
 
+    /* P11 cut 2b: the boot record SLOTLDR.EFI hands the kernel, and the pure
+     * kernel decision over it (svc/slot_service.c). Every check that flips one
+     * field must be refused; every scenario names the action and the record. */
+    {
+        static struct ck_slot_boot_record b, bm;
+        static struct ck_slot_control c, out;
+        static struct ck_slot_manifest man;
+        enum ck_slot_action a;
+        fill_manifest(&man, img, sizeof img, 9, 4, 0, "0123456789abcdef0123456789abcdef01234567",
+                      "selftest candidate", 1760000000ull);
+        memset(&b, 0, sizeof b);
+        memcpy(b.magic, CK_SLOT_BOOT_MAGIC, 8);
+        b.version = CK_SLOT_BOOT_VERSION;
+        b.boot_slot = 1;
+        b.reason = CK_SLOT_R_CANDIDATE_TRY;
+        b.tries = 2;
+        b.control_present = 1;
+        b.control_seq = 5;
+        b.generation = man.generation;
+        b.policy_generation = man.policy_generation;
+        memcpy(b.image_sha512, man.image_sha512, 64);
+        memcpy(b.loader_commit, "0123456789abcdef0123456789abcdef01234567", 40);
+        ck_slot_boot_seal(&b);
+        check(ck_slot_boot_check(&b, &why) == 0, "boot record: sealed record is valid");
+#define BM(stmt, want, what)                                                                        \
+        do {                                                                                        \
+            bm = b;                                                                                 \
+            stmt;                                                                                   \
+            ck_slot_boot_seal(&bm);                                                                 \
+            check(ck_slot_boot_check(&bm, &why) != 0 && strcmp(why, want) == 0, "boot record: " what); \
+        } while (0)
+        bm = b;
+        bm.tries ^= 1;
+        check(ck_slot_boot_check(&bm, &why) != 0 && strcmp(why, "boot record digest mismatch") == 0,
+              "boot record: one changed byte without a reseal refused (digest)");
+        BM(bm.magic[0] ^= 1, "bad boot record magic", "bad magic refused");
+        BM(bm.version = 2, "unsupported boot record version", "version 2 refused");
+        BM(bm.boot_slot = 2, "boot record slot out of range", "slot 2 refused");
+        BM(bm.reason = CK_SLOT_R_NONE, "boot record reason out of range", "reason none refused");
+        BM(bm.reason = CK_SLOT_R_RECOVERY_REQUIRED, "boot record reason out of range", "reason recovery_required refused");
+        BM(bm.control_present = 2, "boot record control flag out of range", "control flag 2 refused");
+        BM(bm.tries = CK_SLOT_MAX_TRIES + 1, "boot record tries above the bound", "tries above the bound refused");
+        BM(bm.generation = 0, "boot record generation fields", "generation 0 refused");
+        BM(bm.policy_generation = bm.generation + 1, "boot record generation fields", "policy above generation refused");
+        BM(bm.reserved[79] = 1, "boot record reserved bytes nonzero", "reserved byte refused");
+        BM(bm.control_present = 0, "boot record claims a decision without a control record",
+           "decision without control refused");
+        BM(bm.reason = CK_SLOT_R_NO_CONTROL, "boot record claims no control with a control record",
+           "no_control with a control record refused");
+#undef BM
+
+        /* Candidate B on its try, control still names it. */
+        ck_slot_control_init(&c, 0);
+        c.generation_floor = 1;
+        check(ck_slot_stage_candidate(&c, 1, 9, &why) == 0, "kernel action: fixture staged");
+        c.tries_remaining = 2;
+        a = ck_slot_kernel_action(&b, &c, &man, 0, &out, &why);
+        check(a == CK_SLOT_A_WAIT && strcmp(why, "health milestone not reached") == 0,
+              "kernel action: candidate not healthy -> WAIT (nothing written)");
+        a = ck_slot_kernel_action(&b, &c, &man, 1, &out, &why);
+        check(a == CK_SLOT_A_PROMOTE && out.active_slot == 1 && out.candidate_slot == CK_SLOT_NONE &&
+                  out.tries_remaining == 0 && out.generation_floor == 4 && out.last_good_generation == 9 &&
+                  ck_slot_control_check(&out, &why) == 0,
+              "kernel action: healthy candidate -> PROMOTE (active=B, floor=policy 4, last_good=9)");
+        check(ck_slot_kernel_action(&b, 0, &man, 1, &out, &why) == CK_SLOT_A_REFUSE &&
+                  strcmp(why, "no control record on disk") == 0,
+              "kernel action: no control record -> REFUSE");
+        out = c;
+        out.version = 9;
+        check(ck_slot_kernel_action(&b, &out, &man, 1, &out, &why) == CK_SLOT_A_REFUSE,
+              "kernel action: corrupt control record -> REFUSE");
+        check(ck_slot_kernel_action(&b, &c, 0, 1, &out, &why) == CK_SLOT_A_REFUSE &&
+                  strcmp(why, "started slot's manifest unreadable") == 0,
+              "kernel action: unreadable manifest -> REFUSE");
+        m = man;
+        m.image_sha512[0] ^= 1;
+        m.kernel_sha512[0] ^= 1; /* v1: kernel_sha512 == image_sha512, so the manifest stays well formed */
+        check(ck_slot_kernel_action(&b, &c, &m, 1, &out, &why) == CK_SLOT_A_REFUSE &&
+                  strcmp(why, "started slot's manifest on disk differs from the boot record") == 0,
+              "kernel action: manifest digest differs from the boot record -> REFUSE");
+        m = man;
+        m.generation = 10;
+        check(ck_slot_kernel_action(&b, &c, &m, 1, &out, &why) == CK_SLOT_A_REFUSE,
+              "kernel action: manifest generation differs from the boot record -> REFUSE");
+        bm = b;
+        bm.digest[0] ^= 1;
+        check(ck_slot_kernel_action(&bm, &c, &man, 1, &out, &why) == CK_SLOT_A_REFUSE &&
+                  strcmp(why, "boot record digest mismatch") == 0,
+              "kernel action: damaged boot record -> REFUSE");
+        out = c;
+        out.candidate_slot = CK_SLOT_NONE;
+        out.tries_remaining = 0;
+        check(ck_slot_kernel_action(&b, &out, &man, 1, &out, &why) == CK_SLOT_A_NONE,
+              "kernel action: control no longer names the started slot -> NONE");
+
+        /* A booted because B ran out of tries / failed verification. */
+        fill_manifest(&m, img, sizeof img, 3, 1, 0, "0123456789abcdef0123456789abcdef01234567", "selftest active",
+                      1760000000ull);
+        bm = b;
+        bm.boot_slot = 0;
+        bm.reason = CK_SLOT_R_CANDIDATE_EXHAUSTED;
+        bm.tries = 0;
+        bm.generation = 3;
+        bm.policy_generation = 1;
+        memcpy(bm.image_sha512, m.image_sha512, 64);
+        ck_slot_boot_seal(&bm);
+        c.tries_remaining = 0;
+        a = ck_slot_kernel_action(&bm, &c, &m, 0, &out, &why);
+        check(a == CK_SLOT_A_ABANDON && out.active_slot == 0 && out.candidate_slot == CK_SLOT_NONE &&
+                  (out.flags & CK_SLOT_CTL_FLAG_CANDIDATE_FAILED) && out.generation_floor == 1 &&
+                  ck_slot_control_check(&out, &why) == 0,
+              "kernel action: exhausted candidate -> ABANDON (failed flag, active A stays, not gated on health)");
+        bm.reason = CK_SLOT_R_CANDIDATE_INVALID;
+        ck_slot_boot_seal(&bm);
+        check(ck_slot_kernel_action(&bm, &c, &m, 1, &out, &why) == CK_SLOT_A_ABANDON,
+              "kernel action: invalid candidate -> ABANDON");
+        bm.reason = CK_SLOT_R_ACTIVE;
+        ck_slot_boot_seal(&bm);
+        check(ck_slot_kernel_action(&bm, &c, &m, 1, &out, &why) == CK_SLOT_A_NONE,
+              "kernel action: steady active boot -> NONE");
+        bm.reason = CK_SLOT_R_CANDIDATE_EXHAUSTED;
+        bm.boot_slot = 1;
+        memcpy(bm.image_sha512, man.image_sha512, 64);
+        bm.generation = 9;
+        bm.policy_generation = 4;
+        ck_slot_boot_seal(&bm);
+        check(ck_slot_kernel_action(&bm, &c, &man, 1, &out, &why) == CK_SLOT_A_NONE,
+              "kernel action: exhausted reason on the non-active slot -> NONE (never abandons its own active)");
+        check(strcmp(ck_slot_action_text(CK_SLOT_A_PROMOTE), "promote") == 0, "action text");
+    }
+
+    /* The shared control-commit routine: commit, read back, sequence. */
+    {
+        static uint8_t media[CK_SLOT_CONTROL_UNITS * CK_SLOT_UNIT];
+        struct filedev fd = {media, sizeof media};
+        ts_device dev;
+        ts_region r;
+        uint64_t seq = 0, s2 = 0;
+        static struct ck_slot_control c, back;
+        memset(media, 0, sizeof media);
+        bind_dev(&dev, &fd);
+        check(ts_open(&r, &dev, 0) == TS_OK && ts_recover(&r, (uint8_t *)&back, &seq, 0) == TS_EMPTY,
+              "control commit: blank region");
+        ck_slot_control_init(&c, 0);
+        check(ck_slot_control_commit(&r, &c, &seq) == TS_OK && seq == 1, "control commit: first record seq 1");
+        check(ck_slot_stage_candidate(&c, 1, 2, &why) == 0 && ck_slot_control_commit(&r, &c, &s2) == TS_OK && s2 == 2,
+              "control commit: second record seq 2");
+        check(ts_recover(&r, (uint8_t *)&back, &seq, 0) == TS_OK && seq == 2 && memcmp(&back, &c, sizeof c) == 0,
+              "control commit: read back equals what was committed");
+    }
+
     /* keys-c rendering: bounded, refuses instead of overflowing. */
     {
         static char kt[8192], small[sizeof kt];
diff --git a/scripts/.crumb b/scripts/.crumb
index 11b69ded..1d5a41dc 100644
--- a/scripts/.crumb
+++ b/scripts/.crumb
@@ -7,14 +7,14 @@
     "generated": {
       "children": [],
       "children_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
-      "compiled_at": "2026-10-12T17:55:37Z",
+      "compiled_at": "2026-10-12T19:04:55Z",
       "compiler": "crumb-compile/1",
-      "digest": "sha256:fa53022eb88e3cb8dbbeae8d5da3a7601ba4ca51030d9169e4fefafa8db5ee29",
+      "digest": "sha256:90ed142e7c24f44a6635cddb089b6e8b0ccdd3b6914f9992cab7635a82ab24a8",
       "evidence_files": 0,
       "evidence_root": "sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
       "files": 87,
-      "generated_at_commit": "0fef1545d535093462d69b9318a40c232debd709",
-      "source_tree": "sha256:9df55cbd7fff1fa567534651db1578cfd22251e8e5c4d81407348b045c76cbed"
+      "generated_at_commit": "44dc7ee624d1b72eb3930cd35f55629c2c12a008",
+      "source_tree": "sha256:e846f35d34899aa68198d89cd93d8a1194c137c3617635d554b08b81ab5e72c2"
     },
     "owner_lane": "",
     "provenance": {
diff --git a/scripts/qemu_ck_slot_loader_test.sh b/scripts/qemu_ck_slot_loader_test.sh
index b375e8b4..110101d1 100755
--- a/scripts/qemu_ck_slot_loader_test.sh
+++ b/scripts/qemu_ck_slot_loader_test.sh
@@ -28,6 +28,14 @@
 #  7 both slots invalid: "recovery_required (A: ...; B: ...)", the loader returns
 #    to the firmware, no kernel runs (QEMU is stopped by the row timeout).
 #  8 B validly signed but below the generation floor: refused, boots A.
+#  P11 cut 2b (the service kernel promotes / abandons; svc/slot_service.c), one NVMe
+#  disk with the Store and slots partitions, "shutdown" sent once the lifecycle is ready:
+#  9 healthy candidate B: the kernel promotes it (active=B, floor 2); next boot
+#    is a steady boot of B, nothing written.
+# 10 candidate that never becomes healthy (Store LOCKED): last try spent, not
+#    promoted; next boot falls back to A and the kernel abandons B (flags 0x01).
+# 11 negative control: the service image started without SLOTLDR finds no boot
+#    record and writes nothing.
 #
 # Output: one PASS/FAIL line per check, then
 #     AIENOS_CK_SLOT_LOADER: PASS|FAIL|NOT_RUN [(...)]
@@ -50,10 +58,18 @@ mk() { make -s -C native/kernel CROSS="${cross}" "$@" >/dev/null; }
 mk OUT="${out}" AIENOS_COMMIT="${commit}" CK_TEST_SLOT_KEY=1 slot-loader slot-tool gpt-image
 mk OUT="${out}/payload-a" AIENOS_COMMIT="slotA-${commit}"
 mk OUT="${out}/payload-b" AIENOS_COMMIT="slotB-${commit}"
+# P11 cut 2b service payloads (rows 9-11): TEST-key service image as A and B, the plain
+# service image (no production keys: stays LOCKED) as L.
+mk OUT="${out}/svc-a" AIENOS_COMMIT="slotA-${commit}" CK_SERVICE=1 CK_SERVICE_TEST_KEYS=1 full
+mk OUT="${out}/svc-b" AIENOS_COMMIT="slotB-${commit}" CK_SERVICE=1 CK_SERVICE_TEST_KEYS=1 full
+mk OUT="${out}/svc-l" AIENOS_COMMIT="slotL-${commit}" CK_SERVICE=1 full
 tool="${out}/host/ck_slot_tool"
 gpt="${out}/host/ck_gpt_image"
 img_a="${out}/payload-a/BOOTAA64.EFI"
 img_b="${out}/payload-b/BOOTAA64.EFI"
+svc_a="${out}/svc-a/full-service-testkeys/BOOTAA64.EFI"
+svc_b="${out}/svc-b/full-service-testkeys/BOOTAA64.EFI"
+svc_l="${out}/svc-l/full-service/BOOTAA64.EFI"
 
 . "${repo_root}/scripts/lib_gate_hold.sh"
 if ! gh_quiet_check || ! gh_lock_take qemu_ck_slot_loader_test "${AIENOS_GATE_MINUTES:-60}"; then
@@ -63,6 +79,7 @@ if ! gh_quiet_check || ! gh_lock_take qemu_ck_slot_loader_test "${AIENOS_GATE_MI
 fi
 work="$(mktemp -d)"
 cleanup() {
+    [[ -z "${qpid:-}" ]] || kill "${qpid}" 2>/dev/null || true
     rm -rf "${work}"
     gh_lock_release
 }
@@ -289,10 +306,142 @@ ran 8 A
 tool_agrees 8 "${work}/c_floor" "${A2}" "${B1}" "boot_slot=A reason=candidate_invalid_active loader_write=0"
 row_end 8
 
+
+# ==== P11 cut 2b: the service kernel promotes / abandons (svc/slot_service.c) =====
+# One NVMe disk (ck_gpt_image layout aienos-slots: AIENOS Store partition + slots
+# partition), the ESP as above. Payloads: the TEST-key service image built twice
+# (slotA- / slotB- commits: Store formats, continuity provisions, lifecycle READY =
+# healthy) and the plain service image as slot L (no production keys in a QEMU
+# build: the Store stays LOCKED = never healthy). The operator line "shutdown" is
+# sent over the PL011 pipe once the lifecycle is ready; the image then resets.
+gline="$("${gpt}" create "${work}/svc.img" 512 64 aienos-slots)"
+first="$(sed -n 's/.*slots_first_lba=\([0-9]*\).*/\1/p' <<<"${gline}")"
+last="$(sed -n 's/.*slots_last_lba=\([0-9]*\).*/\1/p' <<<"${gline}")"
+[[ -n "${first}" && -n "${last}" ]] || { bad "ck_gpt_image aienos-slots gave no slots geometry: ${gline}"; first=0; last=0; }
+disk="${work}/svc.img"
+cp "${disk}" "${work}/blank.img"
+mm SA1 "${svc_a}" 1
+mm SB2 "${svc_b}" 2 2
+mm SL2 "${svc_l}" 2 2
+SA1="${work}/SA1,${svc_a}"
+SB2="${work}/SB2,${svc_b}"
+SL2="${work}/SL2,${svc_l}"
+# c_stage_b with tries 1: the loader's own decision applied twice (select --out).
+slots --a "${SA1}" --b "${SL2}" --control "${work}/c_stage_b"
+cap_s="$(geo_val image_cap)"
+"${tool}" select --control "${work}/c_stage_b" --a "${SA1}" --b "${SL2}" --test-key --cap "${cap_s}" --out "${work}/c_t2" >/dev/null || true
+"${tool}" select --control "${work}/c_t2" --a "${SA1}" --b "${SL2}" --test-key --cap "${cap_s}" --out "${work}/c_t1" >/dev/null || true
+
+qpid=""
+sboot() { # name timeout-seconds [efi]: ESP with SLOTLDR (or efi), NVMe ${disk}; "shutdown" once ready
+    local name="$1" to="$2" efi="${3:-${out}/SLOTLDR.EFI}" w t0 rc dpid
+    w="${work}/s-${name}"
+    mkdir -p "${w}/esp/EFI/BOOT" "${w}/esp/EFI/AIENOS"
+    touch "${w}/esp/EFI/AIENOS/BOOTREPORT.TXT"
+    cp "${efi}" "${w}/esp/EFI/BOOT/BOOTAA64.EFI"
+    cp "${vars_fd}" "${w}/vars.fd"
+    mkfifo "${w}/ser.in" "${w}/ser.out"
+    : >"${w}/serial.raw"
+    t0="$(date +%s)"
+    timeout "${to}" qemu-system-aarch64 \
+        -M virt,virtualization=on,gic-version=3,iommu=smmuv3 -accel tcg,thread=single -cpu max -smp 4 -m 2048 \
+        -drive if=pflash,format=raw,readonly=on,file="${code_fd}" \
+        -drive if=pflash,format=raw,file="${w}/vars.fd" \
+        -drive if=none,id=esp,format=raw,file=fat:rw:"${w}/esp" \
+        -device virtio-blk-pci,drive=esp \
+        -drive if=none,id=nvme0,format=raw,file="${disk}" \
+        -device nvme,drive=nvme0,serial=aienos-slot-test \
+        -device ramfb -display none -nic none -monitor none \
+        -chardev pipe,id=ser,path="${w}/ser" -serial chardev:ser -no-reboot 2>"${w}/qemu.err" &
+    qpid=$!
+    cat "${w}/ser.out" >>"${w}/serial.raw" &
+    dpid=$!
+    exec 4>"${w}/ser.in"
+    while kill -0 "${qpid}" 2>/dev/null; do
+        if tr -d '\r' <"${w}/serial.raw" | grep -qE '^lifecycle: ready state=|^report_kind: (panic|fault|final)'; then break; fi
+        sleep 1
+    done
+    if tr -d '\r' <"${w}/serial.raw" | grep -q '^lifecycle: ready state='; then
+        sleep 1
+        printf 'shutdown\r' >&4 || true
+    fi
+    set +e
+    wait "${qpid}"
+    rc=$?
+    set -e
+    qpid=""
+    exec 4>&- 2>/dev/null || true
+    wait "${dpid}" 2>/dev/null || true
+    boots=$((boots + 1))
+    qemu_secs=$((qemu_secs + $(date +%s) - t0))
+    tr -d '\r' <"${w}/serial.raw" >"${w}/serial.log"
+    [[ -z "${AIENOS_LOG_DIR:-}" ]] || cp "${w}/serial.log" "${AIENOS_LOG_DIR}/qemu_ck_slot_loader_${name}.log"
+    echo "boot ${name}: qemu exit ${rc} after $(( $(date +%s) - t0 )) s"
+    last_rc="${rc}"
+    last_log="${w}/serial.log"
+}
+before() { # row label first-text second-text: both present, first earlier
+    local a b
+    a="$({ grep -nF -m1 -- "$3" "${last_log}" || true; } | cut -d: -f1)"
+    b="$({ grep -nF -m1 -- "$4" "${last_log}" || true; } | cut -d: -f1)"
+    if [[ -n "${a}" && -n "${b}" && "${a}" -lt "${b}" ]]; then ok "row $1: $2 (lines ${a} < ${b})"; else bad "row $1: $2 (lines ${a:-none} ${b:-none})"; show=1; fi
+}
+svc_to="${AIENOS_SLOT_SERVICE_TIMEOUT:-420}"
+
+# ---- row 9: candidate B healthy -> promoted by the kernel; next boot steady ------
+slots --a "${SA1}" --b "${SB2}" --control "${work}/c_stage_b"
+sboot r9-try "${svc_to}"
+has 9 "candidate try committed by the loader" "slot_loader: control committed seq=2 tries=2"
+has 9 "boot record handed over" "slot_loader: boot record handed over type=0x80000a1e slot=B reason=candidate_try seq=2"
+has 9 "kernel read the record" "slot: booted slot B reason=candidate_try generation=2 tries=2 control_seq=2"
+has 9 "kernel promoted B after health" "slot: promoted slot B to active generation=2 floor=2 seq=3"
+has 9 "health: lifecycle READY" "lifecycle: ready state=ready store=open"
+before 9 "continuity committed before the promotion" "continuity: PROVISIONED" "slot: promoted slot B"
+ran 9 B
+ctl_is 9 "control on disk: B active, floor raised to its policy generation" "seq=3 control: active=1 candidate=none tries=0 flags=0x00 floor=2 last_good=2"
+sboot r9-steady "${svc_to}"
+has 9 "next boot: B is the active slot" "slot_loader: boot=B reason=active gen=2 tries=0 floor=2"
+lacks 9 "next boot: loader writes nothing" "slot_loader: control committed"
+has 9 "next boot: kernel writes nothing" "slot: nothing to write (nothing to write) active=B"
+ran 9 B
+ctl_is 9 "control unchanged by the steady boot" "seq=3 control: active=1 candidate=none tries=0"
+row_end 9
+
+# ---- row 10: candidate never healthy -> not promoted; exhausted -> abandoned; A stays
+slots --a "${SA1}" --b "${SL2}" --control "${work}/c_t1"
+ctl_is 10 "fixture: candidate B with one try left" "seq=1 control: active=0 candidate=1 tries=1"
+sboot r10-locked "${svc_to}"
+has 10 "last try committed" "slot_loader: control committed seq=2 tries=0"
+has 10 "candidate L booted" "aienos_commit: slotL-${commit}"
+has 10 "Store stays locked (no keys)" "lifecycle: ready state=locked"
+has 10 "kernel waits for health" "slot: candidate B waiting for health (tries left 0): not promoted yet"
+has 10 "stop order says not promoted" "slot: candidate B NOT promoted this boot"
+lacks 10 "no promotion" "slot: promoted"
+ctl_is 10 "control: tries spent, nothing promoted" "seq=2 control: active=0 candidate=1 tries=0 flags=0x00"
+sboot r10-exhausted "${svc_to}"
+has 10 "loader falls back to A" "slot_loader: boot=A reason=candidate_exhausted_active gen=1 tries=0"
+has 10 "kernel read the record" "slot: booted slot A reason=candidate_exhausted_active"
+has 10 "kernel abandoned the candidate" "slot: candidate abandoned (marked failed) active=A stays seq=3"
+ran 10 A
+ctl_is 10 "control: candidate cleared, failed flag, A still active" "seq=3 control: active=0 candidate=none tries=0 flags=0x01"
+region "${work}/c10.region"
+"${tool}" control-recover --region "${work}/c10.region" --out "${work}/c10" >/dev/null || true
+tool_agrees 10 "${work}/c10" "${SA1}" "${SL2}" "boot_slot=A reason=active loader_write=0"
+row_end 10
+
+# ---- row 11: negative control: no boot record (service started without SLOTLDR) ---
+slots --a "${SA1}" --b "${SB2}" --control "${work}/c_stage_b"
+sboot r11-direct "${svc_to}" "${svc_a}"
+has 11 "kernel says it has no record" "slot: no boot record (not started by SLOTLDR.EFI): slot service idle, nothing written"
+has 11 "healthy service" "lifecycle: ready state=ready store=open"
+lacks 11 "no promotion without the loader's record" "slot: promoted"
+ctl_is 11 "control untouched" "seq=1 control: active=0 candidate=1 tries=3"
+row_end 11
+
 gh_lock_release
 echo "slot loader gate: ${boots} boots, ${checks} checks, ${fails} failures, QEMU ${qemu_secs} s (commit ${commit:0:12}; QEMU only, hardware NOT_RUN)"
 if [[ "${fails}" == 0 ]]; then
-    echo "${tag}: PASS (8 rows, ${boots} boots, ${checks} checks; QEMU, not hardware)"
+    echo "${tag}: PASS (11 rows, ${boots} boots, ${checks} checks; QEMU, not hardware)"
 else
     echo "${tag}: FAIL (${fails} of ${checks} checks)"
     exit 1