Design 47 H2: the kept call paced, take once, page by cursor, settings, class and caps, check-needs #209

Merged
mesh-tools merged 35 commits from feat/47-H2 into main 2026-11-22 03:50:59 +00:00
35 Commits
Author SHA1 Message Date
jschoubben 087e41497e The tests' seat list takes again node-engine, whose have's pipeline description moved
seatlisttest takes again node-engine from mesh-contracts feat/47-H2 ba5a2538,
where only the have's pipeline description changed (a want's run is compared
with the have's run only when the want's branch is the same), no form change.
It is a bootstrapped seat, so the bootstrap copy and its captured contracts
copy are replaced too (ADR 0635 §3), and CAPTURED names the commit. Every
other seat and both parts still equal the group's heads (mesh-contracts
feat/47-H2 ba5a2538, mesh-delivery feat/47-H2 abfe37e6, mesh-networking
feat/47-H2 18e564c0).

Builds: design 47 H2, H-A-452, ADR 0635 §3
2026-11-22 03:15:14 +01:00
jschoubben 78fd003263 The tests' seat list takes again five definitions the group's heads moved, two of them bootstrapped
seatlisttest takes again mesh-builds (its verb publish-queue), mesh-delivery,
mesh-wants (keep-now), node-engine (form 4: the have's run keeps its pipeline,
the composition answer gains drift) and node-packet-filter from the group's
current heads (mesh-contracts feat/47-H2 8f2bed18, mesh-delivery feat/47-H2
abfe37e6, mesh-networking feat/47-H2 18e564c0), so a test judges a manifest
against the seats the running validator judges it against; every other seat
and both parts already equal those heads. The two bootstrapped seats among
them (mesh-delivery, node-engine) are replaced in the bootstrap and its
captured contracts copy too (ADR 0635 §3), and CAPTURED names the commits.

Builds: design 47 H2, H-A-452
2026-11-22 02:58:54 +01:00
jschoubben a323a3fd54 The tests' seat list holds the group's definitions: mesh-recovery and four more seats, eleven taken again
seatlisttest gains mesh-builds, mesh-delivery-view, mesh-grants,
mesh-pipeline-runner and mesh-recovery, which the live list (revision 473)
holds, and takes again the eleven definitions and two parts the group's heads
change (mesh-contracts feat/47-H2 e6ed560e, mesh-delivery feat/47-H2 80ff1afa,
mesh-catalog's form 5 from feat/47-H2-i 5e943280), so a test judges a manifest
against the seats the running validator judges it against. The three
bootstrapped seats among them (mesh-catalog, mesh-delivery, node-engine) are
replaced in the bootstrap and its captured contracts copy too (ADR 0635 §3,
ADR 0636 §7); the service manager's tests take its kernel-log verb, and the
grants module's name, now also a seat's, joins the kept names.

Builds: design 47 H2, H-A-452
2026-11-22 02:29:29 +01:00
jschoubben f90189353c Fold H2's new tests into existing ones: go/ at 327 unit tests (from 331), TypeScript at 48 (from 49)
The eight Go test functions H2 added become subtests of existing tests
(catalogue's state test, the bundle's state test, the views test, the process
state test, the testbus bus test, the seal byte-for-byte test), and four more
are folded beside them (two seal, two process watch); the two TypeScript seal
tests become one, and two more TypeScript tests are folded into their
neighbours. No assertion is lost.

Builds: design 47 H2 §819
2026-11-22 02:25:44 +01:00
jschoubben 7d7a89411c M1 check-needs: a manifest names at its top level the seats a package outside every artifact's from needs
A package no artifact's from holds (the forge module's seatgit whole test) has no artifact to carry its
check-needs, so the module says it once at its level, in the artifact's form (H-A-453 (2)).

Builds: design 47 H2 §800, H-A-453 (2)
2026-11-22 02:24:49 +01:00
jschoubben 4e338436da Kept-call pace read once and atomically: no data race with the kept calls reading it
ReadPace wrote the pace at every Connect and Serve while kept calls on other
goroutines read it. The pace is now held atomically and read once at the
start: a later read of the same pace changes nothing, one of another pace is
refused naming both. KeptPace becomes a function.

Builds: design 47 H2 §782, §775
2026-11-22 02:21:53 +01:00
jschoubben 03e2aca59f S4 page by cursor: a page hands a kept delete as an entry marked deleted with no value
A reader following pages removes the key, so a deleted key never comes back
alive from a bucket with history.

Builds: design 47 H2 §779, H-A-451 (1)
2026-11-22 02:19:27 +01:00
jschoubben ed281663fd S16 addendum: a waiting ask says when it waits again after a nak
Builds: design 47 H2 §777, H-A-410 and its addendum
2026-11-22 01:00:24 +01:00
jschoubben d6cdf3b8f5 S15 TypeScript seals: seal, open and sealAnonymous beside go/seal
The forge module's minting processes are TypeScript and the vault's two steps need ADR 0206's
sealed box and the NaCl anonymous box its intake opens; both now live once in mesh-sdk, proven
byte for byte against the Go package's bytes (tweetnacl 1.0.3 and blakejs 1.2.1 pinned).

Builds: design 47 H2 §808, §822, H-A-407 and its addendum
2026-11-22 00:59:54 +01:00
jschoubben 3ad8ccbc06 S16 QueueWaiting: a holder reads its own seat queue's waiting asks through the runtime
A holder's asks tool answers what waits on its seat's queue; the queue is its own store, so
the read is the owner's, one shared form asked of the tool runner as mesh/queue.waiting.

Builds: design 47 H2 §777, H-A-410
2026-11-22 00:56:35 +01:00
jschoubben 3f8f35a87a S14 kept chunked call: CallChunksKept and CallFileKept pace the ask and carry its id on every chunk
The assigner's compose-candidate ask is chunked, and the one-shot CallFile ended at the
first no responders; the kept call's form now makes the chunked call too.

Builds: design 47 H2 §775, H-A-405 (1), H-A-351
2026-11-22 00:55:25 +01:00
jschoubben c99295c21d The starved setup's line lives in the root package
stdio.SetupStarved holds "mesh: setup starved:" so the delivery SDK reads
it without importing testbus; testbus.SetupStarved names it.

Builds: design 47 H2 §800; H-A-368, H-A-399
2026-11-22 00:52:02 +01:00
jschoubben 5dd0d66acb S10 check-needs names the seats a package's tests need the node to hold
check-needs is a list of seat names (node-build-node), as the marker
file named them, not the value node-modules.

Builds: design 47 H2 §800; H-A-350 DMC-6, H-A-399 (3)
2026-11-22 00:44:18 +01:00
jschoubben e54151336e S13 bootstrap copy of git: take the git seat as D5 defines it
The bootstrapped definition, its test copy and the captured contract file
are replaced by mesh-delivery's seats/git/seat.json at D5 (tags name their
commits, a holder says away), byte for byte.

Builds: design 47 H2 §796, §776; H-A-350 DMC-3
2026-11-22 00:22:57 +01:00
jschoubben 98ed28c1d1 S12 class: a manifest says whether its module is core or a leaf
The gate reads a mover's class from its catalog entry; a module that
names none is a leaf.

Builds: design 47 H2 §810, §814; H-A-394 (1)
2026-11-22 00:21:38 +01:00
jschoubben 7e538e3eae S12 caps in the catalog: a manifest says each kept store that names no cap
The manifest validator refuses a delivery module's state, log or objects
entry with no cap; the catalog reads them from the old sections and the
requires entries alike, so the validator judges one list.

Builds: design 47 H2 §814, §812
2026-11-22 00:20:57 +01:00
jschoubben 134b111e3f Raise the declaration's Version to 2 for drain-bound; manifests state the Version read and written
Version is the declaration's form: drain-bound raises it by one, and a
node-engine refuses only a higher one, so it still takes what a composer
of version 1 writes. A manifest says declaration-reads (the node-engine's)
and declaration-writes (the composer's), so the delivery plan can order
the writer of a Version after every engine that reads it.

Builds: design 47 H2 §813 (12), H-A-388 (2), H-A-358
2026-11-22 00:19:52 +01:00
jschoubben 484e2bba3c S11 prune helper and tools: a kept store is pruned toward its cap at its own writes
A process judges a running sum of what its writes put against the figures
read at the bind and after each prune; a bundle judges the fill the
runtime's put answer carries. Past prune-mark (70 %) the oldest keys by
revision go down to prune-target (50 %), in one journal line; a key kept
under _keep/<key> stays, and no reader counts the keep. The generic tools
<module>_state_prune_now and <module>_state_keep act through the hand-act log.

Builds: design 47 H2 §812, H-A-380, H-A-386
2026-11-22 00:17:36 +01:00
jschoubben fe052c135e Read a state's max-mib in the manifest-reads baseline
Every running node-engine reads a state's max-mib (it writes every
module's bucket cap from it), so the baseline a node-engine that states
nothing is read as stating carries it.

Builds: design 47 H2 §812, §820; H-A-383
2026-11-22 00:06:15 +01:00
jschoubben 450ea7eddc S10 check-needs: a Go artifact declares what its tests need in its manifest
catalogue.Artifact gains check-needs (node-modules), the field that
replaces the marker file in a package's directory; its readers read it
from the manifest.

Builds: design 47 H2 §800; H-A-350 DMC-6
2026-11-22 00:04:53 +01:00
jschoubben eee02a20a9 S7 safe for concurrent use: hold the bus wrappers to it under the race detector
Many goroutines' gets, puts, pages, keys and watches through one bundle's
runtime channel, one process connection's state and one process reader's
pictures run under the race detector; no unguarded call was found, so the
tests hold the wrappers to it.

Builds: design 47 H2 §782; H-A-349 DQ-3
2026-11-22 00:03:19 +01:00
jschoubben e9481928f5 KeptPace from settings: a module's declared pace paces its kept calls
busretry.ReadPace sets the kept-call pace from kept-call-pace-first and
kept-call-pace-max through the one settings reader; process.Connect and a
bundle's Serve read it at their start and refuse a value that is no
duration.

Builds: design 47 H2 §775, §781; H-A-370
2026-11-21 23:59:04 +01:00
jschoubben 139626daab S9 setup bound: a starved setup on the bus says so in one line
A test's setup waits on the bus for half of its level's bound
(MESH_TEST_LEVEL_BOUND), 30 s when unset, and fails with the line
"mesh: setup starved:" a build module reads to run the level again.

Builds: design 47 H2 §800; H-A-368
2026-11-21 23:57:12 +01:00
jschoubben 92cb6a8d6d S4 page by cursor: a state page continues from an opaque cursor in sequence order
The runtime's mesh/state.page takes the cursor the page before answered as
next, so a state is read once however many pages it takes; a key written
again since an earlier page comes marked seen-again.

Builds: design 47 H2 §779
2026-11-21 23:56:07 +01:00
jschoubben 6d290eb46b S6 settings: read a setting by its key in a process and a bundle
The node-engine composes each config value as MESH_CONFIG_<KEY>, in a
process's environment and the module's tool-runner slice alike;
stdio.Setting and SettingDuration read it, the one reader both sides use.

Builds: design 47 H2 §781; H-A-350 DMC-13, H-A-370
2026-11-21 23:23:15 +01:00
jschoubben ab05031e9a Purge a deleted object's leftovers through the runtime's delete
The runtime's objects delete already purges an object's chunks, and purges
them again when asked again: Purge and purgeObject ask it, and no act of
their own is added.

Builds: design 47 H2 §812; H-A-366 (correction)
2026-11-21 23:22:38 +01:00
jschoubben 75287d8ce5 Let a bundle purge a deleted object's leftovers through the runtime
The runtime's objects act purge removes a deleted object's chunks:
busstate.Objects.Purge and TypeScript purgeObject, so the registry's
program opens no connection of its own for it.

Builds: design 47 H2 §812; H-A-366
2026-11-21 23:20:52 +01:00
jschoubben 0c27544582 Let a holder take asks once over a store bound on its own link
process.StateOver gives a State over a key-value store the caller bound
itself, so the node-engine, which serves its seat over its own link, keeps
the asks it took in its own taken state.

Builds: design 47 H2 §775; H-A-364
2026-11-21 23:19:11 +01:00
jschoubben 6852228000 Derive a seat's work queue and its worker from the seat definition
An accepted kind names its work queue's settings (max-age,
duplicates-window, ack-wait, in-progress, max-msgs, max-ack-pending,
max-deliveries); buscompose.SeatQueue derives the seat's work-queue stream
and its one shared worker from them, once, for the grants part to take.

Builds: design 47 H2 §777; H-A-350 DMC-1, H-A-362, H-A-340 (1)
2026-11-21 23:18:34 +01:00
jschoubben 1f2b1cd46b Carry a seat definition's form and a part's form
A definition and a part gain form, raised at every field their messages
add or remove; absent reads 1 and below 1 is refused, so the generator can
hold a changed definition to a raised form.

Builds: design 47 H2 §780; H-A-352 (1)
2026-11-21 23:14:28 +01:00
jschoubben 25b3030a93 S2 take once in a bundle too, Go and TypeScript
A bundle holder takes an ask once through the runtime's create with the
ask's bound as the key's time to live: stdio.KeptState.TakeOnce and
TypeScript takeOnce; stdio.TakenState and TakenKey are the one name, which
process refers to.

Builds: design 47 H2 §775, §820; H-A-359
2026-11-21 23:12:58 +01:00
jschoubben 423de0e8a2 S3 away: read a holder's answer of the kind away as a transport fault
A holder answers error-kind away, with part and words, when a part it
depends on is away; the kept call reads it from the answer and calls again
at the pace. Go: busretry.ErrorKindAway, AwayAnswer, AwayIn, Away;
TypeScript: ERROR_KIND_AWAY, awayAnswer, awayIn.

Builds: design 47 H2 §776, §775; H-A-349 DQ-15, H-A-350 DMC-2, H-A-354
2026-11-21 23:10:27 +01:00
jschoubben d40fa0b3a0 Carry a process's drain bound in the declaration
A process that stays up may name drain-bound (seconds): the node-engine
writes its unit's stop from it, so the tool runner finishes its calls in
flight before it exits. Absent is none; a step or a scheduled run is
refused one.

Builds: design 47 H2 §813 (12); H-A-358, H-A-353
2026-11-21 23:08:38 +01:00
jschoubben f5dc3b6bd1 S2 take once: keep the ids a holder took in its state taken
A holder of a kept call takes an ask once by its id: TakeOnce creates
<seat>.<ask> in the state taken with the ask's bound as its time to live,
and a second ask of the same id within it answers false.

Builds: design 47 H2 §775, §820; H-A-338 (6), H-A-339 (4)
2026-11-21 23:08:38 +01:00
jschoubben 14c2532b0c S1 kept call paced: carry the ask id, pace at the settings' defaults with jitter, stop at the caller's bound
The kept call is made again on a transport fault after kept-call-pace-first
(1 s) doubling to kept-call-pace-max (30 s), each wait within 20 %, until
the caller's bound; past it the answer names every call's time and words.
One journal line per seat at the first fault, then at most once a minute.
The ask id travels in the header x-ask; a holder reads it with
process.AskOf, a bundle with stdio.AskIDOf (TypeScript askIdOf) from the
call's _meta mesh/ask.

Builds: design 47 H2 §775; H-A-351
2026-11-21 23:06:24 +01:00