roadmap BUILT

944. The self-test proves a supervised death and a teardown that leaks nothing

(Title and slug provisional.)

Reuse: the TCB spawn path (create_thread_control_block, CAP_INSERT, CONFIGURE, START) and the supervision fixtures system_tests already had, moved into the kernel so both use one copy. user::run was the proposal's candidate and is not used: supervision is fixed at START from the reserved fault slot and never afterward (DECISIONS ยง26 (the fault endpoint)), and a thread run enters never passes START. Nothing new is taken.

Raised 2026-10-20 (UTC) by lane milestone/890-tours-to-self-test. calef ruled on 2026-10-19 (UTC), on #2434, that every claim the per-port tours made becomes a check in self_test::run. Two of x86_64's did not, and milestone 890 (riscv64 and x86_64 join the shared boot path) recorded them in its BUGS.

Index row

Two of the per-port tours' claims are checks in the boot self-test on all three ports: a faulting thread's death reaches its supervisor, and tearing a process down returns every frame. Both spawn through one helper that takes a supervision endpoint.

The two claims

What was built

notes/self-test-checks.md has each check's design.

Evidence

script/boot-check, all three under QEMU, 2026-10-24 (UTC):

port supervised teardown (first, second round) verdict
aarch64 pc 0x60000004, addr 0xa50000 0, 0 frames 10 of 15 passed, 5 absent
riscv64 pc 0x60000004, addr 0xa50000 0, 0 frames 10 of 15 passed, 5 absent
x86_64 pc 0x60000005, addr 0xa50000 0, 0 frames 12 of 15 passed, 3 absent

Falsification: one frame allocated and dropped after the second round turns the aarch64 verdict red, teardown FAILED ... the first cost 0 frame(s), the second 1. script/test on all three runs the suite's supervision tests through the shared helper; the pull request has the gate table.

Done when

  1. A spawn helper takes a supervision endpoint on aarch64, riscv64 and x86_64.
  2. self_test::run has supervised and teardown, and both pass under QEMU on all three.
  3. Milestone 890's BUGS line and follow-on bullet point here.

Exit criteria, as built

criterion state
1 Done: user::supervised_child::spawn, one function on all three.
2 Done: the table above.
3 Done.

BUGS

Follow-on