fix(v4): a killed node's children become Hera's; Review Focus 4 checked

From the final review of MESH step 7.  NODE-KILL left children whose parent
was the dead number, so a node born later under it inherited authority over
them; they are re-parented to Hera.  After UNIT-KILL Hera no longer lists the
removed centre, and a later KILL completes (shown to fail with GONE-DOWN's
unlisting taken out).  test_manage 45/45 both widths; test_host_unit 127/127.

Acceptance: amd64, aarch64, riscv64 clean qemu: ok>, POST 538/538,
dict_hash=0x248b4edc47f4357e on all three; test-32 0 failures.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rajames
2026-10-16 20:03:45 -04:00
co-authored by Claude Opus 5.5
parent 9382df69e5
commit 7ad02bf72f
10 changed files with 497 additions and 3 deletions
+10 -1
View File
@@ -151,7 +151,16 @@ int main(void)
r = birth(a, 13);
CHECK(r >= 0, "node 11 births 13");
push(h, 11);
CHECK(v4_manage_serve(&m, h, V4_REQ_NODE_KILL) == 1 && place_of(h, 13) == r && child(h, 11, 0) == 13, "killing 11 does not kill its child, as in v3");
CHECK(v4_manage_serve(&m, h, V4_REQ_NODE_KILL) == 1 && place_of(h, 13) == r, "killing 11 does not kill its child, as in v3");
CHECK(child(h, 11, 0) == 0 && child(h, 10, 0) == 13, "its child is Hera's now: no number that is not live is anyone's parent");
{
/* A NUMBER USED AGAIN INHERITS NOTHING (the final review of step 7): a node born later as 11 is not
* the parent of the 13 the old 11 birthed, and may not wire it. */
v4_cell again = birth(h, 11), r13 = r;
CHECK(again >= 0 && child(h, 11, 0) == 0, "Hera births a new 11: it has no children");
push((unsigned)again, again); push((unsigned)again, 3); push((unsigned)again, r13); push((unsigned)again, 2);
CHECK(refused((unsigned)again, V4_REQ_NODE_WIRE) && depth((unsigned)again) == 0, "and may not wire the old 11's child");
}
CHECK(place_of(h, 12) == -1 && place_of(h, 10) == (v4_cell)h, "NODE-PLACE of a number not live is -1");
printf(" %d checks, %d failures\n", checks, failures);