Merge branch 'feat/47-G-build' into feat/47-G-build-builder

This commit is contained in:
2026-11-11 11:30:12 +01:00
18 changed files with 293 additions and 69 deletions
+20 -13
View File
@@ -24,11 +24,12 @@ const (
)
const (
AcceptDelivery = "delivery"
AcceptCheck = "check"
AcceptStep = "step"
AcceptRecheck = "recheck"
AcceptRun = "run"
AcceptDelivery = "delivery"
AcceptCheck = "check"
AcceptCheckStep = "check.step"
AcceptDeliveryStep = "delivery.step"
AcceptRecheck = "recheck"
AcceptCheckRun = "check.run"
)
const (
@@ -66,14 +67,17 @@ const AcceptSubjectDelivery = "mesh.seat.node-build-go.accept.delivery"
// AcceptSubjectCheck is where check is sent.
const AcceptSubjectCheck = "mesh.seat.node-build-go.accept.check"
// AcceptSubjectStep is where step is sent.
const AcceptSubjectStep = "mesh.seat.node-build-go.accept.step"
// AcceptSubjectCheckStep is where check.step is sent.
const AcceptSubjectCheckStep = "mesh.seat.node-build-go.accept.check.step"
// AcceptSubjectDeliveryStep is where delivery.step is sent.
const AcceptSubjectDeliveryStep = "mesh.seat.node-build-go.accept.delivery.step"
// AcceptSubjectRecheck is where recheck is sent.
const AcceptSubjectRecheck = "mesh.seat.node-build-go.accept.recheck"
// AcceptSubjectRun is where run is sent.
const AcceptSubjectRun = "mesh.seat.node-build-go.accept.run"
// AcceptSubjectCheckRun is where check.run is sent.
const AcceptSubjectCheckRun = "mesh.seat.node-build-go.accept.check.run"
const (
StateSteps = "steps"
@@ -930,14 +934,17 @@ type DeliveryAccept = StepAsk
// CheckAccept is the body of check.
type CheckAccept = StepAsk
// StepAccept is the body of step.
type StepAccept = StepAsk
// CheckStepAccept is the body of check.step.
type CheckStepAccept = StepAsk
// DeliveryStepAccept is the body of delivery.step.
type DeliveryStepAccept = StepAsk
// RecheckAccept is the body of recheck.
type RecheckAccept = StepAsk
// RunAccept is the body of run.
type RunAccept = StepAsk
// CheckRunAccept is the body of check.run.
type CheckRunAccept = StepAsk
// StepEndedEvent is the body of the event step-ended.
type StepEndedEvent = StepEnded
@@ -63,10 +63,12 @@ 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.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}",
decode: func(b []byte) (any, error) { var v StepAccept; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-go\\.accept\\.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.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 RunAccept; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-go\\.accept\\.run$")},
{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}",
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}",
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$")},
{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) {
var v DetectedStepsByModuleArtifactValue
+15 -8
View File
@@ -24,10 +24,11 @@ const (
)
const (
AcceptDelivery = "delivery"
AcceptCheck = "check"
AcceptStep = "step"
AcceptRecheck = "recheck"
AcceptDelivery = "delivery"
AcceptCheck = "check"
AcceptCheckStep = "check.step"
AcceptDeliveryStep = "delivery.step"
AcceptRecheck = "recheck"
)
const (
@@ -67,8 +68,11 @@ const AcceptSubjectDelivery = "mesh.seat.node-build-image.accept.delivery"
// AcceptSubjectCheck is where check is sent.
const AcceptSubjectCheck = "mesh.seat.node-build-image.accept.check"
// AcceptSubjectStep is where step is sent.
const AcceptSubjectStep = "mesh.seat.node-build-image.accept.step"
// AcceptSubjectCheckStep is where check.step is sent.
const AcceptSubjectCheckStep = "mesh.seat.node-build-image.accept.check.step"
// AcceptSubjectDeliveryStep is where delivery.step is sent.
const AcceptSubjectDeliveryStep = "mesh.seat.node-build-image.accept.delivery.step"
// AcceptSubjectRecheck is where recheck is sent.
const AcceptSubjectRecheck = "mesh.seat.node-build-image.accept.recheck"
@@ -928,8 +932,11 @@ type DeliveryAccept = StepAsk
// CheckAccept is the body of check.
type CheckAccept = StepAsk
// StepAccept is the body of step.
type StepAccept = StepAsk
// CheckStepAccept is the body of check.step.
type CheckStepAccept = StepAsk
// DeliveryStepAccept is the body of delivery.step.
type DeliveryStepAccept = StepAsk
// RecheckAccept is the body of recheck.
type RecheckAccept = StepAsk
@@ -47,8 +47,10 @@ 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.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}",
decode: func(b []byte) (any, error) { var v StepAccept; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-image\\.accept\\.step$")},
{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}",
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}",
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) {
var v DetectedStepsByModuleArtifactValue
+15 -8
View File
@@ -24,10 +24,11 @@ const (
)
const (
AcceptDelivery = "delivery"
AcceptCheck = "check"
AcceptStep = "step"
AcceptRecheck = "recheck"
AcceptDelivery = "delivery"
AcceptCheck = "check"
AcceptCheckStep = "check.step"
AcceptDeliveryStep = "delivery.step"
AcceptRecheck = "recheck"
)
const (
@@ -67,8 +68,11 @@ const AcceptSubjectDelivery = "mesh.seat.node-build-node.accept.delivery"
// AcceptSubjectCheck is where check is sent.
const AcceptSubjectCheck = "mesh.seat.node-build-node.accept.check"
// AcceptSubjectStep is where step is sent.
const AcceptSubjectStep = "mesh.seat.node-build-node.accept.step"
// AcceptSubjectCheckStep is where check.step is sent.
const AcceptSubjectCheckStep = "mesh.seat.node-build-node.accept.check.step"
// AcceptSubjectDeliveryStep is where delivery.step is sent.
const AcceptSubjectDeliveryStep = "mesh.seat.node-build-node.accept.delivery.step"
// AcceptSubjectRecheck is where recheck is sent.
const AcceptSubjectRecheck = "mesh.seat.node-build-node.accept.recheck"
@@ -928,8 +932,11 @@ type DeliveryAccept = StepAsk
// CheckAccept is the body of check.
type CheckAccept = StepAsk
// StepAccept is the body of step.
type StepAccept = StepAsk
// CheckStepAccept is the body of check.step.
type CheckStepAccept = StepAsk
// DeliveryStepAccept is the body of delivery.step.
type DeliveryStepAccept = StepAsk
// RecheckAccept is the body of recheck.
type RecheckAccept = StepAsk
@@ -51,8 +51,10 @@ 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.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}",
decode: func(b []byte) (any, error) { var v StepAccept; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.node-build-node\\.accept\\.step$")},
{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}",
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}",
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) {
var v DetectedStepsByModuleArtifactValue
@@ -373,8 +373,56 @@
},
{
"name": "a step ask of the runner with the names and kept results",
"of": "accept:step",
"subject": "mesh.seat.node-build-go.accept.step",
"of": "accept:check.step",
"subject": "mesh.seat.node-build-go.accept.check.step",
"given": {
"v": 1,
"id": "m2kx9a1b3c4d5e",
"kind": "step",
"language": "go",
"asker": "mesh-delivery-pipeline",
"at": "2026-11-10T10:00:00Z",
"step": {
"pipeline": "main.12.nats",
"step": "unit",
"module": "nats",
"artifact": "nats:program",
"branch": "main",
"commit": "0123456789abcdef0123456789abcdef01234567",
"revision": 12,
"fingerprint": "fp-0123",
"fetch": {
"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",
"digest": "sha256:bbbb",
"level": "unit",
"pipeline": "main.11.nats"
}
]
}
}
},
{
"name": "a recovery's step ask of the runner, on the stream delivery",
"of": "accept:delivery.step",
"subject": "mesh.seat.node-build-go.accept.delivery.step",
"given": {
"v": 1,
"id": "m2kx9a1b3c4d5e",
@@ -421,8 +469,8 @@
},
{
"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",
"of": "accept:check.run",
"subject": "mesh.seat.node-build-go.accept.check.run",
"given": {
"v": 1,
"id": "r5e6",
+12
View File
@@ -37,6 +37,17 @@
},
{
"name": "step",
"stream": "check",
"body": {
"$ref": "#/defs/StepAsk"
},
"callers": [
"seat:mesh-pipeline-runner"
]
},
{
"name": "step",
"stream": "delivery",
"body": {
"$ref": "#/defs/StepAsk"
},
@@ -55,6 +66,7 @@
},
{
"name": "run",
"stream": "check",
"body": {
"$ref": "#/defs/StepAsk"
},
@@ -89,8 +89,48 @@
},
{
"name": "a lint step ask of the runner with the names",
"of": "accept:step",
"subject": "mesh.seat.node-build-image.accept.step",
"of": "accept:check.step",
"subject": "mesh.seat.node-build-image.accept.check.step",
"given": {
"v": 1,
"id": "m2kx9a1b3c4d5e",
"kind": "step",
"language": "image",
"asker": "mesh-delivery-pipeline",
"at": "2026-11-10T10:00:00Z",
"step": {
"pipeline": "main.12.nats",
"step": "lint",
"module": "nats",
"artifact": "nats:program",
"branch": "main",
"commit": "0123456789abcdef0123456789abcdef01234567",
"revision": 12,
"fingerprint": "fp-0123",
"fetch": {
"repository": "novox/mesh-catalog",
"commit": "0123456789abcdef0123456789abcdef01234567"
},
"names": {
"modules": [
"nats",
"mesh-sdk"
],
"repositories": [
"novox/mesh-catalog",
"novox/mesh-sdk"
],
"branches": [
"main"
]
}
}
}
},
{
"name": "a recovery's step ask of the runner, on the stream delivery",
"of": "accept:delivery.step",
"subject": "mesh.seat.node-build-image.accept.delivery.step",
"given": {
"v": 1,
"id": "m2kx9a1b3c4d5e",
@@ -28,6 +28,17 @@
},
{
"name": "step",
"stream": "check",
"body": {
"$ref": "#/defs/StepAsk"
},
"callers": [
"seat:mesh-pipeline-runner"
]
},
{
"name": "step",
"stream": "delivery",
"body": {
"$ref": "#/defs/StepAsk"
},
@@ -161,8 +161,56 @@
},
{
"name": "a step ask of the runner with the names and kept results",
"of": "accept:step",
"subject": "mesh.seat.node-build-node.accept.step",
"of": "accept:check.step",
"subject": "mesh.seat.node-build-node.accept.check.step",
"given": {
"v": 1,
"id": "m2kx9a1b3c4d5e",
"kind": "step",
"language": "typescript",
"asker": "mesh-delivery-pipeline",
"at": "2026-11-10T10:00:00Z",
"step": {
"pipeline": "main.12.nats",
"step": "unit",
"module": "nats",
"artifact": "nats:program",
"branch": "main",
"commit": "0123456789abcdef0123456789abcdef01234567",
"revision": 12,
"fingerprint": "fp-0123",
"fetch": {
"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",
"digest": "sha256:bbbb",
"level": "unit",
"pipeline": "main.11.nats"
}
]
}
}
},
{
"name": "a recovery's step ask of the runner, on the stream delivery",
"of": "accept:delivery.step",
"subject": "mesh.seat.node-build-node.accept.delivery.step",
"given": {
"v": 1,
"id": "m2kx9a1b3c4d5e",
+11
View File
@@ -35,6 +35,17 @@
},
{
"name": "step",
"stream": "check",
"body": {
"$ref": "#/defs/StepAsk"
},
"callers": [
"seat:mesh-pipeline-runner"
]
},
{
"name": "step",
"stream": "delivery",
"body": {
"$ref": "#/defs/StepAsk"
},
+14 -8
View File
@@ -18,9 +18,10 @@ export declare const verbs: {
export declare const accepts: {
readonly delivery: "delivery";
readonly check: "check";
readonly step: "step";
readonly checkStep: "check.step";
readonly deliveryStep: "delivery.step";
readonly recheck: "recheck";
readonly run: "run";
readonly checkRun: "check.run";
};
export declare const events: {
@@ -39,11 +40,13 @@ export declare const deliverySubject: "mesh.seat.node-build-go.accept.delivery";
export declare const checkSubject: "mesh.seat.node-build-go.accept.check";
export declare const stepSubject: "mesh.seat.node-build-go.accept.step";
export declare const checkStepSubject: "mesh.seat.node-build-go.accept.check.step";
export declare const deliveryStepSubject: "mesh.seat.node-build-go.accept.delivery.step";
export declare const recheckSubject: "mesh.seat.node-build-go.accept.recheck";
export declare const runSubject: "mesh.seat.node-build-go.accept.run";
export declare const checkRunSubject: "mesh.seat.node-build-go.accept.check.run";
export declare const states: {
readonly steps: "steps";
@@ -151,14 +154,17 @@ export type DeliveryAccept = StepAsk;
/** is the body of check. */
export type CheckAccept = StepAsk;
/** is the body of step. */
export type StepAccept = StepAsk;
/** is the body of check.step. */
export type CheckStepAccept = StepAsk;
/** is the body of delivery.step. */
export type DeliveryStepAccept = StepAsk;
/** is the body of recheck. */
export type RecheckAccept = StepAsk;
/** is the body of run. */
export type RunAccept = StepAsk;
/** is the body of check.run. */
export type CheckRunAccept = StepAsk;
/** is one value of the state steps under the key <node>.<id>. */
export type StepsByNodeIDValue = Step;
+7 -4
View File
@@ -16,9 +16,10 @@ export const verbs = {
export const accepts = {
delivery: "delivery",
check: "check",
step: "step",
checkStep: "check.step",
deliveryStep: "delivery.step",
recheck: "recheck",
run: "run",
checkRun: "check.run",
};
export const events = {
@@ -39,11 +40,13 @@ export const deliverySubject = "mesh.seat.node-build-go.accept.delivery";
export const checkSubject = "mesh.seat.node-build-go.accept.check";
export const stepSubject = "mesh.seat.node-build-go.accept.step";
export const checkStepSubject = "mesh.seat.node-build-go.accept.check.step";
export const deliveryStepSubject = "mesh.seat.node-build-go.accept.delivery.step";
export const recheckSubject = "mesh.seat.node-build-go.accept.recheck";
export const runSubject = "mesh.seat.node-build-go.accept.run";
export const checkRunSubject = "mesh.seat.node-build-go.accept.check.run";
export const states = {
steps: "steps",
+10 -4
View File
@@ -18,7 +18,8 @@ export declare const verbs: {
export declare const accepts: {
readonly delivery: "delivery";
readonly check: "check";
readonly step: "step";
readonly checkStep: "check.step";
readonly deliveryStep: "delivery.step";
readonly recheck: "recheck";
};
@@ -38,7 +39,9 @@ export declare const deliverySubject: "mesh.seat.node-build-image.accept.deliver
export declare const checkSubject: "mesh.seat.node-build-image.accept.check";
export declare const stepSubject: "mesh.seat.node-build-image.accept.step";
export declare const checkStepSubject: "mesh.seat.node-build-image.accept.check.step";
export declare const deliveryStepSubject: "mesh.seat.node-build-image.accept.delivery.step";
export declare const recheckSubject: "mesh.seat.node-build-image.accept.recheck";
@@ -148,8 +151,11 @@ export type DeliveryAccept = StepAsk;
/** is the body of check. */
export type CheckAccept = StepAsk;
/** is the body of step. */
export type StepAccept = StepAsk;
/** is the body of check.step. */
export type CheckStepAccept = StepAsk;
/** is the body of delivery.step. */
export type DeliveryStepAccept = StepAsk;
/** is the body of recheck. */
export type RecheckAccept = StepAsk;
+5 -2
View File
@@ -16,7 +16,8 @@ export const verbs = {
export const accepts = {
delivery: "delivery",
check: "check",
step: "step",
checkStep: "check.step",
deliveryStep: "delivery.step",
recheck: "recheck",
};
@@ -38,7 +39,9 @@ export const deliverySubject = "mesh.seat.node-build-image.accept.delivery";
export const checkSubject = "mesh.seat.node-build-image.accept.check";
export const stepSubject = "mesh.seat.node-build-image.accept.step";
export const checkStepSubject = "mesh.seat.node-build-image.accept.check.step";
export const deliveryStepSubject = "mesh.seat.node-build-image.accept.delivery.step";
export const recheckSubject = "mesh.seat.node-build-image.accept.recheck";
+10 -4
View File
@@ -18,7 +18,8 @@ export declare const verbs: {
export declare const accepts: {
readonly delivery: "delivery";
readonly check: "check";
readonly step: "step";
readonly checkStep: "check.step";
readonly deliveryStep: "delivery.step";
readonly recheck: "recheck";
};
@@ -38,7 +39,9 @@ export declare const deliverySubject: "mesh.seat.node-build-node.accept.delivery
export declare const checkSubject: "mesh.seat.node-build-node.accept.check";
export declare const stepSubject: "mesh.seat.node-build-node.accept.step";
export declare const checkStepSubject: "mesh.seat.node-build-node.accept.check.step";
export declare const deliveryStepSubject: "mesh.seat.node-build-node.accept.delivery.step";
export declare const recheckSubject: "mesh.seat.node-build-node.accept.recheck";
@@ -148,8 +151,11 @@ export type DeliveryAccept = StepAsk;
/** is the body of check. */
export type CheckAccept = StepAsk;
/** is the body of step. */
export type StepAccept = StepAsk;
/** is the body of check.step. */
export type CheckStepAccept = StepAsk;
/** is the body of delivery.step. */
export type DeliveryStepAccept = StepAsk;
/** is the body of recheck. */
export type RecheckAccept = StepAsk;
+5 -2
View File
@@ -16,7 +16,8 @@ export const verbs = {
export const accepts = {
delivery: "delivery",
check: "check",
step: "step",
checkStep: "check.step",
deliveryStep: "delivery.step",
recheck: "recheck",
};
@@ -38,7 +39,9 @@ export const deliverySubject = "mesh.seat.node-build-node.accept.delivery";
export const checkSubject = "mesh.seat.node-build-node.accept.check";
export const stepSubject = "mesh.seat.node-build-node.accept.step";
export const checkStepSubject = "mesh.seat.node-build-node.accept.check.step";
export const deliveryStepSubject = "mesh.seat.node-build-node.accept.delivery.step";
export const recheckSubject = "mesh.seat.node-build-node.accept.recheck";