fix(v4): (DOWN) calls the GONE hook and puts (ONE) back; the hand-on swept

Found by the depth sweep: a hook that sent a message about another node
overwrote (ONE), which AWAIT reads after believing a GONE, so the wait went
on.  (DOWN) now calls the hook through (RUN) and restores (ONE).

AWAIT ended by a GONE that is handed on: works to 26 values and 21 calls
deep, then a stack error and nothing else, at both widths.  Removal sweep:
node 11 or 12 removed, or the wire cut, at every step: 0 wrong.  hosted
dict_hash=0x248b4edc47f4357e on all three ISAs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rajames
2026-10-16 14:42:54 -04:00
co-authored by Claude Opus 5.5
parent 3506747d5a
commit 529ba0fc48
3 changed files with 41 additions and 9 deletions
+3 -2
View File
@@ -1128,15 +1128,16 @@ int main(void)
* (Hera's KILL does: test_host_unit.c). Its wait is ended by the line it is then typed, "Interrupted",
* and it answers. */
{
static const struct { const char *what, *set10, *set11, *set12; v4_cell node; const char *text; } ex[3] = {
static const struct { const char *what, *set10, *set11, *set12; v4_cell node; const char *text; } ex[4] = {
{ "text from the console for node 12, what it prints and how it ended", "1 DROP", "1 DROP", ": A 7 8 * . ;", 12, "A" },
{ "node 11 SENDs node 12 text and waits for its answer", "1 DROP", ": T S\" Q\" 12 SEND 12 AWAIT . ;", "1 DROP", 11, "T" },
{ "a GONE node 10 sends node 11, which node 11 hands on to node 12", ": G 44 11 GONE ;", ": DOWN 12 GONE ; ' DOWN (GONE-HOOK) ! 44 3 ROUTE", "44 2 ROUTE", 10, "G" },
{ "a message node 12 has no way for, and its NACK to node 10", "55 2 ROUTE : N S\" 1 DROP\" 55 SEND ;", "55 3 ROUTE", "NO-ROUTES 1 2 ROUTE 10 2 ROUTE 11 2 ROUTE", 10, "N" }
};
static const char *const how_name[4] = { "", "node 11 removed", "node 12 removed", "the wire between nodes 11 and 12 cut and made again" };
unsigned e, g, whole, tried, wrong, first, all = 0;
step_cap = 2000000;
for (e = 0; e < 3; e++) {
for (e = 0; e < 4; e++) {
CHECK(row() && told(10, ex[e].set10) && told(11, ex[e].set11) && told(12, ex[e].set12) && told(10, ASK) && told(11, ASK) && told(12, ASK), "a row made afresh for: %s", ex[e].what);
step_cap = 2000000;
keep();