The grants part no longer composes the tool runner's `_tools` twin: at a child's
first subscribe the runner creates or updates `<node>_<module>_tools` on EVENTS and
on every heard stream from the spec the membership's entry carries (filters, ack
wait, max deliver, max ack pending, deliver policy), and binds by name an entry an
older grants part wrote without one. When the grants part withdraws the module's
membership on this node, the runner removes the twins from the streams the last
entry named and makes none again until a membership is issued; it removes nothing
at its start. The heard entry is mesh-sdk's type, so the hearing keys its loops by
stream and consumer.
Builds: design 47 H2 H-A-472 (fifth, sixth, seventh, eighth and ninth addenda)
A hearing's loops, SeatTake's heartbeat and followGrants' retry loop outlive the
call that started them and read the package's settings on every turn; a test
that sets a setting back as it ends then raced the loop (the race detector:
streams_test.go:232's cleanup write of RebindEvery against the rebind loop's
read, in TestAConsumerNamedBeforeItExistsIsBoundOnceItDoes at -count=30). Each
loop now takes RebindEvery, NakDelay, EventHeartbeat, WorkHeartbeat,
GrantsRetry, GrantsRetryMost, GrantsPatience and StateTimeout once, as consumes
already took IdleHeartbeat and its tick hook.
Builds: design 47 H H-A-363 (fix-a-bug-met-twice: a goroutine outliving its settings)
Review round 1 (P7): the runner's bind copied the SDK's claim wrapper and its
caller lookup. It now calls process.ConsumeOnce, which claims, pulls and
releases (at a stop, or once a drain or the bus ended the loop, before its
Closed is closed), naming the claim for the module whose hearing it is.
Builds: design 47 H H-A-197, H-A-196
A tool runner built before H-A-132/133 ran two pull loops on the indexer
bundle's one durable, each event reached one loop only, and nothing said so;
the SDK's guard (H-A-196) could not see it, since the runner bound through the
bus client directly. hearing.bind now claims each durable with
process.PullOnce, naming the runner's hearing and the part that asked it, and
releases the claim as the loop is stopped or drained, or as the bus ends it,
so a re-serve (which stops its old loop first) binds again without a refusal.
The heartbeat test's second consume pulled the same durable: it gets its own.
Builds: design 47 H H-A-197, H-A-196
mesh/check pass 33317194073a on bb6a0e3192db | unit 115 run, 11 kept, 11 skipped | integration 117 run, 11 kept, 10 skipped | over bound: unit (slowes…
nats.go ends a pull loop on a deleted consumer only when a pull is pending at that moment; otherwise the loop waits out its heartbeat. The rebind tick now looks each bound consumer up by name and compares its creation time.
An event a module's consumer heard after the module was dropped for a
reload read a deleted entry and panicked node-tools, taking every tool on
the machine down. The handler now refuses an event of a consumer that is no
longer the module's, and a stopped hearing hands nothing on and offers the
event again at once.
A bundle that writes beside itself (a cache, a socket) loaded itself again
after every quiet spell, because the signature took in every file in its
directory. A delivery puts every file in place anew, so the entrypoint alone
tells a new build. The watch also looks once as it begins, so a bundle that
came between its load and the watch is not missed.
Tests: 1945/AC23 and AC24 in internal/runtime/reload_test.go, and a stopped
hearing in internal/bus/hearing_stopped_test.go.
mesh/delivery covered after its failure: a later walk that contains it was delivered: plan-1792008849869252364 (novox/mesh-tools at 5d70eb3e into main, d…