Merge branch 'feat/47-G-fix11-b2l' into feat/47-G-join11

# Conflicts:
#	modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/buildended.go
#	modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/graphkept.go
#	modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/main.go
#	modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/pass.go
#	modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/tools.go
#	modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/world.go
#	modules/mesh-delivery-assigner/internal/assign/wants_test.go
#	modules/mesh-delivery-assigner/manifest_test.go
#	modules/mesh-delivery-assigner/module.json
This commit is contained in:
2026-11-12 10:36:04 +01:00
51 changed files with 2476 additions and 118 deletions
@@ -51,6 +51,10 @@ const (
BackupSkip = seat.WantsByWantNodeModuleValueBackupSkip
)
// RevertLive is the operator's answer to a held revert: the node starts the reverted build on the live data as it is, with
// nothing restored (design 47 G §710).
const RevertLive = seat.WantsByWantNodeModuleValueRevertLive
// NodeWord is the last part of a node's own key.
const NodeWord = "node"
@@ -217,6 +221,9 @@ func checkWant(w Want) error {
default:
return fmt.Errorf("wants: the backup answer %q is not %s or %s", w.Backup, BackupAgain, BackupSkip)
}
if w.Revert != "" && w.Revert != RevertLive {
return fmt.Errorf("wants: the revert answer %q is not %s", w.Revert, RevertLive)
}
if w.Newest == "" && w.Rule == 0 {
return nil
}
@@ -40,6 +40,7 @@ func TestWantsAreWhatTheEarlierCodecWrote(t *testing.T) {
"composed": {Want{Fp: a, Composed: c, Words: "w"}, `{"v":1,"fp":"` + a + `","composed":"` + c + `","words":"w"}`},
"held back": {Want{Fp: a, Self: true, Newest: b, Rule: RuleGrant, Backup: BackupAgain, Words: "held"}, `{"v":1,"fp":"` + a + `","newest":"` + b + `","rule":6,"backup":"again","words":"held","self":true}`},
"put": {Want{Fp: a, Self: true, Put: true, Hold: true, Yes: d, Release: "r1"}, `{"v":1,"fp":"` + a + `","put":true,"hold":true,"yes":"` + d + `","release":"r1","self":true}`},
"revert": {Want{Fp: a, Self: true, Revert: RevertLive, Words: "live"}, `{"v":1,"fp":"` + a + `","revert":"live","words":"live","self":true}`},
"removed": {Want{Removed: true, Words: "gone"}, `{"v":1,"removed":true,"words":"gone"}`},
"released": {Want{Fp: a, Composed: c, Version: "0.1.15", Parts: map[string]string{"mesh-sdk:go": d}}, `{"v":1,"fp":"` + a + `","composed":"` + c + `","version":"0.1.15","parts":{"mesh-sdk:go":"` + d + `"}}`},
"kept": {Want{Fp: a, Composed: c, Parts: map[string]string{"x:image": d}, KeptOn: "n1"}, `{"v":1,"fp":"` + a + `","composed":"` + c + `","parts":{"x:image":"` + d + `"},"kept-on":"n1"}`},
@@ -67,6 +68,7 @@ func TestWantsAreWhatTheEarlierCodecWrote(t *testing.T) {
"removed names a rule": {Removed: true, Rule: 1},
"release without yes": {Fp: a, Self: true, Release: "r"},
"backup answer unknown": {Fp: a, Self: true, Backup: "later"},
"revert answer unknown": {Fp: a, Self: true, Revert: "hold"},
"newest equals fp": {Fp: a, Self: true, Newest: a, Rule: RuleStep},
"rule 11": {Fp: a, Self: true, Newest: b, Rule: 11},
"newest without a rule": {Fp: a, Self: true, Newest: b},
@@ -732,6 +732,8 @@ type CatalogEntry struct {
Bases []string `json:"bases,omitempty"`
// the merge commit it was last changed at
Commit string `json:"commit"`
// the requirements the manifest's contributes object names as keys, sorted, its local names not carried; each is also in requires (design 47 G section 709)
Contributes []string `json:"contributes,omitempty"`
// the edges into this module's artifacts, each from the artifact that comes first; the build and the delivery order by these alone
Edges []Edge `json:"edges,omitempty"`
// its fingerprint (src2: and 64 hex digits); absent when it has none
@@ -564,9 +564,9 @@ type Edge struct {
Kind string `json:"kind"`
Module string `json:"module"`
Node string `json:"node"`
// for provisioning, the provision
// for provisioning and contribution, the requirement
Provision string `json:"provision,omitempty"`
// for contribution, the seat it contributes to; for acting, the seat whose rule gave the edge
// for acting only, the seat whose rule gave the edge
Seat string `json:"seat,omitempty"`
// for acting, the step: take-in, validate, check, build, compose, grant or place
Step string `json:"step,omitempty"`
@@ -584,11 +584,20 @@ type Fill struct {
Store string `json:"store"`
}
// Held is one requirement an entry is held on, for want of a provider.
// Held is one requirement an entry is held on, for want of a provider (design 47 G section 708): the assigner writes no want from a held entry, so the node keeps what it runs.
type Held struct {
// a provisioning edge to each placed provider of it, none chosen; none when no placed module provides it
Candidates []Edge `json:"candidates,omitempty"`
Provision string `json:"provision"`
// each placed module that provides it, sorted; empty when none does
Candidates []HeldCandidate `json:"candidates,omitempty"`
// the requirement no step of the order resolves
Requirement string `json:"requirement"`
// the seat that delivers the requirement and that no placement holds; only where the named seat's step held it
Seat string `json:"seat,omitempty"`
}
// HeldCandidate is one placed provider of a held requirement.
type HeldCandidate struct {
Module string `json:"module"`
Node string `json:"node"`
}
// NodeEntryRef is a type of the contract.
@@ -912,6 +921,8 @@ type WantsByWantNodeModuleValue struct {
Put bool `json:"put,omitempty"`
Release string `json:"release,omitempty"`
Removed bool `json:"removed,omitempty"`
// live: the operator's answer to a held revert, to start the reverted build on the live data as it is, with nothing restored (design 47 G section 710)
Revert string `json:"revert,omitempty"`
// the rule that holds the node back, 1 to 10
Rule int64 `json:"rule,omitempty"`
Self bool `json:"self,omitempty"`
@@ -928,6 +939,11 @@ const (
WantsByWantNodeModuleValueBackupSkip = "skip"
)
// The values of WantsByWantNodeModuleValue's revert.
const (
WantsByWantNodeModuleValueRevertLive = "live"
)
// WantsByWantNodeNodeValue is one value of the state wants under the key want.<node>.node.
type WantsByWantNodeNodeValue struct {
Composed string `json:"composed"`
@@ -1936,6 +1936,13 @@
"type": "string"
}
},
"contributes": {
"type": "array",
"items": {
"type": "string"
},
"description": "the requirements the manifest's contributes object names as keys, sorted, its local names not carried; each is also in requires (design 47 G section 709)"
},
"awaits": {
"type": "array",
"items": {
@@ -515,6 +515,13 @@
"skip"
]
},
"revert": {
"type": "string",
"description": "live: the operator's answer to a held revert, to start the reverted build on the live data as it is, with nothing restored (design 47 G section 710)",
"enum": [
"live"
]
},
"words": {
"type": "string"
},
@@ -773,11 +780,11 @@
},
"provision": {
"type": "string",
"description": "for provisioning, the provision"
"description": "for provisioning and contribution, the requirement"
},
"seat": {
"type": "string",
"description": "for contribution, the seat it contributes to; for acting, the seat whose rule gave the edge"
"description": "for acting only, the seat whose rule gave the edge"
},
"step": {
"type": "string",
@@ -844,21 +851,42 @@
},
"Held": {
"type": "object",
"description": "one requirement an entry is held on, for want of a provider",
"description": "one requirement an entry is held on, for want of a provider (design 47 G section 708): the assigner writes no want from a held entry, so the node keeps what it runs",
"properties": {
"provision": {
"type": "string"
"requirement": {
"type": "string",
"description": "the requirement no step of the order resolves"
},
"seat": {
"type": "string",
"description": "the seat that delivers the requirement and that no placement holds; only where the named seat's step held it"
},
"candidates": {
"type": "array",
"description": "a provisioning edge to each placed provider of it, none chosen; none when no placed module provides it",
"description": "each placed module that provides it, sorted; empty when none does",
"items": {
"$ref": "#/defs/Edge"
"$ref": "#/defs/HeldCandidate"
}
}
},
"required": [
"provision"
"requirement"
]
},
"HeldCandidate": {
"type": "object",
"description": "one placed provider of a held requirement",
"properties": {
"node": {
"type": "string"
},
"module": {
"type": "string"
}
},
"required": [
"node",
"module"
]
},
"NodeEntryRef": {
@@ -243,6 +243,8 @@ export interface CatalogEntry {
"bases"?: string[];
/** the merge commit it was last changed at */
"commit": string;
/** the requirements the manifest's contributes object names as keys, sorted, its local names not carried; each is also in requires (design 47 G section 709) */
"contributes"?: string[];
/** the edges into this module's artifacts, each from the artifact that comes first; the build and the delivery order by these alone */
"edges"?: Edge[];
/** its fingerprint (src2: and 64 hex digits); absent when it has none */
@@ -232,9 +232,9 @@ export interface Edge {
"kind": string;
"module": string;
"node": string;
/** for provisioning, the provision */
/** for provisioning and contribution, the requirement */
"provision"?: string;
/** for contribution, the seat it contributes to; for acting, the seat whose rule gave the edge */
/** for acting only, the seat whose rule gave the edge */
"seat"?: string;
/** for acting, the step: take-in, validate, check, build, compose, grant or place */
"step"?: string;
@@ -252,11 +252,20 @@ export interface Fill {
"store": string;
}
/** one requirement an entry is held on, for want of a provider */
/** one requirement an entry is held on, for want of a provider (design 47 G section 708): the assigner writes no want from a held entry, so the node keeps what it runs */
export interface Held {
/** a provisioning edge to each placed provider of it, none chosen; none when no placed module provides it */
"candidates"?: Edge[];
"provision": string;
/** each placed module that provides it, sorted; empty when none does */
"candidates"?: HeldCandidate[];
/** the requirement no step of the order resolves */
"requirement": string;
/** the seat that delivers the requirement and that no placement holds; only where the named seat's step held it */
"seat"?: string;
}
/** one placed provider of a held requirement */
export interface HeldCandidate {
"module": string;
"node": string;
}
export interface NodeEntryRef {
@@ -530,6 +539,8 @@ export interface WantsByWantNodeModuleValue {
"put"?: boolean;
"release"?: string;
"removed"?: boolean;
/** live: the operator's answer to a held revert, to start the reverted build on the live data as it is, with nothing restored (design 47 G section 710) */
"revert"?: "live";
/** the rule that holds the node back, 1 to 10 */
"rule"?: number;
"self"?: boolean;