Name plans-building among the controller's readable states, for the checker's read (issue 1687, ADR 0483 clause 2)
mesh/repo-check head 580da61a9107 merged into trunk 07a65927c362 beside mesh-catalog#423@12ff1cfb +1 more — pass: its merge-check.sh passed, each part in i…
mesh/merge-gate head 580da61a9107 merged into trunk 07a65927c362 — pass: group feat/the-checker composed: every machine composes with the change as it did …
mesh/delivery delivered
mesh/delivery-group group feat/the-checker delivered: every member is delivered
mesh/repo-check head 580da61a9107 merged into trunk 07a65927c362 beside mesh-catalog#423@12ff1cfb +1 more — pass: its merge-check.sh passed, each part in i…
mesh/merge-gate head 580da61a9107 merged into trunk 07a65927c362 — pass: group feat/the-checker composed: every machine composes with the change as it did …
mesh/delivery delivered
mesh/delivery-group group feat/the-checker delivered: every member is delivered
This commit is contained in:
@@ -133,7 +133,9 @@ func StateProblems(m Manifest) []string {
|
|||||||
// controller's account alone (the writers table); declared as a module's state, they would be asserted a
|
// controller's account alone (the writers table); declared as a module's state, they would be asserted a
|
||||||
// second way and granted to the module's own principal as well. Named here so a read of one is a read of
|
// second way and granted to the module's own principal as well. Named here so a read of one is a read of
|
||||||
// kept state. The bus's list is broker.ControllerMirrors; a test keeps the two agreeing.
|
// kept state. The bus's list is broker.ControllerMirrors; a test keeps the two agreeing.
|
||||||
var ControllerMirrors = []string{"assignments", "declared-config", "predefined", "builds", "rollouts", "checks-running"}
|
// plans-building is the plans in their build phase, read by the checker to hold checks while a delivery builds (ADR 0483
|
||||||
|
// clause 2, issue 1687).
|
||||||
|
var ControllerMirrors = []string{"assignments", "declared-config", "predefined", "builds", "rollouts", "checks-running", "plans-building"}
|
||||||
|
|
||||||
// StateReadsNothingDeclares is every read across a catalogue whose owner is present and declares no
|
// StateReadsNothingDeclares is every read across a catalogue whose owner is present and declares no
|
||||||
// such state. An absent owner says nothing — a module may be installed long before the one whose
|
// such state. An absent owner says nothing — a module may be installed long before the one whose
|
||||||
|
|||||||
@@ -82,6 +82,16 @@ func TestAReadOfTheControllersMirrorsIsAReadOfKeptState(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A module may read `mesh-controller.plans-building` (novox/hq ADR 0483 clause 2, issue 1687): the checker holds a check
|
||||||
|
// while a delivery builds, and the composed check refused its read as state the controller does not keep.
|
||||||
|
func TestAReadOfThePlansBuildingIsAReadOfKeptState(t *testing.T) {
|
||||||
|
controller := Manifest{Module: ControllerSeatName}
|
||||||
|
checker := Manifest{Module: "mesh-delivery-checker", Reads: []string{"mesh-controller.plans-building"}}
|
||||||
|
if p := StateReadsNothingDeclares([]Manifest{controller, checker}); len(p) != 0 {
|
||||||
|
t.Fatalf("a read of the controller's plans-building was refused: %v", p)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// **Across the whole catalogue**: every state name is local, and every read whose owner is present
|
// **Across the whole catalogue**: every state name is local, and every read whose owner is present
|
||||||
// names state that owner keeps.
|
// names state that owner keeps.
|
||||||
func TestEveryManifestsStateIsLocalAndEveryReadIsKept(t *testing.T) {
|
func TestEveryManifestsStateIsLocalAndEveryReadIsKept(t *testing.T) {
|
||||||
|
|||||||
Reference in New Issue
Block a user