Files
mesh-catalog/modules/mesh-healers
jschoubben b5475cfa5c
mesh/delivery merged: source.main moved to novox/mesh-catalog@5d9cead336ab
mesh/delivery-group group fix/held-module-and-assigner-contract merged: every member is merged
mesh/check checking b5475cfa5c3d on 395a37dddab9 | novox/mesh-catalog#571 in group fix/held-module-and-assigner-contract
Subscribe as soon as the runtime serves, never after a guessed wait, so no event sent at a start is missed (issue 774)
mesh-healers slept 2 s before its first subscribe to the keeper's conditions; its whole test delivered
condition-raised once the lease was read, often before that, and the event was dropped: "never: the would-act
written" in about two runs of three on main, failing the group check. Eight modules had the same shape.

Quick fix: sleep after a failed subscribe in mesh-healers alone.
Thorough fix (chosen, the kind is in eight modules): every loop that asks the runtime for events or a watch
waits for stdio.Served() and subscribes at once, sleeping only after a refusal (mesh-healers, mesh-config,
mesh-mail, mesh-issues, mesh-provisioner, mesh-watcher, mesh-delivery-gate); mesh-knowledge, whose pinned
mesh-sdk has no Served, subscribes first and sleeps after a refusal. The healers' whole test delivers the
event only once the bundle has subscribed it, as the runtime's consumer holds it until then.
2026-10-30 21:57:31 +01:00
..

mesh-healers

Holds the seat mesh-healers (novox/hq ADR 0564 §7, §8): the mesh's healers, moved out of the controller. Go, one binary (cmd/mesh-healers), served by a runtime of its own on its own bus account (runs-as).

What it does

It hears the condition keeper's condition-raised and condition-changed (seat mesh-conditions) on a durable consumer. A condition whose kind a healer answers is acted on within the healer's budget, its settle and the mesh-wide brake (twelve acts an hour). A repair is a call of the seat or tool that owns the act: H3 asks the grants part's grants_assert for the module whose consumer is gone. H4 (the controller's own consumer) and H5 (the provider's own repair) are registered and run elsewhere.

Each act is begun by a create of its key in attempts before it is made and finished after, so a holder that dies mid-act has spent it and a second instance cannot begin it again. The condition keeper writes the condition's tried, resolver and escalation from attempts; a healer writes no condition.

Only once the controller's lease names no controller. Until the write that hands the lease away, each act it would take is written to would, never to attempts: it counts for no budget, settle or brake and reaches no condition.

Each key of attempts and would lives a week from its last write, its own time to live (the buckets are declared key-ttl): nothing else deletes would, and once the lease is handed away nothing is written there. The healers' waits are keys of wakes whose time to live is the wait: settle.<condition key> ends with a settle and judges the condition again, fortnight ends when S15's oldest counted act leaves the fortnight and counts again. The watch of wakes hears each expiry; no timer runs in the process. A wait still running is on the bus across a restart; one that expired while no instance watched is judged at the start, once the lease is first read.

S15: it hears the seat mesh-hand-acts' act-recorded and watches the controller's hand-act log and writes healer-wanted for a cause repaired by hand twice within a fortnight; a drill and a person's decision by design never count.

What it keeps

  • mesh-healers_attempts: every act and escalation, each key kept a week.
  • mesh-healers_would: the newest act it would take per healer and condition while the controller holds the lease, each key kept a week.
  • mesh-healers_findings: the brake, its own blindness, and S15.
  • mesh-healers_wakes: the waits, each key living as long as it waits.

Its verbs and tools

  • mesh-healers.healers: the registry, the acts of the last days, the would-acts, the brake, whether it acts and why; recount=true counts the hand-act log again.
  • mesh-healers.heal: one act now on an open condition, by key and why.
  • mesh-healers.drill: records a drill in the hand-act log of the seat mesh-hand-acts as hand-act drill (the controller's drill while that seat has no holder and the controller holds its lease). S15 never counts a drill.
  • healers_findings, healers_would, healers_wakes: the reads of its buckets.