C-R4: the runner's rerun, accept and ask-again name the mover's module
A pipeline of several movers is never ambiguous: the seat mesh-pipeline-runner's verbs rerun, accept and ask-again gain the optional input module, the mover's; a call naming none on a pipeline of one mover is taken as that mover. Fixture rows of each verb's input name a module and failed to read back before the field was defined. Builds: design 47 H §746; lead answer H-A-101 (1) Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy
This commit is contained in:
@@ -1120,6 +1120,8 @@ type ReviewAnswer struct {
|
||||
// RerunInput is what rerun takes.
|
||||
type RerunInput struct {
|
||||
Artifact string `json:"artifact,omitempty"`
|
||||
// the mover's module, so a pipeline of several movers is never ambiguous; a call naming none on a pipeline of one mover is taken as that mover (design 47 H-A-101)
|
||||
Module string `json:"module,omitempty"`
|
||||
// the pipeline's key
|
||||
Pipeline string `json:"pipeline"`
|
||||
Step string `json:"step"`
|
||||
@@ -1148,6 +1150,8 @@ type RerunAnswer struct {
|
||||
// AcceptInput is what accept takes.
|
||||
type AcceptInput struct {
|
||||
Artifact string `json:"artifact,omitempty"`
|
||||
// the mover's module, so a pipeline of several movers is never ambiguous; a call naming none on a pipeline of one mover is taken as that mover (design 47 H-A-101)
|
||||
Module string `json:"module,omitempty"`
|
||||
// the pipeline's key
|
||||
Pipeline string `json:"pipeline"`
|
||||
Step string `json:"step"`
|
||||
@@ -1200,6 +1204,8 @@ type PlaceAnswer struct {
|
||||
|
||||
// AskAgainInput is what ask-again takes.
|
||||
type AskAgainInput struct {
|
||||
// the mover's module, so a pipeline of several movers is never ambiguous; a call naming none on a pipeline of one mover is taken as that mover (design 47 H-A-101)
|
||||
Module string `json:"module,omitempty"`
|
||||
// the pipeline's key
|
||||
Pipeline string `json:"pipeline"`
|
||||
// why, written with the caller the runtime proves in the hand-act log
|
||||
|
||||
@@ -93,6 +93,12 @@ func TestFixtures(t *testing.T) {
|
||||
decode: func(b []byte) (any, error) { var v ReviewAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "show answers a pipeline with its log and fill", subject: "", given: "{\"fill\":[{\"bytes\":4096,\"cap\":268435456,\"store\":\"pipelines\"}],\"log\":[{\"artifact\":\"nats:program\",\"at\":\"2026-11-10T10:00:00Z\",\"pipeline\":\"main.3589\",\"step\":\"lint\",\"what\":\"started\"}],\"outputs\":[\"main.12.nats.lint.nats:program\"],\"pipeline\":{\"branch\":\"main\",\"movers\":[{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"repository\":\"mesh-networking\",\"tier\":1}],\"outcome\":\"running\",\"pipeline\":\"main.3589\",\"revision\":12,\"source\":3589,\"steps\":[{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"node\":\"anchor\",\"outcome\":\"passed\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"}],\"v\":1}}", wire: "{\"fill\":[{\"bytes\":4096,\"cap\":268435456,\"store\":\"pipelines\"}],\"log\":[{\"artifact\":\"nats:program\",\"at\":\"2026-11-10T10:00:00Z\",\"pipeline\":\"main.3589\",\"step\":\"lint\",\"what\":\"started\"}],\"outputs\":[\"main.12.nats.lint.nats:program\"],\"pipeline\":{\"branch\":\"main\",\"movers\":[{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"repository\":\"mesh-networking\",\"tier\":1}],\"outcome\":\"running\",\"pipeline\":\"main.3589\",\"revision\":12,\"source\":3589,\"steps\":[{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"node\":\"anchor\",\"outcome\":\"passed\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"}],\"v\":1}}",
|
||||
decode: func(b []byte) (any, error) { var v ShowAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "rerun names the mover's module", subject: "", given: "{\"module\":\"nats\",\"pipeline\":\"main.3589\",\"step\":\"unit\",\"why\":\"a flaky test, issue 1966\"}", wire: "{\"module\":\"nats\",\"pipeline\":\"main.3589\",\"step\":\"unit\",\"why\":\"a flaky test, issue 1966\"}",
|
||||
decode: func(b []byte) (any, error) { var v RerunInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "accept names the mover's module", subject: "", given: "{\"module\":\"nats\",\"pipeline\":\"main.3589\",\"step\":\"integration\",\"why\":\"flaky upstream, issue 1966\"}", wire: "{\"module\":\"nats\",\"pipeline\":\"main.3589\",\"step\":\"integration\",\"why\":\"flaky upstream, issue 1966\"}",
|
||||
decode: func(b []byte) (any, error) { var v AcceptInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "ask-again names the mover's module", subject: "", given: "{\"module\":\"nats\",\"pipeline\":\"main.3589\",\"why\":\"the build node was away\"}", wire: "{\"module\":\"nats\",\"pipeline\":\"main.3589\",\"why\":\"the build node was away\"}",
|
||||
decode: func(b []byte) (any, error) { var v AskAgainInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "accept asks with why", subject: "", given: "{\"artifact\":\"nats:program\",\"pipeline\":\"main.3589\",\"step\":\"integration\",\"why\":\"flaky upstream, issue 1966\"}", wire: "{\"artifact\":\"nats:program\",\"pipeline\":\"main.3589\",\"step\":\"integration\",\"why\":\"flaky upstream, issue 1966\"}",
|
||||
decode: func(b []byte) (any, error) { var v AcceptInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "stands answers a wait on a build node", subject: "", given: "{\"stands\":[{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"on\":\"build node\",\"pipeline\":\"main.3589\",\"revision\":12,\"since\":\"2026-11-10T10:00:00Z\",\"source\":3589,\"step\":\"unit\",\"v\":1}]}", wire: "{\"stands\":[{\"artifact\":\"nats:program\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"on\":\"build node\",\"pipeline\":\"main.3589\",\"revision\":12,\"since\":\"2026-11-10T10:00:00Z\",\"source\":3589,\"step\":\"unit\",\"v\":1}]}",
|
||||
|
||||
@@ -100,6 +100,35 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "rerun names the mover's module",
|
||||
"of": "verb:rerun.input",
|
||||
"given": {
|
||||
"pipeline": "main.3589",
|
||||
"module": "nats",
|
||||
"step": "unit",
|
||||
"why": "a flaky test, issue 1966"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "accept names the mover's module",
|
||||
"of": "verb:accept.input",
|
||||
"given": {
|
||||
"pipeline": "main.3589",
|
||||
"module": "nats",
|
||||
"step": "integration",
|
||||
"why": "flaky upstream, issue 1966"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ask-again names the mover's module",
|
||||
"of": "verb:ask-again.input",
|
||||
"given": {
|
||||
"pipeline": "main.3589",
|
||||
"module": "nats",
|
||||
"why": "the build node was away"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "accept asks with why",
|
||||
"of": "verb:accept.input",
|
||||
|
||||
@@ -340,6 +340,10 @@
|
||||
"type": "string",
|
||||
"description": "the pipeline's key"
|
||||
},
|
||||
"module": {
|
||||
"type": "string",
|
||||
"description": "the mover's module, so a pipeline of several movers is never ambiguous; a call naming none on a pipeline of one mover is taken as that mover (design 47 H-A-101)"
|
||||
},
|
||||
"step": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@@ -393,6 +397,10 @@
|
||||
"type": "string",
|
||||
"description": "the pipeline's key"
|
||||
},
|
||||
"module": {
|
||||
"type": "string",
|
||||
"description": "the mover's module, so a pipeline of several movers is never ambiguous; a call naming none on a pipeline of one mover is taken as that mover (design 47 H-A-101)"
|
||||
},
|
||||
"step": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@@ -509,6 +517,10 @@
|
||||
"type": "string",
|
||||
"description": "the pipeline's key"
|
||||
},
|
||||
"module": {
|
||||
"type": "string",
|
||||
"description": "the mover's module, so a pipeline of several movers is never ambiguous; a call naming none on a pipeline of one mover is taken as that mover (design 47 H-A-101)"
|
||||
},
|
||||
"why": {
|
||||
"type": "string",
|
||||
"description": "why, written with the caller the runtime proves in the hand-act log"
|
||||
|
||||
@@ -632,6 +632,8 @@ export interface ReviewAnswer {
|
||||
/** is what rerun takes. */
|
||||
export interface RerunInput {
|
||||
"artifact"?: string;
|
||||
/** the mover's module, so a pipeline of several movers is never ambiguous; a call naming none on a pipeline of one mover is taken as that mover (design 47 H-A-101) */
|
||||
"module"?: string;
|
||||
/** the pipeline's key */
|
||||
"pipeline": string;
|
||||
"step": "validate" | "build" | "lint" | "unit" | "integration" | "composition" | "review" | "approval";
|
||||
@@ -648,6 +650,8 @@ export interface RerunAnswer {
|
||||
/** is what accept takes. */
|
||||
export interface AcceptInput {
|
||||
"artifact"?: string;
|
||||
/** the mover's module, so a pipeline of several movers is never ambiguous; a call naming none on a pipeline of one mover is taken as that mover (design 47 H-A-101) */
|
||||
"module"?: string;
|
||||
/** the pipeline's key */
|
||||
"pipeline": string;
|
||||
"step": "validate" | "build" | "lint" | "unit" | "integration" | "composition" | "review" | "approval";
|
||||
@@ -688,6 +692,8 @@ export interface PlaceAnswer {
|
||||
|
||||
/** is what ask-again takes. */
|
||||
export interface AskAgainInput {
|
||||
/** the mover's module, so a pipeline of several movers is never ambiguous; a call naming none on a pipeline of one mover is taken as that mover (design 47 H-A-101) */
|
||||
"module"?: string;
|
||||
/** the pipeline's key */
|
||||
"pipeline": string;
|
||||
/** why, written with the caller the runtime proves in the hand-act log */
|
||||
|
||||
Reference in New Issue
Block a user