Step back from a rendered resolver file only, and compare a declared path cleaned (issue 412, review 80)
mesh/merge-gate head 24347ea5a02b merged into trunk 84deb530ee5a — pass: builds build-agent, mesh-controller → ace, g14, novox, shanks; no bus step; every …
mesh/repo-check head 24347ea5a02b merged into trunk 84deb530ee5a — pass: its merge-check.sh passed
mesh/delivery delivered

A resource on the resolver file was left out by the check and still composed by the declaration, so an
uplink declaring it as a resource beside the resolver passed with two writers; it is refused again, as
before. And /etc//hosts or /etc/../etc/hosts is /etc/hosts to the machine, so it is compared cleaned.
A seat names no root or top-level directory.
This commit is contained in:
jochen
2026-10-12 17:08:55 +02:00
parent a3bf5da9b1
commit 24347ea5a0
3 changed files with 74 additions and 26 deletions
+9 -12
View File
@@ -1,5 +1,7 @@
package catalogue
import "path"
// The machine's own resolver (novox/hq ADR 0247).
//
// **Most machines have none.** Every machine lists the mesh's resolvers in /etc/resolv.conf and nothing
@@ -66,10 +68,13 @@ func holdsSeat(m Manifest, seat string) bool {
return false
}
// stepsBack is the module as it composes among the modules of one machine (novox/hq ADR 0287, ADR 0247):
// stepsBack is the module as it composes among the modules of one machine (novox/hq ADR 0287,
// ADR 0247):
// **where it holds a seat that names a path stepping back for another seat, and that other seat's holder
// is on the machine and declares the path, its own declaration of the path is left out**, and nothing else
// of it changes. The stepping back is the seat's definition — node-uplink stepping back from the resolver
// is on the machine and declares the path, its own rendering of the path is left out**, and nothing else
// of it changes. Only a file the mesh renders for it steps back, as before: a resource on the path is
// composed as declared (the declaration copies a module's resources whole), so an uplink holder declaring
// the resolver file as a resource beside the resolver's holder is two owners of one path, and refused. The stepping back is the seat's definition — node-uplink stepping back from the resolver
// file for node-resolver — so any other module declaring the path beside the owner's is still two owners
// of one path, and is refused as before.
func stepsBack(m Manifest, modules []Manifest) Manifest {
@@ -95,20 +100,12 @@ func stepsBack(m Manifest, modules []Manifest) Manifest {
}
facts := make(map[string]RosterFile, len(m.Facts))
for name, f := range m.Facts {
if !f.Home && drop[f.Path] {
if !f.Home && drop[path.Clean(f.Path)] {
continue
}
facts[name] = f
}
m.Facts = facts
var resources []map[string]any
for _, r := range m.Resources {
if p, ok := r["path"].(string); ok && drop[p] {
continue
}
resources = append(resources, r)
}
m.Resources = resources
return m
}