Take out StepRun.names: the step ask no longer carries the registrations' names for a lint scan
The part build-step.json, its generated Go and TypeScript (seatgen, check clean), the three build seats' fixtures and sdk/buildstep lose StepNames and the ask's required names. Builds: design 47 G §7, §328, §329
This commit is contained in:
@@ -812,16 +812,6 @@ const (
|
||||
StepEndedStepIntegration = "integration"
|
||||
)
|
||||
|
||||
// StepNames is the names the registrations hold, which the lint step refuses fixed in code logic (ADR 0666 section 5, seams ruling M7): carried in the ask, never read by the build module from another part.
|
||||
type StepNames struct {
|
||||
// every watched branch a registration names
|
||||
Branches []string `json:"branches"`
|
||||
// every module the registrations name
|
||||
Modules []string `json:"modules"`
|
||||
// every repository a registration's git origin names, as <owner>/<name>
|
||||
Repositories []string `json:"repositories"`
|
||||
}
|
||||
|
||||
// StepProgress is a running ask's progress, said once a minute while the holder runs it (design 47 G section 496).
|
||||
type StepProgress struct {
|
||||
Ask string `json:"ask"`
|
||||
@@ -883,7 +873,6 @@ type StepRun struct {
|
||||
// the kept results of the artifact's packages, by digest and level (design 47 *Carried, not run*)
|
||||
Kept []KeptResult `json:"kept,omitempty"`
|
||||
Module string `json:"module"`
|
||||
Names StepNames `json:"names"`
|
||||
// the runner's pipeline key, <branch>.<revision>.<module>, a branch escaped as a key's name is
|
||||
Pipeline string `json:"pipeline"`
|
||||
// the step is asked again by the runner's rerun
|
||||
|
||||
@@ -67,9 +67,9 @@ func TestFixtures(t *testing.T) {
|
||||
decode: func(b []byte) (any, error) { var v StepsByNodeIDValue; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "an ask dropped by the caller that no longer waits", subject: "", given: "{\"at\":\"2026-11-05T10:00:00Z\",\"by\":\"mesh-delivery-builder\",\"v\":1,\"why\":\"a newer fingerprint supersedes it\"}", wire: "{\"at\":\"2026-11-05T10:00:00Z\",\"by\":\"mesh-delivery-builder\",\"v\":1,\"why\":\"a newer fingerprint supersedes it\"}",
|
||||
decode: func(b []byte) (any, error) { var v PausesByDroppedIDValue; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "a step ask of the runner with the names and kept results", subject: "mesh.seat.node-build-go.accept.check.step", given: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"go\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"kept\":[{\"digest\":\"sha256:bbbb\",\"level\":\"unit\",\"package\":\"./modules/nats/a\",\"pipeline\":\"main.11.nats\"}],\"module\":\"nats\",\"names\":{\"branches\":[\"main\"],\"modules\":[\"nats\",\"mesh-sdk\"],\"repositories\":[\"novox/mesh-catalog\",\"novox/mesh-sdk\"]},\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"unit\"},\"v\":1}", wire: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"go\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"kept\":[{\"digest\":\"sha256:bbbb\",\"level\":\"unit\",\"package\":\"./modules/nats/a\",\"pipeline\":\"main.11.nats\"}],\"module\":\"nats\",\"names\":{\"branches\":[\"main\"],\"modules\":[\"nats\",\"mesh-sdk\"],\"repositories\":[\"novox/mesh-catalog\",\"novox/mesh-sdk\"]},\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"unit\"},\"v\":1}",
|
||||
{name: "a step ask of the runner with its kept results", subject: "mesh.seat.node-build-go.accept.check.step", given: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"go\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"kept\":[{\"digest\":\"sha256:bbbb\",\"level\":\"unit\",\"package\":\"./modules/nats/a\",\"pipeline\":\"main.11.nats\"}],\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"unit\"},\"v\":1}", wire: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"go\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"kept\":[{\"digest\":\"sha256:bbbb\",\"level\":\"unit\",\"package\":\"./modules/nats/a\",\"pipeline\":\"main.11.nats\"}],\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"unit\"},\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v CheckStepAccept; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-go\\.accept\\.check\\.step$")},
|
||||
{name: "a recovery's step ask of the runner, on the stream delivery", subject: "mesh.seat.node-build-go.accept.delivery.step", given: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"go\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"kept\":[{\"digest\":\"sha256:bbbb\",\"level\":\"unit\",\"package\":\"./modules/nats/a\",\"pipeline\":\"main.11.nats\"}],\"module\":\"nats\",\"names\":{\"branches\":[\"main\"],\"modules\":[\"nats\",\"mesh-sdk\"],\"repositories\":[\"novox/mesh-catalog\",\"novox/mesh-sdk\"]},\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"unit\"},\"v\":1}", wire: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"go\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"kept\":[{\"digest\":\"sha256:bbbb\",\"level\":\"unit\",\"package\":\"./modules/nats/a\",\"pipeline\":\"main.11.nats\"}],\"module\":\"nats\",\"names\":{\"branches\":[\"main\"],\"modules\":[\"nats\",\"mesh-sdk\"],\"repositories\":[\"novox/mesh-catalog\",\"novox/mesh-sdk\"]},\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"unit\"},\"v\":1}",
|
||||
{name: "a recovery's step ask of the runner, on the stream delivery", subject: "mesh.seat.node-build-go.accept.delivery.step", given: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"go\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"kept\":[{\"digest\":\"sha256:bbbb\",\"level\":\"unit\",\"package\":\"./modules/nats/a\",\"pipeline\":\"main.11.nats\"}],\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"unit\"},\"v\":1}", wire: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"go\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"kept\":[{\"digest\":\"sha256:bbbb\",\"level\":\"unit\",\"package\":\"./modules/nats/a\",\"pipeline\":\"main.11.nats\"}],\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"unit\"},\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v DeliveryStepAccept; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-go\\.accept\\.delivery\\.step$")},
|
||||
{name: "a run ask of the runner, the program built from the change and run over its heads", subject: "mesh.seat.node-build-go.accept.check.run", given: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-05T10:00:00Z\",\"id\":\"r5e6\",\"kind\":\"run\",\"language\":\"go\",\"run\":{\"args\":[\"-verdict\"],\"heads\":[{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-delivery\"},{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-sdk\"}],\"input\":{\"digest\":\"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\"size\":7,\"verb\":\"seat:mesh-delivery-checker.input\"},\"program\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"dir\":\"modules/mesh-delivery-checker\",\"package\":\"./cmd/mesh-checking-program\",\"repository\":\"novox/mesh-delivery\"},\"reader\":\"checking program of mesh-delivery head\"},\"v\":1}", wire: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-05T10:00:00Z\",\"id\":\"r5e6\",\"kind\":\"run\",\"language\":\"go\",\"run\":{\"args\":[\"-verdict\"],\"heads\":[{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-delivery\"},{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-sdk\"}],\"input\":{\"digest\":\"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\",\"size\":7,\"verb\":\"seat:mesh-delivery-checker.input\"},\"program\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"dir\":\"modules/mesh-delivery-checker\",\"package\":\"./cmd/mesh-checking-program\",\"repository\":\"novox/mesh-delivery\"},\"reader\":\"checking program of mesh-delivery head\"},\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v CheckRunAccept; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-go\\.accept\\.check\\.run$")},
|
||||
|
||||
@@ -810,16 +810,6 @@ const (
|
||||
StepEndedStepIntegration = "integration"
|
||||
)
|
||||
|
||||
// StepNames is the names the registrations hold, which the lint step refuses fixed in code logic (ADR 0666 section 5, seams ruling M7): carried in the ask, never read by the build module from another part.
|
||||
type StepNames struct {
|
||||
// every watched branch a registration names
|
||||
Branches []string `json:"branches"`
|
||||
// every module the registrations name
|
||||
Modules []string `json:"modules"`
|
||||
// every repository a registration's git origin names, as <owner>/<name>
|
||||
Repositories []string `json:"repositories"`
|
||||
}
|
||||
|
||||
// StepProgress is a running ask's progress, said once a minute while the holder runs it (design 47 G section 496).
|
||||
type StepProgress struct {
|
||||
Ask string `json:"ask"`
|
||||
@@ -881,7 +871,6 @@ type StepRun struct {
|
||||
// the kept results of the artifact's packages, by digest and level (design 47 *Carried, not run*)
|
||||
Kept []KeptResult `json:"kept,omitempty"`
|
||||
Module string `json:"module"`
|
||||
Names StepNames `json:"names"`
|
||||
// the runner's pipeline key, <branch>.<revision>.<module>, a branch escaped as a key's name is
|
||||
Pipeline string `json:"pipeline"`
|
||||
// the step is asked again by the runner's rerun
|
||||
|
||||
@@ -51,9 +51,9 @@ func TestFixtures(t *testing.T) {
|
||||
decode: func(b []byte) (any, error) { var v StepsByNodeIDValue; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "an ask dropped by the caller that no longer waits", subject: "", given: "{\"at\":\"2026-11-05T10:00:00Z\",\"by\":\"mesh-delivery-builder\",\"v\":1,\"why\":\"a newer fingerprint supersedes it\"}", wire: "{\"at\":\"2026-11-05T10:00:00Z\",\"by\":\"mesh-delivery-builder\",\"v\":1,\"why\":\"a newer fingerprint supersedes it\"}",
|
||||
decode: func(b []byte) (any, error) { var v PausesByDroppedIDValue; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "a lint step ask of the runner with the names", subject: "mesh.seat.node-build-image.accept.check.step", given: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"image\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"names\":{\"branches\":[\"main\"],\"modules\":[\"nats\",\"mesh-sdk\"],\"repositories\":[\"novox/mesh-catalog\",\"novox/mesh-sdk\"]},\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"lint\"},\"v\":1}", wire: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"image\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"names\":{\"branches\":[\"main\"],\"modules\":[\"nats\",\"mesh-sdk\"],\"repositories\":[\"novox/mesh-catalog\",\"novox/mesh-sdk\"]},\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"lint\"},\"v\":1}",
|
||||
{name: "a lint step ask of the runner with the names", subject: "mesh.seat.node-build-image.accept.check.step", given: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"image\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"lint\"},\"v\":1}", wire: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"image\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"lint\"},\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v CheckStepAccept; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-image\\.accept\\.check\\.step$")},
|
||||
{name: "a recovery's step ask of the runner, on the stream delivery", subject: "mesh.seat.node-build-image.accept.delivery.step", given: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"image\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"names\":{\"branches\":[\"main\"],\"modules\":[\"nats\",\"mesh-sdk\"],\"repositories\":[\"novox/mesh-catalog\",\"novox/mesh-sdk\"]},\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"lint\"},\"v\":1}", wire: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"image\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"names\":{\"branches\":[\"main\"],\"modules\":[\"nats\",\"mesh-sdk\"],\"repositories\":[\"novox/mesh-catalog\",\"novox/mesh-sdk\"]},\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"lint\"},\"v\":1}",
|
||||
{name: "a recovery's step ask of the runner, on the stream delivery", subject: "mesh.seat.node-build-image.accept.delivery.step", given: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"image\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"lint\"},\"v\":1}", wire: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"image\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"lint\"},\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v DeliveryStepAccept; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-image\\.accept\\.delivery\\.step$")},
|
||||
{name: "an artifact's detected steps", subject: "", given: "{\"at\":\"2026-11-10T10:00:00Z\",\"fingerprint\":\"fp-0123\",\"steps\":[{\"step\":\"lint\"},{\"packages\":[\"./modules/nats/a\"],\"step\":\"unit\"}],\"v\":1}", wire: "{\"at\":\"2026-11-10T10:00:00Z\",\"fingerprint\":\"fp-0123\",\"steps\":[{\"step\":\"lint\"},{\"packages\":[\"./modules/nats/a\"],\"step\":\"unit\"}],\"v\":1}",
|
||||
decode: func(b []byte) (any, error) {
|
||||
|
||||
@@ -810,16 +810,6 @@ const (
|
||||
StepEndedStepIntegration = "integration"
|
||||
)
|
||||
|
||||
// StepNames is the names the registrations hold, which the lint step refuses fixed in code logic (ADR 0666 section 5, seams ruling M7): carried in the ask, never read by the build module from another part.
|
||||
type StepNames struct {
|
||||
// every watched branch a registration names
|
||||
Branches []string `json:"branches"`
|
||||
// every module the registrations name
|
||||
Modules []string `json:"modules"`
|
||||
// every repository a registration's git origin names, as <owner>/<name>
|
||||
Repositories []string `json:"repositories"`
|
||||
}
|
||||
|
||||
// StepProgress is a running ask's progress, said once a minute while the holder runs it (design 47 G section 496).
|
||||
type StepProgress struct {
|
||||
Ask string `json:"ask"`
|
||||
@@ -881,7 +871,6 @@ type StepRun struct {
|
||||
// the kept results of the artifact's packages, by digest and level (design 47 *Carried, not run*)
|
||||
Kept []KeptResult `json:"kept,omitempty"`
|
||||
Module string `json:"module"`
|
||||
Names StepNames `json:"names"`
|
||||
// the runner's pipeline key, <branch>.<revision>.<module>, a branch escaped as a key's name is
|
||||
Pipeline string `json:"pipeline"`
|
||||
// the step is asked again by the runner's rerun
|
||||
|
||||
@@ -55,9 +55,9 @@ func TestFixtures(t *testing.T) {
|
||||
decode: func(b []byte) (any, error) { var v StepsByNodeIDValue; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "an ask dropped by the caller that no longer waits", subject: "", given: "{\"at\":\"2026-11-05T10:00:00Z\",\"by\":\"mesh-delivery-builder\",\"v\":1,\"why\":\"a newer fingerprint supersedes it\"}", wire: "{\"at\":\"2026-11-05T10:00:00Z\",\"by\":\"mesh-delivery-builder\",\"v\":1,\"why\":\"a newer fingerprint supersedes it\"}",
|
||||
decode: func(b []byte) (any, error) { var v PausesByDroppedIDValue; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "a step ask of the runner with the names and kept results", subject: "mesh.seat.node-build-node.accept.check.step", given: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"typescript\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"kept\":[{\"digest\":\"sha256:bbbb\",\"level\":\"unit\",\"package\":\"./modules/nats/a\",\"pipeline\":\"main.11.nats\"}],\"module\":\"nats\",\"names\":{\"branches\":[\"main\"],\"modules\":[\"nats\",\"mesh-sdk\"],\"repositories\":[\"novox/mesh-catalog\",\"novox/mesh-sdk\"]},\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"unit\"},\"v\":1}", wire: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"typescript\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"kept\":[{\"digest\":\"sha256:bbbb\",\"level\":\"unit\",\"package\":\"./modules/nats/a\",\"pipeline\":\"main.11.nats\"}],\"module\":\"nats\",\"names\":{\"branches\":[\"main\"],\"modules\":[\"nats\",\"mesh-sdk\"],\"repositories\":[\"novox/mesh-catalog\",\"novox/mesh-sdk\"]},\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"unit\"},\"v\":1}",
|
||||
{name: "a step ask of the runner with its kept results", subject: "mesh.seat.node-build-node.accept.check.step", given: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"typescript\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"kept\":[{\"digest\":\"sha256:bbbb\",\"level\":\"unit\",\"package\":\"./modules/nats/a\",\"pipeline\":\"main.11.nats\"}],\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"unit\"},\"v\":1}", wire: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"typescript\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"kept\":[{\"digest\":\"sha256:bbbb\",\"level\":\"unit\",\"package\":\"./modules/nats/a\",\"pipeline\":\"main.11.nats\"}],\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"unit\"},\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v CheckStepAccept; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-node\\.accept\\.check\\.step$")},
|
||||
{name: "a recovery's step ask of the runner, on the stream delivery", subject: "mesh.seat.node-build-node.accept.delivery.step", given: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"typescript\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"kept\":[{\"digest\":\"sha256:bbbb\",\"level\":\"unit\",\"package\":\"./modules/nats/a\",\"pipeline\":\"main.11.nats\"}],\"module\":\"nats\",\"names\":{\"branches\":[\"main\"],\"modules\":[\"nats\",\"mesh-sdk\"],\"repositories\":[\"novox/mesh-catalog\",\"novox/mesh-sdk\"]},\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"unit\"},\"v\":1}", wire: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"typescript\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"kept\":[{\"digest\":\"sha256:bbbb\",\"level\":\"unit\",\"package\":\"./modules/nats/a\",\"pipeline\":\"main.11.nats\"}],\"module\":\"nats\",\"names\":{\"branches\":[\"main\"],\"modules\":[\"nats\",\"mesh-sdk\"],\"repositories\":[\"novox/mesh-catalog\",\"novox/mesh-sdk\"]},\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"unit\"},\"v\":1}",
|
||||
{name: "a recovery's step ask of the runner, on the stream delivery", subject: "mesh.seat.node-build-node.accept.delivery.step", given: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"typescript\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"kept\":[{\"digest\":\"sha256:bbbb\",\"level\":\"unit\",\"package\":\"./modules/nats/a\",\"pipeline\":\"main.11.nats\"}],\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"unit\"},\"v\":1}", wire: "{\"asker\":\"mesh-delivery-pipeline\",\"at\":\"2026-11-10T10:00:00Z\",\"id\":\"m2kx9a1b3c4d5e\",\"kind\":\"step\",\"language\":\"typescript\",\"step\":{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fetch\":{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"repository\":\"novox/mesh-catalog\"},\"fingerprint\":\"fp-0123\",\"kept\":[{\"digest\":\"sha256:bbbb\",\"level\":\"unit\",\"package\":\"./modules/nats/a\",\"pipeline\":\"main.11.nats\"}],\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"step\":\"unit\"},\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v DeliveryStepAccept; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-node\\.accept\\.delivery\\.step$")},
|
||||
{name: "an artifact's detected steps", subject: "", given: "{\"at\":\"2026-11-10T10:00:00Z\",\"fingerprint\":\"fp-0123\",\"steps\":[{\"step\":\"lint\"},{\"packages\":[\"./modules/nats/a\"],\"step\":\"unit\"}],\"v\":1}", wire: "{\"at\":\"2026-11-10T10:00:00Z\",\"fingerprint\":\"fp-0123\",\"steps\":[{\"step\":\"lint\"},{\"packages\":[\"./modules/nats/a\"],\"step\":\"unit\"}],\"v\":1}",
|
||||
decode: func(b []byte) (any, error) {
|
||||
|
||||
@@ -1392,41 +1392,6 @@
|
||||
"modules"
|
||||
]
|
||||
},
|
||||
"StepNames": {
|
||||
"type": "object",
|
||||
"description": "the names the registrations hold, which the lint step refuses fixed in code logic (ADR 0666 section 5, seams ruling M7): carried in the ask, never read by the build module from another part",
|
||||
"properties": {
|
||||
"modules": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"minItems": 1,
|
||||
"description": "every module the registrations name"
|
||||
},
|
||||
"repositories": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"minItems": 1,
|
||||
"description": "every repository a registration's git origin names, as <owner>/<name>"
|
||||
},
|
||||
"branches": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"minItems": 1,
|
||||
"description": "every watched branch a registration names"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"modules",
|
||||
"repositories",
|
||||
"branches"
|
||||
]
|
||||
},
|
||||
"KeptResult": {
|
||||
"type": "object",
|
||||
"description": "a package's passing result the runner keeps, by the digest of what its tests read (ADR 0666 section 8): the step runs no package whose digest and level it names",
|
||||
@@ -1515,9 +1480,6 @@
|
||||
"toolchain": {
|
||||
"$ref": "#/defs/ToolchainUsed"
|
||||
},
|
||||
"names": {
|
||||
"$ref": "#/defs/StepNames"
|
||||
},
|
||||
"kept": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -1541,8 +1503,7 @@
|
||||
"artifact",
|
||||
"commit",
|
||||
"fingerprint",
|
||||
"fetch",
|
||||
"names"
|
||||
"fetch"
|
||||
]
|
||||
},
|
||||
"StepEnded": {
|
||||
|
||||
@@ -372,7 +372,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a step ask of the runner with the names and kept results",
|
||||
"name": "a step ask of the runner with its kept results",
|
||||
"of": "accept:check.step",
|
||||
"subject": "mesh.seat.node-build-go.accept.check.step",
|
||||
"given": {
|
||||
@@ -395,19 +395,6 @@
|
||||
"repository": "novox/mesh-catalog",
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567"
|
||||
},
|
||||
"names": {
|
||||
"modules": [
|
||||
"nats",
|
||||
"mesh-sdk"
|
||||
],
|
||||
"repositories": [
|
||||
"novox/mesh-catalog",
|
||||
"novox/mesh-sdk"
|
||||
],
|
||||
"branches": [
|
||||
"main"
|
||||
]
|
||||
},
|
||||
"kept": [
|
||||
{
|
||||
"package": "./modules/nats/a",
|
||||
@@ -443,19 +430,6 @@
|
||||
"repository": "novox/mesh-catalog",
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567"
|
||||
},
|
||||
"names": {
|
||||
"modules": [
|
||||
"nats",
|
||||
"mesh-sdk"
|
||||
],
|
||||
"repositories": [
|
||||
"novox/mesh-catalog",
|
||||
"novox/mesh-sdk"
|
||||
],
|
||||
"branches": [
|
||||
"main"
|
||||
]
|
||||
},
|
||||
"kept": [
|
||||
{
|
||||
"package": "./modules/nats/a",
|
||||
|
||||
@@ -110,19 +110,6 @@
|
||||
"fetch": {
|
||||
"repository": "novox/mesh-catalog",
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567"
|
||||
},
|
||||
"names": {
|
||||
"modules": [
|
||||
"nats",
|
||||
"mesh-sdk"
|
||||
],
|
||||
"repositories": [
|
||||
"novox/mesh-catalog",
|
||||
"novox/mesh-sdk"
|
||||
],
|
||||
"branches": [
|
||||
"main"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -150,19 +137,6 @@
|
||||
"fetch": {
|
||||
"repository": "novox/mesh-catalog",
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567"
|
||||
},
|
||||
"names": {
|
||||
"modules": [
|
||||
"nats",
|
||||
"mesh-sdk"
|
||||
],
|
||||
"repositories": [
|
||||
"novox/mesh-catalog",
|
||||
"novox/mesh-sdk"
|
||||
],
|
||||
"branches": [
|
||||
"main"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a step ask of the runner with the names and kept results",
|
||||
"name": "a step ask of the runner with its kept results",
|
||||
"of": "accept:check.step",
|
||||
"subject": "mesh.seat.node-build-node.accept.check.step",
|
||||
"given": {
|
||||
@@ -183,19 +183,6 @@
|
||||
"repository": "novox/mesh-catalog",
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567"
|
||||
},
|
||||
"names": {
|
||||
"modules": [
|
||||
"nats",
|
||||
"mesh-sdk"
|
||||
],
|
||||
"repositories": [
|
||||
"novox/mesh-catalog",
|
||||
"novox/mesh-sdk"
|
||||
],
|
||||
"branches": [
|
||||
"main"
|
||||
]
|
||||
},
|
||||
"kept": [
|
||||
{
|
||||
"package": "./modules/nats/a",
|
||||
@@ -231,19 +218,6 @@
|
||||
"repository": "novox/mesh-catalog",
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567"
|
||||
},
|
||||
"names": {
|
||||
"modules": [
|
||||
"nats",
|
||||
"mesh-sdk"
|
||||
],
|
||||
"repositories": [
|
||||
"novox/mesh-catalog",
|
||||
"novox/mesh-sdk"
|
||||
],
|
||||
"branches": [
|
||||
"main"
|
||||
]
|
||||
},
|
||||
"kept": [
|
||||
{
|
||||
"package": "./modules/nats/a",
|
||||
|
||||
-1
@@ -160,7 +160,6 @@ export type StepAskCheck = buildStep.StepAskCheck;
|
||||
export type StepAskCompose = buildStep.StepAskCompose;
|
||||
export type StepEnded = buildStep.StepEnded;
|
||||
export type StepEndedEvent = buildStep.StepEndedEvent;
|
||||
export type StepNames = buildStep.StepNames;
|
||||
export type StepProgress = buildStep.StepProgress;
|
||||
export type StepProgressEvent = buildStep.StepProgressEvent;
|
||||
export type StepResult = buildStep.StepResult;
|
||||
|
||||
@@ -428,16 +428,6 @@ export interface StepEnded {
|
||||
"v"?: number;
|
||||
}
|
||||
|
||||
/** the names the registrations hold, which the lint step refuses fixed in code logic (ADR 0666 section 5, seams ruling M7): carried in the ask, never read by the build module from another part */
|
||||
export interface StepNames {
|
||||
/** every watched branch a registration names */
|
||||
"branches": string[];
|
||||
/** every module the registrations name */
|
||||
"modules": string[];
|
||||
/** every repository a registration's git origin names, as <owner>/<name> */
|
||||
"repositories": string[];
|
||||
}
|
||||
|
||||
/** a running ask's progress, said once a minute while the holder runs it (design 47 G section 496) */
|
||||
export interface StepProgress {
|
||||
"ask": string;
|
||||
@@ -491,7 +481,6 @@ export interface StepRun {
|
||||
/** the kept results of the artifact's packages, by digest and level (design 47 *Carried, not run*) */
|
||||
"kept"?: KeptResult[];
|
||||
"module": string;
|
||||
"names": StepNames;
|
||||
/** the runner's pipeline key, <branch>.<revision>.<module>, a branch escaped as a key's name is */
|
||||
"pipeline": string;
|
||||
/** the step is asked again by the runner's rerun */
|
||||
|
||||
@@ -157,7 +157,6 @@ export type StepAskCheck = buildStep.StepAskCheck;
|
||||
export type StepAskCompose = buildStep.StepAskCompose;
|
||||
export type StepEnded = buildStep.StepEnded;
|
||||
export type StepEndedEvent = buildStep.StepEndedEvent;
|
||||
export type StepNames = buildStep.StepNames;
|
||||
export type StepProgress = buildStep.StepProgress;
|
||||
export type StepProgressEvent = buildStep.StepProgressEvent;
|
||||
export type StepResult = buildStep.StepResult;
|
||||
|
||||
@@ -428,16 +428,6 @@ export interface StepEnded {
|
||||
"v"?: number;
|
||||
}
|
||||
|
||||
/** the names the registrations hold, which the lint step refuses fixed in code logic (ADR 0666 section 5, seams ruling M7): carried in the ask, never read by the build module from another part */
|
||||
export interface StepNames {
|
||||
/** every watched branch a registration names */
|
||||
"branches": string[];
|
||||
/** every module the registrations name */
|
||||
"modules": string[];
|
||||
/** every repository a registration's git origin names, as <owner>/<name> */
|
||||
"repositories": string[];
|
||||
}
|
||||
|
||||
/** a running ask's progress, said once a minute while the holder runs it (design 47 G section 496) */
|
||||
export interface StepProgress {
|
||||
"ask": string;
|
||||
@@ -491,7 +481,6 @@ export interface StepRun {
|
||||
/** the kept results of the artifact's packages, by digest and level (design 47 *Carried, not run*) */
|
||||
"kept"?: KeptResult[];
|
||||
"module": string;
|
||||
"names": StepNames;
|
||||
/** the runner's pipeline key, <branch>.<revision>.<module>, a branch escaped as a key's name is */
|
||||
"pipeline": string;
|
||||
/** the step is asked again by the runner's rerun */
|
||||
|
||||
-1
@@ -157,7 +157,6 @@ export type StepAskCheck = buildStep.StepAskCheck;
|
||||
export type StepAskCompose = buildStep.StepAskCompose;
|
||||
export type StepEnded = buildStep.StepEnded;
|
||||
export type StepEndedEvent = buildStep.StepEndedEvent;
|
||||
export type StepNames = buildStep.StepNames;
|
||||
export type StepProgress = buildStep.StepProgress;
|
||||
export type StepProgressEvent = buildStep.StepProgressEvent;
|
||||
export type StepResult = buildStep.StepResult;
|
||||
|
||||
@@ -428,16 +428,6 @@ export interface StepEnded {
|
||||
"v"?: number;
|
||||
}
|
||||
|
||||
/** the names the registrations hold, which the lint step refuses fixed in code logic (ADR 0666 section 5, seams ruling M7): carried in the ask, never read by the build module from another part */
|
||||
export interface StepNames {
|
||||
/** every watched branch a registration names */
|
||||
"branches": string[];
|
||||
/** every module the registrations name */
|
||||
"modules": string[];
|
||||
/** every repository a registration's git origin names, as <owner>/<name> */
|
||||
"repositories": string[];
|
||||
}
|
||||
|
||||
/** a running ask's progress, said once a minute while the holder runs it (design 47 G section 496) */
|
||||
export interface StepProgress {
|
||||
"ask": string;
|
||||
@@ -491,7 +481,6 @@ export interface StepRun {
|
||||
/** the kept results of the artifact's packages, by digest and level (design 47 *Carried, not run*) */
|
||||
"kept"?: KeptResult[];
|
||||
"module": string;
|
||||
"names": StepNames;
|
||||
/** the runner's pipeline key, <branch>.<revision>.<module>, a branch escaped as a key's name is */
|
||||
"pipeline": string;
|
||||
/** the step is asked again by the runner's rerun */
|
||||
|
||||
@@ -47,14 +47,13 @@ func runAsk() StepAsk {
|
||||
Input: in, Args: []string{"-verdict"}}}
|
||||
}
|
||||
|
||||
// stepAsk is the runner's unit step of one artifact (086 A-D31): the names the lint step reads and a kept result.
|
||||
// stepAsk is the runner's unit step of one artifact (086 A-D31): its kept result.
|
||||
func stepAsk() StepAsk {
|
||||
return StepAsk{ID: testAskID, Kind: AskStep, Language: AskGo, Asker: "mesh-delivery-pipeline",
|
||||
At: time.Date(2026, 11, 10, 10, 0, 0, 0, time.UTC),
|
||||
Step: &StepRun{Pipeline: "main.12.nats", Step: StepUnit, Module: "nats", Artifact: "nats:program", Branch: "main",
|
||||
Commit: testCommit, Revision: 12, Fingerprint: "fp-0123", Fetch: Fetch{Repository: "novox/mesh-catalog", Commit: testCommit},
|
||||
Names: StepNames{Modules: []string{"nats"}, Repositories: []string{"novox/mesh-catalog"}, Branches: []string{"main"}},
|
||||
Kept: []KeptResult{{Package: "./modules/nats/a", Digest: "sha256:bbbb", Level: StepUnit}}}}
|
||||
Kept: []KeptResult{{Package: "./modules/nats/a", Digest: "sha256:bbbb", Level: StepUnit}}}}
|
||||
}
|
||||
|
||||
// The ask the three build seats share is one neutral form: it round-trips, and every ill-formed ask is refused,
|
||||
@@ -137,7 +136,6 @@ func TestAskCheckAndRoundTrip(t *testing.T) {
|
||||
{"artifact of another module", func(a *StepAsk) { a.Step.Artifact = "nats-tools:program" }, "not nats:<artifact>"},
|
||||
{"step at a branch", func(a *StepAsk) { a.Step.Commit = "main" }, "no full commit"},
|
||||
{"no fingerprint", func(a *StepAsk) { a.Step.Fingerprint = "" }, "no build-input fingerprint"},
|
||||
{"no names", func(a *StepAsk) { a.Step.Names = StepNames{Modules: []string{"nats"}} }, "no repositories, branches of the registrations"},
|
||||
{"rerun with no caller", func(a *StepAsk) { a.Step.Rerun = true }, "rerun with no caller"},
|
||||
} {
|
||||
a := stepAsk()
|
||||
|
||||
@@ -39,14 +39,6 @@ var StepOutcomes = []string{OutcomePassed, OutcomeFailed, OutcomeNothingToRun, O
|
||||
// StepEndedVersion is the layout version of a step's end.
|
||||
const StepEndedVersion = 1
|
||||
|
||||
// StepNames are the names the registrations hold, which the lint step refuses fixed in code logic (ADR 0666 §5):
|
||||
// carried in the ask, so the build module reads no other part for them.
|
||||
type StepNames struct {
|
||||
Modules []string `json:"modules"`
|
||||
Repositories []string `json:"repositories"`
|
||||
Branches []string `json:"branches"`
|
||||
}
|
||||
|
||||
// KeptResult is a package's passing result at the digest of what its tests read (ADR 0666 §8).
|
||||
type KeptResult struct {
|
||||
Package string `json:"package"`
|
||||
@@ -74,7 +66,6 @@ type StepRun struct {
|
||||
Fingerprint string `json:"fingerprint"`
|
||||
Fetch Fetch `json:"fetch"`
|
||||
Toolchain *ToolchainUsed `json:"toolchain,omitempty"`
|
||||
Names StepNames `json:"names"`
|
||||
Kept []KeptResult `json:"kept,omitempty"`
|
||||
Rerun bool `json:"rerun,omitempty"`
|
||||
By string `json:"by,omitempty"`
|
||||
@@ -109,18 +100,6 @@ func (r StepRun) check(id string) error {
|
||||
if err := r.Fetch.check(id); err != nil {
|
||||
return err
|
||||
}
|
||||
var missing []string
|
||||
for _, n := range []struct {
|
||||
name string
|
||||
list []string
|
||||
}{{"modules", r.Names.Modules}, {"repositories", r.Names.Repositories}, {"branches", r.Names.Branches}} {
|
||||
if len(n.list) == 0 {
|
||||
missing = append(missing, n.name)
|
||||
}
|
||||
}
|
||||
if len(missing) > 0 {
|
||||
return fmt.Errorf("buildstep: the step ask %s names no %s of the registrations, which the lint step reads", id, strings.Join(missing, ", "))
|
||||
}
|
||||
if r.Rerun != (r.By != "") {
|
||||
return fmt.Errorf("buildstep: the step ask %s is a rerun with no caller, or names a caller and is no rerun", id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user