From 580da61a9107f74fbef33388ece982e1b9a2e483 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 21 Oct 2026 22:44:52 +0200 Subject: [PATCH] Name plans-building among the controller's readable states, for the checker's read (issue 1687, ADR 0483 clause 2) --- go/catalogue/state.go | 4 +++- go/catalogue/state_test.go | 10 ++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/go/catalogue/state.go b/go/catalogue/state.go index 14e3432..87e402f 100644 --- a/go/catalogue/state.go +++ b/go/catalogue/state.go @@ -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 // 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. -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 // such state. An absent owner says nothing — a module may be installed long before the one whose diff --git a/go/catalogue/state_test.go b/go/catalogue/state_test.go index d4cf687..475ea2e 100644 --- a/go/catalogue/state_test.go +++ b/go/catalogue/state_test.go @@ -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 // names state that owner keeps. func TestEveryManifestsStateIsLocalAndEveryReadIsKept(t *testing.T) {