The lead's answer on issue 1754 (note of 2026-11-23 20:00, principles 11
and 7): no bound written into the code. meshtest.Bound(t) is t.Deadline()
less 30 s for the test's cleanup, go test's default of 10 min where a run
names no deadline, and what is left, at least 1 ms, once less than the
margin is (the lead's round-2 answer, note 11; principles 3 and 7). Until
stops at it; callWithin is gone, call() takes it. The guard now refuses
any constant bound of a second or more.
Each upper limit is half the bound it tells apart: the watch's refusal is
held to half the default StateTimeout the test replaced (a watch timer
fixed at 10 s failed it in 10.0 s, round 1 passed it); the console's close
to half its backstop ShutdownWithin (a Close that never cancels failed it
in 5.1 s, round 1 passed it); the console waits to half WaitDefault.
Builds: issue 1754 notes 10 (lead answer, 20:00) and 11 (round 2: margin, AC1, AC4); principles 3, 7 and 11
TestAStaleWriteIsRefusedAndWritesNothing gave the watch 5 s to hear a 1 s
key's expire and failed main.505's integration step on a loaded build node;
TestARunnerAtItsStopAnswersNoCallAndItsCallersMeetNoResponders failed its
rerun while it asked 1 s of two round trips and 5 s and 10 s of its waits.
The second of a kind after 3850eb8, so the kind is fixed: meshtest.Bound
(30 s, Until's bound, named once) is what every node-tools test that starts
a bus waits for what the bus carries; Until becomes a deadline of it, so a
try that waits does not multiply it; an upper bound on how long a call or a
wait took is half the bound it tells apart (bus.RequestTimeout, the call's
or the wait's own), at most meshtest.Bound. A wait that hears ends then: no
passing test is longer (per-test durations before and after, equal).
A guard (meshtest waits_test.go) reads every test file that imports
meshtest and refuses a wait whose constant bound is a second or more under
meshtest.Bound; it names 34 such waits at 309069de.
Builds: issue 1754 note 8 (the quick fix), note 9 (1754/AC1 to AC4); principle 11
A tool's or a proof's subscription made while the stop took its snapshot was registered
after it, so it stayed subscribed until the close and its callers waited out their bound
instead of meeting no responders (the review's probe: 4 of 2000 rounds). Now a new
answering subscription is kept, and the stop checked again, in one section under the lock
the stop takes its subscriptions down under; when the stop began meanwhile, it is drained
and the serve refused.
Tests: 721/AC4 rows in the bus (a tool's serve and a proof answerer each run the stop
between their subscription and its keeping, through a test hook, and are refused; their
callers meet no responders), failing without the locked check.
Builds: design 47 H2 H-A-570 (1)
The runner answered each call it did not take once its stop began with the typed fault
stopping (#90). Callers built before mesh-sdk read it as the callee's refusal and ended their
kept call, and no edge delivered the new answer after its readers. Now, once told to stop,
the runner first drains every subscription it answers calls on (a tool's, a seat verb's and
a seat proof's) and subscribes none again, then finishes the calls in flight within
drain-bound. A call made after the stop meets no responders at once, a transport fault every
caller of every mesh-sdk already waits out, until the new runner subscribes. A call that
still reached it is answered nothing, as H-A-369 has it. The typed answer goes whole: the
reply's error-kind, KindedError, ErrorKindStopping and the bundle's error data.
Tests: 721/AC4 in the bus (a call and a proof after the stop meet no responders within a
second, the call in flight is answered, a subject served after the stop is refused) and in
launch (a call that still reaches the runner gets no answer and no typed fault); the whole
test meets no responders while a call is still in flight, before the drain bound.
Builds: design 47 H2 H-A-570 (1), (3) (mesh-tools' part), amending §813 (12) as H-A-369 has it
A call the runner does not take once its stop began was answered nothing, so its
caller's wait ended in a bare "timeout" and a build step's publish failed (main.440).
It is now answered with error-kind stopping beside its words, on a tool's reply and
a seat proof's alike; the calling runner keeps that kind and hands it to its bundle
as the JSON-RPC error's data, so mesh-sdk's stdio tells it by its kind. A call cut
at the drain bound stays unanswered (H-A-369).
Builds: design 47 H2 H-A-542 (amends H-A-369)
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)
The drain's rows join the stopping runtime's table, the settings reader joins the start's cases, and
the pull through a bundle's channel joins the take through it: 162 test functions become 159, every
case kept (review round 1, finding 4).
Builds: design 47 H2 §819
The page watch ignored delete markers, so a reader following pages of a bucket with history kept
a deleted key's last value. A kept delete (a purge reads as one) is now an entry deleted: true with
no value at its sequence, seen-again like any message (review round 1, finding 1, state.go:375).
Builds: design 47 H2 §779, H-A-451 (1), H-A-382 (2)
SeatAnswer answered the drain's unanswered error as {"error": "answered nothing"}; it now sends no
reply, as answerCalledOn does, so the caller's kept call meets the next runner (review round 1,
finding 2, seat.go:222).
Builds: design 47 H2 §813 (12), H-A-369
mesh/queue.waiting reads from each worker's acknowledgement floor, so an ask a worker holds or
handed back is listed with again: true; the holder tells the two apart by its own state taken.
Builds: design 47 H2 §777, H-A-410 (second addendum)
mesh/queue.waiting {seat} answers {asks: [{id, module, age_seconds}], capped}: for each worker the
holder's membership lists on the seat's stream, every message after the worker's delivered
sequence, read by a direct get by subject, never consumed; at most 768 KB; refused for a seat the
module holds no queue of (ADR 0596: a holder reads its own store).
Builds: design 47 H2 §777, H-A-410
drain-bound, kept-call-pace-first and kept-call-pace-max are placed in no file: the process reads
them from MESH_CONFIG_<KEY>, so each is marked "runtime": true, which the manifest validator asks.
Builds: design 47 H2 §775, §813 (12), H-A-370
The bus package waited within Until's fixed 5 s eighteen more times, the kind
the per-node test's fix names; raised in its one place, Until in meshtest,
which runtime, console, firstview and provide wait with too. The bound only
ends a wait that never hears what it waits for.
Builds: design 47 H H-A-363 (fix-a-bug-met-twice: a fixed bound a loaded machine overruns)
mesh/state.put answers {"revision", "fill": {"count", "bytes", "max_bytes"}}, buscalls.Fill's
form, read from the bound stream's info once per put, since the key-value put answers no figures;
a bundle's prune reads it from the put.
Builds: design 47 H2 DMC-14, H-A-350, H-A-386
mesh/state.page reads a state from an ordered watch starting after the cursor's sequence, never a
replay of the bucket per page: each kept message once across the pages of a read, a key's older
kept revisions included, at most 768 KB a page, next the opaque cursor, empty at the end. A value
written after the read reached its bucket comes marked seen-again (the cursor carries that mark;
the runner keeps nothing per read); a deleted key gets no entry. A state kept one bucket per node is
read one node's bucket after another.
Builds: design 47 H2 §779, H-A-254, H-A-382
Under load TestAPerNodeStateIsServedAcrossEveryNodesBucket failed 2 of 30: a
bucket made during the watch is taken in on the bus's creation advisory, which a
loaded machine delivers after mt.Until's fixed five seconds. The test now waits
as the watch hands each change over, bounded only for a watch that never hears.
Builds: design 47 H H-A-363 (fix-a-bug-met-twice: a fixed bound a loaded machine overruns)
node-tools declares drain-bound (30s), kept-call-pace-first (1s) and kept-call-pace-max (30s) as
duration settings; the runner reads the pace through the SDK at its start, as it reads its drain
bound, and stops before it serves on a value that is no duration.
Builds: design 47 H2 §775, §813 (12), §781, H-A-370, H-A-377
The runner reads its setting drain-bound as the node-engine composes it (MESH_CONFIG_DRAIN_BOUND)
with the SDK's duration reader, and stops before it serves on a value that is no duration.
Builds: design 47 H2 §813 (12), §781, H-A-369, H-A-370, H-A-377
A refusal would end the caller's kept call; left unanswered, the kept call paces and meets the new
runner. The ask made once the drain began ends Unanswered, so the bus sends its caller nothing.
Builds: design 47 H2 §813 (12), H-A-369
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)
A worker bound for a pull was kept for the process, so a later connection's pull
used a worker bound on a closed connection and answered "connection closed"
(every run of TestAHolderPullsOneMessageWhenItHasRoom after the first). The
bound workers and the pulled messages are now the Conn's.
The two tests that failed main.165 and main.115 asserted on bus figures before
the bus had delivered them: the worker's pending count right after a publish, a
no-wait pull right after a publish, a callback counter read when a flush
returned, a 300 ms delay and a 2 s ack wait a loaded machine overruns. They now
count binds on a channel the watcher's reader fills, pull with a wait that ends
at the delivery, prove "nothing fetched ahead" by the second message's first
delivery, and use bounds a loaded machine stays within.
Builds: design 47 H H-A-363 (fix-a-bug-met-twice; whole-module tests under load, H-A-327)
A wait by seat and event name was refused for a seat the catalog half's own definitions do not
name (the runner's mesh-pipeline-runner.pipeline-ended, defined in the delivery repository's
contracts module), though the seat list declares the event under the seat's events family. Every
seat of the seat list is now an emitter by its declared events.
Builds: design 47 H2 §821, H-A-343
Every tool call and seat verb the tool runner serves hands the bundle the ask id the kept call set
in the header x-ask (stdio.AskHeader) under _meta mesh/ask (stdio.MetaAsk), beside mesh/call; a call
whose header carries none names none.
Builds: design 47 H2 §775, H-A-351
Once told to stop, the tool runner makes no new ask of a bundle (a call after the stop is refused),
waits for the asks in flight within the drain bound (30 s by default), cuts each still in flight at
the bound with a journal line naming the bundle, the verb and the call's age, leaves its caller
unanswered (a transport fault), and only then stops its bundles itself.
Builds: design 47 H2 §813 (12), H-A-342 (2), H-A-353
The runtime asked the bucket's stream info before every get, put, delete and
listing, so each state read was two answers on the bus (a third of the night's
flood came this way, ten thousand reads per sweep). A Conn is one account's
connection; it now keeps one binding per bucket, shared by concurrent askers,
and binds again once when the bus says the bucket is gone.
Builds: design 47 H H-A-251
The fill was a listing of every description in the store, deleted chunks'
leftovers included; a receiver reading it per chunk made one connection read
about 14 MB/s. The fill is now one stream info request: its bytes, its cap,
and its live subjects as the count.
Builds: design 47 H H-A-227
The bus package's doc names the proof, so node-tools rebuilds against the SDK version the same merge call publishes; go.mod keeps mesh-sdk at the zero version.
Builds: design 47 H §5 step 7, G §370
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
Review round 1. A ledger binding heard while a module was loaded again
made refreshRepairs serve the repairs on the reload's stand-in, whose
subscriptions nobody stopped: the repairs were served twice, and still
answered after the runtime stopped. The stand-in is now marked as
reloading and the refresh leaves it alone; the reload serves the module's
repairs as its binding is when the load ends. The reload test holds a
bundle's start, issues the binding inside the reload, and asks a repair
after the runtime stopped: without the change it still answered (6 of 6
runs, GOMAXPROCS=1 and 24).
No test failed without keep's stop waiting for the heartbeat's goroutine.
The heartbeat test now holds one Say and stops meanwhile: stop must not
return before that Say has; without the wait it failed 50 of 50 runs at
GOMAXPROCS=1 and at 24.
Builds: design 47 H §774, H-A-160; principle 11
When a module's ledger binding came or went, refreshRepairs stopped every
subscription of its tools and served them all again, so a call in that
gap was dropped the same way as on a membership (H-A-158). serve is now
the one routine that changes a module's subscriptions, by tool address:
it keeps those still named, subscribes the new, then stops those no
longer named; refreshRepairs and the first serve both go through it, so
no tool is served twice or not at all.
The ledger test's later binding now comes and goes ten times, and the
module's own tool must answer the first call after each, within the
tests' 2 s bound; it failed without the change at GOMAXPROCS=1 and 24.
Builds: design 47 H §774, H-A-158, H-A-160; principle 11
TestTheRuntimeSaysItIsThereEveryInterval slept 70 ms and wanted three
beats at 20 ms: a loaded machine that did not schedule the heartbeat in
time failed it (main.20's integration step on the build node); and its
stop returned before the heartbeat's goroutine ended, so a beat could be
said after it ("said after it was stopped"). The ticks are now the
caller's (keep, beside Keep's own ticker), the test drives them and waits
on each beat, and stop returns once nothing more is said. Pinned to one
processor at idle priority beside six busy loops, the old test failed 13
of 100 runs; the new passes 100 of 100.
TestTwoWritersIncrementingOneCounterOnTheBusLoseNoUpdate bounded a
writer's tries at 1000, a guess: on one processor the scheduler lets one
writer win every round and the other lost its 1000 tries every time. A
write is lost only to the other writer's write, so the bound is the
other's count plus one.
Builds: design 47 H §774; principle 11
On every membership of a module, HandleCalled stopped each subscription
of a tool and subscribed again on the same subjects; a call the bus
routed in that window was dropped by the client in silence, and its
caller waited the runner's whole bound (30 s). On the build node this
was the 30 s of TestAReplacedBundlesOldToolStaysGoneOnTheNextMembership
and of TestTheLedgerRepairsAreToolsOfEveryLedgerOwner, and most of the
integration level's 72 s. Now a membership keeps every subscription whose
subject and queue it still names, subscribes the new ones, and only then
stops those it no longer names (make before break).
The test asks the served tool once after each of five memberships, with
the tests' own call bound of 2 s (principle 11); it fails without the
change. The runtime tests' call helper and the ledger listing wait that
bound, not the runner's 30 s.
Builds: design 47 H §774, H-A-158; principle 11
Review round 1: no test failed when serve went back to firstview.Start.
startViews starts the follower and answers the options runtime.Run is
given; its test holds that on a module's own account the follower binds
nothing and the runtime is given the hearer, and on the machine's
account the follower binds its own.
Builds: design 47 H §752, H-A-113, H-A-132, H-A-133
Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy