Contract: the seat mesh-wants' wait gains the step outside
Builds: design 47 G §706 (step outside added to §498's list), §498 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -675,7 +675,7 @@ type Wait struct {
|
||||
// the acting part waited for
|
||||
Part string `json:"part,omitempty"`
|
||||
Since time.Time `json:"since"`
|
||||
// which wait: an acting step of section 203 or put, delivery, kept-build, backup (design 47 G section 498)
|
||||
// which wait: an acting step of section 203 or put, delivery, kept-build, backup, or outside, a moved module's failing check held on an outside cause (design 47 G section 498, section 706)
|
||||
Step string `json:"step"`
|
||||
// its new version's fingerprint
|
||||
Version string `json:"version,omitempty"`
|
||||
@@ -697,6 +697,7 @@ const (
|
||||
WaitStepDelivery = "delivery"
|
||||
WaitStepKeptBuild = "kept-build"
|
||||
WaitStepBackup = "backup"
|
||||
WaitStepOutside = "outside"
|
||||
)
|
||||
|
||||
// UpgradeInput is what upgrade takes.
|
||||
|
||||
@@ -55,6 +55,10 @@ func TestFixtures(t *testing.T) {
|
||||
decode: func(b []byte) (any, error) { var v WaitHeldEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-wants\\.event\\.wait-held$")},
|
||||
{name: "the builder's toolchain wait ended by a newer fingerprint", subject: "mesh.seat.mesh-wants.event.wait-ended", given: "{\"fingerprint\":\"src2:aaaa\",\"how\":\"superseded\",\"module\":\"mesh-sdk\",\"on\":\"toolchain\",\"owner\":\"mesh-delivery-builder\",\"since\":\"2026-11-11T10:00:00Z\",\"step\":\"build\"}", wire: "{\"fingerprint\":\"src2:aaaa\",\"how\":\"superseded\",\"module\":\"mesh-sdk\",\"on\":\"toolchain\",\"owner\":\"mesh-delivery-builder\",\"since\":\"2026-11-11T10:00:00Z\",\"step\":\"build\"}",
|
||||
decode: func(b []byte) (any, error) { var v WaitEndedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-wants\\.event\\.wait-ended$")},
|
||||
{name: "an outside wait held on a hub's silence, counted from its first start", subject: "mesh.seat.mesh-wants.event.wait-held", given: "{\"bound\":\"30m\",\"clock-from\":\"2026-11-11T10:00:00Z\",\"fingerprint\":\"src2:aaaa\",\"module\":\"nats\",\"node\":\"ace\",\"on\":\"silent:g14\",\"owner\":\"mesh-delivery-assigner\",\"since\":\"2026-11-11T10:00:00Z\",\"step\":\"outside\"}", wire: "{\"bound\":\"30m\",\"clock-from\":\"2026-11-11T10:00:00Z\",\"fingerprint\":\"src2:aaaa\",\"module\":\"nats\",\"node\":\"ace\",\"on\":\"silent:g14\",\"owner\":\"mesh-delivery-assigner\",\"since\":\"2026-11-11T10:00:00Z\",\"step\":\"outside\"}",
|
||||
decode: func(b []byte) (any, error) { var v WaitHeldEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-wants\\.event\\.wait-held$")},
|
||||
{name: "an outside wait ended by the operator's Go on", subject: "mesh.seat.mesh-wants.event.wait-ended", given: "{\"fingerprint\":\"src2:aaaa\",\"how\":\"go-on\",\"module\":\"nats\",\"node\":\"ace\",\"on\":\"silent:g14\",\"owner\":\"mesh-delivery-assigner\",\"since\":\"2026-11-11T10:00:00Z\",\"step\":\"outside\"}", wire: "{\"fingerprint\":\"src2:aaaa\",\"how\":\"go-on\",\"module\":\"nats\",\"node\":\"ace\",\"on\":\"silent:g14\",\"owner\":\"mesh-delivery-assigner\",\"since\":\"2026-11-11T10:00:00Z\",\"step\":\"outside\"}",
|
||||
decode: func(b []byte) (any, error) { var v WaitEndedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-wants\\.event\\.wait-ended$")},
|
||||
{name: "a want", subject: "", given: "{\"fp\":\"ab12\",\"rule\":3,\"v\":1}", wire: "{\"fp\":\"ab12\",\"rule\":3,\"v\":1}",
|
||||
decode: func(b []byte) (any, error) {
|
||||
var v WantsByWantNodeModuleValue
|
||||
|
||||
@@ -253,5 +253,36 @@
|
||||
"since": "2026-11-11T10:00:00Z",
|
||||
"how": "superseded"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "an outside wait held on a hub's silence, counted from its first start",
|
||||
"of": "event:wait-held",
|
||||
"subject": "mesh.seat.mesh-wants.event.wait-held",
|
||||
"given": {
|
||||
"step": "outside",
|
||||
"owner": "mesh-delivery-assigner",
|
||||
"node": "ace",
|
||||
"module": "nats",
|
||||
"fingerprint": "src2:aaaa",
|
||||
"on": "silent:g14",
|
||||
"since": "2026-11-11T10:00:00Z",
|
||||
"clock-from": "2026-11-11T10:00:00Z",
|
||||
"bound": "30m"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "an outside wait ended by the operator's Go on",
|
||||
"of": "event:wait-ended",
|
||||
"subject": "mesh.seat.mesh-wants.event.wait-ended",
|
||||
"given": {
|
||||
"step": "outside",
|
||||
"owner": "mesh-delivery-assigner",
|
||||
"node": "ace",
|
||||
"module": "nats",
|
||||
"fingerprint": "src2:aaaa",
|
||||
"on": "silent:g14",
|
||||
"since": "2026-11-11T10:00:00Z",
|
||||
"how": "go-on"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -1038,9 +1038,10 @@
|
||||
"put",
|
||||
"delivery",
|
||||
"kept-build",
|
||||
"backup"
|
||||
"backup",
|
||||
"outside"
|
||||
],
|
||||
"description": "which wait: an acting step of section 203 or put, delivery, kept-build, backup (design 47 G section 498)"
|
||||
"description": "which wait: an acting step of section 203 or put, delivery, kept-build, backup, or outside, a moved module's failing check held on an outside cause (design 47 G section 498, section 706)"
|
||||
},
|
||||
"part": {
|
||||
"type": "string",
|
||||
|
||||
+2
-2
@@ -328,8 +328,8 @@ export interface Wait {
|
||||
/** the acting part waited for */
|
||||
"part"?: string;
|
||||
"since": string;
|
||||
/** which wait: an acting step of section 203 or put, delivery, kept-build, backup (design 47 G section 498) */
|
||||
"step": "take-in" | "validate" | "check" | "build" | "compose" | "grant" | "place" | "pipeline" | "put" | "delivery" | "kept-build" | "backup";
|
||||
/** which wait: an acting step of section 203 or put, delivery, kept-build, backup, or outside, a moved module's failing check held on an outside cause (design 47 G section 498, section 706) */
|
||||
"step": "take-in" | "validate" | "check" | "build" | "compose" | "grant" | "place" | "pipeline" | "put" | "delivery" | "kept-build" | "backup" | "outside";
|
||||
/** its new version's fingerprint */
|
||||
"version"?: string;
|
||||
/** the wait in plain words (design 47 G section 512, section 629) */
|
||||
|
||||
Reference in New Issue
Block a user