Commit Graph
1372 Commits
Author SHA1 Message Date
jschoubben fd7f049e2e selfcompose: one pass at a time; the hand passes of the 1966 step run on a copy
TestSelfcompose/TheNodeComposesItsWantsFromTheBus failed pipelines main.266,
main.459 and main.479: its issue 1966 step composed by hand beside the
composer's running loop, and a loop pass woken by an entry's answer composed
tool too and handed it on out, so a later quiet or wait saw n1.tool.

The kind is two passes over one composer's state at once. compose and
composeEarly now hold one lock (passMu) for the whole pass, so a pass asked
while another runs is made after it. The lock alone does not take the
order away (the loop's woken pass may still come before the test's), so the
step's passes run on a copy of what the composer holds (scratch), which runs
no loop; the take-back pass at its end is no longer needed and goes.

The test of an ask while a pass runs also makes a pass by hand there: it
does not begin until the running one ended (fails without the lock). Its
read of what runs no longer blocks once eight reads are unheard (a pass
reads it more than once, and the extra pass filled the channel).

Issue 721 note 11 (a blocking fault for its live proof).
2026-11-23 15:30:46 +01:00
mesh-tools 90f80565f4 Merge pull request 'The node-engine gives a directory's contents its new owner (design 47 H2, H-A-545, H-A-550, H-A-554, H-A-556)' (#256) from fix/gitea-runs-as into main 2026-11-23 11:31:54 +00:00
jschoubben 70d410934f The node-engine states it gives a directory's contents their new owner
readsNow states the reader capability directory-contents-owner, which mesh-sdk's
ManifestNeeds names for every manifest declaring runs-as, so the module graph
orders a move to an account of its own after this engine runs on its node.

Builds: design 47 H2 H-A-554 (1), H-A-556
2026-11-23 12:25:59 +01:00
jschoubben 684931e099 Give a directory's contents before the directory, matched by user
Review round 1: the contents are now given before the directory's own owner
changes, so a walk that fails leaves the directory as it was and the next apply
walks again; an entry gone meanwhile is nothing to give. An entry is matched by
its user alone: one of another user is left with everything below it, and one
given the new user gets the new group only where its group was the previous
group. A test now applies a directory whose owner changed, with stand-ins for
the chowns, and shows the contents given first and a placed child left.

Builds: design 47 H2 H-A-550, H-A-554 (2)
2026-11-23 12:25:59 +01:00
jschoubben d16c4cd003 A directory whose owner changes gives its contents the new owner
A module moved to an account of its own (runs-as) has files below its
directories that it wrote as the account it ran as before (gitea's webhook
secret, 0600, as the operator's account); the node-engine changed only the
directory's owner, so the new account could not read them. Now applyDirectory
and applyMeshDirectory give the new owner to what the previous owner held below
the directory, but never a path the declaration or another module's composition
places (and what lies below it), never an entry another account owns, never
through a link (Lchown) and never on another file system.

Builds: design 47 H2 H-A-545 (2), H-A-550
2026-11-23 12:07:40 +01:00
mesh-tools 1a19492541 Merge pull request 'selfcompose test: wait for the pass's say that names the vault, never a fixed sleep (issue 774; design 47 H2)' (#255) from fix/selfcompose-wants into main 2026-11-23 09:47:31 +00:00
jschoubben 2a6b92eeab selfcompose: only the say naming the vault read releases it
Review round 1 of the slow vault read's wait: a tick before the read began
says "waits on nothing it reads (composing)", which released the read at
once; the read then ended before the next tick and the row failed again on
a slow start. The read now waits for a line naming the vault's own
secrets, and the row asks that any line said names it.

Runs under issue 774 (a pass that runs on says what it waits on).
Builds: design 47 H2 (test only; no design line changes)
2026-11-23 10:46:02 +01:00
jschoubben 1d0f3b7709 selfcompose: the slow vault read lasts until the pass said it runs on
TheNodeComposesItsWantsFromTheBus failed in pipeline main.417 on a loaded
build node: its row "the vault did not answer in time" slept a fixed 30 ms
in the vault read and expected the pass's 5 ms ticker to have said it runs
on. When the process stalls, the read ends with the first tick, the pass
ends and cancels the ticker first, and the say is lost or lands after the
test read the shared lines. The merge of #253 and #254 did not cause it.

The read now waits for the pass's own say (bounded at 5 s), with no fixed
sleep, and the test reads only this pass's lines, which must name the
vault's own secrets as what it waits on.

Builds: design 47 H2 (test only; no design line changes, issue 774's say)
2026-11-23 10:40:39 +01:00
mesh-tools dfb8b4a549 Merge pull request 'The node-engine keeps an image's pinned reference; the blobs form is for files and bundles (design 47 H2, H-A-513)' (#254) from fix/image-reference-form into main 2026-11-23 08:47:54 +00:00
mesh-tools 20d11e03b9 Merge pull request 'The node-engine applies a want by the bus revision of its key; run is information (design 47 H2 §813 (1), H-A-504 third to fifth addendum)' (#253) from fix/want-order-by-revision into main 2026-11-23 01:46:04 +00:00
jschoubben 4adc35d5ce H2 H-A-504: every have read gives the run, pipeline and want revision
Review round 1: sessionHaves.Read gave no run, pipeline or want revision,
so on the live engine every have written over an apply (held, failed,
waiting, not composed) dropped the want revision, and the next want
counted as nothing applied. Read now maps the have value the same way as
ReadAt, through one function.

Builds: design 47 H2 §813 (1); H-A-504 fourth addendum
2026-11-23 02:13:04 +01:00
jschoubben 9c91854d3b The node-engine keeps an image's pinned reference; the blobs form is for files and bundles
The composer wrote every placed artifact as artifact-store://…/blobs/<digest>,
which the routing turns into a blob URL the declaration's own check refuses
("image … is not pinned"), so nats's composition was refused on the node. An
image now keeps the image seat's form, an upstream copy the reference the seat's
holder answers by name-of (kept by from; unanswered leaves the old form, said
once), and only bundles and archives take the blobs form.

Builds: design 47 H2 H-A-513, H-A-513 second addendum
2026-11-23 02:06:39 +01:00
jschoubben 84ff92a407 H2 H-A-504: the node-engine orders wants by the want key's bus revision
The engine refused a want whose run was not newer than the run it applied,
so wants written with a revision number as their run held every later
want back ("the want of mesh-delivery-indexer carries run 288, and the
engine applied it from run 323"). The bus orders the writes of one key:
the engine now keeps the want revision it applied in the have (beside the
run, the seat's form 5) and refuses only an older revision; the same
revision goes on to the checks that already stop a needless apply, so
Reconcile and a recomposition still apply. The run is information.

Builds: design 47 H2 §813 (1); H-A-504 third addendum, H-A-504 fourth addendum, H-A-504 fifth addendum
2026-11-23 02:02:23 +01:00
mesh-tools 266512663b Merge pull request 'The node-engine never overwrites a rank wait with the composer's mark; the composer's watch ends with its run (H-A-480)' (#252) from fix/rank-wait-kept into main 2026-11-22 15:22:36 +00:00
jschoubben 43839ae66a H-A-480 c: test the rank wait and the clear's guard; say a mark lost to every race
Review round 1: the line that never marks a module waiting for its rank and the
clear's "only while the have still says the mark" had no failing test; each now
has one. A mark whose every write lost its race is now said, not dropped silently
(P-failure-loud).

Builds: design 47 H2 H-A-480 (review round 1 finding)
2026-11-22 16:19:14 +01:00
jschoubben a22769bbc6 H-A-480 b: the composer's watch ends with the agent's stop
The composer's loop and its hearers outlived the node agent's run and logged after
it ended; the node agent now waits for them (Composer.Wait) once its run stops.

Builds: design 47 H2 H-A-480
2026-11-22 16:12:10 +01:00
jschoubben cb5eddeba8 H-A-480 a: the composer's mark is a compare-and-set on the have's revision
Under load, a rank wait settle wrote between the composer's read of a have and its
mark was overwritten by the mark and never written again. The mark and its clear
now write over the revision they read (a lost race reads again and keeps the other
cause), a module waiting for its rank is never marked, and a mark on a module that
never ran is cleared at the next pass that composes it.

Builds: design 47 H2 H-A-480 (and its addendum), H §771, H-A-59
2026-11-22 16:12:10 +01:00
mesh-tools e90872d852 Merge pull request 'The node-engine leaves a setting's word out when it rebuilds a running module's bundles (§781, H-A-477)' (#251) from fix/setting-words-not-own into main 2026-11-22 14:37:51 +00:00
jschoubben d5b2123180 Node-engine: a setting's word is never a running bundle's own (H-A-477)
Rebuilding a stubbed module's bundles from the tool runner's running
MESH_TOOL_ENV kept the setting words the engine itself composed before
(MESH_CONFIG_PUBLISH_TRIES "8" from the builder's old default), so §781's
check refused them against the setting's composed value ("5") and every
composition on shanks failed. Leave them out like the other mesh-said
words; they are composed again from the setting.

Builds: design 47 H2 §781, H-A-477
2026-11-22 15:33:38 +01:00
mesh-tools 058ff297ae Merge pull request 'Node-engine: the composer strips every manifest-only process key (H-A-469)' (#250) from fix/process-serves into main 2026-11-22 10:59:22 +00:00
jschoubben 23e6e9e262 Compose every catalogue manifest and read its declaration, so no manifest-only key leaks again
serves reached the wire because nothing composed the catalogue's own manifests and read
what came out with the node-engine's strict decoder. The test composes each manifest of
the catalogue placed beside the repository on one machine, with what it needs there, and
fails when a key the node-engine does not know reaches a declaration; every other
refusal is the catalogue's own fault and is logged. Against the catalogue's main it
fails at the parent commit for nats (keeper) and mesh-recovery.

Builds: design 47 H2 H-A-469, H-A-469 addendum
2026-11-22 11:49:49 +01:00
jschoubben 687509adf7 The composer strips every manifest-only process key, serves beside bus
The composer stripped a process's bus before the declaration but not its serves, so the
node-engine's strict declaration read refused every module whose process declares serves
(the builder, the bus module's keeper, mesh-recovery): "a process does not use serves, and
it is set". The keys are now one set, built from the SDK's constants, so a later
manifest-only key joins it in one place; the bus test gains a row for serves.

Builds: design 47 H2 H-A-469
2026-11-22 11:37:09 +01:00
mesh-tools 49d88332d3 Merge pull request 'Design 47 H2: the node-engine takes a compose ask once, answers composition-diff and drains its tool runner' (#248) from feat/47-H2 into main 2026-11-22 04:56:16 +00:00
jschoubben 635df49682 Merge main (the node-engine composes nothing of a package artifact, H-A-466) 2026-11-22 04:50:40 +01:00
mesh-tools 27fce4e6a9 Merge pull request 'Node-engine: compose nothing of a package artifact (H-A-466)' (#249) from fix/engine-package-artifacts into main 2026-11-22 03:40:17 +00:00
jschoubben cc79528acc Prove the take-in skips a done key's package (H-A-466, review finding)
The take-in's two package skips (the wait for a reference and Built)
were proved by no test: the test's take-in only got the build buildOf
makes, which carries no package. The builder's done key frombus hands
over does carry the package with no reference; the package row now
takes in such a key and checks Built gives no package. Without the
first skip the key is refused waiting for the package's reference;
without the second Built holds it.

Builds: design 47 H2 H-A-466
2026-11-22 04:38:46 +01:00
jschoubben 63133503a9 The node-engine composes nothing of a package artifact (H-A-466)
A package is a build input published to a registry, never placed on a
machine, and no registry seat the engine reads numbers it: asking its
digest failed the whole build, so a module declaring a package (the
indexer, the forge bridge) was wanted and held. The engine now leaves
package artifacts out of what it resolves (lookUp), holds
(partsMissing), builds (buildOf) and takes in (takein.Manifest,
takein.Built, and the manifest handed to Resolve), and so does the
candidate compose, which shares partsOf.

Builds: design 47 H2 H-A-466
2026-11-22 04:32:20 +01:00
jschoubben 876bf45223 H-A-458 (1): compare a want's run with the have's only within its branch
A pipeline's key is <branch>.<source>, so every pipeline of a branch has its
own key, and comparing the whole key found no applied run for a stale want of
an older pipeline of the same branch (main.175 after main.180): it was
applied. settleOne now compares the branches, each key without its last
part; a want of another branch still replaces whatever stands. Rows with real
keys: feat.10 applied, feat.9 refused and said, main.5 applied, the have
naming run 5 of main.5.

Review round 2, finding: the whole pipeline key compared instead of its branch.

Builds: design 47 H2 §813 (1); H-A-429 (1), H-A-458 (1)
2026-11-22 03:13:15 +01:00
jschoubben a9d41d44ec Merge main into feat/47-H2: the self-compose test fixes (#247) 2026-11-22 02:58:26 +01:00
jschoubben 3b1f5a07d2 H-A-458 (2): answer the composition's drift through the seat's contract
The verb composition's drift, the directory entries the mesh made whose
owner or mode on disk differ, was the engine's own DriftView, a field the
node-engine seat's definition did not have. The definition now carries
drift (id, path, drift) at form 4, and the engine answers it as the
generated CompositionAnswerDriftItem; DriftView goes. Row: the answer read
back through the contract's decoder names the drift.

Review round 1, finding: drift in the composition answer.

Builds: design 47 H2 §813; H-A-374, H-A-392 (b), H-A-458 (2)
2026-11-22 02:58:22 +01:00
jschoubben 213542192c H-A-458 (3): bind the taken write by the compose call's own context
The state taken's write was bound by a five-second bound of its own,
whatever the ask's deadline, so an ask whose caller had gone could still be
kept, and its repeat refused. takenWithin goes: Env.Taken carries the
compose call's context, Session.TakeOnce binds the state with it and keeps
nothing once it ended. Row: a take whose context ended is refused, and the
same id is then taken the first time.

Review round 1, finding: the taken bound.

Builds: design 47 H2 §775; H-A-364 (a), H-A-458 (3)
2026-11-22 02:57:45 +01:00
jschoubben 7d87dde0a4 H-A-458 (1): compare a want's run with the have's only within its pipeline
A want of another pipeline is a placement the assigner made on purpose, so a
lower run of it was refused against a run of another branch the engine had
applied. The have now keeps the pipeline of the want it was applied from
beside its run (the node-engine seat's form 4), settleOne compares the runs
only when the pipelines are equal, and a want of another pipeline replaces
whatever stands. Rows: a lower run of another pipeline is applied, a lower
run of the same is refused and said; the have names both.

Review round 1, finding: the applied run's branch.

Builds: design 47 H2 §813 (1); H-A-429 (1), H-A-458 (1)
2026-11-22 02:57:04 +01:00
jschoubben 86380b66c1 Write each node's declaration at the Version its engine reads
The composer is the node-engine's own build, so a newer composer could hand
an older engine a field its strict decode refuses. The engine's record now
states the declaration Version it reads, and the composer writes node X's
declaration at the lower of its own Version and X's (1 when X states none),
leaving out what that Version lacks: an engine reading 1 gets no
drain-bound and runs on its own default.

Builds: design 47 H2 §813 (12); H-A-416 (2), H-A-419; mesh-contracts feat/47-H2 e6ed560e (the record's declaration-reads)
2026-11-22 01:17:49 +01:00
jschoubben b305a5f08c Revert: the registry seats still hold versions; the engine asks it again
The resolved definitions of oci-artifact-registry and container-image-registry
on mesh-delivery feat/47-H2 (42788501) both still hold versions, from the
registry part they include; D4a (ac99946f) only gave list a module filter and
a cursor. The validator's refusal came from a request that did not resolve
the includes, so nothing the definitions hold is changed: this reverts
845de026.

Builds: design 47 H2 §813 (7); H-A-415 (2) and its addendum
2026-11-22 01:13:44 +01:00
jschoubben 9d0ca8e954 State the declaration Version the engine's composer writes
The composer is the node-engine's own build, its declarations written by
mesh-sdk's composition inside it, so the manifest states the Version it
writes beside the one it reads; the manifest test holds both to the
engine's declaration Version.

Builds: design 47 H2 §813 (12); H-A-416 (2)
2026-11-22 01:13:44 +01:00
jschoubben 845de02631 Read a module's version through the registry seats' list
H2's registry seat definitions fold the version read into list, filtered by
module, so the validator refused the engine's manifest for invoking
versions. The engine reads a version as a tag in list: oci-artifact-registry
by the module, every page while it says next, the blob a manifest keeps;
container-image-registry, whose list takes no module, by the repository's
name. The manifest invokes list, and the node grant the tests run under
follows it.

Builds: design 47 H2 §779, §813 (7); H-A-350 DMC-10, H-A-415 (2)
2026-11-22 01:12:33 +01:00
jschoubben 0aff33d617 Claim composition-diff among the node-engine seat's verbs
The group's node-engine seat defines composition-diff, and the engine has
answered it since E5, but its claim did not name it, so the manifest
validator refused the manifest: the seat's protocol promises a verb the
claim does not serve. The claim serves it, and the manifest test holds the
claim to every verb of the seat's contract.

Builds: design 47 H2 §813 (3); H-A-349 DQ-12b, H-A-355 (2), H-A-392; mesh-contracts feat/47-H2 3fbe3361 (the seat's composition-diff)
2026-11-22 00:36:33 +01:00
jschoubben 0c01c81c3f E8: run each file's unit tests as subtests of one test
The node-engine held 1,707 top-level unit tests against the budget of 500
a module. Each unit test file with two or more tests now runs them as
subtests of one test named for the file, each named as its function was,
in the same order: every check is kept, and the check counts 383. Files
with a TestMain, a re-run of a test by its name, or the integration tag
are left. Four files of this branch's earlier commits are formatted.

Builds: design 47 H2 §819; H-A-349 DQ-14
2026-11-22 00:30:05 +01:00
jschoubben a882051de6 M: the node-engine's manifest declares its class, core
The gate reads a mover's class from its manifest, and a module that
claims a seat carries a contract of the mesh: the node-engine claims the
seat node-engine, so it is core. An engine before it cannot state the word,
so this build's one hold for a yes at its delivery covers it too.

Builds: design 47 H2 §810, §814; H-A-394 (1)
2026-11-22 00:28:21 +01:00
jschoubben ba78025469 E7b: state the declaration Version the engine reads
A process's drain-bound raises the declaration's Version to 2, and an
engine before it decodes such a declaration strictly and refuses it, so the
composer that writes Version 2 must come after every engine that reads it.
The engine's manifest states the Version it reads, declaration-reads 2,
the edge the delivery plan derives; an engine before it cannot state the
word, so this build is held for a yes once at its delivery.

Builds: design 47 H2 §813 (12); H-A-358, H-A-384 (3), H-A-388 (2)
2026-11-22 00:27:55 +01:00
jschoubben 1c32872fcc H-A-374: set a drifted directory the mesh made right at the engine's start
ace's Node toolchain cache directory stood at 0700 against its entry's 0711
while the engine said its composition was unchanged: an unchanged
composition is never applied, and the judgement reads the compositions, not
the disk. Each module taken as running at the engine's start now has every
directory entry its record says the mesh made given its declared owner and
mode where they drifted on disk, one journal line each; one the mesh never
made stays used as found and is said (issue 339). The verb composition's
diff names a drifted directory the mesh made. The agent test that marks
modules not composed now waits for every want it marks.

Builds: design 47 H2 §813; H-A-374, H-A-392
2026-11-22 00:26:18 +01:00
jschoubben f4f5615bfb E4b: keep the run a module was applied from in its have
The engine kept the applied run in its memory only, so a restarted engine
applied an older run's want again. The have, the record of what the engine
applied, carries the run (the node-engine seat's form 2): the engine reads
it from the have before it applies a want that carries one, a write that
names none keeps the last have's, and every have is written at the seat's
form.

Builds: design 47 H2 §813 (1); H-A-355, H-A-384 (2), H-A-388 (1)
2026-11-22 00:19:47 +01:00
jschoubben fea6836f9e E6b: cut a derived rule's comment to nftables' 128 bytes with a count
nftables refuses a rule comment past 128 bytes, and with it the whole
table, so a port shared by enough modules took every opening down. The
comment is a label: past the bound its module list is cut with a count of
the rest; the whole list stands in the table's lines above the rule.

Builds: design 47 H2 §813 (4); H-A-357, H-A-384 (1)
2026-11-22 00:11:18 +01:00
jschoubben f5dcea2f10 E2: take a compose-candidate ask once by its id
The holder of mesh-wants asks each node-engine compose-candidate as a kept
call, so the same ask may come again on a transport fault. The engine reads
the ask id from the request header, keeps it in its own state taken for
compose-ask-bound (process.StateOver over the link it serves its seat on),
and a repeat while the ask's run goes joins that run and gets the answer
composed once; a repeat after the run ended is composed again, since the
verb is a read and no answer is kept. The manifest declares taken with its
8 MiB cap.

Builds: design 47 H2 §775, §820; H-A-351, H-A-364, H-A-383
2026-11-22 00:10:01 +01:00
jschoubben b33061088a E3: compose every setting as the word the one settings reader takes
A module's settings reached its own process only as files its manifest
named, and its tools bundles not at all. The node-engine now composes each
setting the module declares as MESH_CONFIG_<KEY>, its value as text, into
each of its processes' environments and its slice of the tool runner's
MESH_TOOL_ENV alike, and the tool runner's own into its process; the
runner's drain-bound is a Go duration like every time setting.

Builds: design 47 H2 §781; H-A-350 DMC-13, H-A-370, H-A-377
2026-11-22 00:09:04 +01:00
jschoubben 84fc34398a E4: apply a want again only from a newer run
One writer per composition key: the holder of mesh-wants writes run, the
composition run's pipeline sequence, on the want; the node-engine keeps
the run each module was applied from, applies again only a want whose run
is newer, and names the run in its journal.

Builds: design 47 H2 §813 (1); H-A-355
2026-11-21 23:22:30 +01:00
jschoubben 53d5c8b20f E1: read another part's values tolerantly
The generated decoders keep unknown fields and return the form read, so
a want the assigner writes with run, or any field added later, is applied
rather than refused: the node-engine that reads run runs before the
assigner writes it.

Builds: design 47 H2 §780; §813 (1) (the edge)
2026-11-21 23:18:48 +01:00
jschoubben 38447a66b8 E8: merge seven unit tests into the tests they extend
The node-engine holds 1,715 unit tests against a budget of 500; each of
these asserted one more case of a rendering another test already holds.

Builds: design 47 H2 §819
2026-11-21 23:16:38 +01:00
jschoubben 7adf9996c5 E7: stop the tool runner alone and wait its drain bound
The service manager's stop signalled the tool runner's whole group, so
its bundles died with their calls. The composer carries the runner's
drain-bound setting on its process; the unit stops the runner alone and
waits the bound and 15 s before it kills what is left, so the new runner
starts only after the old one exits or that bound passes.

Builds: design 47 H2 §813 (12); H-A-353; H-A-358
2026-11-21 23:13:34 +01:00
jschoubben 019ced4449 E5: answer the node-engine seat's composition-diff
The node-engine serves seat verbs and no tools bundle, so composed values
read by resource are a read verb beside composition: per resource, the
entries that differ between what runs and a revision or digest of its
composition key, environment entries by name, a secret's value masked.

Builds: design 47 H2 §813 (3); H-A-349 DQ-12b
2026-11-21 23:10:59 +01:00