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:
co-authored by
Claude Opus 5.5
parent
9382df69e5
commit
7ad02bf72f
+5
-1
@@ -109,9 +109,13 @@ int v4_manage_serve(const v4_manage *m, unsigned place, v4_cell request)
|
||||
if (request == V4_REQ_NODE_SLEEP) v4_fabric_sleep(m->f, e->place);
|
||||
else if (request == V4_REQ_NODE_WAKE) v4_fabric_wake(m->f, e->place);
|
||||
else {
|
||||
unsigned gone_place = e->place;
|
||||
unsigned gone_place = e->place, k;
|
||||
v4_cell gone_number = e->number;
|
||||
v4_fabric_node *was = v4_fabric_remove(m->f, gone_place);
|
||||
e->number = 0;
|
||||
/* its children are not removed (as v3) and become Hera's: a number that is not live is no one's
|
||||
* parent, so a node born later under it inherits nothing (the final review of step 7) */
|
||||
for (k = 0; k < m->reg_cap; k++) if (m->reg[k].number != 0 && m->reg[k].parent == gone_number) m->reg[k].parent = me->number;
|
||||
if (was && m->gone) m->gone(m->self, gone_place, was);
|
||||
}
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user