diff --git a/contracts/go/seats/meshwants/contract.go b/contracts/go/seats/meshwants/contract.go index e86953fe..c4faef83 100644 --- a/contracts/go/seats/meshwants/contract.go +++ b/contracts/go/seats/meshwants/contract.go @@ -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. diff --git a/contracts/go/seats/meshwants/contract_test.go b/contracts/go/seats/meshwants/contract_test.go index d18fcac6..29449e7f 100644 --- a/contracts/go/seats/meshwants/contract_test.go +++ b/contracts/go/seats/meshwants/contract_test.go @@ -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 diff --git a/contracts/seats/mesh-wants/fixtures/events.json b/contracts/seats/mesh-wants/fixtures/events.json index 85b2e909..908e63d6 100644 --- a/contracts/seats/mesh-wants/fixtures/events.json +++ b/contracts/seats/mesh-wants/fixtures/events.json @@ -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" + } } ] diff --git a/contracts/seats/mesh-wants/seat.json b/contracts/seats/mesh-wants/seat.json index 05966ed3..fb0d2654 100644 --- a/contracts/seats/mesh-wants/seat.json +++ b/contracts/seats/mesh-wants/seat.json @@ -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", diff --git a/contracts/ts/seats/meshwants/index.d.ts b/contracts/ts/seats/meshwants/index.d.ts index 399bdeaa..974bc4d0 100644 --- a/contracts/ts/seats/meshwants/index.d.ts +++ b/contracts/ts/seats/meshwants/index.d.ts @@ -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) */