From 3560362330b131be721101ee612aa5967dc4e1ad Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 20 Nov 2026 03:27:41 +0100 Subject: [PATCH] C-W2: a step the assigner serves names its asker MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The seat mesh-wants' StepRun gains asker, the seat name of the part asking the step (the runner writes mesh-pipeline-runner), so the assigner names a step's progress with it. Optional in the definition: the line names its writer, not that a step without it is refused. Both accept:step fixtures carry it; the generated fixture test fails without the field. Builds: design 47 H §745; lead answer H-A-88 (hq 2c6c7c03), H-A-41 Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy --- .../mesh-delivery-contracts/go/seats/meshwants/contract.go | 2 ++ .../go/seats/meshwants/contract_test.go | 4 ++-- .../seats/mesh-wants/fixtures/verbs.json | 6 ++++-- modules/mesh-delivery-contracts/seats/mesh-wants/seat.json | 4 ++++ .../mesh-delivery-contracts/ts/seats/meshwants/index.d.ts | 2 ++ 5 files changed, 14 insertions(+), 4 deletions(-) diff --git a/modules/mesh-delivery-contracts/go/seats/meshwants/contract.go b/modules/mesh-delivery-contracts/go/seats/meshwants/contract.go index 98ca9b80..9ef9156c 100644 --- a/modules/mesh-delivery-contracts/go/seats/meshwants/contract.go +++ b/modules/mesh-delivery-contracts/go/seats/meshwants/contract.go @@ -1075,6 +1075,8 @@ const ( // StepRun is a pipeline step of one mover the assigner serves (design 47 H §745, G §22): validate, the manifest validator built from the take-in's heads run over the revision's manifests, before composition, each machine's declaration composed at the change's heads with the composer built from them, both in the build seat's sandbox. type StepRun struct { + // the seat name of the part asking the step, mesh-pipeline-runner for the runner; the assigner names the step's progress with it (design 47 H-A-88, H-A-41) + Asker string `json:"asker,omitempty"` // the watched branch, or the branch of a run on request Branch string `json:"branch"` // for a rerun, the caller the runtime proved diff --git a/modules/mesh-delivery-contracts/go/seats/meshwants/contract_test.go b/modules/mesh-delivery-contracts/go/seats/meshwants/contract_test.go index a090ff0d..daeed530 100644 --- a/modules/mesh-delivery-contracts/go/seats/meshwants/contract_test.go +++ b/modules/mesh-delivery-contracts/go/seats/meshwants/contract_test.go @@ -141,9 +141,9 @@ func TestFixtures(t *testing.T) { decode: func(b []byte) (any, error) { var v DifferenceAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil}, {name: "difference refuses a changed fingerprint with no difference, by name", subject: "", given: "{\"changes\":[],\"from\":40,\"refused\":[{\"module\":\"xclip\",\"why\":\"its fingerprint changed and its difference is empty\"}],\"to\":41}", wire: "{\"changes\":[],\"from\":40,\"refused\":[{\"module\":\"xclip\",\"why\":\"its fingerprint changed and its difference is empty\"}],\"to\":41}", decode: func(b []byte) (any, error) { var v DifferenceAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil}, - {name: "a composition step asked by the runner", subject: "mesh.seat.mesh-wants.accept.step", given: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.3589\",\"revision\":12,\"source\":3589,\"step\":\"composition\"}", wire: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.3589\",\"revision\":12,\"source\":3589,\"step\":\"composition\"}", + {name: "a composition step asked by the runner", subject: "mesh.seat.mesh-wants.accept.step", given: "{\"asker\":\"mesh-pipeline-runner\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.3589\",\"revision\":12,\"source\":3589,\"step\":\"composition\"}", wire: "{\"asker\":\"mesh-pipeline-runner\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.3589\",\"revision\":12,\"source\":3589,\"step\":\"composition\"}", decode: func(b []byte) (any, error) { var v StepAccept; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-wants\\.accept\\.step$")}, - {name: "a validate step asked by the runner, before the mover's composition", subject: "mesh.seat.mesh-wants.accept.step", given: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.3589\",\"revision\":12,\"source\":3589,\"step\":\"validate\"}", wire: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.3589\",\"revision\":12,\"source\":3589,\"step\":\"validate\"}", + {name: "a validate step asked by the runner, before the mover's composition", subject: "mesh.seat.mesh-wants.accept.step", given: "{\"asker\":\"mesh-pipeline-runner\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.3589\",\"revision\":12,\"source\":3589,\"step\":\"validate\"}", wire: "{\"asker\":\"mesh-pipeline-runner\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.3589\",\"revision\":12,\"source\":3589,\"step\":\"validate\"}", decode: func(b []byte) (any, error) { var v StepAccept; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-wants\\.accept\\.step$")}, {name: "input asks a composition step's input by digest", subject: "", given: "{\"call\":\"0123456789abcdef0123456789abcdef\",\"digest\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"}", wire: "{\"call\":\"0123456789abcdef0123456789abcdef\",\"digest\":\"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\"}", decode: func(b []byte) (any, error) { var v InputInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil}, diff --git a/modules/mesh-delivery-contracts/seats/mesh-wants/fixtures/verbs.json b/modules/mesh-delivery-contracts/seats/mesh-wants/fixtures/verbs.json index cbeb2d7f..2c09da7a 100644 --- a/modules/mesh-delivery-contracts/seats/mesh-wants/fixtures/verbs.json +++ b/modules/mesh-delivery-contracts/seats/mesh-wants/fixtures/verbs.json @@ -157,7 +157,8 @@ "commit": "0123456789abcdef0123456789abcdef01234567", "revision": 12, "source": 3589, - "fingerprint": "fp-0123" + "fingerprint": "fp-0123", + "asker": "mesh-pipeline-runner" } }, { @@ -172,7 +173,8 @@ "commit": "0123456789abcdef0123456789abcdef01234567", "revision": 12, "source": 3589, - "fingerprint": "fp-0123" + "fingerprint": "fp-0123", + "asker": "mesh-pipeline-runner" } }, { diff --git a/modules/mesh-delivery-contracts/seats/mesh-wants/seat.json b/modules/mesh-delivery-contracts/seats/mesh-wants/seat.json index 09488de3..11f475d6 100644 --- a/modules/mesh-delivery-contracts/seats/mesh-wants/seat.json +++ b/modules/mesh-delivery-contracts/seats/mesh-wants/seat.json @@ -1362,6 +1362,10 @@ "type": "string", "description": "the module's build-input fingerprint at the commit" }, + "asker": { + "type": "string", + "description": "the seat name of the part asking the step, mesh-pipeline-runner for the runner; the assigner names the step's progress with it (design 47 H-A-88, H-A-41)" + }, "run": { "type": "string", "description": "the run on request's id: its composition writes no want (ADR 0666 section 18)" diff --git a/modules/mesh-delivery-contracts/ts/seats/meshwants/index.d.ts b/modules/mesh-delivery-contracts/ts/seats/meshwants/index.d.ts index c8112c2e..5e250410 100644 --- a/modules/mesh-delivery-contracts/ts/seats/meshwants/index.d.ts +++ b/modules/mesh-delivery-contracts/ts/seats/meshwants/index.d.ts @@ -466,6 +466,8 @@ export interface StepEnded { /** a pipeline step of one mover the assigner serves (design 47 H §745, G §22): validate, the manifest validator built from the take-in's heads run over the revision's manifests, before composition, each machine's declaration composed at the change's heads with the composer built from them, both in the build seat's sandbox */ export interface StepRun { + /** the seat name of the part asking the step, mesh-pipeline-runner for the runner; the assigner names the step's progress with it (design 47 H-A-88, H-A-41) */ + "asker"?: string; /** the watched branch, or the branch of a run on request */ "branch": string; /** for a rerun, the caller the runtime proved */