No client names the holder of the seat mesh-provisioner: each reader keeps its own constant, held to its manifest (ADR 0625 section 4, issue 1966)

Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
2026-11-05 19:36:21 +01:00
parent c3754e48c8
commit bd555e6014
2 changed files with 16 additions and 12 deletions
+9 -5
View File
@@ -38,6 +38,10 @@ func Offers() map[string]provider.Offer {
}}
}
// Provisioner is the module holding the seat mesh-provisioner, whose provisions and plans the helper reads: named from this
// module's manifest (`reads`; TestTheOfferServesThePortTheManifestServes), since no client names a holder (novox/hq ADR 0625 §4).
const Provisioner = "mesh-provisioner"
// busOf is the helper's bus over the runtime's own state: the provider's bucket is its state `bound`, and the
// provisions and plans of the seat mesh-provisioner are the states it reads, by mesh-sdk's names (novox/hq ADR 0570,
// issue 1954 L6-T1). The old assignments are read no more (mesh-sdk 692dbf9, L6-P3).
@@ -47,10 +51,10 @@ func (b busOf) state(bucket string) (string, error) {
switch bucket {
case provider.BucketOf(Module):
return "bound", nil
case provisions.ProvisionsBucket:
return provisions.ProvisionsRead, nil
case provisions.PlansBucket:
return provisions.PlansRead, nil
case provisions.ProvisionsBucketOf(Provisioner):
return provisions.ProvisionsReadOf(Provisioner), nil
case provisions.PlansBucketOf(Provisioner):
return provisions.PlansReadOf(Provisioner), nil
}
return "", fmt.Errorf("%s is not a bucket this provider keeps or reads", bucket)
}
@@ -97,7 +101,7 @@ func (b busOf) Delete(_ context.Context, bucket, key string) error {
func New(conn *bus.Conn, node string, every time.Duration, logf func(string, ...any)) *provider.Provider {
return provider.New(provider.Options{
Node: node,
Module: Module,
Module: Module, Provisioner: Provisioner,
Offers: Offers(),
Bus: busOf{conn: conn},
Every: every,