Runner's list: each row names its branch, every branch's when none is named

The pipelines page lists every watched branch's pipelines together, the
branch a column of each row, so the short row carries the pipeline's branch;
list already answered every branch when none was named, and its description
now says so. The seat mesh-pipeline-runner's form rises to 11 for the field.

Builds: design 47 H2 H-A-533 (hq 1b1e1984)
This commit is contained in:
2026-11-23 11:09:42 +01:00
parent 9bba3000f3
commit 19f06be6c1
5 changed files with 27 additions and 9 deletions
@@ -14,13 +14,13 @@ const Seat = "mesh-pipeline-runner"
// Form is the form of the seat's values, events and answers this contract was generated at (design 47 H2 §780):
// a reader of a value of another form says "form N, this reader knows M".
const Form = 10
const Form = 11
// The forms and the digest of the fields this contract was generated from: the generator's compare fails a definition
// whose fields changed while its forms did not (design 47 H2 §780).
const (
generatedForms = "10"
generatedFieldsDigest = "AcceptAnswer=224df0394653 Accepted=d2b011e5090f AskAgainAnswer=224df0394653 CancelAnswer=a0dcc32b3f57 EndAgainAnswer=a0dcc32b3f57 FailedStep=cd7184342136 Fill=7a76c9ceb157 FillingEvent=5bd4df78ed84 FullEvent=5bd4df78ed84 KeptAnswer=dfe0d48bc169 KeptByLevelDigestValue=f06c90f7da7f KeptResult=af5f81f189b7 ListAnswer=284210b3c054 LogEntry=b059967b2ae4 Member=8a103baec01f Mover=5db376275bcf MoverEnded=4b35095f6829 MoverRow=b61f41d131a3 Pipeline=2663792125bf PipelineEnded=e3f4c58f93c8 PipelineEndedEvent=cb44007f7173 PipelineEndedPhases=9d1c33ce4cc4 PipelineEndedPhasesBuild=a08d49692a09 PipelineEndedPhasesComposition=a08d49692a09 PipelineEndedPhasesIntegration=a08d49692a09 PipelineEndedPhasesLint=a08d49692a09 PipelineEndedPhasesUnit=a08d49692a09 PipelineEndedPhasesValidate=a08d49692a09 PipelineRow=f58dbdcaf2d4 PipelineStarted=582f8ff3b28d PipelineStartedEvent=eaa401af4117 PipelinesByBranchRevisionAgainNValue=693580eed498 PipelinesByBranchRevisionUnfinishedModuleValue=693580eed498 PipelinesByBranchRevisionValue=693580eed498 PipelinesByBranchRunRunValue=693580eed498 PipelinesByBranchSourcePublishedPackageVersionValue=693580eed498 PipelinesByStepsPipelineMoverValue=94de99db7816 PlaceAnswer=a0dcc32b3f57 PlaceUnfinishedAnswer=ed94ced4513a Published=d9af3024dacc QueueByQueueNextValue=765a2918a728 QueueByRunningPipelineValue=ed94ced4513a QueueByWaitingSequenceValue=99605298ae13 RePinnedEvent=92fd04bfa6d3 RerunAnswer=9b7efd0df344 ReviewAnswer=f397b8965179 RoomEvent=5bd4df78ed84 RunAnswer=96bd45aa2e62 RunStarted=b280617410c3 RunStartedEvent=0767a9358fa3 Shared=c981cf6aa860 SharedAskedBy=c9b30cc4d0d0 ShowAnswer=48b8cecc529a StandsAnswer=0afa3693bf3b StartAnswer=ed94ced4513a StepEndedEvent=799020642c19 StepEvent=64f18c40ed5d StepLogByPipelineValue=ffdde090a101 StepResult=0dac0e15d017 StepStartedEvent=799020642c19 TestCounts=9c1332427159 TestRun=ca5a87f3b6b8 TestRunPackage=a7d30558470d TestRunReader=c9b30cc4d0d0 TestRunsAnswer=7ab81a45ca33 TestRunsDropAnswer=8ee70b35469d ToolchainUsed=43b6d42376fb Wait=21e4ee7a3ef1 WaitEndedEvent=2bf6d38041c0 WaitHeldEvent=2bf6d38041c0 Waiting=ed94ced4513a WhyCarriedAnswer=8e2fcea6479f Widening=e2790a307466"
generatedForms = "11"
generatedFieldsDigest = "AcceptAnswer=224df0394653 Accepted=d2b011e5090f AskAgainAnswer=224df0394653 CancelAnswer=a0dcc32b3f57 EndAgainAnswer=a0dcc32b3f57 FailedStep=cd7184342136 Fill=7a76c9ceb157 FillingEvent=5bd4df78ed84 FullEvent=5bd4df78ed84 KeptAnswer=dfe0d48bc169 KeptByLevelDigestValue=f06c90f7da7f KeptResult=af5f81f189b7 ListAnswer=284210b3c054 LogEntry=b059967b2ae4 Member=8a103baec01f Mover=5db376275bcf MoverEnded=4b35095f6829 MoverRow=b61f41d131a3 Pipeline=2663792125bf PipelineEnded=e3f4c58f93c8 PipelineEndedEvent=cb44007f7173 PipelineEndedPhases=9d1c33ce4cc4 PipelineEndedPhasesBuild=a08d49692a09 PipelineEndedPhasesComposition=a08d49692a09 PipelineEndedPhasesIntegration=a08d49692a09 PipelineEndedPhasesLint=a08d49692a09 PipelineEndedPhasesUnit=a08d49692a09 PipelineEndedPhasesValidate=a08d49692a09 PipelineRow=397a8219a855 PipelineStarted=582f8ff3b28d PipelineStartedEvent=eaa401af4117 PipelinesByBranchRevisionAgainNValue=693580eed498 PipelinesByBranchRevisionUnfinishedModuleValue=693580eed498 PipelinesByBranchRevisionValue=693580eed498 PipelinesByBranchRunRunValue=693580eed498 PipelinesByBranchSourcePublishedPackageVersionValue=693580eed498 PipelinesByStepsPipelineMoverValue=94de99db7816 PlaceAnswer=a0dcc32b3f57 PlaceUnfinishedAnswer=ed94ced4513a Published=d9af3024dacc QueueByQueueNextValue=765a2918a728 QueueByRunningPipelineValue=ed94ced4513a QueueByWaitingSequenceValue=99605298ae13 RePinnedEvent=92fd04bfa6d3 RerunAnswer=9b7efd0df344 ReviewAnswer=f397b8965179 RoomEvent=5bd4df78ed84 RunAnswer=96bd45aa2e62 RunStarted=b280617410c3 RunStartedEvent=0767a9358fa3 Shared=c981cf6aa860 SharedAskedBy=c9b30cc4d0d0 ShowAnswer=48b8cecc529a StandsAnswer=0afa3693bf3b StartAnswer=ed94ced4513a StepEndedEvent=799020642c19 StepEvent=64f18c40ed5d StepLogByPipelineValue=ffdde090a101 StepResult=0dac0e15d017 StepStartedEvent=799020642c19 TestCounts=9c1332427159 TestRun=ca5a87f3b6b8 TestRunPackage=a7d30558470d TestRunReader=c9b30cc4d0d0 TestRunsAnswer=7ab81a45ca33 TestRunsDropAnswer=8ee70b35469d ToolchainUsed=43b6d42376fb Wait=21e4ee7a3ef1 WaitEndedEvent=2bf6d38041c0 WaitHeldEvent=2bf6d38041c0 Waiting=ed94ced4513a WhyCarriedAnswer=8e2fcea6479f Widening=e2790a307466"
)
const (
@@ -73,7 +73,7 @@ func VerbDescription(verb string) string {
case VerbShow:
return "One pipeline: naming a mover, its steps alone; with no mover, each mover's row (its module, outcome and failed step), never every step of every mover, or the steps of any mover the step and state filters hold; and its step log, with the stores' fill (design 47 H2 §789, H-A-376). Reads only."
case VerbList:
return "The pipelines and runs of a module, a branch or a commit, newest first: by default one short row per pipeline, the newest 20 (its key, call, source, revision, start, end, outcome, movers' count, its steps counted per outcome and first failed or could-not-run step with its module and why); the whole pipelines, each record with its movers and steps counted, never its steps (show gives those), only with full and a limit (design 47 H2 H-A-376, H-A-467). Reads only."
return "The pipelines and runs of a module, a branch or a commit, newest first, of every branch when none is named (design 47 H2 H-A-533): by default one short row per pipeline, the newest 20 (its key, branch, call, source, revision, start, end, outcome, movers' count, its steps counted per outcome and first failed or could-not-run step with its module and why); the whole pipelines, each record with its movers and steps counted, never its steps (show gives those), only with full and a limit (design 47 H2 H-A-376, H-A-467). Reads only."
case VerbStands:
return "What stands still, and since when: each step not ended and each wait held. Reads only."
case VerbWhyCarried:
@@ -921,6 +921,8 @@ const (
// PipelineRow is one pipeline in list's short form, with its source, revision and its steps counted per outcome (design 47 H2 H-A-376, H-A-467).
type PipelineRow struct {
// the watched branch, or the branch of a run on request: a column of the pipelines page, which lists every branch's together (design 47 H2 H-A-533)
Branch string `json:"branch,omitempty"`
// the merge call whose source revision the take-in took in
Call string `json:"call,omitempty"`
Ended *time.Time `json:"ended,omitempty"`
@@ -178,7 +178,7 @@
},
{
"name": "list",
"description": "The pipelines and runs of a module, a branch or a commit, newest first: by default one short row per pipeline, the newest 20 (its key, call, source, revision, start, end, outcome, movers' count, its steps counted per outcome and first failed or could-not-run step with its module and why); the whole pipelines, each record with its movers and steps counted, never its steps (show gives those), only with full and a limit (design 47 H2 H-A-376, H-A-467). Reads only.",
"description": "The pipelines and runs of a module, a branch or a commit, newest first, of every branch when none is named (design 47 H2 H-A-533): by default one short row per pipeline, the newest 20 (its key, branch, call, source, revision, start, end, outcome, movers' count, its steps counted per outcome and first failed or could-not-run step with its module and why); the whole pipelines, each record with its movers and steps counted, never its steps (show gives those), only with full and a limit (design 47 H2 H-A-376, H-A-467). Reads only.",
"input": {
"type": "object",
"properties": {
@@ -2296,6 +2296,10 @@
"type": "string",
"description": "the pipeline's key"
},
"branch": {
"type": "string",
"description": "the watched branch, or the branch of a run on request: a column of the pipelines page, which lists every branch's together (design 47 H2 H-A-533)"
},
"call": {
"type": "string",
"description": "the merge call whose source revision the take-in took in"
@@ -2378,5 +2382,5 @@
]
}
},
"form": 10
"form": 11
}
@@ -430,6 +430,8 @@ export interface PipelineEnded {
/** one pipeline in list's short form, with its source, revision and its steps counted per outcome (design 47 H2 H-A-376, H-A-467) */
export interface PipelineRow {
/** the watched branch, or the branch of a run on request: a column of the pipelines page, which lists every branch's together (design 47 H2 H-A-533) */
"branch"?: string;
/** the merge call whose source revision the take-in took in */
"call"?: string;
"ended"?: string;
@@ -249,7 +249,8 @@ func MoverRows(p seat.Pipeline) []seat.MoverRow {
return out
}
// List is the pipelines and runs of a module, a branch, a commit or a run, newest started first (§83): by default one
// List is the pipelines and runs of a module, a branch, a commit or a run, newest started first (§83), of every branch when
// none is named, each row naming its branch (design 47 H2 H-A-533): by default one
// short row per pipeline, the newest ListRows or Limit (design 47 H2 H-A-376); with Full and a Limit each one's record with
// its movers and steps counted, its steps empty (H-A-191).
func (r Reads) List(in seat.ListInput) (seat.ListAnswer, error) {
@@ -288,7 +289,7 @@ func (r Reads) List(in seat.ListInput) (seat.ListAnswer, error) {
for _, p := range out {
// A row carries its source, its revision and its steps counted per outcome (design 47 H2 H-A-467): a page's list is
// one read of the short form.
rows = append(rows, seat.PipelineRow{Pipeline: p.Pipeline, Call: p.Call, Source: p.Source, Revision: p.Revision,
rows = append(rows, seat.PipelineRow{Pipeline: p.Pipeline, Branch: p.Branch, Call: p.Call, Source: p.Source, Revision: p.Revision,
Started: p.Started, Ended: p.Ended, Outcome: p.Outcome, MoverCount: p.MoverCount, Steps: stepCounts(steps[p.Pipeline]),
Failed: firstFailed(steps[p.Pipeline])})
}
@@ -157,12 +157,21 @@ func TestReads(t *testing.T) {
a, err := r.List(seat.ListInput{Branch: "gone"})
raw, _ := json.Marshal(a.Rows)
return fmt.Sprint(string(raw), " ", len(a.Pipelines)), err
}, `[{"call":"call-2","ended":"2026-11-11T10:01:00Z","failed":{"artifact":"zeta:program","module":"zeta","outcome":"could not run","step":"unit","why":"its node lacks node-build-node"},"mover-count":1,"outcome":"failed","pipeline":"gone.2","revision":5,"source":2,"started":"2026-11-11T10:00:00Z","steps":{"could not run":1,"failed":1}}] 0`},
}, `[{"branch":"gone","call":"call-2","ended":"2026-11-11T10:01:00Z","failed":{"artifact":"zeta:program","module":"zeta","outcome":"could not run","step":"unit","why":"its node lacks node-build-node"},"mover-count":1,"outcome":"failed","pipeline":"gone.2","revision":5,"source":2,"started":"2026-11-11T10:00:00Z","steps":{"could not run":1,"failed":1}}] 0`},
// Design 47 H2 H-A-467: a row counts the steps per outcome, a mover's kept steps (H-A-187) with them.
{"list's row counts its steps per outcome", func() (string, error) {
a, err := r.List(seat.ListInput{Branch: "next"})
return fmt.Sprint(a.Rows[0].Source, " ", a.Rows[0].Steps), err
}, "8 map[passed:2 waiting:1]"},
// Design 47 H2 H-A-533: naming no branch, list answers every branch's pipelines together, each row naming its branch.
{"list with no branch answers every branch's, newest first, each row naming its branch", func() (string, error) {
a, err := r.List(seat.ListInput{})
var s []string
for _, row := range a.Rows {
s = append(s, row.Branch+":"+row.Pipeline)
}
return strings.Join(s, " "), err
}, "beta:beta.3.alpha main:main.7.gamma gone:gone.2 main:main.7.alpha next:next.8"},
{"list's full needs a limit", func() (string, error) {
_, err := r.List(seat.ListInput{Full: true})
return "", err