CT4: a wait names its clock and its kind: clock-from, step of the acting steps, a put's fingerprint, a delivery wait's machines; regenerated

mesh-wants' Wait gains clock-from, the step enum of section 203 with put, delivery, kept-build and backup,
fingerprint and machines, and requires step, module and since only (a put's wait has no part);
the runner's wait body gains clock-from. The runner's `step` already names pipeline steps: see the report.

Builds: design 47 G §498, §266, §269

Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
2026-11-11 12:21:56 +01:00
parent 940d42c659
commit e1499f0617
8 changed files with 114 additions and 10 deletions
@@ -675,6 +675,8 @@ type Wait struct {
Artifact string `json:"artifact,omitempty"`
// the watched branch, or the branch of a run on request
Branch string `json:"branch"`
// the time the bound counts from (design 47 G section 266, section 269, section 498)
ClockFrom *time.Time `json:"clock-from,omitempty"`
// the commit the module's entry was last changed at
Commit string `json:"commit,omitempty"`
// the module's build-input fingerprint at the commit
+27 -4
View File
@@ -659,20 +659,43 @@ type Wait struct {
Bound string `json:"bound,omitempty"`
// on a release, who released it and why
By string `json:"by,omitempty"`
Fp string `json:"fp,omitempty"`
// the time the bound counts from (design 47 G section 266, section 269, section 498)
ClockFrom *time.Time `json:"clock-from,omitempty"`
// 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
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"`
Node string `json:"node,omitempty"`
// the acting part waited for
Part string `json:"part"`
Part string `json:"part,omitempty"`
Since time.Time `json:"since"`
Step string `json:"step"`
// which wait: an acting step of section 203 or put, delivery, kept-build, backup (design 47 G section 498)
Step string `json:"step"`
// its new version's fingerprint
Version string `json:"version"`
Version string `json:"version,omitempty"`
}
// The values of Wait's step.
const (
WaitStepTakeIn = "take-in"
WaitStepValidate = "validate"
WaitStepCheck = "check"
WaitStepBuild = "build"
WaitStepCompose = "compose"
WaitStepGrant = "grant"
WaitStepPlace = "place"
WaitStepPipeline = "pipeline"
WaitStepPut = "put"
WaitStepDelivery = "delivery"
WaitStepKeptBuild = "kept-build"
WaitStepBackup = "backup"
)
// UpgradeInput is what upgrade takes.
type UpgradeInput struct {
// "true": each node's own composition, by its digest, and the assigner's findings
@@ -45,6 +45,10 @@ func TestFixtures(t *testing.T) {
decode: func(b []byte) (any, error) { var v VersionDeliveredEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-wants\\.event\\.version-delivered$")},
{name: "a composition step's progress", subject: "mesh.seat.mesh-wants.event.step-progress.ace", given: "{\"ask\":\"a1b2\",\"asker\":\"assigner\",\"at\":\"2026-11-11T10:01:00Z\",\"phase\":\"build\"}", wire: "{\"ask\":\"a1b2\",\"asker\":\"assigner\",\"at\":\"2026-11-11T10:01:00Z\",\"phase\":\"build\"}",
decode: func(b []byte) (any, error) { var v StepProgressEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-wants\\.event\\.step-progress\\.[^.*> ]+$")},
{name: "a put without hold waits, counted from its start", subject: "mesh.seat.mesh-wants.event.wait-held", given: "{\"bound\":\"30m\",\"clock-from\":\"2026-11-11T10:00:00Z\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"node\":\"ace\",\"since\":\"2026-11-11T10:00:00Z\",\"step\":\"put\"}", wire: "{\"bound\":\"30m\",\"clock-from\":\"2026-11-11T10:00:00Z\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"node\":\"ace\",\"since\":\"2026-11-11T10:00:00Z\",\"step\":\"put\"}",
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: "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
@@ -1483,6 +1483,11 @@
"how": {
"type": "string",
"description": "for its end, how it ended: answered, ran, released, superseded"
},
"clock-from": {
"type": "string",
"format": "date-time",
"description": "the time the bound counts from (design 47 G section 266, section 269, section 498)"
}
},
"description": "a step's wait, held and ended; a wait on a person is said as waiting on that person, never a stall (ADR 0283)",
@@ -177,5 +177,37 @@
"phase": "build",
"at": "2026-11-11T10:01:00Z"
}
},
{
"name": "a put without hold waits, counted from its start",
"of": "event:wait-held",
"subject": "mesh.seat.mesh-wants.event.wait-held",
"given": {
"step": "put",
"node": "ace",
"module": "nats",
"fingerprint": "fp-0123",
"since": "2026-11-11T10:00:00Z",
"clock-from": "2026-11-11T10:00:00Z",
"bound": "30m"
}
},
{
"name": "a dependent's delivery waits for a dependency's version",
"of": "event:wait-held",
"subject": "mesh.seat.mesh-wants.event.wait-held",
"given": {
"step": "delivery",
"part": "mesh-sdk",
"version": "0.1.4",
"machines": [
"ace",
"g14"
],
"module": "nats",
"since": "2026-11-11T10:00:00Z",
"clock-from": "2026-11-11T09:58:00Z",
"bound": "60m"
}
}
]
+32 -3
View File
@@ -1025,7 +1025,22 @@
"description": "a step's wait the assigner holds: placing, wanting or composing until an acting part's new version runs",
"properties": {
"step": {
"type": "string"
"type": "string",
"enum": [
"take-in",
"validate",
"check",
"build",
"compose",
"grant",
"place",
"pipeline",
"put",
"delivery",
"kept-build",
"backup"
],
"description": "which wait: an acting step of section 203 or put, delivery, kept-build, backup (design 47 G section 498)"
},
"part": {
"type": "string",
@@ -1060,12 +1075,26 @@
"by": {
"type": "string",
"description": "on a release, who released it and why"
},
"clock-from": {
"type": "string",
"format": "date-time",
"description": "the time the bound counts from (design 47 G section 266, section 269, section 498)"
},
"fingerprint": {
"type": "string",
"description": "a put's wait: the fingerprint of the build put"
},
"machines": {
"type": "array",
"items": {
"type": "string"
},
"description": "a dependent's delivery wait: the machines the dependency's version has yet to reach"
}
},
"required": [
"step",
"part",
"version",
"module",
"since"
]
+2
View File
@@ -364,6 +364,8 @@ export interface Wait {
"artifact"?: string;
/** the watched branch, or the branch of a run on request */
"branch": string;
/** the time the bound counts from (design 47 G section 266, section 269, section 498) */
"clock-from"?: string;
/** the commit the module's entry was last changed at */
"commit"?: string;
/** the module's build-input fingerprint at the commit */
+10 -3
View File
@@ -311,18 +311,25 @@ export interface Wait {
"bound"?: string;
/** on a release, who released it and why */
"by"?: string;
/** the time the bound counts from (design 47 G section 266, section 269, section 498) */
"clock-from"?: string;
/** a put's wait: the fingerprint of the build put */
"fingerprint"?: string;
"fp"?: string;
/** on wait-ended: ran or released */
"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;
"node"?: string;
/** the acting part waited for */
"part": string;
"part"?: string;
"since": string;
"step": 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";
/** its new version's fingerprint */
"version": string;
"version"?: string;
}
/** is what upgrade takes. */