§702 the seat mesh-wants' wait gains owner, on and words, and its module is optional

The builder's toolchain wait is said with this type, step build; how may be superseded. Fixtures and generated code follow.

Builds: design 47 G §702, §629, §512

Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
2026-11-11 21:44:21 +01:00
parent d637a89b5e
commit 7574848c5f
5 changed files with 66 additions and 9 deletions
+9 -3
View File
@@ -650,7 +650,7 @@ const (
StepRunStepComposition = "composition"
)
// Wait is a step's wait the assigner holds: placing, wanting or composing until an acting part's new version runs.
// Wait is a step's wait the assigner holds: placing, wanting or composing until an acting part's new version runs; the builder's toolchain wait is of this type too, with step build (design 47 G section 702).
type Wait struct {
// a duration such as 30m
Bound string `json:"bound,omitempty"`
@@ -661,13 +661,17 @@ type Wait struct {
// a put's wait: the fingerprint of the build put
Fingerprint string `json:"fingerprint,omitempty"`
Fp string `json:"fp,omitempty"`
// on wait-ended: ran or released
// on wait-ended: ran, released or superseded
How string `json:"how,omitempty"`
// a dependent's delivery wait: the machines the dependency's version has yet to reach
Machines []string `json:"machines,omitempty"`
// the entry that waits
Module string `json:"module"`
Module string `json:"module,omitempty"`
Node string `json:"node,omitempty"`
// what it waits on (design 47 G section 512, section 629)
On string `json:"on,omitempty"`
// the seat holding the wait (design 47 G section 512, section 629)
Owner string `json:"owner,omitempty"`
// the acting part waited for
Part string `json:"part,omitempty"`
Since time.Time `json:"since"`
@@ -675,6 +679,8 @@ type Wait struct {
Step string `json:"step"`
// its new version's fingerprint
Version string `json:"version,omitempty"`
// the wait in plain words (design 47 G section 512, section 629)
Words string `json:"words,omitempty"`
}
// The values of Wait's step.
@@ -49,6 +49,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: "a dependent's delivery waits for a dependency's version", subject: "mesh.seat.mesh-wants.event.wait-held", given: "{\"bound\":\"60m\",\"clock-from\":\"2026-11-11T09:58:00Z\",\"machines\":[\"ace\",\"g14\"],\"module\":\"nats\",\"part\":\"mesh-sdk\",\"since\":\"2026-11-11T10:00:00Z\",\"step\":\"delivery\",\"version\":\"0.1.4\"}", wire: "{\"bound\":\"60m\",\"clock-from\":\"2026-11-11T09:58:00Z\",\"machines\":[\"ace\",\"g14\"],\"module\":\"nats\",\"part\":\"mesh-sdk\",\"since\":\"2026-11-11T10:00:00Z\",\"step\":\"delivery\",\"version\":\"0.1.4\"}",
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 held, in the contract's words", subject: "mesh.seat.mesh-wants.event.wait-held", given: "{\"bound\":\"30m\",\"clock-from\":\"2026-11-11T10:00:00Z\",\"fingerprint\":\"src2:aaaa\",\"module\":\"mesh-sdk\",\"on\":\"toolchain\",\"owner\":\"mesh-delivery-builder\",\"since\":\"2026-11-11T10:00:00Z\",\"step\":\"build\",\"words\":\"waits for the Go build seat to report its toolchain\"}", wire: "{\"bound\":\"30m\",\"clock-from\":\"2026-11-11T10:00:00Z\",\"fingerprint\":\"src2:aaaa\",\"module\":\"mesh-sdk\",\"on\":\"toolchain\",\"owner\":\"mesh-delivery-builder\",\"since\":\"2026-11-11T10:00:00Z\",\"step\":\"build\",\"words\":\"waits for the Go build seat to report its toolchain\"}",
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: "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
@@ -209,5 +209,35 @@
"clock-from": "2026-11-11T09:58:00Z",
"bound": "60m"
}
},
{
"name": "the builder's toolchain wait held, in the contract's words",
"of": "event:wait-held",
"subject": "mesh.seat.mesh-wants.event.wait-held",
"given": {
"owner": "mesh-delivery-builder",
"step": "build",
"on": "toolchain",
"module": "mesh-sdk",
"fingerprint": "src2:aaaa",
"since": "2026-11-11T10:00:00Z",
"clock-from": "2026-11-11T10:00:00Z",
"bound": "30m",
"words": "waits for the Go build seat to report its toolchain"
}
},
{
"name": "the builder's toolchain wait ended by a newer fingerprint",
"of": "event:wait-ended",
"subject": "mesh.seat.mesh-wants.event.wait-ended",
"given": {
"owner": "mesh-delivery-builder",
"step": "build",
"on": "toolchain",
"module": "mesh-sdk",
"fingerprint": "src2:aaaa",
"since": "2026-11-11T10:00:00Z",
"how": "superseded"
}
}
]
+14 -3
View File
@@ -1018,7 +1018,7 @@
},
"Wait": {
"type": "object",
"description": "a step's wait the assigner holds: placing, wanting or composing until an acting part's new version runs",
"description": "a step's wait the assigner holds: placing, wanting or composing until an acting part's new version runs; the builder's toolchain wait is of this type too, with step build (design 47 G section 702)",
"properties": {
"step": {
"type": "string",
@@ -1066,7 +1066,7 @@
},
"how": {
"type": "string",
"description": "on wait-ended: ran or released"
"description": "on wait-ended: ran, released or superseded"
},
"by": {
"type": "string",
@@ -1087,11 +1087,22 @@
"type": "string"
},
"description": "a dependent's delivery wait: the machines the dependency's version has yet to reach"
},
"owner": {
"type": "string",
"description": "the seat holding the wait (design 47 G section 512, section 629)"
},
"on": {
"type": "string",
"description": "what it waits on (design 47 G section 512, section 629)"
},
"words": {
"type": "string",
"description": "the wait in plain words (design 47 G section 512, section 629)"
}
},
"required": [
"step",
"module",
"since"
]
},
+9 -3
View File
@@ -303,7 +303,7 @@ export interface StepRun {
"step": "composition";
}
/** a step's wait the assigner holds: placing, wanting or composing until an acting part's new version runs */
/** a step's wait the assigner holds: placing, wanting or composing until an acting part's new version runs; the builder's toolchain wait is of this type too, with step build (design 47 G section 702) */
export interface Wait {
/** a duration such as 30m */
"bound"?: string;
@@ -314,13 +314,17 @@ export interface Wait {
/** a put's wait: the fingerprint of the build put */
"fingerprint"?: string;
"fp"?: string;
/** on wait-ended: ran or released */
/** on wait-ended: ran, released or superseded */
"how"?: string;
/** a dependent's delivery wait: the machines the dependency's version has yet to reach */
"machines"?: string[];
/** the entry that waits */
"module": string;
"module"?: string;
"node"?: string;
/** what it waits on (design 47 G section 512, section 629) */
"on"?: string;
/** the seat holding the wait (design 47 G section 512, section 629) */
"owner"?: string;
/** the acting part waited for */
"part"?: string;
"since": string;
@@ -328,6 +332,8 @@ export interface Wait {
"step": "take-in" | "validate" | "check" | "build" | "compose" | "grant" | "place" | "pipeline" | "put" | "delivery" | "kept-build" | "backup";
/** its new version's fingerprint */
"version"?: string;
/** the wait in plain words (design 47 G section 512, section 629) */
"words"?: string;
}
/** is what upgrade takes. */