messenger: a walk's held messages are told only once its message was sent, handed on only as a first hold would take them, and its start and end compared on the controller's clock (hq issue 538) #238

Merged
mesh-admin merged 2 commits from fix/538-walk-hold-told-handover-clock into main 2026-10-12 11:41:48 +00:00
Contributor

Fixes issue 538 (review 16 of #230, ADR 0308's router half).

What changes (modules/messenger)

A. Told only once sent, owed until then. tellWalk no longer marks what a walk's end or bound message carries as told when it is queued. The outbox item carries the records' keys (item.Carries), and sendEntries marks each told on a channel only once the message was sent there (Sent, FirstSent, LastSaid; one that cleared meanwhile gets its clearing said). queued counts a carried key, so while the message waits nothing says the record on its own. Each carried record (and each said on its own, and each left unsent when no channel can send) is kept owed in the state (Record.Owed, persisted at tellWalk); sendEntries clears it when a message about it is sent. Load turns an owed, still-open record into Pending (not history), so after a restart that lost the walk's message the next tick says it on its own, urgent and warning alike (review 39). An urgent one said at the state reading is queued first, so the tick does not say it twice. The history says to be told in the message of walk … at release and told in the message of walk <the item's walk> per channel at send.

B. The handover follows the first hold's rules. release hands a held message to a later open walk only when it is still open, not silenced, not said since it was held, and not one neverHeld refuses (an open ask about it, a walk's own failure, a secret). Any other is released by the ending walk as before.

C. One clock. The start-after-end check (startOfEnded) compares the start the controller said (started_at, else its at) with the end's started_at, else with the end's own moment as the controller said it (new tomb field ended_said, uncapped). Only when the controller said neither does it compare the moments as heard here.

README's walk section says all three.

Tests (walks_test.go)

  • TestAHeldMessageIsToldOnlyOnceTheWalksMessageWasSent: both channels fail at the end; the record is not told. sent: the channels recover, the walk's message goes once per channel, only then is the record told and no longer owed, and nothing more is said 10 min later. restart urgent / restart warning: a new router loads the state and reads the open conditions; the held message is said once, marked told, not owed, and not said again by a later reading. On the previous head df94be0 restart warning fails (history ends at "to be told in the message of walk…", as review 39 found); on main every subtest fails at the told check.
  • TestAWalksEndHandsOnOnlyWhatALaterWalkWouldHold: a silenced message and one with an open ask about it are not handed to a later walk. Fails without the fix.
  • TestAStartHeardAfterItsEndOpensNothingWhenTheControllersClockIsAhead: the controller's clock 10 min ahead, the end heard first with and without started_at. Fails without the fix.
  • go vet, go test -race -count=1 ./... in the module pass. MESH_GATE=<controller built from mesh-controller main dd2fd28> MESH_CHECK_MODULES=messenger sh merge-check.sh passes.

Choice made for review 39

Of the two ways the review offered, the owed marker on each record: it lives where the record already lives in the state, needs no walk kept past its end, and reuses the unsent retry the tick already does. A record that clears while owed is not said at the restart (nothing open to say).

Limits I chose

  • A message already held by another open walk stays held there even if it was silenced since; that walk's end applies these rules again.
  • C does not touch the bound or the 'took' duration, which still use the router's capped moment.

Reviewers' checklist

  • Each test fails without its fix; checks green.
  • Nothing is said twice: while the walk's message waits, queued holds back the retry and the state reading; after a restart, the owed record is said once.
  • No manifest change; no state migration (optional fields owed on a record, ended_said on a kept walk).

By fix-538@g14. Not merged.

Fixes issue 538 (review 16 of #230, ADR 0308's router half). ## What changes (modules/messenger) **A. Told only once sent, owed until then.** `tellWalk` no longer marks what a walk's end or bound message carries as told when it is queued. The outbox item carries the records' keys (`item.Carries`), and `sendEntries` marks each told on a channel only once the message was sent there (`Sent`, `FirstSent`, `LastSaid`; one that cleared meanwhile gets its clearing said). `queued` counts a carried key, so while the message waits nothing says the record on its own. Each carried record (and each said on its own, and each left unsent when no channel can send) is kept **owed** in the state (`Record.Owed`, persisted at `tellWalk`); `sendEntries` clears it when a message about it is sent. `Load` turns an owed, still-open record into `Pending` (not history), so after a restart that lost the walk's message the next tick says it on its own, urgent and warning alike (review 39). An urgent one said at the state reading is queued first, so the tick does not say it twice. The history says `to be told in the message of walk …` at release and `told in the message of walk <the item's walk>` per channel at send. **B. The handover follows the first hold's rules.** `release` hands a held message to a later open walk only when it is still open, not silenced, not said since it was held, and not one `neverHeld` refuses (an open ask about it, a walk's own failure, a secret). Any other is released by the ending walk as before. **C. One clock.** The start-after-end check (`startOfEnded`) compares the start the controller said (`started_at`, else its `at`) with the end's `started_at`, else with the end's own moment as the controller said it (new tomb field `ended_said`, uncapped). Only when the controller said neither does it compare the moments as heard here. README's walk section says all three. ## Tests (walks_test.go) - `TestAHeldMessageIsToldOnlyOnceTheWalksMessageWasSent`: both channels fail at the end; the record is not told. `sent`: the channels recover, the walk's message goes once per channel, only then is the record told and no longer owed, and nothing more is said 10 min later. `restart urgent` / `restart warning`: a new router loads the state and reads the open conditions; the held message is said once, marked told, not owed, and not said again by a later reading. On the previous head df94be0 `restart warning` fails (history ends at "to be told in the message of walk…", as review 39 found); on main every subtest fails at the told check. - `TestAWalksEndHandsOnOnlyWhatALaterWalkWouldHold`: a silenced message and one with an open ask about it are not handed to a later walk. Fails without the fix. - `TestAStartHeardAfterItsEndOpensNothingWhenTheControllersClockIsAhead`: the controller's clock 10 min ahead, the end heard first with and without `started_at`. Fails without the fix. - `go vet`, `go test -race -count=1 ./...` in the module pass. `MESH_GATE=<controller built from mesh-controller main dd2fd28> MESH_CHECK_MODULES=messenger sh merge-check.sh` passes. ## Choice made for review 39 Of the two ways the review offered, the owed marker on each record: it lives where the record already lives in the state, needs no walk kept past its end, and reuses the unsent retry the tick already does. A record that clears while owed is not said at the restart (nothing open to say). ## Limits I chose - A message already held by another open walk stays held there even if it was silenced since; that walk's end applies these rules again. - C does not touch the bound or the 'took' duration, which still use the router's capped moment. ## Reviewers' checklist - [ ] Each test fails without its fix; checks green. - [ ] Nothing is said twice: while the walk's message waits, `queued` holds back the retry and the state reading; after a restart, the owed record is said once. - [ ] No manifest change; no state migration (optional fields `owed` on a record, `ended_said` on a kept walk). By fix-538@g14. Not merged.
mesh-admin added 1 commit 2026-10-12 11:27:05 +00:00
messenger: mark a walk's held messages told only once its message was sent, hand on only what a first hold would take, compare a walk's start and end on the controller's clock (issue 538)
mesh/merge-gate pass: builds messenger → novox; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)
mesh/delivery superseded: a newer head of the same pull request
df94be0e60
A message lost with a restart before it was sent left what it carried marked told,
so it reached the operator only as its reminder hours later. A later walk took over
silenced, already said or asked messages that ADR 0308 section 3 never holds. A start
capped at the router's now was compared with the controller's moments.
Author
Contributor

Delivery novox/mesh-catalog@424fc5a28184 — delivered since 2026-10-12T11:46:08Z

Delivery plan — builds messenger → novox; no bus step

  • tier 0: messenger
  • novox: receives messenger

Machines

  • messenger on novox: passed — healthy 1 times over 1m38s
  • messenger on the rest running it: sent

Transitions

  • 2026-10-12 11:35 (new) → proposed (announced): novox/mesh-catalog#238's head announced
  • 2026-10-12 11:38 proposed → checked (checked): the verdict names this commit
  • 2026-10-12 11:38 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail
  • 2026-10-12 11:43 ready → published (merged): on the trunk its modules follow: merged there, and its walk opened — or nothing for a walk to move
  • 2026-10-12 11:43 published → delivering (go): its walk started: let go by this owner in its group's order, by a person, or on the controller's own path — not a failed walk that carried a later commit for it, after which it waits for a walk of its own commit
  • 2026-10-12 11:46 delivering → delivered (done): its walk is done, carrying its own commit: every machine of its deploy plan passed, or was left as its policy says

The commit's note under refs/notes/mesh-plan keeps every transition: git log --notes=mesh-plan.

<!-- mesh-delivery:view --> **Delivery** `novox/mesh-catalog@424fc5a28184` — **delivered** since 2026-10-12T11:46:08Z **Delivery plan** — builds messenger → novox; no bus step - tier 0: messenger - novox: receives messenger **Machines** - messenger on novox: passed — healthy 1 times over 1m38s - messenger on the rest running it: sent **Transitions** - 2026-10-12 11:35 (new) → proposed (announced): novox/mesh-catalog#238's head announced - 2026-10-12 11:38 proposed → checked (checked): the verdict names this commit - 2026-10-12 11:38 checked → ready (accepted): the gate passed or warned, and the repository's own check did not fail - 2026-10-12 11:43 ready → published (merged): on the trunk its modules follow: merged there, and its walk opened — or nothing for a walk to move - 2026-10-12 11:43 published → delivering (go): its walk started: let go by this owner in its group's order, by a person, or on the controller's own path — not a failed walk that carried a later commit for it, after which it waits for a walk of its own commit - 2026-10-12 11:46 delivering → delivered (done): its walk is done, carrying its own commit: every machine of its deploy plan passed, or was left as its policy says The commit's note under `refs/notes/mesh-plan` keeps every transition: `git log --notes=mesh-plan`.
Author
Contributor

Merge check at df94be0e

  • mesh/merge-gate: PASS — every machine composes with the change as it did without (4 of 4 compose) (modules: messenger)
  • mesh/repo-check: PASS — its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)

Delivery plan — builds messenger → novox; no bus step

  • tier 0: messenger
  • novox: receives messenger
  • read by no module's build: modules/messenger/README.md, modules/messenger/cmd/messenger/walks_test.go

Run by the build seat on novox as build-1791804427884269532 (builds --log build-1791804427884269532).

--- the gate: messenger
messenger: ok, 7 tool(s), invokes seat:mesh-controller.conditions, seat:mesh-controller.root-free, seat:issue-tracker.tracking, keeps state open, sent, asks, identities, walks; WARNING: settings ask(s) for a setting and do(es) not say whether it is trusted, so it counts as trusted: set at the terminal alone; say "trusted" false where nothing trusts it (novox/hq issue 339)
long-running resources without health: 0
files asking for a setting without saying whether it is trusted: 1
1 manifest(s) checked. Judged against the seats this binary carries; a claim on one of the mesh's own seats is judged fully at registration, and a seat declared by a module not given here reads as unknown. Identities judged on a 6-character machine name, against the bounds of the providers given here
judging 1 module(s) changed against 4 machine(s), as the snapshot of 2026-10-12T11:22:09Z says they run
composing every machine as the mesh is
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
composing every machine with the change
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
merge gate: PASS — every machine composes with the change as it did without (4 of 4 compose)
judged by controller development build against the facts of 2026-10-12T11:22:09Z

modules the change moves:
  - messenger (changed)

machines:
  - a machine (f35): composes
  - holds mesh-dns-resolver (idt): composes
  - holds git, holds mesh-artifact-store, holds mesh-broker, holds mesh-catalog, holds mesh-delivery, holds mesh-dns-resolver, holds mesh-store, holds mesh-vault, holds npm-package-registry, the control node, the hub (ygcyr): composes
  - a machine (yvbpsm): composes

a merge would rebuild 1 module(s) in 1 tier(s): messenger

notes:
  - modules/messenger/README.md and modules/messenger/cmd/messenger/walks_test.go read by no module's build, and rebuild nothing (issue 280)
--- its merge-check.sh (go toolchain)
ok  	git.novox.be/novox/mesh-catalog/checks/words	0.004s
words: 12 retired words and 70 daemons' lines, none in the 43133 strings of 690 files
ok  	git.novox.be/novox/mesh-catalog/checks/agenthome	0.015s
agent-home: no archive and no file written into under the agent's home
ok  	git.novox.be/novox/mesh-catalog/checks/paths	0.006s
paths: no module names another's state on its machine (3 known, listed to go)
long-running resources without health: 69, as kept
ok  	git.novox.be/novox/mesh-catalog/checks/deps	0.328s
testing modules/messenger
ok  	messenger/cmd/messenger	2.306s
--- its merge-check-typescript.sh (typescript toolchain)
**Merge check** at `df94be0e` - `mesh/merge-gate`: **PASS** — every machine composes with the change as it did without (4 of 4 compose) (modules: messenger) - `mesh/repo-check`: **PASS** — its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript) **Delivery plan** — builds messenger → novox; no bus step - tier 0: messenger - novox: receives messenger - read by no module's build: modules/messenger/README.md, modules/messenger/cmd/messenger/walks_test.go Run by the build seat on novox as `build-1791804427884269532` (`builds --log build-1791804427884269532`). ``` --- the gate: messenger messenger: ok, 7 tool(s), invokes seat:mesh-controller.conditions, seat:mesh-controller.root-free, seat:issue-tracker.tracking, keeps state open, sent, asks, identities, walks; WARNING: settings ask(s) for a setting and do(es) not say whether it is trusted, so it counts as trusted: set at the terminal alone; say "trusted" false where nothing trusts it (novox/hq issue 339) long-running resources without health: 0 files asking for a setting without saying whether it is trusted: 1 1 manifest(s) checked. Judged against the seats this binary carries; a claim on one of the mesh's own seats is judged fully at registration, and a seat declared by a module not given here reads as unknown. Identities judged on a 6-character machine name, against the bounds of the providers given here judging 1 module(s) changed against 4 machine(s), as the snapshot of 2026-10-12T11:22:09Z says they run composing every machine as the mesh is the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued composing every machine with the change the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued merge gate: PASS — every machine composes with the change as it did without (4 of 4 compose) judged by controller development build against the facts of 2026-10-12T11:22:09Z modules the change moves: - messenger (changed) machines: - a machine (f35): composes - holds mesh-dns-resolver (idt): composes - holds git, holds mesh-artifact-store, holds mesh-broker, holds mesh-catalog, holds mesh-delivery, holds mesh-dns-resolver, holds mesh-store, holds mesh-vault, holds npm-package-registry, the control node, the hub (ygcyr): composes - a machine (yvbpsm): composes a merge would rebuild 1 module(s) in 1 tier(s): messenger notes: - modules/messenger/README.md and modules/messenger/cmd/messenger/walks_test.go read by no module's build, and rebuild nothing (issue 280) --- its merge-check.sh (go toolchain) ok git.novox.be/novox/mesh-catalog/checks/words 0.004s words: 12 retired words and 70 daemons' lines, none in the 43133 strings of 690 files ok git.novox.be/novox/mesh-catalog/checks/agenthome 0.015s agent-home: no archive and no file written into under the agent's home ok git.novox.be/novox/mesh-catalog/checks/paths 0.006s paths: no module names another's state on its machine (3 known, listed to go) long-running resources without health: 69, as kept ok git.novox.be/novox/mesh-catalog/checks/deps 0.328s testing modules/messenger ok messenger/cmd/messenger 2.306s --- its merge-check-typescript.sh (typescript toolchain) ```
mesh-admin left a comment
Author
Contributor

Verdict: request changes at df94be0

Independent review, in a fresh clone. mesh/merge-gate passes (it builds messenger for novox, and 4 of 4 machines compose), and so does mesh/repo-check. go vet is clean, and go test -race -count=3 ./... in modules/messenger passes. All three fixes are correct as far as they go. I ran each of the three new tests on 3e84581 (main before this branch), using this branch's walks_test.go, and every one fails there. One limit the builder chose still loses a held message, and that blocks.

Blocking: a held warning whose walk message is lost with a restart is never told

The limit the PR states is this: "a warning whose walk message was lost with a restart is kept as state; only an urgent one is said at the reading." In practice, that warning is never said to the operator.

The path:

  • tellWalk queues the walk's message, and the records stay untold: Pending stays "" and History stays false (walks.go:627-643).
  • The walk is already a tombstone without Held (walks.go:341-347). The outbox lives in memory only.
  • After a restart, Load sees nothing pending (holder.go:404). Sync puts the known, untold warning under default and keeps it as state (sync.go:109-115), because the warning is older than FreshFor.
  • Tick has nothing to retry: Pending is "". The reminder needs FirstSent (holder.go:787), and the quiet reminder needs needsNothing.

I reproduced it with a scratch test, not committed. A warning (machine.novox.disk-filling) is held by a walk, and the end is sent while both channels fail. The router restarts from the same state, with Sync at once and then every 6 h for 48 h. The result: Sync gives as_state:[machine.novox.disk-filling], nothing is ever sent, and the last history line is "held to be told in the message of walk plan-w ended delivered".

This contradicts ADR 0308 §4: "A held message whose condition is still open is told after it". It also contradicts §5 ("A walk that hangs never silences the mesh") and "failure must be loud". The PR cites the router's general rule for what was waiting at a restart (issue 271, history is never news), but that rule does not cover this case. Issue 271's rule is for things the operator could have been told through the normal stream. A held message was deliberately kept from the operator, for up to its bound, and its only record of being owed is gone with the outbox.

Suggested fix: persist on each carried record that it is still owed. Two ways to do that:

  • Option 1: at release, set the record's Pending to what was to be said, or set a new field such as Carried (the walk id plus what). Clear it in sendEntries. Load then leaves a carried, untold record pending, without demoting it to History, and Tick says it on its own once nothing queued carries it.
  • Option 2: keep the walk's Held on the tombstone until every channel has sent the message, and release it again on load.

Whichever you choose, add a warning case to TestAHeldMessageIsToldOnlyOnceTheWalksMessageWasSent/restart. Today that test only covers an urgent message, which the reading says anyway.

The three fixes, checked

  • A. Told only once sent. item.Carries (outbox.go:21-23) carries the keys. sendEntries marks each carried record told on a channel only after a successful send (outbox.go:448-476), and sets ClearUnsaid for one that cleared while it waited. queued counts carried keys (outbox.go:138-142), so neither Tick's retry nor Sync (sync.go:104) says a carried record on its own while the walk's message waits. Nothing is said twice. failed() moving a desk item to Away keeps Carries, because the whole item is moved. Test: TestAHeldMessageIsToldOnlyOnceTheWalksMessageWasSent. On 3e84581 both subtests fail at walks_test.go:644.
  • B. The handover applies the first hold's rules. release first collects the records that are open, not silenced and not said since they were held (walks.go:385-391). It then calls neverHeld outside the lock (walks.go:393-396) and hands on only handable records (walks.go:403). A record that is not handed on goes through the existing switch: silenced or said means neither told nor counted. Test: TestAWalksEndHandsOnOnlyWhatALaterWalkWouldHold. On 3e84581 it fails at walks_test.go:713 and 716, where both records are handed to plan-b and history says held again.
  • C. One clock. startOfEnded (walks.go:356-371) compares the start the controller said (started_at, else its at, uncapped) with the end's started_at, else with the new uncapped ended_said (walks.go:117-119, 341). Only when the controller said neither does it fall back to the capped moments. A retry under the same id has a later started_at, so it opens. Test: TestAStartHeardAfterItsEndOpensNothingWhenTheControllersClockIsAhead. On 3e84581 both subtests fail at walks_test.go:743.

Minor (not blocking)

  • In sendEntries, the history line names the walk from entries[0].it.Key. That is right only while a walk's message is always sent alone, which WalkEndWhat ensures today. If a carried item ever lands in a digest, the line names the wrong key.

Not merged by me.

Verdict: request changes at df94be0 Independent review, in a fresh clone. mesh/merge-gate passes (it builds messenger for novox, and 4 of 4 machines compose), and so does mesh/repo-check. `go vet` is clean, and `go test -race -count=3 ./...` in modules/messenger passes. All three fixes are correct as far as they go. I ran each of the three new tests on 3e84581 (main before this branch), using this branch's walks_test.go, and **every one fails there**. One limit the builder chose still loses a held message, and that blocks. ## Blocking: a held warning whose walk message is lost with a restart is never told The limit the PR states is this: "a warning whose walk message was lost with a restart is kept as state; only an urgent one is said at the reading." In practice, that warning is never said to the operator. The path: - `tellWalk` queues the walk's message, and the records stay untold: Pending stays "" and History stays false (walks.go:627-643). - The walk is already a tombstone without `Held` (walks.go:341-347). The outbox lives in memory only. - After a restart, `Load` sees nothing pending (holder.go:404). `Sync` puts the known, untold warning under `default` and keeps it as state (sync.go:109-115), because the warning is older than FreshFor. - `Tick` has nothing to retry: Pending is "". The reminder needs `FirstSent` (holder.go:787), and the quiet reminder needs `needsNothing`. I reproduced it with a scratch test, not committed. A warning (`machine.novox.disk-filling`) is held by a walk, and the end is sent while both channels fail. The router restarts from the same state, with `Sync` at once and then every 6 h for 48 h. The result: `Sync` gives `as_state:[machine.novox.disk-filling]`, nothing is ever sent, and the last history line is "held to be told in the message of walk plan-w ended delivered". This contradicts ADR 0308 §4: "A held message whose condition is still open is told after it". It also contradicts §5 ("A walk that hangs never silences the mesh") and "failure must be loud". The PR cites the router's general rule for what was waiting at a restart (issue 271, history is never news), but that rule does not cover this case. Issue 271's rule is for things the operator *could* have been told through the normal stream. A held message was deliberately kept from the operator, for up to its bound, and its only record of being owed is gone with the outbox. Suggested fix: persist on each carried record that it is still owed. Two ways to do that: - **Option 1:** at release, set the record's `Pending` to what was to be said, or set a new field such as `Carried` (the walk id plus what). Clear it in `sendEntries`. `Load` then leaves a carried, untold record pending, without demoting it to `History`, and `Tick` says it on its own once nothing queued carries it. - **Option 2:** keep the walk's `Held` on the tombstone until every channel has sent the message, and release it again on load. Whichever you choose, add a **warning** case to `TestAHeldMessageIsToldOnlyOnceTheWalksMessageWasSent/restart`. Today that test only covers an urgent message, which the reading says anyway. ## The three fixes, checked - **A. Told only once sent.** `item.Carries` (outbox.go:21-23) carries the keys. `sendEntries` marks each carried record told on a channel only after a successful send (outbox.go:448-476), and sets `ClearUnsaid` for one that cleared while it waited. `queued` counts carried keys (outbox.go:138-142), so neither `Tick`'s retry nor `Sync` (sync.go:104) says a carried record on its own while the walk's message waits. Nothing is said twice. `failed()` moving a desk item to Away keeps `Carries`, because the whole item is moved. Test: `TestAHeldMessageIsToldOnlyOnceTheWalksMessageWasSent`. On 3e84581 both subtests fail at walks_test.go:644. - **B. The handover applies the first hold's rules.** `release` first collects the records that are open, not silenced and not said since they were held (walks.go:385-391). It then calls `neverHeld` outside the lock (walks.go:393-396) and hands on only `handable` records (walks.go:403). A record that is not handed on goes through the existing switch: silenced or said means neither told nor counted. Test: `TestAWalksEndHandsOnOnlyWhatALaterWalkWouldHold`. On 3e84581 it fails at walks_test.go:713 and 716, where both records are handed to plan-b and history says `held` again. - **C. One clock.** `startOfEnded` (walks.go:356-371) compares the start the controller said (`started_at`, else its `at`, uncapped) with the end's `started_at`, else with the new uncapped `ended_said` (walks.go:117-119, 341). Only when the controller said neither does it fall back to the capped moments. A retry under the same id has a later `started_at`, so it opens. Test: `TestAStartHeardAfterItsEndOpensNothingWhenTheControllersClockIsAhead`. On 3e84581 both subtests fail at walks_test.go:743. ## Minor (not blocking) - In `sendEntries`, the history line names the walk from `entries[0].it.Key`. That is right only while a walk's message is always sent alone, which `WalkEndWhat` ensures today. If a carried item ever lands in a digest, the line names the wrong key. Not merged by me.
jschoubben added 1 commit 2026-10-12 11:35:50 +00:00
messenger: keep what a walk held owed in the state until its message was sent, so a restart says a held warning too (issue 538, review 39)
mesh/merge-gate pass: builds messenger → novox; no bus step; every machine composes with the change as it did without (4 of 4 compose)
mesh/repo-check pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)
mesh/delivery delivered
424fc5a281
A warning held on purpose and lost with the walk's message at a restart was turned
into history and never told. Name the walk in the told line from its own item.
Author
Contributor

Merge check at 424fc5a2

  • mesh/merge-gate: PASS — every machine composes with the change as it did without (4 of 4 compose) (modules: messenger)
  • mesh/repo-check: PASS — its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript)

Delivery plan — builds messenger → novox; no bus step

  • tier 0: messenger
  • novox: receives messenger
  • read by no module's build: modules/messenger/README.md, modules/messenger/cmd/messenger/walks_test.go

Run by the build seat on shanks as build-1791804959769257165 (builds --log build-1791804959769257165).

--- the gate: messenger
messenger: ok, 7 tool(s), invokes seat:mesh-controller.conditions, seat:mesh-controller.root-free, seat:issue-tracker.tracking, keeps state open, sent, asks, identities, walks; WARNING: settings ask(s) for a setting and do(es) not say whether it is trusted, so it counts as trusted: set at the terminal alone; say "trusted" false where nothing trusts it (novox/hq issue 339)
long-running resources without health: 0
files asking for a setting without saying whether it is trusted: 1
1 manifest(s) checked. Judged against the seats this binary carries; a claim on one of the mesh's own seats is judged fully at registration, and a seat declared by a module not given here reads as unknown. Identities judged on a 6-character machine name, against the bounds of the providers given here
judging 0 module(s) changed against 4 machine(s), as the snapshot of 2026-10-12T11:32:09Z says they run
composing every machine as the mesh is
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
composing every machine with the change
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued
merge gate: PASS — every machine composes with the change as it did without (4 of 4 compose)
judged by controller development build against the facts of 2026-10-12T11:32:09Z

machines:
  - a machine (f35): composes
  - holds mesh-dns-resolver (idt): composes
  - holds git, holds mesh-artifact-store, holds mesh-broker, holds mesh-catalog, holds mesh-delivery, holds mesh-dns-resolver, holds mesh-store, holds mesh-vault, holds npm-package-registry, the control node, the hub (ygcyr): composes
  - a machine (yvbpsm): composes

a merge would rebuild 1 module(s) in 1 tier(s): messenger

notes:
  - modules/messenger/README.md and modules/messenger/cmd/messenger/walks_test.go read by no module's build, and rebuild nothing (issue 280)
--- its merge-check.sh (go toolchain)
ok  	git.novox.be/novox/mesh-catalog/checks/words	0.005s
words: 12 retired words and 70 daemons' lines, none in the 43139 strings of 690 files
ok  	git.novox.be/novox/mesh-catalog/checks/agenthome	0.013s
agent-home: no archive and no file written into under the agent's home
ok  	git.novox.be/novox/mesh-catalog/checks/paths	0.007s
paths: no module names another's state on its machine (3 known, listed to go)
long-running resources without health: 69, as kept
ok  	git.novox.be/novox/mesh-catalog/checks/deps	0.224s
testing modules/messenger
ok  	messenger/cmd/messenger	2.235s
--- its merge-check-typescript.sh (typescript toolchain)
**Merge check** at `424fc5a2` - `mesh/merge-gate`: **PASS** — every machine composes with the change as it did without (4 of 4 compose) (modules: messenger) - `mesh/repo-check`: **PASS** — its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-check-typescript.sh (typescript) **Delivery plan** — builds messenger → novox; no bus step - tier 0: messenger - novox: receives messenger - read by no module's build: modules/messenger/README.md, modules/messenger/cmd/messenger/walks_test.go Run by the build seat on shanks as `build-1791804959769257165` (`builds --log build-1791804959769257165`). ``` --- the gate: messenger messenger: ok, 7 tool(s), invokes seat:mesh-controller.conditions, seat:mesh-controller.root-free, seat:issue-tracker.tracking, keeps state open, sent, asks, identities, walks; WARNING: settings ask(s) for a setting and do(es) not say whether it is trusted, so it counts as trusted: set at the terminal alone; say "trusted" false where nothing trusts it (novox/hq issue 339) long-running resources without health: 0 files asking for a setting without saying whether it is trusted: 1 1 manifest(s) checked. Judged against the seats this binary carries; a claim on one of the mesh's own seats is judged fully at registration, and a seat declared by a module not given here reads as unknown. Identities judged on a 6-character machine name, against the bounds of the providers given here judging 0 module(s) changed against 4 machine(s), as the snapshot of 2026-10-12T11:32:09Z says they run composing every machine as the mesh is the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued composing every machine with the change the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued the bus's user list leaves out 5 user(s) the mesh has minted no credential for: controller, node.f35, node.idt, node.ygcyr, node.yvbpsm. Each is a user that cannot connect until one is issued merge gate: PASS — every machine composes with the change as it did without (4 of 4 compose) judged by controller development build against the facts of 2026-10-12T11:32:09Z machines: - a machine (f35): composes - holds mesh-dns-resolver (idt): composes - holds git, holds mesh-artifact-store, holds mesh-broker, holds mesh-catalog, holds mesh-delivery, holds mesh-dns-resolver, holds mesh-store, holds mesh-vault, holds npm-package-registry, the control node, the hub (ygcyr): composes - a machine (yvbpsm): composes a merge would rebuild 1 module(s) in 1 tier(s): messenger notes: - modules/messenger/README.md and modules/messenger/cmd/messenger/walks_test.go read by no module's build, and rebuild nothing (issue 280) --- its merge-check.sh (go toolchain) ok git.novox.be/novox/mesh-catalog/checks/words 0.005s words: 12 retired words and 70 daemons' lines, none in the 43139 strings of 690 files ok git.novox.be/novox/mesh-catalog/checks/agenthome 0.013s agent-home: no archive and no file written into under the agent's home ok git.novox.be/novox/mesh-catalog/checks/paths 0.007s paths: no module names another's state on its machine (3 known, listed to go) long-running resources without health: 69, as kept ok git.novox.be/novox/mesh-catalog/checks/deps 0.224s testing modules/messenger ok messenger/cmd/messenger 2.235s --- its merge-check-typescript.sh (typescript toolchain) ```
mesh-admin left a comment
Author
Contributor

Verdict: approve at 424fc5a

A re-review against review 39, in a fresh clone. mesh/merge-gate passes (it builds messenger for novox, and 4 of 4 machines compose), and so does mesh/repo-check. go vet is clean, and go test -race -count=3 ./... in modules/messenger passes.

The blocking finding of review 39 is fixed

  • Each held record gets Owed when the walk's end or bound message is queued, on both the carried path and the alone path, and the record is persisted (walks.go:583-592, 653-655).
  • Owed is cleared only when a message saying the record is really sent: the walk's message (outbox.go:469) or the record's own (outbox.go:433).
  • Load turns an owed, still-open record back into an unsent one, not history (holder.go:413-417), so Tick says it after a restart, a warning included.
  • The updated test TestAHeldMessageIsToldOnlyOnceTheWalksMessageWasSent gains a restart warning subtest. I ran it on df94be0 with only the Owed field checks removed, and it fails there at walks_test.go:674 ("not said after the restart").

My reproduction from review 39, rerun: a held warning, the walk's message sent while both channels fail, a restart, then a reading of the open conditions at once and every 6 h for 48 h. The warning is now said exactly once, on the desk at 12:02:30. Its normal reminder follows 12 h later, in place of that message. An urgent one is said once on each channel at the restart, with no second copy from the reading: the reading skips it as told or queued. Its normal reminder follows 1 h later, in place.

No restart: nothing said twice

Warning and urgent, with both channels failing at the end and then recovering:

  • The walk's message goes once per channel it reaches, and the record is marked told there.
  • Only the usual reminder follows. queued counts carried keys, so neither the minute retry nor a reading says the record on its own while the walk's message waits.

A record that clears while it is owed

  • No restart: the waiting walk message says it open, and its clearing is then said (ClearUnsaid, outbox.go:470-473). The ADR's "cleared during the walk: only counted" is about what clears before the walk's end, and release still counts those. This one cleared after the end, while its message waited. Saying it open and then resolved is consistent with that, and nothing is lost.
  • Restart: Load skips an owed record that has cleared, so nothing is said. The operator was never told it was open, so there is nothing to unsay, which is the router's existing rule for a condition that clears before it is said.

Minor (not blocking)

  • cleared() leaves Owed set on the cleared record. I found no path where that stale value makes a message be said twice: a reopen's own send clears it, and Load ignores it while the record stays cleared. Clearing it in cleared() would keep the state honest.
  • The history line of a carried record now names its own item's walk (outbox.go:449-475), which settles my earlier minor point.

Not merged by me.

Verdict: approve at 424fc5a A re-review against review 39, in a fresh clone. mesh/merge-gate passes (it builds messenger for novox, and 4 of 4 machines compose), and so does mesh/repo-check. `go vet` is clean, and `go test -race -count=3 ./...` in modules/messenger passes. ## The blocking finding of review 39 is fixed - Each held record gets `Owed` when the walk's end or bound message is queued, on both the carried path and the `alone` path, and the record is persisted (walks.go:583-592, 653-655). - `Owed` is cleared only when a message saying the record is really sent: the walk's message (outbox.go:469) or the record's own (outbox.go:433). - `Load` turns an owed, still-open record back into an unsent one, not history (holder.go:413-417), so `Tick` says it after a restart, a warning included. - The updated test `TestAHeldMessageIsToldOnlyOnceTheWalksMessageWasSent` gains a `restart warning` subtest. I ran it on df94be0 with only the `Owed` field checks removed, and it fails there at walks_test.go:674 ("not said after the restart"). **My reproduction from review 39, rerun:** a held warning, the walk's message sent while both channels fail, a restart, then a reading of the open conditions at once and every 6 h for 48 h. The warning is now **said exactly once**, on the desk at 12:02:30. Its normal reminder follows 12 h later, in place of that message. An urgent one is said once on each channel at the restart, with no second copy from the reading: the reading skips it as told or queued. Its normal reminder follows 1 h later, in place. ## No restart: nothing said twice Warning and urgent, with both channels failing at the end and then recovering: - The walk's message goes once per channel it reaches, and the record is marked told there. - Only the usual reminder follows. `queued` counts carried keys, so neither the minute retry nor a reading says the record on its own while the walk's message waits. ## A record that clears while it is owed - **No restart:** the waiting walk message says it open, and its clearing is then said (`ClearUnsaid`, outbox.go:470-473). The ADR's "cleared during the walk: only counted" is about what clears before the walk's end, and `release` still counts those. This one cleared after the end, while its message waited. Saying it open and then resolved is consistent with that, and nothing is lost. - **Restart:** `Load` skips an owed record that has cleared, so nothing is said. The operator was never told it was open, so there is nothing to unsay, which is the router's existing rule for a condition that clears before it is said. ## Minor (not blocking) - `cleared()` leaves `Owed` set on the cleared record. I found no path where that stale value makes a message be said twice: a reopen's own send clears it, and `Load` ignores it while the record stays cleared. Clearing it in `cleared()` would keep the state honest. - The history line of a carried record now names its own item's walk (outbox.go:449-475), which settles my earlier minor point. Not merged by me.
mesh-admin merged commit 3fe19c9c0e into main 2026-10-12 11:41:48 +00:00
mesh-admin deleted branch fix/538-walk-hold-told-handover-clock 2026-10-12 11:41:49 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-catalog#238