From 17517b9f4edbac87c85831a64cf9116d7f4dc693 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 11 Nov 2026 10:44:58 +0100 Subject: [PATCH] CT5: the build seats' accepted kinds step and run, and the state detected-steps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Builds: design 47 G §22, §338 (accepted kinds step, runner alone; run, node-build-go, callers the runner, the indexer, the assigner and the checker), §326, §414 (state detected-steps, one key per artifact, apart from today's step keys steps). Not built: §415's kind names check.step, check.run, delivery.step (the definition reader refuses a dotted accepted-kind name); stopped on that question. Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ --- contracts/parts/build-step.json | 27 +++++++++ .../seats/node-build-go/fixtures/states.json | 60 +++++++++++++++++++ contracts/seats/node-build-go/seat.json | 27 +++++++++ .../node-build-image/fixtures/states.json | 20 +++++++ contracts/seats/node-build-image/seat.json | 15 +++++ .../node-build-node/fixtures/states.json | 20 +++++++ contracts/seats/node-build-node/seat.json | 15 +++++ 7 files changed, 184 insertions(+) diff --git a/contracts/parts/build-step.json b/contracts/parts/build-step.json index 872d1435..3aed594f 100644 --- a/contracts/parts/build-step.json +++ b/contracts/parts/build-step.json @@ -1601,6 +1601,33 @@ "required": [ "step" ] + }, + "DetectedSteps": { + "type": "object", + "description": "the steps detected for one artifact at its newest build-input fingerprint, replaced when a newer fingerprint is detected and by steps with again (design 47 G section 326)", + "properties": { + "v": { + "type": "integer" + }, + "fingerprint": { + "type": "string" + }, + "steps": { + "type": "array", + "items": { + "$ref": "#/defs/DetectedStep" + } + }, + "at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "v", + "fingerprint", + "steps" + ] } }, "events": [ diff --git a/contracts/seats/node-build-go/fixtures/states.json b/contracts/seats/node-build-go/fixtures/states.json index b14fffbb..88351639 100644 --- a/contracts/seats/node-build-go/fixtures/states.json +++ b/contracts/seats/node-build-go/fixtures/states.json @@ -418,5 +418,65 @@ ] } } + }, + { + "name": "a run ask of the runner, the program built from the change and run over its heads", + "of": "accept:run", + "subject": "mesh.seat.node-build-go.accept.run", + "given": { + "v": 1, + "id": "r5e6", + "kind": "run", + "language": "go", + "asker": "mesh-delivery-pipeline", + "at": "2026-11-05T10:00:00Z", + "run": { + "program": { + "repository": "novox/mesh-delivery", + "commit": "0123456789abcdef0123456789abcdef01234567", + "dir": "modules/mesh-delivery-checker", + "package": "./cmd/mesh-checking-program" + }, + "heads": [ + { + "repository": "novox/mesh-delivery", + "commit": "0123456789abcdef0123456789abcdef01234567" + }, + { + "repository": "novox/mesh-sdk", + "commit": "0123456789abcdef0123456789abcdef01234567" + } + ], + "input": { + "verb": "seat:mesh-delivery-checker.input", + "digest": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "size": 7 + }, + "args": [ + "-verdict" + ], + "reader": "checking program of mesh-delivery head" + } + } + }, + { + "name": "an artifact's detected steps", + "of": "state:detected-steps/.", + "given": { + "v": 1, + "fingerprint": "fp-0123", + "steps": [ + { + "step": "lint" + }, + { + "step": "unit", + "packages": [ + "./modules/nats/a" + ] + } + ], + "at": "2026-11-10T10:00:00Z" + } } ] diff --git a/contracts/seats/node-build-go/seat.json b/contracts/seats/node-build-go/seat.json index 6bb7f53a..0e720750 100644 --- a/contracts/seats/node-build-go/seat.json +++ b/contracts/seats/node-build-go/seat.json @@ -52,6 +52,18 @@ "callers": [ "seat:mesh-delivery-checker" ] + }, + { + "name": "run", + "body": { + "$ref": "#/defs/StepAsk" + }, + "callers": [ + "seat:mesh-pipeline-runner", + "seat:mesh-catalog", + "seat:mesh-wants", + "seat:mesh-delivery-checker" + ] } ], "description": "The Go build module on a node: it takes the asks of the builder and the checker, runs them as steps and answers.", @@ -117,6 +129,21 @@ ], "description": "the toolchains the nodes report", "history": 1 + }, + { + "name": "detected-steps", + "template": "state", + "history": 1, + "description": "each artifact's detected steps, one key per artifact (design 47 G section 326, section 414)", + "key-forms": [ + { + "key": ".", + "value": { + "$ref": "#/defs/DetectedSteps" + }, + "description": "an artifact's detected steps" + } + ] } ], "family": { diff --git a/contracts/seats/node-build-image/fixtures/states.json b/contracts/seats/node-build-image/fixtures/states.json index c993e033..0053f603 100644 --- a/contracts/seats/node-build-image/fixtures/states.json +++ b/contracts/seats/node-build-image/fixtures/states.json @@ -126,5 +126,25 @@ } } } + }, + { + "name": "an artifact's detected steps", + "of": "state:detected-steps/.", + "given": { + "v": 1, + "fingerprint": "fp-0123", + "steps": [ + { + "step": "lint" + }, + { + "step": "unit", + "packages": [ + "./modules/nats/a" + ] + } + ], + "at": "2026-11-10T10:00:00Z" + } } ] diff --git a/contracts/seats/node-build-image/seat.json b/contracts/seats/node-build-image/seat.json index d2329e72..383860af 100644 --- a/contracts/seats/node-build-image/seat.json +++ b/contracts/seats/node-build-image/seat.json @@ -108,6 +108,21 @@ ], "description": "the toolchains the nodes report", "history": 1 + }, + { + "name": "detected-steps", + "template": "state", + "history": 1, + "description": "each artifact's detected steps, one key per artifact (design 47 G section 326, section 414)", + "key-forms": [ + { + "key": ".", + "value": { + "$ref": "#/defs/DetectedSteps" + }, + "description": "an artifact's detected steps" + } + ] } ], "family": { diff --git a/contracts/seats/node-build-node/fixtures/states.json b/contracts/seats/node-build-node/fixtures/states.json index e2cd93a4..8e4c9fe0 100644 --- a/contracts/seats/node-build-node/fixtures/states.json +++ b/contracts/seats/node-build-node/fixtures/states.json @@ -206,5 +206,25 @@ ] } } + }, + { + "name": "an artifact's detected steps", + "of": "state:detected-steps/.", + "given": { + "v": 1, + "fingerprint": "fp-0123", + "steps": [ + { + "step": "lint" + }, + { + "step": "unit", + "packages": [ + "./modules/nats/a" + ] + } + ], + "at": "2026-11-10T10:00:00Z" + } } ] diff --git a/contracts/seats/node-build-node/seat.json b/contracts/seats/node-build-node/seat.json index d500250e..dd03154f 100644 --- a/contracts/seats/node-build-node/seat.json +++ b/contracts/seats/node-build-node/seat.json @@ -115,6 +115,21 @@ ], "description": "the toolchains the nodes report", "history": 1 + }, + { + "name": "detected-steps", + "template": "state", + "history": 1, + "description": "each artifact's detected steps, one key per artifact (design 47 G section 326, section 414)", + "key-forms": [ + { + "key": ".", + "value": { + "$ref": "#/defs/DetectedSteps" + }, + "description": "an artifact's detected steps" + } + ] } ], "family": {