Design 47 H1: a process pulls a durable consumer once; ConsumeOnce claims, pulls and releases (H-A-196) #204

Merged
mesh-tools merged 2 commits from fix/47-H1-durable-pulled-once into main 2026-11-20 23:53:10 +00:00
2 Commits
Author SHA1 Message Date
jschoubben becaf8096a H-A-196: one SDK function claims, pulls and wraps a durable's loop
The tool runner would otherwise copy the claim's wrapper (review round 1, P7):
ConsumeOnce claims the durable, pulls it and answers the loop, and HearEvents
uses it; Conn.Consume claims through the same guard. A drain keeps its claim
until the loop ended, and the loop's Closed is closed only once the claim is
released, so a bind during a drain is refused and one after it is never.

Builds: design 47 H H-A-196, H-A-197
2026-11-20 22:18:43 +01:00
jschoubben c1c369f50c H-A-196: a process pulls a durable consumer once
A second pull loop on a durable the same process already pulls takes every other
event from the first, and nothing said so: the tool runner's two loops on the
indexer bundle's durable left the catalog seat's revision verb stale twice today.
The SDK now refuses it at bind time, naming the durable and both binders:
PullOnce claims a durable (by stream, name and the time the bus made it), and
HearEvents and Conn.Consume claim through it, releasing on stop, drain or the
bus ending the loop.

Builds: design 47 H H-A-196
2026-11-20 22:05:14 +01:00