Rebased onto main: ADR 0188 renumbered to 0201, migration 0055 to 0056

The bundles refactor took ADR 0188 on main, so this work's record is 0201 and
every comment citing it moves with it. Main also took migration 0055 (an
older build never replaces a newer), so the store's collected-artifacts table
is 0056 — a number two migrations share is a schema nobody can trust.

make check passes except TestTheResolverIsToldEveryMachineOnTheNetworkAndToldAgainWhenOneLeaves,
which fails on main too and now for two stacked reasons (hq issues 203 and 202).
This commit is contained in:
2026-10-04 02:45:06 +02:00
parent c7884f5a72
commit 79993fb498
6 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ func knownFor(m Manifest, needs []Needed, node string) (map[string]map[string]st
"as": as, "as": as,
} }
// What the provider derives for this consumer rather than for all of them // What the provider derives for this consumer rather than for all of them
// (novox/hq ADR 0188). Filled here, the one place a provision and the module // (novox/hq ADR 0201). Filled here, the one place a provision and the module
// requiring it are both in hand. // requiring it are both in hand.
served, err := ServedTo(n.Serves, as) served, err := ServedTo(n.Serves, as)
if err != nil { if err != nil {
+3 -3
View File
@@ -8,7 +8,7 @@ import (
) )
// What a provider derives for one consumer, said once in the provider's definition and delivered // What a provider derives for one consumer, said once in the provider's definition and delivered
// to both ends (novox/hq ADR 0188, issue 124). // to both ends (novox/hq ADR 0201, issue 124).
// //
// A `serves` block is otherwise literal: the same values for every consumer. Where the provider // A `serves` block is otherwise literal: the same values for every consumer. Where the provider
// *names the resource* — a bucket, a database, a vhost — the name is derived from who is asking, // *names the resource* — a bucket, a database, a vhost — the name is derived from who is asking,
@@ -165,7 +165,7 @@ func sortedAnyKeys(values map[string]any) []string {
} }
// derivedFor is what the provider on this machine derives for one consumer of one provision // derivedFor is what the provider on this machine derives for one consumer of one provision
// (novox/hq ADR 0188). // (novox/hq ADR 0201).
// //
// Settled first, then derived: an operator may set a prefix on what the provider serves and the // Settled first, then derived: an operator may set a prefix on what the provider serves and the
// mesh still fills the consumer's half of it ([ADR 0174]). Only the keys that actually name the // mesh still fills the consumer's half of it ([ADR 0174]). Only the keys that actually name the
@@ -209,7 +209,7 @@ func (r Resolution) derivedFor(provision, as string, settings SettingsBy) (map[s
} }
// notTranscribed refuses a consumer's file that writes out the value its provider derives for it, // notTranscribed refuses a consumer's file that writes out the value its provider derives for it,
// instead of asking for it (novox/hq ADR 0188, issue 124). // instead of asking for it (novox/hq ADR 0201, issue 124).
// //
// **What would have caught the one wrong instance.** The object store's three consumers each wrote // **What would have caught the one wrong instance.** The object store's three consumers each wrote
// their bucket into their own configuration by hand. One of them named a predecessor's bucket, and // their bucket into their own configuration by hand. One of them named a predecessor's bucket, and
+3 -3
View File
@@ -647,7 +647,7 @@ func (r Resolution) compose(with Rendering, owner map[string]string,
} }
as := ConsumerIdentity(r.Node, IdentitySource(m.Slug, m.Module)) as := ConsumerIdentity(r.Node, IdentitySource(m.Slug, m.Module))
// What the provider derives for THIS consumer, filled here where the consumer is // What the provider derives for THIS consumer, filled here where the consumer is
// known (novox/hq ADR 0188). The same fill knownFor does below, so the binding file // known (novox/hq ADR 0201). The same fill knownFor does below, so the binding file
// and the module's `${bound:…}` substitutions cannot say different things. // and the module's `${bound:…}` substitutions cannot say different things.
told := *found told := *found
told.Serves, err = ServedTo(told.Serves, as) told.Serves, err = ServedTo(told.Serves, as)
@@ -777,7 +777,7 @@ func (r Resolution) compose(with Rendering, owner map[string]string,
// And the machine underneath, which no binding of its own can tell it. // And the machine underneath, which no binding of its own can tell it.
thisMachine := machineFacts(r, with.Names, with.MeshRange) thisMachine := machineFacts(r, with.Names, with.MeshRange)
// **A definition that already holds the answer transcribed it** (novox/hq ADR 0188). // **A definition that already holds the answer transcribed it** (novox/hq ADR 0201).
// Judged over what the module itself declares, and before anything is substituted: the // Judged over what the module itself declares, and before anything is substituted: the
// mesh's own generated files — the binding, the contributions — legitimately carry the // mesh's own generated files — the binding, the contributions — legitimately carry the
// derived value, and after substitution so does every consumer's file, so this is the one // derived value, and after substitution so does every consumer's file, so this is the one
@@ -1203,7 +1203,7 @@ type Contribution struct {
// is what makes swapping one for another cost nothing. // is what makes swapping one for another cost nothing.
Values map[string]any `json:"values"` Values map[string]any `json:"values"`
// Derived is what this provider's own definition said it derives for this consumer, already // Derived is what this provider's own definition said it derives for this consumer, already
// derived (novox/hq ADR 0188). // derived (novox/hq ADR 0201).
// //
// **The provider is told, rather than recomputing it.** A served value may name the consumer's // **The provider is told, rather than recomputing it.** A served value may name the consumer's
// identity — a bucket named for who is asking, a database prefixed with it — and before this // identity — a bucket named for who is asking, a database prefixed with it — and before this
@@ -7,7 +7,7 @@ import (
) )
// What a provider derives for each consumer, said once and delivered to both ends // What a provider derives for each consumer, said once and delivered to both ends
// (novox/hq ADR 0188, issue 124). // (novox/hq ADR 0201, issue 124).
// //
// The failure these are written against: the object store's provisioner derived each consumer's // The failure these are written against: the object store's provisioner derived each consumer's
// bucket from the login the mesh minted, in its own code, and the mesh had no channel to tell the // bucket from the login the mesh minted, in its own code, and the mesh had no channel to tell the
+1 -1
View File
@@ -1428,7 +1428,7 @@ func ParseManifest(raw []byte) (Manifest, error) {
"%s serves %q to whoever requires it, and does not provide it", m.Module, to)) "%s serves %q to whoever requires it, and does not provide it", m.Module, to))
} }
} }
// A served value may be derived for the consumer it is served to (novox/hq ADR 0188). Read // A served value may be derived for the consumer it is served to (novox/hq ADR 0201). Read
// here, where the definition is, rather than when somebody first requires it: a rule that // here, where the definition is, rather than when somebody first requires it: a rule that
// would be refused at the first consumer is wrong from the moment it is written. // would be refused at the first consumer is wrong from the moment it is written.
problems = append(problems, CheckServes(m)...) problems = append(problems, CheckServes(m)...)