Commit Graph
99 Commits
Author SHA1 Message Date
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 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 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 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 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 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 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 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
jschoubben fedf9d2e7b Pull small batches in the event hub and keep slow handlers alive (H-A-281)
The hub pulled the bus client's default 500 messages per pull and handled
them one by one, so buffered messages outlived the 30 s ack wait and were
given again and handled twice (met live on the builder: 37 of 38
outstanding redelivered). HearEvents, the one pull of the hub and of
HearStream, now pulls at most twenty messages per pull and says in
progress for a message whose handler runs past a third of the consumer's
ack wait, read once from the bound consumer's information.

Builds: design 47 H H-A-281
2026-11-21 16:48:05 +01:00
jschoubben 3bc7da52e4 Design 47 H1, proof 2: mark the SDK side of the two-module change
The process package's doc names the proof, so the SDK publishes a new version that node-tools, its importer, is built against in the same merge call.

Builds: design 47 H §5 step 7, G §370
2026-11-21 01:46:34 +01:00
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
jschoubben e568e6dc63 views: count the events no handler takes as the module's finding
An event a module consumes that no handler takes was said in the journal
alone, so a part that never acted on it (the runner's placing at 17:34) was
seen only by reading the log. The event hub now tells a hook of each such
subject; the process reader, where it holds a findings writer, counts them
in one finding event-unhandled per module (the count since the start and
the last subject) and clears it at its start, since a new build may handle
the event. Without a findings writer the journal line stands alone.

Builds: design 47 H H-A-166, H-A-169
2026-11-20 17:45:27 +01:00
jschoubben f1b828c6e5 process: Account.NamedEventConsumer binds the durable <node>_<module>_<suffix> beside EventConsumer's
Builds: design 47 H §743, H-A-90
2026-11-20 03:31:31 +01:00
jschoubben bc6c7a7710 sdk-callers-refused: seatdef refuses callers and drops the checker's copies
A definition naming callers is refused (a field the format does not know); Callers, DefaultCallers, EffectiveCallers, CallerEntryProblem and the Caller constants go. The test seat list's seats lose their callers. The seat mesh-delivery-checker's bootstrap, test and captured copies go.

The copies of git, mesh-delivery and mesh-catalog (bootstrap, test, captured) have only their callers lines taken out by hand so this commit's tests are green: they are replaced by mesh-delivery's contracts files in sdk-seat-copies-h1's remainder.

Builds: design 47 H §752, §764 (The checker, Every seat contract), H-A-41, H-A-42, H-A-57
2026-11-20 02:34:34 +01:00
jschoubben 9b77f82c8b process: the integration test of the seat's callers follows A-434 (an unproven caller of a read definition is admitted)
Builds: design 47 G A-434
2026-11-16 09:40:47 +01:00
jschoubben 88c385a7d2 process: an unread seat definition holds a verb that may need approval for a caller that is no module's account
A-435: the mesh MCP server's account, a person and an unproven caller are held as before while the definition is unread;
a module's account runs it (A-433).

Builds: design 47 G A-433, A-435
2026-11-16 09:40:21 +01:00
jschoubben 58c396e3dc process: a seat verb answered by a process admits every caller
The operator, 2026-11-15 23:25 CET: every module, agent and operator may call anything. A marked verb still goes
through the holder's gate.
2026-11-15 23:27:12 +01:00
jschoubben 958b327432 EventHub.StartKept: a program binds its durable on each kept seat event's stream it handles (A-397: the tool runner reads its own twin) 2026-11-14 18:58:20 +01:00
jschoubben 9ec8a88cb0 A call nobody answered names the subjects it was asked on and how long it waited, so its caller's log says where it went unanswered (operator, 2026-11-14: add logging) 2026-11-14 16:17:14 +01:00
jschoubben 5fa64be894 Revert the revert of G's mesh-sdk merge (#191): G's sdk stands again over reader release 3
Main reverted G's half merge (#189, reverted by 8afc3eb in #191) and then took the reader release's S1-S5, which
copied G's code. G's form holds where they differ (process_bus.go, seats.go, state.go and their tests); the
release's kept names stay so main's callers keep building: SeatViewPrefix beside SeatReadPrefix, and QueueInvoke's
empty strings on not-ok (with its test TestQueueInvoke). The tree differs from G's head f30dee54 only by those and
the release's two tests (objects cap option, seat states and stream kinds).

Builds: design 47 G (the milestone's sdk part, as at f30dee54)

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-13 12:49:56 +01:00
jschoubben 8afc3ebdf3 Revert G's mesh-sdk merge (#189): G merged half, and today's validator refuses G's delivery parts
mesh/delivery merged: source.main moved to novox/mesh-sdk@27da949140c6
mesh/check being carried to 8afc3ebdf371 on 93e0a7b50d90 | from 27da949140c6
The group feat/47-G-join11 merged 3 of 17 members on 2026-11-13; G's mesh-sdk alone on main breaks 25 trunk
modules. The operator chose to put the order right: a reader release first, then G whole. This restores main
to 8fbba810 exactly.

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-13 11:12:48 +01:00
jschoubben b16298c757 Merge main into feat/47-G-join11: the reader's if-config and config forms, StreamPublish, BusSubject (issue 1979)
stream-publish, the capability of StreamPublish (A-44), is named in go/buscalls beside the other bus-state words, as G names every capability word in mesh-sdk.

Builds: design 47 G §622; design 42 zfs-owns-zfs A-41, A-42, A-44, S1, S2

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-13 09:10:44 +01:00
jschoubben f84fe54c6c mesh-sdk: Account.BusSubject names the subject of a template stream (A-41)
Builds: design 42 zfs-owns-zfs A-41
2026-11-13 01:29:59 +01:00
jschoubben 842a901229 A-291: a process receives a seat verb's chunked answer through one helper
Conn.CallChunks subscribes to the call's chunks before it asks the verb, hands the verb's answer to an accept hook, then
receives the chunks the answer counts, in order, acknowledging each, into a writer; CallFile answers the whole body as
the member file, the form a bundle's seat call answers. The checker, the indexer, the assigner and the recovery keeper
read a step's answer kept as an object through it.

Builds: design 47 G A-291, A-290, A-254

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-12 16:48:22 +01:00
jschoubben 22ded4011f Area 3 (join 11): the held finding writer says its events under its finding-events binding
A part handed the binding finding-events publishes on mesh.bus.<module>.finding-events.<event>.<node>, a part with none on
the old stream; the stdio writer reads the event of either form.

Builds: design 47 G A-274, A-13, A-30, §529

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-12 11:02:11 +01:00
jschoubben 78ed82c668 Merge branch 'feat/47-G-fix11-a3h' into feat/47-G-join11 2026-11-12 10:25:17 +01:00
jschoubben a6e764323b Merge branch 'feat/47-G-fix11-b2f' into feat/47-G-join11 2026-11-12 10:25:04 +01:00
jschoubben b325ba0120 Merge branch 'feat/47-G-fix11-b1g' into feat/47-G-join11 2026-11-12 10:24:52 +01:00
jschoubben 8cc9837f3a Merge branch 'feat/47-G-fix11-b1e' into feat/47-G-join11 2026-11-12 10:24:52 +01:00
jschoubben 1e1ca6b14f Merge branch 'feat/47-G-fix11-a7' into feat/47-G-join11 2026-11-12 10:24:52 +01:00
jschoubben 3327f8679d A3h item 2a: Conn.Accept sends a seat's holder an accepted kind
A process publishes on mesh.seat.<seat>.accept.<kind>.<caller>, its module the caller, as Emit publishes an event, so the
gate's channel over a connection can ask and cancel through the seat operator-channel.

Builds: design 47 G §677, §700; lead answers A-272, A-273

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-12 10:22:48 +01:00
jschoubben 7f100fc74a A3g item 2a: a definition with a marked verb is read with gated-ended, approvals and the verb by caller
seatdef.Resolve, which the seat generator and every reader of a definition go
through, makes each marked verb by-caller and adds the event gated-ended
(gated-ended.<caller>.<call>, kept last per subject one day) and the verb
approvals (class read); the seat files stay as written. approvals is the
gate's verb, so CanHold asks no holder to name it.

Builds: design 47 G §677, §697; lead answers A-264, A-265, A-266

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-12 09:53:40 +01:00
jschoubben f8062e2680 A3g item 1: a process holder's gate-unanswered rests on a bound key, and its act names no node
A waiting call's ask's 60 minutes are a key with its own time to live in the
holder's state approvals, its end heard as the bus's marker, so no clock waits
in the process; a call whose key ended while the holder was away is judged at
its start. A process holder's act names no node, so two instances raise one ask.

Builds: design 47 G §677, lead answer A-255

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-12 09:42:24 +01:00
jschoubben 89359111a9 A3f item 2: one whole test of a process holder's marked verb on the bus
Against an embedded bus, a module's process calls a holder's marked verb through
process.Conn's call: asked, approved, run once, recorded through
mesh-hand-acts.warranted and its answer {answer, approval} heard on its own
gated-ended; a declined call runs nothing; a marked verb served through no gate,
or a gate whose state approvals is not on the bus, fails closed.

Builds: design 47 G §677, §700, lead answers A-158, A-224, A-244

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-12 09:31:08 +01:00
jschoubben d3980ded07 A3f item 1: a process holder's marked seat verb is held through go/approval
conn.AnswerSeat holds a verb its seat definition marks needs-approval through the
holder's gate (process.Conn.Gate, go/approval held.go): waiting calls call.<id>,
act.<escaped digest> by create or compare-and-set, claimed.<ask id> by create; a
call carrying the x-wait: held header answered {asked, call} in the reply's field
held; on the router's record read under the module's name, the oldest waiting call
run once within 30 minutes of the Approve and recorded through
mesh-hand-acts.warranted, the others asked anew; declined unasked for 10 minutes;
expired and refused ends; every end said on gated-ended.<caller>.<call>; the read
at start; gate-unanswered past the ask's 60 minutes; the verb approvals. A call
without the header takes ADR 0286 §37's path. process.Conn's seat call sends the
header on every seat call and, answered held, waits on its own gated-ended.

Builds: design 47 G §677, §700, lead answers A-158, A-186, A-209, A-219, A-224, A-228, A-244

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-12 09:28:06 +01:00
jschoubben 2134806396 A-233 (sdk): HearStream reads a stream kept by age whole from its first message with FromFirst
At every start an ordered consumer, made for the one read, hands every message from the first, then the
durable is followed, so a part that keeps what an age-kept seat event said (the assigner's version-released
and version-delivered) knows it again after a restart.

Builds: design 47 G A-233, A-189, A-181

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-12 06:19:55 +01:00
jschoubben 2d225ae6c1 Merge commit 'c4521a2b' into feat/47-G-fix11-b2f 2026-11-12 06:16:02 +01:00
jschoubben 0e1aa6dea3 Merge commit '7b9b7e6' into feat/47-G-fix11-b1e 2026-11-12 06:03:09 +01:00
jschoubben 7b9b7e65ec A-181 (sdk): a manifest stream says last-per-subject, and a part hears another module's stream so, read whole at its start
A stream entry takes `last-per-subject`, and process.Account.HearStream reads a module's own stream kept so whole through an ordered
consumer before following its durable, as HearSeatEvents does for a seat's event.

Builds: design 47 G §703, §556, A-181

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-12 05:53:02 +01:00
jschoubben ebd71c5f15 A-187: the consumer ledger keeps a message's first delivery time when it is delivered again
A message delivered again in the same run keeps its kept time; after a restart, which kept none, it takes the time
the bus stored it, never later than its first delivery, so a message that never settles grows old and the runner's
health check fires for it.

Builds: design 47 G A-187, §76

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-12 05:52:33 +01:00
jschoubben 3102fd5c1b A-165 callers: the seat server refuses a caller outside a verb's effective callers before its handler
conn.AnswerSeat takes the seat's definition from its caller (the seat list the process follows) and,
before a handler runs, refuses an unproven caller, and every caller while the definition is unread,
names no such verb or opens it to none; a proven caller is among them, since the grants part composes
the call subject only for the effective callers. Every caller of AnswerSeat passes the definition.

Builds: design 47 G §610; lead answers A-165, A-179, A-186

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-12 05:51:14 +01:00
jschoubben 631654eec6 A-176: a helper writes a durable consumer's facts into the module's state consumers
process.ConsumerLedger writes stream, name, acknowledged sequence, pending, last event applied with its at and the delivery of
the oldest unacknowledged message into one key per consumer, after each message delivered and applied, so a tool reads them.

Builds: design 47 G §579, A-166, A-176
Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-12 05:41:24 +01:00
jschoubben fa0a107cf5 A7 P-1: a process reaches kept data through its Binding (show at start, again on recreated and dropped, a wait naming the entry)
Builds: design 47 G §577
Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-12 04:56:21 +01:00
jschoubben ba6c2a5207 process: AnswerSeat answers a seat's verbs over the bus with the proved caller
A process answers its seat's verbs through one call: caller-named and
unproven subjects, one queue group per seat, reply {result, error, node}.
The rule that a process answers no call (issue 1171 AC3) is replaced by one
that AnswerSeat is the only way to serve. A compare-and-set write on a
process's own state already exists (State.Create, Update).

Builds: design 47 G A-107 (G-20-lead-answers)

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
2026-11-11 23:50:15 +01:00
jschoubben 63a290db3d G B-1 (Go): the tests G added are merged into existing ones as subtests, so mesh-sdk ends G with the tests it started with
unit 302 and integration 34, as at the merge base 45e143f; the buscalls test moves beside busstate's.

Builds: design 47 G §419, §626
Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
2026-11-11 22:03:15 +01:00
jschoubben 141b34d29d G §641: HearSeatEvents reads a stream kept last per subject whole at its start through an ordered consumer, then follows the durable, and says waiting then read
Builds: design 47 G §641, §556, A-19
Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
2026-11-11 21:52:41 +01:00