Commit Graph
1394 Commits
Author SHA1 Message Date
jschoubben 50dffe299f H-A-771 unchanged-no-backup: back up a data module before its apply only when its move changed (issue 1984)
On ace at 03:40:55 the node-engine backed up lidarr (5.6 GB) for a move whose one difference was
env.MESH_FINGERPRINT, judged unchanged; the backup ran past its 10 minutes, lidarr was held, the operator
was asked, and the agent's loop stood still for 10 minutes. A move judged unchanged changes nothing of
the module, so it needs no backup.

- The apply backs a data module up only when the judge finds the move changed (any judgement but
  unchanged), or when the want carries the operator's answer again.
- The judgement compares the composition to what the machine applied (this engine's last apply, else
  the applied store's composition read at the start), never to a have, which in issue 1585's shape
  names a held composition not yet applied; with neither, the move is changed.
- A module held for a failed backup of a move judged unchanged has its hold ended at the engine's
  start, said in the journal, and is applied with no backup; the assigner takes its ask back as stale
  once the have runs.

Builds: design 47 H2 H-A-771, H-A-772 (1), (2)
2026-11-26 04:10:26 +01:00
mesh-tools b4a9052669 Merge pull request 'Design 47 H2's corrections: the owner pass with units stopped, MESH_FINGERPRINT for daemons (issue 1984)' (#259) from feat/47-H2-corrections into main 2026-11-25 20:11:47 +00:00
jschoubben 8e4ede6f96 H2 owner-pass-with-units-stopped: the pass-back row keeps a placed child, another user's entry and a file with two links
Builds: design 47 H2 H-A-602 (the pass back), AC-H2a, AC-H3
2026-11-25 18:57:09 +01:00
jschoubben 6d866665c2 H2 owner-pass-with-units-stopped: the owner pass at the engine's start starts again exactly what its stop found running
StopModule answers only what it found running (a container found stopped is not in it); StartModule starts that answer, services before timers, then containers.

Builds: design 47 H2 H-A-752 (amends H-A-735 (1)), H-A-641
2026-11-25 18:52:01 +01:00
jschoubben d4fb8ef371 H2 owner-pass-with-units-stopped: a row gives the directory back to the earlier account, the owner read stubbed
Builds: design 47 H2 H-A-602 (the pass back), AC-H2a, AC-H3
2026-11-25 18:50:26 +01:00
jschoubben 180d57fe16 H2, H8 (H-A-735): the owner pass at the engine's start stops and starts the module's units; composition-diff keeps the entry's name, the words go to the journal
Builds: design 47 H2 H-A-641, H-A-701, H-A-710 (4), H-A-735
2026-11-25 17:23:16 +01:00
jschoubben 39964d32d8 H7 the bus server's integration test reads the container's env as the engine does
Builds: design 47 H2 H-A-710 (2) (hq 27369077)
2026-11-25 17:18:12 +01:00
jschoubben 754f11a258 H8 fingerprint-readers: process-builds answers a container's build from its module's have, composition-diff names the value left from before H2
Builds: design 47 H2 H-A-710 (4) (hq 27369077)
2026-11-25 17:16:05 +01:00
jschoubben 915049a729 H7 fingerprint-no-change: a difference of MESH_FINGERPRINT alone in a container is no change, in the judgement and in the apply
Builds: design 47 H2 H-A-710 (2), (3) (the node-engine's side) (hq 27369077)
2026-11-25 17:14:32 +01:00
jschoubben 4e520bffe4 H6 fingerprint-for-daemons: only a daemon whose want names a fingerprint is handed MESH_FINGERPRINT
Builds: design 47 H2 H-A-710 (1) (hq 27369077)
2026-11-25 17:11:40 +01:00
jschoubben 894e2c89c2 H3 hard-links-left: an entry with more than one hard link keeps its owner in the owner pass, said in the journal
Builds: design 47 H2 H-A-579 (2), H-A-583 (4), H-A-604 (4)
2026-11-25 17:10:27 +01:00
jschoubben 9c40b4a3fb H2 owner-pass-with-units-stopped: the module's units and processes stop before the owner pass and start after it
Builds: design 47 H2 H-A-579 (1), H-A-602 (the pass back), H-A-641 (hq 6b8373ce), H-A-701 (hq 95cf2052)
2026-11-25 17:09:52 +01:00
jschoubben 204cd51e4b H1 the-word-from-the-contract: the engine states directory-contents-owner from the seat's contract
Builds: design 47 H2 H-A-622, H-A-640 (hq 6b8373ce)
2026-11-25 17:06:40 +01:00
jschoubben 3753d4d5dc H5 names-no-version: a want naming no version is held as naming no version
Builds: design 47 H2 H-A-673 (hq 6b8373ce)
2026-11-25 17:06:09 +01:00
jschoubben 174cb9dcd8 H4 operator-keys-row-goes: no test reads ManifestNeeds or MissingManifestReads
Builds: design 47 H2 H-A-639 (hq 6b8373ce)
2026-11-25 17:05:27 +01:00
mesh-tools 19db1971c7 Merge pull request 'node-engine: every process it runs gets MESH_NODE, a running one at its first pass after the update (issue 1984)' (#258) from fix/mesh-node-composition into main 2026-11-25 14:35:24 +00:00
jschoubben 3c2e60dc1f node-engine: at its first pass after an update, a process taken as running gets its unit written again with MESH_NODE (1984/AC16, AC17; H-A-711, H-A-713, H-A-714)
A module taken as running its want's composition at the start (the agent's TakenAtStart, now the named
takenAtStartIn the node agent hands it) has the unit of each process whose composed unit differs from its
applied record's written again, by one function (apply.ProcessWrote, which the apply builds its record with
too), and the record takes it, so a second pass finds nothing. Nothing is applied: no backup, no other
resource, the have unchanged. A held module, or one whose want names a new fingerprint, is never taken as
running and is not touched. A process whose record names another bundle, or none, is left as it is and said
(H-A-714); a failed units reload is said.

What restarts: services only. Run-once steps and scheduled processes' units are written, not run or started.
Brother's two processes (brother-device, brother-watch; neither run-once nor scheduled) are services: each
restarts once, if brother runs its want's composition.

Builds: design 47 G A-342, H-A-711, H-A-713, H-A-714
2026-11-25 15:34:13 +01:00
jschoubben c312e6a30e node-engine: the refused composition test asserts nothing was written (1984/AC15)
Builds: design 47 G A-342
2026-11-25 15:00:26 +01:00
jschoubben 32c57111d6 node-engine: a module's composition is applied for its node, so its processes get MESH_NODE (design 47 G A-342)
declarationOf never copied the composition's Node into the declaration's For, so no process
placed by a composition got MESH_NODE. Compositions of two nodes, or a composition naming no node,
are refused.

Builds: design 47 G A-342
2026-11-25 14:47:20 +01:00
mesh-tools d27af8347a Merge pull request 'selfcompose: one compose pass at a time, and tests that wait on sync points, not wall time (issue 721)' (#257) from fix/selfcompose-race into main 2026-11-23 15:12:53 +00:00
jschoubben e4926f706e selfcompose: the shadow part of the test waits on its bubble going idle, not wall time
Review round 1 of fd7f049e, the kind "a test waits a fixed quiet window"
(the 50 ms window of the hand pass was the first, note 14's shadow part the
second). The shadow part of TheNodeComposesItsWantsFromTheBus counted its
answers after fixed windows (150 ms drains, a 100 ms no-answer window, two
30 ms sleeps) and failed under load on trunk too (2 of 48 processes).

It now runs in a bubble of testing/synctest: each of those waits ends only
once every goroutine of the bubble is idle and the bubble's clock passed
it, so a slow build node cannot end it early. The pattern bus's watch ends
with its context, as the bus's own does, so the bubble's readers end with
it. What the steps after the shadow use (the record, the assignment, the
want) is made before the bubble; the shadow ends inside it.

Under load (48 processes x 5, GOMAXPROCS=2, race detector): 240 of 240
passed (trunk: 6 of 48 processes failed).

Issue 721 (note 15, acceptance criterion 721/AC2).
2026-11-23 16:00:59 +01:00
jschoubben 1d1ca05349 selfcompose: the hand pass is checked by the lock, not a quiet window; cite 721/AC2
Review round 1 of fd7f049e. The test of an ask while a pass runs waited a
fixed 50 ms for a pass made by hand not to begin. It now checks, while the
loop's pass is held, that the lock of a whole pass is taken (TryLock is
false), which needs no wall time and fails at once when compose takes no
lock; the pass made by hand must still end once the held pass did. Both
tests of the fix cite their criterion, 721/AC2.

Issue 721 (note 15, acceptance criterion 721/AC2).
2026-11-23 15:56:32 +01:00
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