From 75b2676d32bbe73ae9013e4f212750807c0043ad Mon Sep 17 00:00:00 2001 From: jochen Date: Sun, 4 Oct 2026 04:33:56 +0200 Subject: [PATCH] The derived-value record is ADR 0202 (was 0201) The key-value-buckets record took 0201 on main while this waited to merge. Only the comments citing the derived-value work move; this repository's other 0201 citations are the buckets record's own and stay. --- internal/catalogue/bound_into_files.go | 2 +- internal/catalogue/consumer_into_serves.go | 8 ++++---- internal/catalogue/declaration.go | 6 +++--- internal/catalogue/derived_for_consumer_test.go | 2 +- internal/catalogue/manifest.go | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/internal/catalogue/bound_into_files.go b/internal/catalogue/bound_into_files.go index b9729f3..8e47a19 100644 --- a/internal/catalogue/bound_into_files.go +++ b/internal/catalogue/bound_into_files.go @@ -61,7 +61,7 @@ func knownFor(m Manifest, needs []Needed, node string) (map[string]map[string]st "as": as, } // What the provider derives for this consumer rather than for all of them - // (novox/hq ADR 0201). Filled here, the one place a provision and the module + // (novox/hq ADR 0202). Filled here, the one place a provision and the module // requiring it are both in hand. served, err := ServedTo(n.Serves, as) if err != nil { diff --git a/internal/catalogue/consumer_into_serves.go b/internal/catalogue/consumer_into_serves.go index 897411d..1a0f048 100644 --- a/internal/catalogue/consumer_into_serves.go +++ b/internal/catalogue/consumer_into_serves.go @@ -8,7 +8,7 @@ import ( ) // What a provider derives for one consumer, said once in the provider's definition and delivered -// to both ends (novox/hq ADR 0201, issue 124). +// to both ends (novox/hq ADR 0202, issue 124). // // 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, @@ -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 -// (novox/hq ADR 0201). +// (novox/hq ADR 0202). // // 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 @@ -213,7 +213,7 @@ func (r Resolution) derivedFor(provision, as, consumer, local string, settings S "%s keeps several holders of %s (this one is %q), and %s derives %s for each "+ "consumer from the login the mesh minted. Each holder has its own login, and a "+ "consumer is told one value per requirement — so the two ends would name "+ - "different things and nothing would compare them (novox/hq ADR 0201)", + "different things and nothing would compare them (novox/hq ADR 0202)", consumer, local, provision, m.Module, orNothing(sortedAnyKeys(names))) } settled, err := Settle(names, settings[m.Module]) @@ -230,7 +230,7 @@ func (r Resolution) derivedFor(provision, as, consumer, local string, settings S } // notTranscribed refuses a consumer's file that writes out the value its provider derives for it, -// instead of asking for it (novox/hq ADR 0201, issue 124). +// instead of asking for it (novox/hq ADR 0202, issue 124). // // **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 diff --git a/internal/catalogue/declaration.go b/internal/catalogue/declaration.go index b21125f..e16f988 100644 --- a/internal/catalogue/declaration.go +++ b/internal/catalogue/declaration.go @@ -647,7 +647,7 @@ func (r Resolution) compose(with Rendering, owner map[string]string, } as := ConsumerIdentity(r.Node, IdentitySource(m.Slug, m.Module)) // What the provider derives for THIS consumer, filled here where the consumer is - // known (novox/hq ADR 0201). The same fill knownFor does below, so the binding file + // known (novox/hq ADR 0202). The same fill knownFor does below, so the binding file // and the module's `${bound:…}` substitutions cannot say different things. told := *found 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. thisMachine := machineFacts(r, with.Names, with.MeshRange) - // **A definition that already holds the answer transcribed it** (novox/hq ADR 0201). + // **A definition that already holds the answer transcribed it** (novox/hq ADR 0202). // 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 // derived value, and after substitution so does every consumer's file, so this is the one @@ -1212,7 +1212,7 @@ type Contribution struct { // is what makes swapping one for another cost nothing. Values map[string]any `json:"values"` // Derived is what this provider's own definition said it derives for this consumer, already - // derived (novox/hq ADR 0201). + // derived (novox/hq ADR 0202). // // **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 diff --git a/internal/catalogue/derived_for_consumer_test.go b/internal/catalogue/derived_for_consumer_test.go index 5d85206..93a4791 100644 --- a/internal/catalogue/derived_for_consumer_test.go +++ b/internal/catalogue/derived_for_consumer_test.go @@ -7,7 +7,7 @@ import ( ) // What a provider derives for each consumer, said once and delivered to both ends -// (novox/hq ADR 0201, issue 124). +// (novox/hq ADR 0202, issue 124). // // 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 diff --git a/internal/catalogue/manifest.go b/internal/catalogue/manifest.go index 0986efd..1ed3c1a 100644 --- a/internal/catalogue/manifest.go +++ b/internal/catalogue/manifest.go @@ -1439,7 +1439,7 @@ func ParseManifest(raw []byte) (Manifest, error) { "%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 0201). Read + // A served value may be derived for the consumer it is served to (novox/hq ADR 0202). Read // 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. problems = append(problems, CheckServes(m)...)