Drop the node's own copy of a resource a module composition declares, and give the kept declaration's filled paths to their modules (issue 1945) #140

Merged
mesh-tools merged 2 commits from fix/r6-own-composition-dupes into main 2026-10-25 13:51:00 +00:00
Member

Since 12:43 on 2026-10-25 every machine refuses filled files with "2 resources declare X, and a filled file is written for exactly one, so nothing was written": on shanks at 14:33 that is ~/.ssh/config, ~/.config/git/config, ~/.xinitrc, the restic configs and secrets, the build agents' broker and registry files, and more. The controller put modules into the node's own composition while their own src2 composition also ran (fixed in mesh-controller #461); declarationOf joined both.

What changes:

  1. declarationOf drops the node's own copy of a resource that a running module composition also declares, matched on kind and id only (never on target alone: a dropped record would become an orphan and its unit removed); the dropped set is said once.
  2. The kept declaration's filled paths go to their modules (Env.KeptFilled, splitKept), so a module still running from it keeps its files filled ('not named as filled' for claude-code, screen-lock).

Independent of #461: either merged alone stops the refusals' cause on its side.

Tests (each seen failing first): TestTheNodesOwnCopyOfAModulesResourceIsLeftOut (1945/AC17), TestTheKeptDeclarationsFilledPathsGoToTheirModules and TestAModuleRunningFromTheKeptDeclarationKeepsItsFilledPaths (1945/AC18), TestASharedTargetWithAnotherIDIsNotDropped.

Tries: try-1792934953926609709 passed on 1bdbf47f (291 unit, 294 integration).
Reviewed-by: reviewer-r6m@shanks at 1bdbf47ffa
Pushed-by: lead-47@shanks

Since 12:43 on 2026-10-25 every machine refuses filled files with "2 resources declare X, and a filled file is written for exactly one, so nothing was written": on shanks at 14:33 that is ~/.ssh/config, ~/.config/git/config, ~/.xinitrc, the restic configs and secrets, the build agents' broker and registry files, and more. The controller put modules into the node's own composition while their own src2 composition also ran (fixed in mesh-controller #461); declarationOf joined both. What changes: 1. declarationOf drops the node's own copy of a resource that a running module composition also declares, matched on kind and id only (never on target alone: a dropped record would become an orphan and its unit removed); the dropped set is said once. 2. The kept declaration's filled paths go to their modules (Env.KeptFilled, splitKept), so a module still running from it keeps its files filled ('not named as filled' for claude-code, screen-lock). Independent of #461: either merged alone stops the refusals' cause on its side. Tests (each seen failing first): TestTheNodesOwnCopyOfAModulesResourceIsLeftOut (1945/AC17), TestTheKeptDeclarationsFilledPathsGoToTheirModules and TestAModuleRunningFromTheKeptDeclarationKeepsItsFilledPaths (1945/AC18), TestASharedTargetWithAnotherIDIsNotDropped. Tries: try-1792934953926609709 passed on 1bdbf47f (291 unit, 294 integration). Reviewed-by: reviewer-r6m@shanks at 1bdbf47ffa83f96fe65b5c5dc217d95e3a28e520 Pushed-by: lead-47@shanks
mesh-tools added 2 commits 2026-10-25 13:37:56 +00:00
The node's own composition and a module's both declared the same files, and
the joined declaration was refused whole ("2 resources declare X"): the
node's own copy is now left out when joining and at the node's own apply, and
said once (1945/AC17). A module still running from the kept declaration now
carries its filled paths, so the filling no longer refuses them as not named
as filled (1945/AC18).
Leave out the node's own copy only by kind and id, never by a shared target (issue 1945, review)
mesh/delivery merged: source.main moved to novox/mesh-host@0dfbe1a179f2
mesh/check pass 1bdbf47ffa83 on 0dfbe1a179f2 | unit 302 run, 1044 kept, 5 skipped | integration 305 run, 1046 kept, 4 skipped | over bound: unit (slow…
1bdbf47ffa
A unit or container of the node's own that shares only its name with a
module's resource is not the module's: dropped, its record became an orphan
the apply removes, stopping the module's unit (1945/AC17).
Author
Member

Delivery novox/mesh-host@1bdbf47ffa83 — merged since 2026-10-25T13:51:01Z

Source — source.main moved to novox/mesh-host@0dfbe1a179. Whether it reached the machines is mesh-delivery-view's, derived from source.main, the wants and the haves.

Transitions

  • 2026-10-25 13:37 (new) → proposed (announced): novox/mesh-host#140's head announced
  • 2026-10-25 13:41 proposed → ready (accepted): a verdict names this commit and the trunk's head as its trunk commit, the gate passed or warned, and the repository's own check did not fail
  • 2026-10-25 13:51 ready → merged (merged): on the trunk its modules follow: merged there

The commit's note under refs/notes/mesh-plan keeps every transition of this change up to its merge: git log --notes=mesh-plan.

<!-- mesh-delivery:view --> **Delivery** `novox/mesh-host@1bdbf47ffa83` — **merged** since 2026-10-25T13:51:01Z **Source** — source.main moved to novox/mesh-host@0dfbe1a179f2. Whether it reached the machines is `mesh-delivery-view`'s, derived from `source.main`, the wants and the haves. **Transitions** - 2026-10-25 13:37 (new) → proposed (announced): novox/mesh-host#140's head announced - 2026-10-25 13:41 proposed → ready (accepted): a verdict names this commit and the trunk's head as its trunk commit, the gate passed or warned, and the repository's own check did not fail - 2026-10-25 13:51 ready → merged (merged): on the trunk its modules follow: merged there The commit's note under `refs/notes/mesh-plan` keeps every transition of this change up to its merge: `git log --notes=mesh-plan`.
mesh-tools merged commit 0dfbe1a179 into main 2026-10-25 13:51:00 +00:00
mesh-tools deleted branch fix/r6-own-composition-dupes 2026-10-25 13:51:01 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-host#140