C-R: the runner's seat: one pipeline per take-in, its movers, the queue and place
The pipeline is keyed <branch>.<source> (and <branch>.<source>.published.<package>.<version>
for a publish), its movers {module, commit, fingerprint, repository, tier} carry what was
per module (version, widens, tests, over-budget); group goes, run, published, unlogged and
end-count stay; call and seq are added and the outcome gains waiting. Each step result
names its module and the step enum gains validate. pipeline-started names the movers;
pipeline-ended carries per mover its fingerprint, version, steps and tier. pipeline-started,
pipeline-ended, wait-held and wait-ended are said on <branch>.<source>; the step events and
run-started on <module>.<branch>.<commit>. A wait gains step pipeline and on
pipelines-at-once. The state queue holds queue.next and waiting.<sequence>; the verb place
takes pipeline and why. group-ended and its body go. The client builds and parses both
subject forms.
Builds: design 47 H §745, §746, §747, §748, §764 (the runner: group-ended, the key per module); lead answers H-A-35, H-A-36, H-A-51, H-A-52, H-A-53, H-A-72 (1) to (5)
Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
// Package meshpipelinerunnerclient is the logic the callers of the seat mesh-pipeline-runner share (ADR 0634 §1): the
|
||||
// subjects of the runner's events, built and parsed, and their bodies decoded (design 47 G §73, §332). It names no
|
||||
// module, repository or branch: every name is the caller's.
|
||||
// subjects of the runner's events, built and parsed, and their bodies decoded (design 47 H §746). It names no module,
|
||||
// repository or branch: every name is the caller's.
|
||||
package meshpipelinerunnerclient
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"slices"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
seat "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-contracts/go/seats/meshpipelinerunner"
|
||||
@@ -16,35 +17,52 @@ import (
|
||||
// eventPrefix starts every event subject of the seat.
|
||||
const eventPrefix = "mesh.seat." + seat.Seat + ".event."
|
||||
|
||||
// Subject is where the runner says event of a pipeline: mesh.seat.mesh-pipeline-runner.event.<event>.<module>.<branch>.
|
||||
// <commit or group>, each name escaped as a key's name is (design 47 *Health and going back*), so a branch or a group
|
||||
// holding a dot is one token.
|
||||
func Subject(event, module, branch, commitOrGroup string) string {
|
||||
return eventPrefix + event + "." + keys.EscapeName(module) + "." + keys.EscapeName(branch) + "." + keys.EscapeName(commitOrGroup)
|
||||
// perSource are the events said per source revision, on <event>.<branch>.<source> (design 47 H §746, H-A-72 (3)).
|
||||
var perSource = []string{seat.EventPipelineStarted, seat.EventPipelineEnded, seat.EventWaitHeld, seat.EventWaitEnded}
|
||||
|
||||
// Subject is where the runner says a step's event or a run's start: mesh.seat.mesh-pipeline-runner.event.<event>.
|
||||
// <module>.<branch>.<commit>, each name escaped as a key's name is, so a branch holding a dot is one token (design 47 H
|
||||
// H-A-72 (4)).
|
||||
func Subject(event, module, branch, commit string) string {
|
||||
return eventPrefix + event + "." + keys.EscapeName(module) + "." + keys.EscapeName(branch) + "." + keys.EscapeName(commit)
|
||||
}
|
||||
|
||||
// GroupEndedSubject is where the runner says a group's end: mesh.seat.mesh-pipeline-runner.event.group-ended.<branch>.
|
||||
// <group>, with no module part, since a group spans modules (design 47 G §332).
|
||||
func GroupEndedSubject(branch, group string) string {
|
||||
return eventPrefix + seat.EventGroupEnded + "." + keys.EscapeName(branch) + "." + keys.EscapeName(group)
|
||||
// SourceSubject is where the runner says a pipeline's start and end and its waits: mesh.seat.mesh-pipeline-runner.
|
||||
// event.<event>.<branch>.<source>, the branch escaped as a key's name is (design 47 H §746, H-A-72 (3)).
|
||||
func SourceSubject(event, branch string, source int64) string {
|
||||
return eventPrefix + event + "." + keys.EscapeName(branch) + "." + strconv.FormatInt(source, 10)
|
||||
}
|
||||
|
||||
// Of is what an event's subject names. A group-ended names no module.
|
||||
// Of is what an event's subject names: a step's event or a run's start names the module, the branch and the commit; an
|
||||
// event per source revision names the branch and the source.
|
||||
type Of struct {
|
||||
Event, Module, Branch, CommitOrGroup string
|
||||
Event, Module, Branch, Commit string
|
||||
Source int64
|
||||
}
|
||||
|
||||
// Parse reads a subject Subject or GroupEndedSubject built: an event of the seat's, and its names unescaped.
|
||||
// Parse reads a subject Subject or SourceSubject built: an event of the seat's, and its names unescaped.
|
||||
func Parse(subject string) (Of, error) {
|
||||
rest, ok := strings.CutPrefix(subject, eventPrefix)
|
||||
toks := strings.Split(rest, ".")
|
||||
bySource := len(toks) > 0 && slices.Contains(perSource, toks[0])
|
||||
want := 4
|
||||
if len(toks) > 0 && toks[0] == seat.EventGroupEnded {
|
||||
if bySource {
|
||||
want = 3
|
||||
}
|
||||
if !ok || len(toks) != want || !slices.Contains(seat.Events(), toks[0]) {
|
||||
return Of{}, fmt.Errorf("meshpipelinerunnerclient: %q is no event subject of the seat %s", subject, seat.Seat)
|
||||
}
|
||||
if bySource {
|
||||
branch, err := keys.UnescapeName(toks[1])
|
||||
if err != nil || branch == "" {
|
||||
return Of{}, fmt.Errorf("meshpipelinerunnerclient: %q: branch: %v", subject, err)
|
||||
}
|
||||
source, err := strconv.ParseInt(toks[2], 10, 64)
|
||||
if err != nil || source < 1 {
|
||||
return Of{}, fmt.Errorf("meshpipelinerunnerclient: %q: no source revision", subject)
|
||||
}
|
||||
return Of{Event: toks[0], Branch: branch, Source: source}, nil
|
||||
}
|
||||
names := make([]string, 0, 3)
|
||||
for i, t := range toks[1:] {
|
||||
n, err := keys.UnescapeName(t)
|
||||
@@ -53,40 +71,25 @@ func Parse(subject string) (Of, error) {
|
||||
}
|
||||
names = append(names, n)
|
||||
}
|
||||
if want == 3 {
|
||||
return Of{Event: toks[0], Branch: names[0], CommitOrGroup: names[1]}, nil
|
||||
}
|
||||
return Of{Event: toks[0], Module: names[0], Branch: names[1], CommitOrGroup: names[2]}, nil
|
||||
return Of{Event: toks[0], Module: names[0], Branch: names[1], Commit: names[2]}, nil
|
||||
}
|
||||
|
||||
// PipelineEnded decodes a pipeline-ended body, refusing one that names no pipeline, module, branch or commit.
|
||||
// PipelineEnded decodes a pipeline-ended body, refusing one that names no pipeline, branch, source or mover, or a mover
|
||||
// that names no module (design 47 H §746).
|
||||
func PipelineEnded(data []byte) (seat.PipelineEndedEvent, error) {
|
||||
var e seat.PipelineEndedEvent
|
||||
if err := json.Unmarshal(data, &e); err != nil {
|
||||
return e, fmt.Errorf("meshpipelinerunnerclient: pipeline-ended: %w", err)
|
||||
}
|
||||
if e.Pipeline == "" || e.Module == "" || e.Branch == "" || e.Commit == "" {
|
||||
return e, fmt.Errorf("meshpipelinerunnerclient: pipeline-ended names no pipeline, module, branch or commit")
|
||||
if e.Pipeline == "" || e.Branch == "" || e.Source == 0 || len(e.Movers) == 0 {
|
||||
return e, fmt.Errorf("meshpipelinerunnerclient: pipeline-ended names no pipeline, branch, source or mover")
|
||||
}
|
||||
return e, nil
|
||||
}
|
||||
|
||||
// GroupEnded decodes a group-ended body, refusing one that names no group or branch, and each of its pipelines as
|
||||
// PipelineEnded does.
|
||||
func GroupEnded(data []byte) (seat.GroupEndedEvent, error) {
|
||||
var g seat.GroupEndedEvent
|
||||
if err := json.Unmarshal(data, &g); err != nil {
|
||||
return g, fmt.Errorf("meshpipelinerunnerclient: group-ended: %w", err)
|
||||
}
|
||||
if g.Group == "" || g.Branch == "" {
|
||||
return g, fmt.Errorf("meshpipelinerunnerclient: group-ended names no group or branch")
|
||||
}
|
||||
for _, p := range g.Pipelines {
|
||||
if p.Pipeline == "" || p.Module == "" || p.Branch == "" || p.Commit == "" {
|
||||
return g, fmt.Errorf("meshpipelinerunnerclient: group-ended %s: a pipeline names no pipeline, module, branch or commit", g.Group)
|
||||
for _, m := range e.Movers {
|
||||
if m.Module == "" {
|
||||
return e, fmt.Errorf("meshpipelinerunnerclient: pipeline-ended %s: a mover names no module", e.Pipeline)
|
||||
}
|
||||
}
|
||||
return g, nil
|
||||
return e, nil
|
||||
}
|
||||
|
||||
// StepEnded decodes a step-ended (or step-started) body, refusing one that names no pipeline, module or step.
|
||||
|
||||
+32
-26
@@ -6,43 +6,49 @@ import (
|
||||
seat "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-contracts/go/seats/meshpipelinerunner"
|
||||
)
|
||||
|
||||
// A-D7: the subject carries the module, the branch and the commit or group, each escaped as a key's name is, and is
|
||||
// read back (design 47 *Health and going back*); a body naming nothing is refused.
|
||||
// design 47 H §746, H-A-72 (3), (4): a pipeline's start and end and its waits are said per source revision,
|
||||
// <branch>.<source>; a step's events and a run's start per module, <module>.<branch>.<commit>; each name escaped as a
|
||||
// key's name is, and read back. group-ended is no event of the seat (§764); a body naming nothing is refused.
|
||||
func TestSubjectsAndBodies(t *testing.T) {
|
||||
s := Subject(seat.EventPipelineEnded, "nats", "release.1", "feat/47-G")
|
||||
if s != "mesh.seat.mesh-pipeline-runner.event.pipeline-ended.nats.release=2e1.feat/47-G" {
|
||||
s := Subject(seat.EventStepEnded, "nats", "release.1", "c1")
|
||||
if s != "mesh.seat.mesh-pipeline-runner.event.step-ended.nats.release=2e1.c1" {
|
||||
t.Errorf("subject %s", s)
|
||||
}
|
||||
if of, err := Parse(s); err != nil || of != (Of{seat.EventPipelineEnded, "nats", "release.1", "feat/47-G"}) {
|
||||
if of, err := Parse(s); err != nil || of != (Of{Event: seat.EventStepEnded, Module: "nats", Branch: "release.1", Commit: "c1"}) {
|
||||
t.Errorf("parse %s: %+v, %v", s, of, err)
|
||||
}
|
||||
for _, bad := range []string{"not.an.event.subject", "mesh.seat.mesh-pipeline-runner.event.pipeline-ended.nats.main",
|
||||
"mesh.seat.mesh-pipeline-runner.event.no-such.nats.main.c1", "mesh.seat.mesh-pipeline-runner.event.pipeline-ended.nats.ma=zz.c1"} {
|
||||
ps := SourceSubject(seat.EventPipelineEnded, "release.1", 3589)
|
||||
if ps != "mesh.seat.mesh-pipeline-runner.event.pipeline-ended.release=2e1.3589" {
|
||||
t.Errorf("pipeline-ended subject %s", ps)
|
||||
}
|
||||
if of, err := Parse(ps); err != nil || of != (Of{Event: seat.EventPipelineEnded, Branch: "release.1", Source: 3589}) {
|
||||
t.Errorf("parse %s: %+v, %v", ps, of, err)
|
||||
}
|
||||
if of, err := Parse(SourceSubject(seat.EventWaitHeld, "main", 7)); err != nil || of.Source != 7 || of.Module != "" {
|
||||
t.Errorf("wait-held: %+v, %v", of, err)
|
||||
}
|
||||
for _, bad := range []string{"not.an.event.subject",
|
||||
"mesh.seat.mesh-pipeline-runner.event.step-ended.nats.main",
|
||||
"mesh.seat.mesh-pipeline-runner.event.pipeline-ended.nats.main.c1",
|
||||
"mesh.seat.mesh-pipeline-runner.event.pipeline-ended.main.c1",
|
||||
"mesh.seat.mesh-pipeline-runner.event.group-ended.main.g1",
|
||||
"mesh.seat.mesh-pipeline-runner.event.no-such.nats.main.c1",
|
||||
"mesh.seat.mesh-pipeline-runner.event.step-ended.nats.ma=zz.c1"} {
|
||||
if _, err := Parse(bad); err == nil {
|
||||
t.Errorf("%s parsed", bad)
|
||||
}
|
||||
}
|
||||
// design 47 G §332: a group's end is said under the branch and the group, with no module.
|
||||
gs := GroupEndedSubject("main", "registry.1966")
|
||||
if gs != "mesh.seat.mesh-pipeline-runner.event.group-ended.main.registry=2e1966" {
|
||||
t.Errorf("group-ended subject %s", gs)
|
||||
if e, err := PipelineEnded([]byte(`{"v":1,"pipeline":"main.3589","branch":"main","source":3589,"call":"0123456789abcdef","outcome":"passed","movers":[{"module":"nats","fingerprint":"fp","version":"0.1.15","tier":1,"steps":[]}]}`)); err != nil || e.Movers[0].Version != "0.1.15" {
|
||||
t.Errorf("pipeline-ended: %+v, %v", e, err)
|
||||
}
|
||||
if of, err := Parse(gs); err != nil || of != (Of{Event: seat.EventGroupEnded, Branch: "main", CommitOrGroup: "registry.1966"}) {
|
||||
t.Errorf("parse %s: %+v, %v", gs, of, err)
|
||||
for _, bad := range []string{`{"v":1,"branch":"main"}`,
|
||||
`{"v":1,"pipeline":"main.3589","branch":"main","source":3589,"outcome":"passed","movers":[{"tier":1,"steps":[]}]}`,
|
||||
`{"v":1,"pipeline":"main.12.nats","module":"nats","branch":"main","commit":"c1","outcome":"passed","steps":[]}`} {
|
||||
if _, err := PipelineEnded([]byte(bad)); err == nil {
|
||||
t.Errorf("pipeline-ended %s was taken", bad)
|
||||
}
|
||||
}
|
||||
if _, err := Parse("mesh.seat.mesh-pipeline-runner.event.group-ended.nats.main.g1"); err == nil {
|
||||
t.Error("a group-ended with a module part parsed")
|
||||
}
|
||||
if _, err := PipelineEnded([]byte(`{"v":1,"pipeline":"main.12.nats","module":"nats","branch":"main","commit":"c1","outcome":"passed","steps":[]}`)); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
if _, err := PipelineEnded([]byte(`{"v":1,"module":"nats"}`)); err == nil {
|
||||
t.Error("a pipeline-ended naming no pipeline was taken")
|
||||
}
|
||||
if _, err := GroupEnded([]byte(`{"v":1,"group":"g","branch":"main","outcome":"passed","pipelines":[{"module":"nats"}]}`)); err == nil {
|
||||
t.Error("a group-ended with a pipeline naming nothing was taken")
|
||||
}
|
||||
if e, err := StepEnded([]byte(`{"v":1,"pipeline":"p","module":"nats","branch":"main","commit":"c1","result":{"step":"unit","status":"required","outcome":"passed","rerun":true,"by":"operator@workstation"}}`)); err != nil || !e.Result.Rerun {
|
||||
if e, err := StepEnded([]byte(`{"v":1,"pipeline":"main.3589","module":"nats","branch":"main","commit":"c1","result":{"step":"validate","status":"required","outcome":"passed"}}`)); err != nil || e.Result.Step != "validate" {
|
||||
t.Errorf("step-ended: %+v, %v", e, err)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@ const (
|
||||
VerbRerun = "rerun"
|
||||
VerbAccept = "accept"
|
||||
VerbCancel = "cancel"
|
||||
VerbPlace = "place"
|
||||
VerbAskAgain = "ask-again"
|
||||
VerbTestRuns = "test-runs"
|
||||
VerbTestRunsDrop = "test-runs-drop"
|
||||
@@ -34,7 +35,6 @@ const (
|
||||
const (
|
||||
EventPipelineStarted = "pipeline-started"
|
||||
EventPipelineEnded = "pipeline-ended"
|
||||
EventGroupEnded = "group-ended"
|
||||
EventRunStarted = "run-started"
|
||||
EventStepStarted = "step-started"
|
||||
EventStepEnded = "step-ended"
|
||||
@@ -47,12 +47,12 @@ const (
|
||||
|
||||
// Verbs is every verb the seat serves, in its definition's order: a new copy each call.
|
||||
func Verbs() []string {
|
||||
return []string{VerbRun, VerbStart, VerbShow, VerbList, VerbStands, VerbWhyCarried, VerbKept, VerbReview, VerbRerun, VerbAccept, VerbCancel, VerbAskAgain, VerbTestRuns, VerbTestRunsDrop}
|
||||
return []string{VerbRun, VerbStart, VerbShow, VerbList, VerbStands, VerbWhyCarried, VerbKept, VerbReview, VerbRerun, VerbAccept, VerbCancel, VerbPlace, VerbAskAgain, VerbTestRuns, VerbTestRunsDrop}
|
||||
}
|
||||
|
||||
// Events is every event published on the seat's subject: a new copy each call.
|
||||
func Events() []string {
|
||||
return []string{EventPipelineStarted, EventPipelineEnded, EventGroupEnded, EventRunStarted, EventStepStarted, EventStepEnded, EventWaitHeld, EventWaitEnded, EventFilling, EventFull, EventRoom}
|
||||
return []string{EventPipelineStarted, EventPipelineEnded, EventRunStarted, EventStepStarted, EventStepEnded, EventWaitHeld, EventWaitEnded, EventFilling, EventFull, EventRoom}
|
||||
}
|
||||
|
||||
// Family is where the seat's events are kept: the shared events stream, filtered to the seat's subjects.
|
||||
@@ -64,42 +64,31 @@ const (
|
||||
// StreamPipelineStarted is the stream pipeline-started is kept in.
|
||||
const StreamPipelineStarted = "SEAT_mesh-pipeline-runner_pipeline-started"
|
||||
|
||||
// SubjectPipelineStarted is where pipeline-started is published, on mesh.seat.mesh-pipeline-runner.event.pipeline-started.<module>.<branch>.<commit-or-group>.
|
||||
func SubjectPipelineStarted(module, branch, commitOrGroup string) string {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.pipeline-started." + module + "." + branch + "." + commitOrGroup
|
||||
// SubjectPipelineStarted is where pipeline-started is published, on mesh.seat.mesh-pipeline-runner.event.pipeline-started.<branch>.<source>.
|
||||
func SubjectPipelineStarted(branch, source string) string {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.pipeline-started." + branch + "." + source
|
||||
}
|
||||
|
||||
// SubjectPipelineStartedAll hears every pipeline-started.
|
||||
const SubjectPipelineStartedAll = "mesh.seat.mesh-pipeline-runner.event.pipeline-started.*.*.*"
|
||||
const SubjectPipelineStartedAll = "mesh.seat.mesh-pipeline-runner.event.pipeline-started.*.*"
|
||||
|
||||
// StreamPipelineEnded is the stream pipeline-ended is kept in.
|
||||
const StreamPipelineEnded = "SEAT_mesh-pipeline-runner_pipeline-ended"
|
||||
|
||||
// SubjectPipelineEnded is where pipeline-ended is published, on mesh.seat.mesh-pipeline-runner.event.pipeline-ended.<module>.<branch>.<commit-or-group>.
|
||||
func SubjectPipelineEnded(module, branch, commitOrGroup string) string {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.pipeline-ended." + module + "." + branch + "." + commitOrGroup
|
||||
// SubjectPipelineEnded is where pipeline-ended is published, on mesh.seat.mesh-pipeline-runner.event.pipeline-ended.<branch>.<source>.
|
||||
func SubjectPipelineEnded(branch, source string) string {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.pipeline-ended." + branch + "." + source
|
||||
}
|
||||
|
||||
// SubjectPipelineEndedAll hears every pipeline-ended.
|
||||
const SubjectPipelineEndedAll = "mesh.seat.mesh-pipeline-runner.event.pipeline-ended.*.*.*"
|
||||
|
||||
// StreamGroupEnded is the stream group-ended is kept in.
|
||||
const StreamGroupEnded = "SEAT_mesh-pipeline-runner_group-ended"
|
||||
|
||||
// SubjectGroupEnded is where group-ended is published, on mesh.seat.mesh-pipeline-runner.event.group-ended.<branch>.<group>.
|
||||
func SubjectGroupEnded(branch, group string) string {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.group-ended." + branch + "." + group
|
||||
}
|
||||
|
||||
// SubjectGroupEndedAll hears every group-ended.
|
||||
const SubjectGroupEndedAll = "mesh.seat.mesh-pipeline-runner.event.group-ended.*.*"
|
||||
const SubjectPipelineEndedAll = "mesh.seat.mesh-pipeline-runner.event.pipeline-ended.*.*"
|
||||
|
||||
// StreamRunStarted is the stream run-started is kept in.
|
||||
const StreamRunStarted = "SEAT_mesh-pipeline-runner_run-started"
|
||||
|
||||
// SubjectRunStarted is where run-started is published, on mesh.seat.mesh-pipeline-runner.event.run-started.<module>.<branch>.<commit-or-group>.
|
||||
func SubjectRunStarted(module, branch, commitOrGroup string) string {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.run-started." + module + "." + branch + "." + commitOrGroup
|
||||
// SubjectRunStarted is where run-started is published, on mesh.seat.mesh-pipeline-runner.event.run-started.<module>.<branch>.<commit>.
|
||||
func SubjectRunStarted(module, branch, commit string) string {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.run-started." + module + "." + branch + "." + commit
|
||||
}
|
||||
|
||||
// SubjectRunStartedAll hears every run-started.
|
||||
@@ -108,9 +97,9 @@ const SubjectRunStartedAll = "mesh.seat.mesh-pipeline-runner.event.run-started.*
|
||||
// StreamStepStarted is the stream step-started is kept in.
|
||||
const StreamStepStarted = "SEAT_mesh-pipeline-runner_step-started"
|
||||
|
||||
// SubjectStepStarted is where step-started is published, on mesh.seat.mesh-pipeline-runner.event.step-started.<module>.<branch>.<commit-or-group>.
|
||||
func SubjectStepStarted(module, branch, commitOrGroup string) string {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.step-started." + module + "." + branch + "." + commitOrGroup
|
||||
// SubjectStepStarted is where step-started is published, on mesh.seat.mesh-pipeline-runner.event.step-started.<module>.<branch>.<commit>.
|
||||
func SubjectStepStarted(module, branch, commit string) string {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.step-started." + module + "." + branch + "." + commit
|
||||
}
|
||||
|
||||
// SubjectStepStartedAll hears every step-started.
|
||||
@@ -119,9 +108,9 @@ const SubjectStepStartedAll = "mesh.seat.mesh-pipeline-runner.event.step-started
|
||||
// StreamStepEnded is the stream step-ended is kept in.
|
||||
const StreamStepEnded = "SEAT_mesh-pipeline-runner_step-ended"
|
||||
|
||||
// SubjectStepEnded is where step-ended is published, on mesh.seat.mesh-pipeline-runner.event.step-ended.<module>.<branch>.<commit-or-group>.
|
||||
func SubjectStepEnded(module, branch, commitOrGroup string) string {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.step-ended." + module + "." + branch + "." + commitOrGroup
|
||||
// SubjectStepEnded is where step-ended is published, on mesh.seat.mesh-pipeline-runner.event.step-ended.<module>.<branch>.<commit>.
|
||||
func SubjectStepEnded(module, branch, commit string) string {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.step-ended." + module + "." + branch + "." + commit
|
||||
}
|
||||
|
||||
// SubjectStepEndedAll hears every step-ended.
|
||||
@@ -130,24 +119,24 @@ const SubjectStepEndedAll = "mesh.seat.mesh-pipeline-runner.event.step-ended.*.*
|
||||
// StreamWaitHeld is the stream wait-held is kept in.
|
||||
const StreamWaitHeld = "SEAT_mesh-pipeline-runner_wait-held"
|
||||
|
||||
// SubjectWaitHeld is where wait-held is published, on mesh.seat.mesh-pipeline-runner.event.wait-held.<module>.<branch>.<commit-or-group>.
|
||||
func SubjectWaitHeld(module, branch, commitOrGroup string) string {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.wait-held." + module + "." + branch + "." + commitOrGroup
|
||||
// SubjectWaitHeld is where wait-held is published, on mesh.seat.mesh-pipeline-runner.event.wait-held.<branch>.<source>.
|
||||
func SubjectWaitHeld(branch, source string) string {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.wait-held." + branch + "." + source
|
||||
}
|
||||
|
||||
// SubjectWaitHeldAll hears every wait-held.
|
||||
const SubjectWaitHeldAll = "mesh.seat.mesh-pipeline-runner.event.wait-held.*.*.*"
|
||||
const SubjectWaitHeldAll = "mesh.seat.mesh-pipeline-runner.event.wait-held.*.*"
|
||||
|
||||
// StreamWaitEnded is the stream wait-ended is kept in.
|
||||
const StreamWaitEnded = "SEAT_mesh-pipeline-runner_wait-ended"
|
||||
|
||||
// SubjectWaitEnded is where wait-ended is published, on mesh.seat.mesh-pipeline-runner.event.wait-ended.<module>.<branch>.<commit-or-group>.
|
||||
func SubjectWaitEnded(module, branch, commitOrGroup string) string {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.wait-ended." + module + "." + branch + "." + commitOrGroup
|
||||
// SubjectWaitEnded is where wait-ended is published, on mesh.seat.mesh-pipeline-runner.event.wait-ended.<branch>.<source>.
|
||||
func SubjectWaitEnded(branch, source string) string {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.wait-ended." + branch + "." + source
|
||||
}
|
||||
|
||||
// SubjectWaitEndedAll hears every wait-ended.
|
||||
const SubjectWaitEndedAll = "mesh.seat.mesh-pipeline-runner.event.wait-ended.*.*.*"
|
||||
const SubjectWaitEndedAll = "mesh.seat.mesh-pipeline-runner.event.wait-ended.*.*"
|
||||
|
||||
// SubjectFilling is where filling is published.
|
||||
const SubjectFilling = "mesh.seat.mesh-pipeline-runner.event.filling"
|
||||
@@ -160,43 +149,150 @@ const SubjectRoom = "mesh.seat.mesh-pipeline-runner.event.room"
|
||||
|
||||
const (
|
||||
StatePipelines = "pipelines"
|
||||
StateQueue = "queue"
|
||||
StateKept = "kept"
|
||||
StateStepLog = "step-log"
|
||||
StateStepOutputs = "step-outputs"
|
||||
)
|
||||
|
||||
// PipelinesByBranchRevisionModuleKey is the key of one value of the state pipelines under the form "<branch>.<revision>.<module>".
|
||||
func PipelinesByBranchRevisionModuleKey(branch, revision, module string) string {
|
||||
return branch + "." + revision + "." + module
|
||||
}
|
||||
// PipelinesByBranchSourceKey is the key of one value of the state pipelines under the form "<branch>.<source>".
|
||||
func PipelinesByBranchSourceKey(branch, source string) string { return branch + "." + source }
|
||||
|
||||
// ParsePipelinesByBranchRevisionModuleKey reads the parts of a key of the form "<branch>.<revision>.<module>", in the order of the form; the last result is false for a key of another form.
|
||||
func ParsePipelinesByBranchRevisionModuleKey(key string) (string, string, string, bool) {
|
||||
// ParsePipelinesByBranchSourceKey reads the parts of a key of the form "<branch>.<source>", in the order of the form; the last result is false for a key of another form.
|
||||
func ParsePipelinesByBranchSourceKey(key string) (string, string, bool) {
|
||||
rest := key
|
||||
v0, after0, found0 := strings.Cut(rest, ".")
|
||||
if !found0 || v0 == "" {
|
||||
return "", "", "", false
|
||||
return "", "", false
|
||||
}
|
||||
rest = after0
|
||||
v2, after2, found2 := strings.Cut(rest, ".")
|
||||
if !found2 || v2 == "" {
|
||||
return "", "", "", false
|
||||
}
|
||||
rest = after2
|
||||
if rest == "" {
|
||||
return "", "", "", false
|
||||
return "", "", false
|
||||
}
|
||||
v4 := rest
|
||||
v2 := rest
|
||||
rest = ""
|
||||
if rest != "" {
|
||||
return "", "", "", false
|
||||
return "", "", false
|
||||
}
|
||||
return v0, v2, v4, true
|
||||
return v0, v2, true
|
||||
}
|
||||
|
||||
// DecodePipelinesByBranchRevisionModuleValue reads one value of the state pipelines under the form "<branch>.<revision>.<module>", refusing a field PipelinesByBranchRevisionModuleValue does not know and any text after the value.
|
||||
func DecodePipelinesByBranchRevisionModuleValue(raw []byte) (PipelinesByBranchRevisionModuleValue, error) {
|
||||
var v PipelinesByBranchRevisionModuleValue
|
||||
// DecodePipelinesByBranchSourceValue reads one value of the state pipelines under the form "<branch>.<source>", refusing a field PipelinesByBranchSourceValue does not know and any text after the value.
|
||||
func DecodePipelinesByBranchSourceValue(raw []byte) (PipelinesByBranchSourceValue, error) {
|
||||
var v PipelinesByBranchSourceValue
|
||||
dec := json.NewDecoder(bytes.NewReader(raw))
|
||||
dec.DisallowUnknownFields()
|
||||
if err := dec.Decode(&v); err != nil {
|
||||
return v, err
|
||||
}
|
||||
if dec.More() {
|
||||
return v, errors.New("text after the value")
|
||||
}
|
||||
return v, nil
|
||||
}
|
||||
|
||||
// PipelinesByBranchSourcePublishedPackageVersionKey is the key of one value of the state pipelines under the form "<branch>.<source>.published.<package>.<version>".
|
||||
func PipelinesByBranchSourcePublishedPackageVersionKey(branch, source, packagePart, version string) string {
|
||||
return branch + "." + source + ".published." + packagePart + "." + version
|
||||
}
|
||||
|
||||
// ParsePipelinesByBranchSourcePublishedPackageVersionKey reads the parts of a key of the form "<branch>.<source>.published.<package>.<version>", in the order of the form; the last result is false for a key of another form.
|
||||
func ParsePipelinesByBranchSourcePublishedPackageVersionKey(key string) (string, string, string, string, bool) {
|
||||
rest := key
|
||||
v0, after0, found0 := strings.Cut(rest, ".")
|
||||
if !found0 || v0 == "" {
|
||||
return "", "", "", "", false
|
||||
}
|
||||
rest = after0
|
||||
v2, after2, found2 := strings.Cut(rest, ".published.")
|
||||
if !found2 || v2 == "" {
|
||||
return "", "", "", "", false
|
||||
}
|
||||
rest = after2
|
||||
v4, after4, found4 := strings.Cut(rest, ".")
|
||||
if !found4 || v4 == "" {
|
||||
return "", "", "", "", false
|
||||
}
|
||||
rest = after4
|
||||
if rest == "" {
|
||||
return "", "", "", "", false
|
||||
}
|
||||
v6 := rest
|
||||
rest = ""
|
||||
if rest != "" {
|
||||
return "", "", "", "", false
|
||||
}
|
||||
return v0, v2, v4, v6, true
|
||||
}
|
||||
|
||||
// DecodePipelinesByBranchSourcePublishedPackageVersionValue reads one value of the state pipelines under the form "<branch>.<source>.published.<package>.<version>", refusing a field PipelinesByBranchSourcePublishedPackageVersionValue does not know and any text after the value.
|
||||
func DecodePipelinesByBranchSourcePublishedPackageVersionValue(raw []byte) (PipelinesByBranchSourcePublishedPackageVersionValue, error) {
|
||||
var v PipelinesByBranchSourcePublishedPackageVersionValue
|
||||
dec := json.NewDecoder(bytes.NewReader(raw))
|
||||
dec.DisallowUnknownFields()
|
||||
if err := dec.Decode(&v); err != nil {
|
||||
return v, err
|
||||
}
|
||||
if dec.More() {
|
||||
return v, errors.New("text after the value")
|
||||
}
|
||||
return v, nil
|
||||
}
|
||||
|
||||
// QueueByQueueNextKey is the key of one value of the state queue under the form "queue.next".
|
||||
func QueueByQueueNextKey() string { return "queue.next" }
|
||||
|
||||
// ParseQueueByQueueNextKey reads the parts of a key of the form "queue.next", in the order of the form; the last result is false for a key of another form.
|
||||
func ParseQueueByQueueNextKey(key string) bool {
|
||||
rest := key
|
||||
if !strings.HasPrefix(rest, "queue.next") {
|
||||
return false
|
||||
}
|
||||
rest = rest[10:]
|
||||
if rest != "" {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// DecodeQueueByQueueNextValue reads one value of the state queue under the form "queue.next", refusing a field QueueByQueueNextValue does not know and any text after the value.
|
||||
func DecodeQueueByQueueNextValue(raw []byte) (QueueByQueueNextValue, error) {
|
||||
var v QueueByQueueNextValue
|
||||
dec := json.NewDecoder(bytes.NewReader(raw))
|
||||
dec.DisallowUnknownFields()
|
||||
if err := dec.Decode(&v); err != nil {
|
||||
return v, err
|
||||
}
|
||||
if dec.More() {
|
||||
return v, errors.New("text after the value")
|
||||
}
|
||||
return v, nil
|
||||
}
|
||||
|
||||
// QueueByWaitingSequenceKey is the key of one value of the state queue under the form "waiting.<sequence>".
|
||||
func QueueByWaitingSequenceKey(sequence string) string { return "waiting." + sequence }
|
||||
|
||||
// ParseQueueByWaitingSequenceKey reads the parts of a key of the form "waiting.<sequence>", in the order of the form; the last result is false for a key of another form.
|
||||
func ParseQueueByWaitingSequenceKey(key string) (string, bool) {
|
||||
rest := key
|
||||
if !strings.HasPrefix(rest, "waiting.") {
|
||||
return "", false
|
||||
}
|
||||
rest = rest[8:]
|
||||
if rest == "" {
|
||||
return "", false
|
||||
}
|
||||
v1 := rest
|
||||
rest = ""
|
||||
if rest != "" {
|
||||
return "", false
|
||||
}
|
||||
return v1, true
|
||||
}
|
||||
|
||||
// DecodeQueueByWaitingSequenceValue reads one value of the state queue under the form "waiting.<sequence>", refusing a field QueueByWaitingSequenceValue does not know and any text after the value.
|
||||
func DecodeQueueByWaitingSequenceValue(raw []byte) (QueueByWaitingSequenceValue, error) {
|
||||
var v QueueByWaitingSequenceValue
|
||||
dec := json.NewDecoder(bytes.NewReader(raw))
|
||||
dec.DisallowUnknownFields()
|
||||
if err := dec.Decode(&v); err != nil {
|
||||
@@ -336,31 +432,6 @@ type Fill struct {
|
||||
Store string `json:"store"`
|
||||
}
|
||||
|
||||
// GroupEnded is a group's one pipeline's end on a watched branch, said once every member's modules have ended; a group's wants are written on it alone (ADR 0666 section 9).
|
||||
type GroupEnded struct {
|
||||
Branch string `json:"branch"`
|
||||
Ended *time.Time `json:"ended,omitempty"`
|
||||
Group string `json:"group"`
|
||||
Outcome string `json:"outcome"`
|
||||
// every member module's pipeline, each ended
|
||||
Pipelines []PipelineEnded `json:"pipelines"`
|
||||
Revision int64 `json:"revision,omitempty"`
|
||||
// the group's one source revision of the watched branch
|
||||
Source int64 `json:"source,omitempty"`
|
||||
V int64 `json:"v"`
|
||||
Why string `json:"why,omitempty"`
|
||||
}
|
||||
|
||||
// The values of GroupEnded's outcome.
|
||||
const (
|
||||
GroupEndedOutcomeRunning = "running"
|
||||
GroupEndedOutcomePassed = "passed"
|
||||
GroupEndedOutcomeFailed = "failed"
|
||||
GroupEndedOutcomeRefused = "refused"
|
||||
GroupEndedOutcomeSuperseded = "superseded"
|
||||
GroupEndedOutcomeCancelled = "cancelled"
|
||||
)
|
||||
|
||||
// KeptResult is a package's passing result the runner keeps, by the digest of what its tests read (ADR 0666 section 8).
|
||||
type KeptResult struct {
|
||||
// sha256:<hex> of what the package's tests read
|
||||
@@ -432,51 +503,75 @@ type Member struct {
|
||||
Module string `json:"module"`
|
||||
}
|
||||
|
||||
// Pipeline is one pipeline as the runner keeps it in its state pipelines, by compare-and-set (design 47 *The runner's kept data*).
|
||||
// Mover is one module a pipeline moves: an entry of its take-in.taken, with what the pipeline found of it (design 47 H §746, H-A-35, H-A-72).
|
||||
type Mover struct {
|
||||
// the commit the module's entry was last changed at
|
||||
Commit string `json:"commit"`
|
||||
// the module's build-input fingerprint at the commit
|
||||
Fingerprint string `json:"fingerprint"`
|
||||
Module string `json:"module"`
|
||||
// yes when the module is over its test budget (design 47 G section 419)
|
||||
OverBudget bool `json:"over-budget,omitempty"`
|
||||
Repository string `json:"repository"`
|
||||
Tests *TestCounts `json:"tests,omitempty"`
|
||||
// the mover's tier in the pipeline's delivery order, from 1 (ADR 0666 section 14; design 47 H §746)
|
||||
Tier int64 `json:"tier"`
|
||||
// the version released for the mover in this pipeline (version-released), absent until one is (design 47 H-A-52)
|
||||
Version string `json:"version,omitempty"`
|
||||
Widens []Widening `json:"widens,omitempty"`
|
||||
}
|
||||
|
||||
// MoverEnded is one mover at its pipeline's end (design 47 H §746).
|
||||
type MoverEnded struct {
|
||||
// the module's build-input fingerprint the pipeline ran at
|
||||
Fingerprint string `json:"fingerprint"`
|
||||
Module string `json:"module"`
|
||||
// the mover's step results, each naming its module (design 47 H-A-72)
|
||||
Steps []StepResult `json:"steps"`
|
||||
// the mover's tier in the delivery order, from 1 (ADR 0666 section 14)
|
||||
Tier int64 `json:"tier"`
|
||||
// the version released for the mover, absent when none was released
|
||||
Version string `json:"version,omitempty"`
|
||||
}
|
||||
|
||||
// Pipeline is one pipeline of one take-in, its movers the take-in's entries, as the runner keeps it in its state pipelines by compare-and-set (design 47 H §746).
|
||||
type Pipeline struct {
|
||||
// the watched branch, or the branch of a run on request
|
||||
Branch string `json:"branch"`
|
||||
// the commit the module's entry was last changed at
|
||||
Commit string `json:"commit"`
|
||||
// the merge call whose source revision the take-in took in (design 47 H §746)
|
||||
Call string `json:"call,omitempty"`
|
||||
// how often the pipeline has ended: 1 at its first end, one higher at each end again after a passing rerun, so the assigner takes a later end of the same source revision (design 47 G sections 29, 325)
|
||||
EndCount int64 `json:"end-count,omitempty"`
|
||||
Ended *time.Time `json:"ended,omitempty"`
|
||||
// the module's build-input fingerprint at the commit
|
||||
Fingerprint string `json:"fingerprint,omitempty"`
|
||||
// the gathered group, when the pipeline is its
|
||||
Group string `json:"group,omitempty"`
|
||||
Module string `json:"module"`
|
||||
Outcome string `json:"outcome"`
|
||||
// yes when the module is over its test budget (design 47 G section 419)
|
||||
OverBudget bool `json:"over-budget,omitempty"`
|
||||
// the pipeline's key, <branch>.<revision>.<module>, a branch escaped as a key's name is
|
||||
Pipeline string `json:"pipeline,omitempty"`
|
||||
// the modules the pipeline moves, its take-in's entries (design 47 H §746)
|
||||
Movers []Mover `json:"movers"`
|
||||
Outcome string `json:"outcome"`
|
||||
// the pipeline's key, <branch>.<source>, or <branch>.<source>.published.<package>.<version> for a pipeline a publish started; a branch escaped as a key's name is (design 47 H §746, §747)
|
||||
Pipeline string `json:"pipeline"`
|
||||
// for a pipeline a package's publish started, that publish (A-202)
|
||||
Published *Published `json:"published,omitempty"`
|
||||
Repository string `json:"repository,omitempty"`
|
||||
Published *Published `json:"published,omitempty"`
|
||||
// the catalog graph revision of the branch the pipeline runs for
|
||||
Revision int64 `json:"revision,omitempty"`
|
||||
// the run on request's id, for a pipeline of a run; such a pipeline delivers nothing
|
||||
Run string `json:"run,omitempty"`
|
||||
// for a pipeline written over pipelines-at-once, its place in the queue: the runner's counter queue.next at its write (design 47 H §748)
|
||||
Seq int64 `json:"seq,omitempty"`
|
||||
// the source revision of the watched branch; the pipeline is keyed by it (ADR 0666 section 9)
|
||||
Source int64 `json:"source,omitempty"`
|
||||
Source int64 `json:"source"`
|
||||
Started *time.Time `json:"started,omitempty"`
|
||||
// every step, approval last
|
||||
// every mover's steps, each naming its mover, approval last
|
||||
Steps []StepResult `json:"steps"`
|
||||
Tests *TestCounts `json:"tests,omitempty"`
|
||||
// the step-log entries of the steps that ended and are not appended to the step log yet, in order; written with the step's end in one write and cleared when appended (design 47 G sections 486, 606)
|
||||
Unlogged []LogEntry `json:"unlogged,omitempty"`
|
||||
// the layout version
|
||||
V int64 `json:"v,omitempty"`
|
||||
// the version package-published names, for a pipeline the runner started from a publication or from outdated; none for any other (design 47 G 550)
|
||||
Version string `json:"version,omitempty"`
|
||||
// for a pipeline that did not pass, the steps that held it
|
||||
Why string `json:"why,omitempty"`
|
||||
Widens []Widening `json:"widens,omitempty"`
|
||||
Why string `json:"why,omitempty"`
|
||||
}
|
||||
|
||||
// The values of Pipeline's outcome.
|
||||
const (
|
||||
PipelineOutcomeWaiting = "waiting"
|
||||
PipelineOutcomeRunning = "running"
|
||||
PipelineOutcomePassed = "passed"
|
||||
PipelineOutcomeFailed = "failed"
|
||||
@@ -485,41 +580,34 @@ const (
|
||||
PipelineOutcomeCancelled = "cancelled"
|
||||
)
|
||||
|
||||
// PipelineEnded is a pipeline's end with every step's result, its test counts, the source revision and widens (design 47 *Health and going back*); the assigner writes a want only from one whose every required step passed.
|
||||
// PipelineEnded is a pipeline's end, said once, with per mover its released version, step results and tier (design 47 H §746); the assigner writes wants only from a passed one.
|
||||
type PipelineEnded struct {
|
||||
// the watched branch, or the branch of a run on request
|
||||
Branch string `json:"branch"`
|
||||
// the commit the module's entry was last changed at
|
||||
Commit string `json:"commit"`
|
||||
// the merge call whose source revision the take-in took in (design 47 H §746)
|
||||
Call string `json:"call,omitempty"`
|
||||
// how often the pipeline has ended: 1 at its first end, one higher at each end again after a passing rerun, so the assigner takes a later end of the same source revision (design 47 G sections 29, 325)
|
||||
EndCount int64 `json:"end-count,omitempty"`
|
||||
Ended *time.Time `json:"ended,omitempty"`
|
||||
// the module's build-input fingerprint at the commit
|
||||
Fingerprint string `json:"fingerprint,omitempty"`
|
||||
// the gathered group, when the pipeline is its
|
||||
Group string `json:"group,omitempty"`
|
||||
Module string `json:"module"`
|
||||
Outcome string `json:"outcome"`
|
||||
// yes when the module is over its test budget (500 unit or 50 integration tests; design 47 G section 419)
|
||||
OverBudget bool `json:"over-budget,omitempty"`
|
||||
// the pipeline's key, <branch>.<revision>.<module>, a branch escaped as a key's name is
|
||||
// per mover its fingerprint, released version, step results and tier, in the delivery order (design 47 H §746, H-A-2)
|
||||
Movers []MoverEnded `json:"movers"`
|
||||
Outcome string `json:"outcome"`
|
||||
// the pipeline's key, <branch>.<source>, or <branch>.<source>.published.<package>.<version> for a pipeline a publish started; a branch escaped as a key's name is (design 47 H §746, §747)
|
||||
Pipeline string `json:"pipeline"`
|
||||
// the catalog graph revision of the branch the pipeline runs for
|
||||
Revision int64 `json:"revision,omitempty"`
|
||||
// the run on request's id, for a pipeline of a run; such a pipeline delivers nothing
|
||||
Run string `json:"run,omitempty"`
|
||||
// the source revision of the watched branch; the pipeline is keyed by it (ADR 0666 section 9)
|
||||
Source int64 `json:"source,omitempty"`
|
||||
Started *time.Time `json:"started,omitempty"`
|
||||
Steps []StepResult `json:"steps"`
|
||||
Tests *TestCounts `json:"tests,omitempty"`
|
||||
V int64 `json:"v"`
|
||||
Why string `json:"why,omitempty"`
|
||||
Widens []Widening `json:"widens,omitempty"`
|
||||
Source int64 `json:"source"`
|
||||
Started *time.Time `json:"started,omitempty"`
|
||||
V int64 `json:"v"`
|
||||
Why string `json:"why,omitempty"`
|
||||
}
|
||||
|
||||
// The values of PipelineEnded's outcome.
|
||||
const (
|
||||
PipelineEndedOutcomeWaiting = "waiting"
|
||||
PipelineEndedOutcomeRunning = "running"
|
||||
PipelineEndedOutcomePassed = "passed"
|
||||
PipelineEndedOutcomeFailed = "failed"
|
||||
@@ -528,44 +616,16 @@ const (
|
||||
PipelineEndedOutcomeCancelled = "cancelled"
|
||||
)
|
||||
|
||||
// PipelineStartedStepsItem is a type of the contract.
|
||||
type PipelineStartedStepsItem struct {
|
||||
Artifact string `json:"artifact,omitempty"`
|
||||
Status string `json:"status"`
|
||||
Step string `json:"step"`
|
||||
}
|
||||
|
||||
// The values of PipelineStartedStepsItem's status.
|
||||
const (
|
||||
PipelineStartedStepsItemStatusRequired = "required"
|
||||
PipelineStartedStepsItemStatusOptional = "optional"
|
||||
PipelineStartedStepsItemStatusBypass = "bypass"
|
||||
)
|
||||
|
||||
// The values of PipelineStartedStepsItem's step.
|
||||
const (
|
||||
PipelineStartedStepsItemStepBuild = "build"
|
||||
PipelineStartedStepsItemStepLint = "lint"
|
||||
PipelineStartedStepsItemStepUnit = "unit"
|
||||
PipelineStartedStepsItemStepIntegration = "integration"
|
||||
PipelineStartedStepsItemStepComposition = "composition"
|
||||
PipelineStartedStepsItemStepReview = "review"
|
||||
PipelineStartedStepsItemStepApproval = "approval"
|
||||
)
|
||||
|
||||
// PipelineStarted is a pipeline's start.
|
||||
// PipelineStarted is a pipeline's start, said at its write, a waiting one's too (design 47 H §746, H-A-52).
|
||||
type PipelineStarted struct {
|
||||
At *time.Time `json:"at,omitempty"`
|
||||
// the watched branch, or the branch of a run on request
|
||||
Branch string `json:"branch"`
|
||||
// the commit the module's entry was last changed at
|
||||
Commit string `json:"commit"`
|
||||
// the module's build-input fingerprint at the commit
|
||||
Fingerprint string `json:"fingerprint,omitempty"`
|
||||
// the gathered group, when the pipeline is its
|
||||
Group string `json:"group,omitempty"`
|
||||
Module string `json:"module"`
|
||||
// the pipeline's key, <branch>.<revision>.<module>, a branch escaped as a key's name is
|
||||
// the merge call whose source revision the take-in took in (design 47 H §746)
|
||||
Call string `json:"call,omitempty"`
|
||||
// the pipeline's movers
|
||||
Movers []Mover `json:"movers"`
|
||||
// the pipeline's key, <branch>.<source>, or <branch>.<source>.published.<package>.<version> for a pipeline a publish started; a branch escaped as a key's name is (design 47 H §746, §747)
|
||||
Pipeline string `json:"pipeline"`
|
||||
// for a pipeline a package's publish started, that publish (A-202)
|
||||
Published *Published `json:"published,omitempty"`
|
||||
@@ -574,10 +634,8 @@ type PipelineStarted struct {
|
||||
// the run on request's id, for a pipeline of a run; such a pipeline delivers nothing
|
||||
Run string `json:"run,omitempty"`
|
||||
// the source revision of the watched branch; the pipeline is keyed by it (ADR 0666 section 9)
|
||||
Source int64 `json:"source,omitempty"`
|
||||
// the steps the policy gives it
|
||||
Steps []PipelineStartedStepsItem `json:"steps,omitempty"`
|
||||
V int64 `json:"v"`
|
||||
Source int64 `json:"source"`
|
||||
V int64 `json:"v"`
|
||||
}
|
||||
|
||||
// Published is the publish of a package that started a pipeline: a newer publish of the same artifact on the same branch supersedes it (design 47 G section 31, A-202).
|
||||
@@ -627,10 +685,8 @@ type StepEvent struct {
|
||||
Commit string `json:"commit"`
|
||||
// the module's build-input fingerprint at the commit
|
||||
Fingerprint string `json:"fingerprint,omitempty"`
|
||||
// the gathered group, when the pipeline is its
|
||||
Group string `json:"group,omitempty"`
|
||||
Module string `json:"module"`
|
||||
// the pipeline's key, <branch>.<revision>.<module>, a branch escaped as a key's name is
|
||||
Module string `json:"module"`
|
||||
// the pipeline's key, <branch>.<source>, or <branch>.<source>.published.<package>.<version> for a pipeline a publish started; a branch escaped as a key's name is (design 47 H §746, §747)
|
||||
Pipeline string `json:"pipeline"`
|
||||
Result StepResult `json:"result"`
|
||||
// the catalog graph revision of the branch the pipeline runs for
|
||||
@@ -656,6 +712,8 @@ type StepResult struct {
|
||||
Ended *time.Time `json:"ended,omitempty"`
|
||||
// the artifact's build-input fingerprint the step ran at
|
||||
Fingerprint string `json:"fingerprint,omitempty"`
|
||||
// the mover the step is of (design 47 H-A-35)
|
||||
Module string `json:"module,omitempty"`
|
||||
// the node whose holder ended it
|
||||
Node string `json:"node,omitempty"`
|
||||
// for a waiting step, who or what it waits on: a person, a build node, the revision view
|
||||
@@ -707,6 +765,7 @@ const (
|
||||
|
||||
// The values of StepResult's step.
|
||||
const (
|
||||
StepResultStepValidate = "validate"
|
||||
StepResultStepBuild = "build"
|
||||
StepResultStepLint = "lint"
|
||||
StepResultStepUnit = "unit"
|
||||
@@ -779,7 +838,7 @@ type ToolchainUsed struct {
|
||||
Version string `json:"version"`
|
||||
}
|
||||
|
||||
// Wait is a step's wait, held and ended; a wait on a person is said as waiting on that person, never a stall (ADR 0283).
|
||||
// Wait is a step's wait, held and ended; a wait on a person is said as waiting on that person, never a stall (ADR 0283); said on <branch>.<source> (design 47 H-A-72).
|
||||
type Wait struct {
|
||||
Artifact string `json:"artifact,omitempty"`
|
||||
// the step's own ask, where it has one (design 47 G §731)
|
||||
@@ -790,14 +849,13 @@ type Wait struct {
|
||||
Commit string `json:"commit,omitempty"`
|
||||
// the module's build-input fingerprint at the commit
|
||||
Fingerprint string `json:"fingerprint,omitempty"`
|
||||
// the gathered group, when the pipeline is its
|
||||
Group string `json:"group,omitempty"`
|
||||
// for its end, how it ended: answered, ran, superseded
|
||||
How string `json:"how,omitempty"`
|
||||
Module string `json:"module"`
|
||||
How string `json:"how,omitempty"`
|
||||
// for a step's wait, the mover whose step waits (design 47 H-A-72)
|
||||
Module string `json:"module,omitempty"`
|
||||
// what the step waits on (design 47 *Health and going back*)
|
||||
On string `json:"on"`
|
||||
// the pipeline's key, <branch>.<revision>.<module>, a branch escaped as a key's name is
|
||||
// the pipeline's key, <branch>.<source>, or <branch>.<source>.published.<package>.<version> for a pipeline a publish started; a branch escaped as a key's name is (design 47 H §746, §747)
|
||||
Pipeline string `json:"pipeline"`
|
||||
// the catalog graph revision of the branch the pipeline runs for
|
||||
Revision int64 `json:"revision,omitempty"`
|
||||
@@ -808,7 +866,7 @@ type Wait struct {
|
||||
Since time.Time `json:"since"`
|
||||
// the source revision of the watched branch; the pipeline is keyed by it (ADR 0666 section 9)
|
||||
Source int64 `json:"source,omitempty"`
|
||||
// a pipeline step a wait inside a pipeline is in
|
||||
// the pipeline step a wait is in, or pipeline for a pipeline waiting its turn (design 47 H §748)
|
||||
Step string `json:"step"`
|
||||
V int64 `json:"v"`
|
||||
// for a wait on a person, who: the operator, a reviewer
|
||||
@@ -817,13 +875,15 @@ type Wait struct {
|
||||
|
||||
// The values of Wait's on.
|
||||
const (
|
||||
WaitOnPerson = "person"
|
||||
WaitOnBuildNode = "build node"
|
||||
WaitOnRevisionView = "revision view"
|
||||
WaitOnPerson = "person"
|
||||
WaitOnBuildNode = "build node"
|
||||
WaitOnRevisionView = "revision view"
|
||||
WaitOnPipelinesAtOnce = "pipelines-at-once"
|
||||
)
|
||||
|
||||
// The values of Wait's step.
|
||||
const (
|
||||
WaitStepValidate = "validate"
|
||||
WaitStepBuild = "build"
|
||||
WaitStepLint = "lint"
|
||||
WaitStepUnit = "unit"
|
||||
@@ -831,8 +891,15 @@ const (
|
||||
WaitStepComposition = "composition"
|
||||
WaitStepReview = "review"
|
||||
WaitStepApproval = "approval"
|
||||
WaitStepPipeline = "pipeline"
|
||||
)
|
||||
|
||||
// Waiting is a pipeline waiting its turn under pipelines-at-once (design 47 H §748, H-A-72).
|
||||
type Waiting struct {
|
||||
// the pipeline's key, <branch>.<source>, or <branch>.<source>.published.<package>.<version> for a pipeline a publish started; a branch escaped as a key's name is (design 47 H §746, §747)
|
||||
Pipeline string `json:"pipeline"`
|
||||
}
|
||||
|
||||
// Widening is a part serving a step the change alters, or an acting rule, a grant or a credential it widens, computed by the running runner (ADR 0666 section 23).
|
||||
type Widening struct {
|
||||
// the part, rule, grant or credential
|
||||
@@ -926,6 +993,7 @@ type WhyCarriedInput struct {
|
||||
|
||||
// The values of WhyCarriedInput's step.
|
||||
const (
|
||||
WhyCarriedInputStepValidate = "validate"
|
||||
WhyCarriedInputStepBuild = "build"
|
||||
WhyCarriedInputStepLint = "lint"
|
||||
WhyCarriedInputStepUnit = "unit"
|
||||
@@ -988,6 +1056,7 @@ type RerunInput struct {
|
||||
|
||||
// The values of RerunInput's step.
|
||||
const (
|
||||
RerunInputStepValidate = "validate"
|
||||
RerunInputStepBuild = "build"
|
||||
RerunInputStepLint = "lint"
|
||||
RerunInputStepUnit = "unit"
|
||||
@@ -1015,6 +1084,7 @@ type AcceptInput struct {
|
||||
|
||||
// The values of AcceptInput's step.
|
||||
const (
|
||||
AcceptInputStepValidate = "validate"
|
||||
AcceptInputStepBuild = "build"
|
||||
AcceptInputStepLint = "lint"
|
||||
AcceptInputStepUnit = "unit"
|
||||
@@ -1042,6 +1112,19 @@ type CancelAnswer struct {
|
||||
Pipeline Pipeline `json:"pipeline"`
|
||||
}
|
||||
|
||||
// PlaceInput is what place takes.
|
||||
type PlaceInput struct {
|
||||
// the pipeline's key
|
||||
Pipeline string `json:"pipeline"`
|
||||
// why, written with the caller the runtime proves in the hand-act log
|
||||
Why string `json:"why"`
|
||||
}
|
||||
|
||||
// PlaceAnswer is what place answers.
|
||||
type PlaceAnswer struct {
|
||||
Pipeline Pipeline `json:"pipeline"`
|
||||
}
|
||||
|
||||
// AskAgainInput is what ask-again takes.
|
||||
type AskAgainInput struct {
|
||||
// the pipeline's key
|
||||
@@ -1099,9 +1182,6 @@ type PipelineStartedEvent = PipelineStarted
|
||||
// PipelineEndedEvent is the body of the event pipeline-ended.
|
||||
type PipelineEndedEvent = PipelineEnded
|
||||
|
||||
// GroupEndedEvent is the body of the event group-ended.
|
||||
type GroupEndedEvent = GroupEnded
|
||||
|
||||
// RunStartedEvent is the body of the event run-started.
|
||||
type RunStartedEvent = RunStarted
|
||||
|
||||
@@ -1126,8 +1206,17 @@ type FullEvent = Fill
|
||||
// RoomEvent is the body of the event room.
|
||||
type RoomEvent = Fill
|
||||
|
||||
// PipelinesByBranchRevisionModuleValue is one value of the state pipelines under the key <branch>.<revision>.<module>.
|
||||
type PipelinesByBranchRevisionModuleValue = Pipeline
|
||||
// PipelinesByBranchSourceValue is one value of the state pipelines under the key <branch>.<source>.
|
||||
type PipelinesByBranchSourceValue = Pipeline
|
||||
|
||||
// PipelinesByBranchSourcePublishedPackageVersionValue is one value of the state pipelines under the key <branch>.<source>.published.<package>.<version>.
|
||||
type PipelinesByBranchSourcePublishedPackageVersionValue = Pipeline
|
||||
|
||||
// QueueByQueueNextValue is one value of the state queue under the key queue.next.
|
||||
type QueueByQueueNextValue = int64
|
||||
|
||||
// QueueByWaitingSequenceValue is one value of the state queue under the key waiting.<sequence>.
|
||||
type QueueByWaitingSequenceValue = Waiting
|
||||
|
||||
// KeptByLevelDigestValue is one value of the state kept under the key <level>.<digest>.
|
||||
type KeptByLevelDigestValue = KeptResult
|
||||
|
||||
@@ -17,68 +17,84 @@ func TestFixtures(t *testing.T) {
|
||||
decode func([]byte) (any, error)
|
||||
subjectIs *regexp.Regexp
|
||||
}{
|
||||
{name: "a pipeline started with the steps its policy gives", subject: "mesh.seat.mesh-pipeline-runner.event.pipeline-started.nats.main.0123456789abcdef0123456789abcdef01234567", given: "{\"at\":\"2026-11-10T10:00:00Z\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"source\":3589,\"steps\":[{\"artifact\":\"nats:program\",\"status\":\"required\",\"step\":\"lint\"},{\"status\":\"bypass\",\"step\":\"review\"}],\"v\":1}", wire: "{\"at\":\"2026-11-10T10:00:00Z\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"source\":3589,\"steps\":[{\"artifact\":\"nats:program\",\"status\":\"required\",\"step\":\"lint\"},{\"status\":\"bypass\",\"step\":\"review\"}],\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v PipelineStartedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-pipeline-runner\\.event\\.pipeline-started\\.[^.*> ]+\\.[^.*> ]+\\.[^.*> ]+$")},
|
||||
{name: "a pipeline ended passed, an optional step failed, over budget and widening named", subject: "mesh.seat.mesh-pipeline-runner.event.pipeline-ended.nats.main.0123456789abcdef0123456789abcdef01234567", given: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"end-count\":1,\"ended\":\"2026-11-10T10:20:00Z\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"outcome\":\"passed\",\"over-budget\":true,\"pipeline\":\"main.12.nats\",\"revision\":12,\"source\":3589,\"started\":\"2026-11-10T10:00:00Z\",\"steps\":[{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"fingerprint\":\"fp-0123\",\"node\":\"anchor\",\"outcome\":\"passed\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"},{\"artifact\":\"nats:program\",\"carried-from\":\"main.11.nats\",\"fingerprint\":\"fp-0123\",\"outcome\":\"carried\",\"status\":\"required\",\"step\":\"unit\",\"tests\":{\"unit\":42}},{\"artifact\":\"nats:program\",\"fingerprint\":\"fp-0123\",\"node\":\"home-server\",\"outcome\":\"failed\",\"seat\":\"node-build-go\",\"status\":\"optional\",\"step\":\"integration\",\"tests\":{\"integration\":3},\"why\":\"TestTheBusWhole failed\"},{\"outcome\":\"passed\",\"seat\":\"mesh-wants\",\"status\":\"required\",\"step\":\"composition\"},{\"outcome\":\"bypassed\",\"status\":\"bypass\",\"step\":\"review\"},{\"outcome\":\"passed\",\"status\":\"required\",\"step\":\"approval\"}],\"tests\":{\"integration\":3,\"unit\":42},\"v\":1,\"widens\":[{\"name\":\"mesh-build-go:program\",\"said\":\"its test runner\",\"what\":\"serving part\"}]}", wire: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"end-count\":1,\"ended\":\"2026-11-10T10:20:00Z\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"outcome\":\"passed\",\"over-budget\":true,\"pipeline\":\"main.12.nats\",\"revision\":12,\"source\":3589,\"started\":\"2026-11-10T10:00:00Z\",\"steps\":[{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"fingerprint\":\"fp-0123\",\"node\":\"anchor\",\"outcome\":\"passed\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"},{\"artifact\":\"nats:program\",\"carried-from\":\"main.11.nats\",\"fingerprint\":\"fp-0123\",\"outcome\":\"carried\",\"status\":\"required\",\"step\":\"unit\",\"tests\":{\"unit\":42}},{\"artifact\":\"nats:program\",\"fingerprint\":\"fp-0123\",\"node\":\"home-server\",\"outcome\":\"failed\",\"seat\":\"node-build-go\",\"status\":\"optional\",\"step\":\"integration\",\"tests\":{\"integration\":3},\"why\":\"TestTheBusWhole failed\"},{\"outcome\":\"passed\",\"seat\":\"mesh-wants\",\"status\":\"required\",\"step\":\"composition\"},{\"outcome\":\"bypassed\",\"status\":\"bypass\",\"step\":\"review\"},{\"outcome\":\"passed\",\"status\":\"required\",\"step\":\"approval\"}],\"tests\":{\"integration\":3,\"unit\":42},\"v\":1,\"widens\":[{\"name\":\"mesh-build-go:program\",\"said\":\"its test runner\",\"what\":\"serving part\"}]}",
|
||||
decode: func(b []byte) (any, error) { var v PipelineEndedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-pipeline-runner\\.event\\.pipeline-ended\\.[^.*> ]+\\.[^.*> ]+\\.[^.*> ]+$")},
|
||||
{name: "a pipeline ended failed, naming the step that held it, its approval not asked", subject: "mesh.seat.mesh-pipeline-runner.event.pipeline-ended.nats.main.0123456789abcdef0123456789abcdef01234567", given: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"end-count\":1,\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"outcome\":\"failed\",\"over-budget\":true,\"pipeline\":\"main.12.nats\",\"revision\":12,\"source\":3589,\"steps\":[{\"artifact\":\"nats:program\",\"fingerprint\":\"fp-0123\",\"outcome\":\"failed\",\"status\":\"required\",\"step\":\"unit\"},{\"outcome\":\"not asked\",\"status\":\"required\",\"step\":\"approval\",\"why\":\"unit of nats:program failed\"}],\"v\":1,\"why\":\"unit of nats:program failed\"}", wire: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"end-count\":1,\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"outcome\":\"failed\",\"over-budget\":true,\"pipeline\":\"main.12.nats\",\"revision\":12,\"source\":3589,\"steps\":[{\"artifact\":\"nats:program\",\"fingerprint\":\"fp-0123\",\"outcome\":\"failed\",\"status\":\"required\",\"step\":\"unit\"},{\"outcome\":\"not asked\",\"status\":\"required\",\"step\":\"approval\",\"why\":\"unit of nats:program failed\"}],\"v\":1,\"why\":\"unit of nats:program failed\"}",
|
||||
decode: func(b []byte) (any, error) { var v PipelineEndedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-pipeline-runner\\.event\\.pipeline-ended\\.[^.*> ]+\\.[^.*> ]+\\.[^.*> ]+$")},
|
||||
{name: "a group's one pipeline ended on a watched branch", subject: "mesh.seat.mesh-pipeline-runner.event.group-ended.main.registry-1966", given: "{\"branch\":\"main\",\"ended\":\"2026-11-10T10:20:00Z\",\"group\":\"registry-1966\",\"outcome\":\"passed\",\"pipelines\":[{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"group\":\"registry-1966\",\"module\":\"nats\",\"outcome\":\"passed\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"source\":3589,\"steps\":[{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"fingerprint\":\"fp-0123\",\"node\":\"anchor\",\"outcome\":\"passed\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"}],\"v\":1}],\"revision\":12,\"source\":3589,\"v\":1}", wire: "{\"branch\":\"main\",\"ended\":\"2026-11-10T10:20:00Z\",\"group\":\"registry-1966\",\"outcome\":\"passed\",\"pipelines\":[{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"group\":\"registry-1966\",\"module\":\"nats\",\"outcome\":\"passed\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"source\":3589,\"steps\":[{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"fingerprint\":\"fp-0123\",\"node\":\"anchor\",\"outcome\":\"passed\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"}],\"v\":1}],\"revision\":12,\"source\":3589,\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v GroupEndedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-pipeline-runner\\.event\\.group-ended\\.[^.*> ]+\\.[^.*> ]+$")},
|
||||
{name: "a take-in's pipeline started with its two movers", subject: "mesh.seat.mesh-pipeline-runner.event.pipeline-started.main.3589", given: "{\"at\":\"2026-11-10T10:00:00Z\",\"branch\":\"main\",\"call\":\"0123456789abcdef\",\"movers\":[{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-sdk\",\"module\":\"mesh-sdk\",\"repository\":\"mesh-sdk\",\"tier\":1},{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"repository\":\"mesh-networking\",\"tier\":2}],\"pipeline\":\"main.3589\",\"revision\":12,\"source\":3589,\"v\":1}", wire: "{\"at\":\"2026-11-10T10:00:00Z\",\"branch\":\"main\",\"call\":\"0123456789abcdef\",\"movers\":[{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-sdk\",\"module\":\"mesh-sdk\",\"repository\":\"mesh-sdk\",\"tier\":1},{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"repository\":\"mesh-networking\",\"tier\":2}],\"pipeline\":\"main.3589\",\"revision\":12,\"source\":3589,\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v PipelineStartedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-pipeline-runner\\.event\\.pipeline-started\\.[^.*> ]+\\.[^.*> ]+$")},
|
||||
{name: "a pipeline ended passed: per mover its version, steps and tier, an optional step failed", subject: "mesh.seat.mesh-pipeline-runner.event.pipeline-ended.main.3589", given: "{\"branch\":\"main\",\"call\":\"0123456789abcdef\",\"end-count\":1,\"ended\":\"2026-11-10T10:20:00Z\",\"movers\":[{\"fingerprint\":\"fp-sdk\",\"module\":\"mesh-sdk\",\"steps\":[{\"module\":\"mesh-sdk\",\"outcome\":\"passed\",\"seat\":\"mesh-wants\",\"status\":\"required\",\"step\":\"validate\"}],\"tier\":1,\"version\":\"0.1.21\"},{\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"steps\":[{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"node\":\"anchor\",\"outcome\":\"passed\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"},{\"artifact\":\"nats:program\",\"carried-from\":\"main.3588\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"outcome\":\"carried\",\"status\":\"required\",\"step\":\"unit\",\"tests\":{\"unit\":42}},{\"artifact\":\"nats:program\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"node\":\"home-server\",\"outcome\":\"failed\",\"seat\":\"node-build-go\",\"status\":\"optional\",\"step\":\"integration\",\"tests\":{\"integration\":3},\"why\":\"TestTheBusWhole failed\"},{\"module\":\"nats\",\"outcome\":\"passed\",\"seat\":\"mesh-wants\",\"status\":\"required\",\"step\":\"composition\"},{\"module\":\"nats\",\"outcome\":\"bypassed\",\"status\":\"bypass\",\"step\":\"review\"},{\"module\":\"nats\",\"outcome\":\"passed\",\"status\":\"required\",\"step\":\"approval\"}],\"tier\":2,\"version\":\"0.1.15\"}],\"outcome\":\"passed\",\"pipeline\":\"main.3589\",\"revision\":12,\"source\":3589,\"started\":\"2026-11-10T10:00:00Z\",\"v\":1}", wire: "{\"branch\":\"main\",\"call\":\"0123456789abcdef\",\"end-count\":1,\"ended\":\"2026-11-10T10:20:00Z\",\"movers\":[{\"fingerprint\":\"fp-sdk\",\"module\":\"mesh-sdk\",\"steps\":[{\"module\":\"mesh-sdk\",\"outcome\":\"passed\",\"seat\":\"mesh-wants\",\"status\":\"required\",\"step\":\"validate\"}],\"tier\":1,\"version\":\"0.1.21\"},{\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"steps\":[{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"node\":\"anchor\",\"outcome\":\"passed\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"},{\"artifact\":\"nats:program\",\"carried-from\":\"main.3588\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"outcome\":\"carried\",\"status\":\"required\",\"step\":\"unit\",\"tests\":{\"unit\":42}},{\"artifact\":\"nats:program\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"node\":\"home-server\",\"outcome\":\"failed\",\"seat\":\"node-build-go\",\"status\":\"optional\",\"step\":\"integration\",\"tests\":{\"integration\":3},\"why\":\"TestTheBusWhole failed\"},{\"module\":\"nats\",\"outcome\":\"passed\",\"seat\":\"mesh-wants\",\"status\":\"required\",\"step\":\"composition\"},{\"module\":\"nats\",\"outcome\":\"bypassed\",\"status\":\"bypass\",\"step\":\"review\"},{\"module\":\"nats\",\"outcome\":\"passed\",\"status\":\"required\",\"step\":\"approval\"}],\"tier\":2,\"version\":\"0.1.15\"}],\"outcome\":\"passed\",\"pipeline\":\"main.3589\",\"revision\":12,\"source\":3589,\"started\":\"2026-11-10T10:00:00Z\",\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v PipelineEndedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-pipeline-runner\\.event\\.pipeline-ended\\.[^.*> ]+\\.[^.*> ]+$")},
|
||||
{name: "a pipeline ended failed, naming the step that held it, no version released", subject: "mesh.seat.mesh-pipeline-runner.event.pipeline-ended.main.3589", given: "{\"branch\":\"main\",\"call\":\"0123456789abcdef\",\"end-count\":1,\"movers\":[{\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"steps\":[{\"artifact\":\"nats:program\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"outcome\":\"failed\",\"status\":\"required\",\"step\":\"unit\"},{\"module\":\"nats\",\"outcome\":\"not asked\",\"status\":\"required\",\"step\":\"approval\",\"why\":\"unit of nats:program failed\"}],\"tier\":1}],\"outcome\":\"failed\",\"pipeline\":\"main.3589\",\"revision\":12,\"source\":3589,\"v\":1,\"why\":\"unit of nats:program failed\"}", wire: "{\"branch\":\"main\",\"call\":\"0123456789abcdef\",\"end-count\":1,\"movers\":[{\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"steps\":[{\"artifact\":\"nats:program\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"outcome\":\"failed\",\"status\":\"required\",\"step\":\"unit\"},{\"module\":\"nats\",\"outcome\":\"not asked\",\"status\":\"required\",\"step\":\"approval\",\"why\":\"unit of nats:program failed\"}],\"tier\":1}],\"outcome\":\"failed\",\"pipeline\":\"main.3589\",\"revision\":12,\"source\":3589,\"v\":1,\"why\":\"unit of nats:program failed\"}",
|
||||
decode: func(b []byte) (any, error) { var v PipelineEndedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-pipeline-runner\\.event\\.pipeline-ended\\.[^.*> ]+\\.[^.*> ]+$")},
|
||||
{name: "a pipeline over pipelines-at-once waits its turn", subject: "mesh.seat.mesh-pipeline-runner.event.wait-held.main.3590", given: "{\"branch\":\"main\",\"on\":\"pipelines-at-once\",\"pipeline\":\"main.3590\",\"revision\":13,\"since\":\"2026-11-10T10:01:00Z\",\"source\":3590,\"step\":\"pipeline\",\"v\":1}", wire: "{\"branch\":\"main\",\"on\":\"pipelines-at-once\",\"pipeline\":\"main.3590\",\"revision\":13,\"since\":\"2026-11-10T10:01:00Z\",\"source\":3590,\"step\":\"pipeline\",\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v WaitHeldEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-pipeline-runner\\.event\\.wait-held\\.[^.*> ]+\\.[^.*> ]+$")},
|
||||
{name: "a run on request started", subject: "mesh.seat.mesh-pipeline-runner.event.run-started.nats.main.0123456789abcdef0123456789abcdef01234567", given: "{\"at\":\"2026-11-10T10:00:00Z\",\"by\":\"fix-1965@workstation\",\"members\":[{\"branch\":\"feature/1966-x\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"module\":\"nats\"}],\"run\":\"run-m2kx9a\",\"v\":1}", wire: "{\"at\":\"2026-11-10T10:00:00Z\",\"by\":\"fix-1965@workstation\",\"members\":[{\"branch\":\"feature/1966-x\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"module\":\"nats\"}],\"run\":\"run-m2kx9a\",\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v RunStartedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-pipeline-runner\\.event\\.run-started\\.[^.*> ]+\\.[^.*> ]+\\.[^.*> ]+$")},
|
||||
{name: "a step started", subject: "mesh.seat.mesh-pipeline-runner.event.step-started.nats.main.0123456789abcdef0123456789abcdef01234567", given: "{\"at\":\"2026-11-10T10:00:00Z\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"result\":{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"outcome\":\"running\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"},\"revision\":12,\"source\":3589,\"v\":1}", wire: "{\"at\":\"2026-11-10T10:00:00Z\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"result\":{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"outcome\":\"running\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"},\"revision\":12,\"source\":3589,\"v\":1}",
|
||||
{name: "a step started", subject: "mesh.seat.mesh-pipeline-runner.event.step-started.nats.main.0123456789abcdef0123456789abcdef01234567", given: "{\"at\":\"2026-11-10T10:00:00Z\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.3589\",\"result\":{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"outcome\":\"running\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"},\"revision\":12,\"source\":3589,\"v\":1}", wire: "{\"at\":\"2026-11-10T10:00:00Z\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.3589\",\"result\":{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"outcome\":\"running\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"},\"revision\":12,\"source\":3589,\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v StepStartedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-pipeline-runner\\.event\\.step-started\\.[^.*> ]+\\.[^.*> ]+\\.[^.*> ]+$")},
|
||||
{name: "a rerun step ended passed, with its proved caller", subject: "mesh.seat.mesh-pipeline-runner.event.step-ended.nats.main.0123456789abcdef0123456789abcdef01234567", given: "{\"at\":\"2026-11-10T10:05:00Z\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"result\":{\"artifact\":\"nats:program\",\"by\":\"operator@workstation\",\"fingerprint\":\"fp-0123\",\"node\":\"anchor\",\"outcome\":\"passed\",\"rerun\":true,\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"unit\",\"tests\":{\"unit\":42}},\"revision\":12,\"source\":3589,\"v\":1}", wire: "{\"at\":\"2026-11-10T10:05:00Z\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"result\":{\"artifact\":\"nats:program\",\"by\":\"operator@workstation\",\"fingerprint\":\"fp-0123\",\"node\":\"anchor\",\"outcome\":\"passed\",\"rerun\":true,\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"unit\",\"tests\":{\"unit\":42}},\"revision\":12,\"source\":3589,\"v\":1}",
|
||||
{name: "a rerun step ended passed, with its proved caller", subject: "mesh.seat.mesh-pipeline-runner.event.step-ended.nats.main.0123456789abcdef0123456789abcdef01234567", given: "{\"at\":\"2026-11-10T10:05:00Z\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.3589\",\"result\":{\"artifact\":\"nats:program\",\"by\":\"operator@workstation\",\"fingerprint\":\"fp-0123\",\"node\":\"anchor\",\"outcome\":\"passed\",\"rerun\":true,\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"unit\",\"tests\":{\"unit\":42}},\"revision\":12,\"source\":3589,\"v\":1}", wire: "{\"at\":\"2026-11-10T10:05:00Z\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.3589\",\"result\":{\"artifact\":\"nats:program\",\"by\":\"operator@workstation\",\"fingerprint\":\"fp-0123\",\"node\":\"anchor\",\"outcome\":\"passed\",\"rerun\":true,\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"unit\",\"tests\":{\"unit\":42}},\"revision\":12,\"source\":3589,\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v StepEndedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-pipeline-runner\\.event\\.step-ended\\.[^.*> ]+\\.[^.*> ]+\\.[^.*> ]+$")},
|
||||
{name: "a bypassed step said", subject: "mesh.seat.mesh-pipeline-runner.event.step-ended.nats.main.0123456789abcdef0123456789abcdef01234567", given: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"result\":{\"outcome\":\"bypassed\",\"status\":\"bypass\",\"step\":\"review\"},\"revision\":12,\"source\":3589,\"v\":1}", wire: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"result\":{\"outcome\":\"bypassed\",\"status\":\"bypass\",\"step\":\"review\"},\"revision\":12,\"source\":3589,\"v\":1}",
|
||||
{name: "a bypassed step said", subject: "mesh.seat.mesh-pipeline-runner.event.step-ended.nats.main.0123456789abcdef0123456789abcdef01234567", given: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.3589\",\"result\":{\"outcome\":\"bypassed\",\"status\":\"bypass\",\"step\":\"review\"},\"revision\":12,\"source\":3589,\"v\":1}", wire: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.3589\",\"result\":{\"outcome\":\"bypassed\",\"status\":\"bypass\",\"step\":\"review\"},\"revision\":12,\"source\":3589,\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v StepEndedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-pipeline-runner\\.event\\.step-ended\\.[^.*> ]+\\.[^.*> ]+\\.[^.*> ]+$")},
|
||||
{name: "an approval waits on the operator", subject: "mesh.seat.mesh-pipeline-runner.event.wait-held.nats.main.0123456789abcdef0123456789abcdef01234567", given: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"on\":\"person\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"since\":\"2026-11-10T10:10:00Z\",\"source\":3589,\"step\":\"approval\",\"v\":1,\"who\":\"the operator\"}", wire: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"on\":\"person\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"since\":\"2026-11-10T10:10:00Z\",\"source\":3589,\"step\":\"approval\",\"v\":1,\"who\":\"the operator\"}",
|
||||
decode: func(b []byte) (any, error) { var v WaitHeldEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-pipeline-runner\\.event\\.wait-held\\.[^.*> ]+\\.[^.*> ]+\\.[^.*> ]+$")},
|
||||
{name: "the wait ended answered", subject: "mesh.seat.mesh-pipeline-runner.event.wait-ended.nats.main.0123456789abcdef0123456789abcdef01234567", given: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"how\":\"answered\",\"module\":\"nats\",\"on\":\"person\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"since\":\"2026-11-10T10:10:00Z\",\"source\":3589,\"step\":\"approval\",\"v\":1,\"who\":\"the operator\"}", wire: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"how\":\"answered\",\"module\":\"nats\",\"on\":\"person\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"since\":\"2026-11-10T10:10:00Z\",\"source\":3589,\"step\":\"approval\",\"v\":1,\"who\":\"the operator\"}",
|
||||
decode: func(b []byte) (any, error) { var v WaitEndedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-pipeline-runner\\.event\\.wait-ended\\.[^.*> ]+\\.[^.*> ]+\\.[^.*> ]+$")},
|
||||
{name: "C1/AC2 a test step started reading a test run, naming its run and ask", subject: "mesh.seat.mesh-pipeline-runner.event.step-started.nats.main.0123456789abcdef0123456789abcdef01234567", given: "{\"at\":\"2026-11-17T10:00:00Z\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"result\":{\"artifact\":\"nats:tools\",\"fingerprint\":\"fp-0123\",\"outcome\":\"running\",\"seat\":\"node-build-go\",\"shared\":[{\"ask\":\"t1a2\",\"run\":\"main.12.unit.d1\"}],\"status\":\"required\",\"step\":\"unit\"},\"revision\":12,\"source\":3589,\"v\":1}", wire: "{\"at\":\"2026-11-17T10:00:00Z\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"result\":{\"artifact\":\"nats:tools\",\"fingerprint\":\"fp-0123\",\"outcome\":\"running\",\"seat\":\"node-build-go\",\"shared\":[{\"ask\":\"t1a2\",\"run\":\"main.12.unit.d1\"}],\"status\":\"required\",\"step\":\"unit\"},\"revision\":12,\"source\":3589,\"v\":1}",
|
||||
{name: "an approval waits on the operator", subject: "mesh.seat.mesh-pipeline-runner.event.wait-held.main.3589", given: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"on\":\"person\",\"pipeline\":\"main.3589\",\"revision\":12,\"since\":\"2026-11-10T10:10:00Z\",\"source\":3589,\"step\":\"approval\",\"v\":1,\"who\":\"the operator\"}", wire: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"on\":\"person\",\"pipeline\":\"main.3589\",\"revision\":12,\"since\":\"2026-11-10T10:10:00Z\",\"source\":3589,\"step\":\"approval\",\"v\":1,\"who\":\"the operator\"}",
|
||||
decode: func(b []byte) (any, error) { var v WaitHeldEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-pipeline-runner\\.event\\.wait-held\\.[^.*> ]+\\.[^.*> ]+$")},
|
||||
{name: "the wait ended answered", subject: "mesh.seat.mesh-pipeline-runner.event.wait-ended.main.3589", given: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"how\":\"answered\",\"module\":\"nats\",\"on\":\"person\",\"pipeline\":\"main.3589\",\"revision\":12,\"since\":\"2026-11-10T10:10:00Z\",\"source\":3589,\"step\":\"approval\",\"v\":1,\"who\":\"the operator\"}", wire: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"how\":\"answered\",\"module\":\"nats\",\"on\":\"person\",\"pipeline\":\"main.3589\",\"revision\":12,\"since\":\"2026-11-10T10:10:00Z\",\"source\":3589,\"step\":\"approval\",\"v\":1,\"who\":\"the operator\"}",
|
||||
decode: func(b []byte) (any, error) { var v WaitEndedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-pipeline-runner\\.event\\.wait-ended\\.[^.*> ]+\\.[^.*> ]+$")},
|
||||
{name: "C1/AC2 a test step started reading a test run, naming its run and ask", subject: "mesh.seat.mesh-pipeline-runner.event.step-started.nats.main.0123456789abcdef0123456789abcdef01234567", given: "{\"at\":\"2026-11-17T10:00:00Z\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.3589\",\"result\":{\"artifact\":\"nats:tools\",\"fingerprint\":\"fp-0123\",\"outcome\":\"running\",\"seat\":\"node-build-go\",\"shared\":[{\"ask\":\"t1a2\",\"run\":\"main.12.unit.d1\"}],\"status\":\"required\",\"step\":\"unit\"},\"revision\":12,\"source\":3589,\"v\":1}", wire: "{\"at\":\"2026-11-17T10:00:00Z\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.3589\",\"result\":{\"artifact\":\"nats:tools\",\"fingerprint\":\"fp-0123\",\"outcome\":\"running\",\"seat\":\"node-build-go\",\"shared\":[{\"ask\":\"t1a2\",\"run\":\"main.12.unit.d1\"}],\"status\":\"required\",\"step\":\"unit\"},\"revision\":12,\"source\":3589,\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v StepStartedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-pipeline-runner\\.event\\.step-started\\.[^.*> ]+\\.[^.*> ]+\\.[^.*> ]+$")},
|
||||
{name: "C1/AC2 a test step ended with the run another step asked", subject: "mesh.seat.mesh-pipeline-runner.event.step-ended.nats.main.0123456789abcdef0123456789abcdef01234567", given: "{\"at\":\"2026-11-17T10:05:00Z\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"result\":{\"artifact\":\"nats:tools\",\"fingerprint\":\"fp-0123\",\"node\":\"anchor\",\"outcome\":\"failed\",\"seat\":\"node-build-go\",\"shared\":[{\"ask\":\"t1a2\",\"asked-by\":{\"artifact\":\"nats:program\",\"pipeline\":\"main.12.nats\"},\"run\":\"main.12.unit.d1\"}],\"status\":\"required\",\"step\":\"unit\",\"tests\":{\"unit\":42}},\"revision\":12,\"source\":3589,\"v\":1}", wire: "{\"at\":\"2026-11-17T10:05:00Z\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"result\":{\"artifact\":\"nats:tools\",\"fingerprint\":\"fp-0123\",\"node\":\"anchor\",\"outcome\":\"failed\",\"seat\":\"node-build-go\",\"shared\":[{\"ask\":\"t1a2\",\"asked-by\":{\"artifact\":\"nats:program\",\"pipeline\":\"main.12.nats\"},\"run\":\"main.12.unit.d1\"}],\"status\":\"required\",\"step\":\"unit\",\"tests\":{\"unit\":42}},\"revision\":12,\"source\":3589,\"v\":1}",
|
||||
{name: "C1/AC2 a test step ended with the run another step asked", subject: "mesh.seat.mesh-pipeline-runner.event.step-ended.nats.main.0123456789abcdef0123456789abcdef01234567", given: "{\"at\":\"2026-11-17T10:05:00Z\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.3589\",\"result\":{\"artifact\":\"nats:tools\",\"fingerprint\":\"fp-0123\",\"node\":\"anchor\",\"outcome\":\"failed\",\"seat\":\"node-build-go\",\"shared\":[{\"ask\":\"t1a2\",\"asked-by\":{\"artifact\":\"nats:program\",\"pipeline\":\"main.3589\"},\"run\":\"main.12.unit.d1\"}],\"status\":\"required\",\"step\":\"unit\",\"tests\":{\"unit\":42}},\"revision\":12,\"source\":3589,\"v\":1}", wire: "{\"at\":\"2026-11-17T10:05:00Z\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.3589\",\"result\":{\"artifact\":\"nats:tools\",\"fingerprint\":\"fp-0123\",\"node\":\"anchor\",\"outcome\":\"failed\",\"seat\":\"node-build-go\",\"shared\":[{\"ask\":\"t1a2\",\"asked-by\":{\"artifact\":\"nats:program\",\"pipeline\":\"main.3589\"},\"run\":\"main.12.unit.d1\"}],\"status\":\"required\",\"step\":\"unit\",\"tests\":{\"unit\":42}},\"revision\":12,\"source\":3589,\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v StepEndedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-pipeline-runner\\.event\\.step-ended\\.[^.*> ]+\\.[^.*> ]+\\.[^.*> ]+$")},
|
||||
{name: "C1 a composition step ended with mesh-wants' runs as they came", subject: "mesh.seat.mesh-pipeline-runner.event.step-ended.nats.main.0123456789abcdef0123456789abcdef01234567", given: "{\"at\":\"2026-11-17T10:05:00Z\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"result\":{\"fingerprint\":\"fp-0123\",\"node\":\"laptop\",\"outcome\":\"passed\",\"seat\":\"mesh-wants\",\"shared\":[{\"ask\":\"r1a2b3\",\"machine\":\"anchor\",\"run\":\"main.12.anchor\"}],\"status\":\"required\",\"step\":\"composition\"},\"revision\":12,\"source\":3589,\"v\":1}", wire: "{\"at\":\"2026-11-17T10:05:00Z\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.12.nats\",\"result\":{\"fingerprint\":\"fp-0123\",\"node\":\"laptop\",\"outcome\":\"passed\",\"seat\":\"mesh-wants\",\"shared\":[{\"ask\":\"r1a2b3\",\"machine\":\"anchor\",\"run\":\"main.12.anchor\"}],\"status\":\"required\",\"step\":\"composition\"},\"revision\":12,\"source\":3589,\"v\":1}",
|
||||
{name: "C1 a composition step ended with mesh-wants' runs as they came", subject: "mesh.seat.mesh-pipeline-runner.event.step-ended.nats.main.0123456789abcdef0123456789abcdef01234567", given: "{\"at\":\"2026-11-17T10:05:00Z\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.3589\",\"result\":{\"fingerprint\":\"fp-0123\",\"node\":\"laptop\",\"outcome\":\"passed\",\"seat\":\"mesh-wants\",\"shared\":[{\"ask\":\"r1a2b3\",\"machine\":\"anchor\",\"run\":\"main.12.anchor\"}],\"status\":\"required\",\"step\":\"composition\"},\"revision\":12,\"source\":3589,\"v\":1}", wire: "{\"at\":\"2026-11-17T10:05:00Z\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"pipeline\":\"main.3589\",\"result\":{\"fingerprint\":\"fp-0123\",\"node\":\"laptop\",\"outcome\":\"passed\",\"seat\":\"mesh-wants\",\"shared\":[{\"ask\":\"r1a2b3\",\"machine\":\"anchor\",\"run\":\"main.12.anchor\"}],\"status\":\"required\",\"step\":\"composition\"},\"revision\":12,\"source\":3589,\"v\":1}",
|
||||
decode: func(b []byte) (any, error) { var v StepEndedEvent; err := json.Unmarshal(b, &v); return v, err }, subjectIs: regexp.MustCompile("^mesh\\.seat\\.mesh-pipeline-runner\\.event\\.step-ended\\.[^.*> ]+\\.[^.*> ]+\\.[^.*> ]+$")},
|
||||
{name: "a pipeline kept", subject: "", given: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"end-count\":1,\"ended\":\"2026-11-10T10:20:00Z\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"outcome\":\"passed\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"source\":3589,\"started\":\"2026-11-10T10:00:00Z\",\"steps\":[{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"fingerprint\":\"fp-0123\",\"node\":\"anchor\",\"outcome\":\"passed\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"},{\"artifact\":\"nats:program\",\"carried-from\":\"main.11.nats\",\"fingerprint\":\"fp-0123\",\"outcome\":\"carried\",\"status\":\"required\",\"step\":\"unit\",\"tests\":{\"unit\":42}},{\"artifact\":\"nats:program\",\"fingerprint\":\"fp-0123\",\"node\":\"home-server\",\"outcome\":\"failed\",\"seat\":\"node-build-go\",\"status\":\"optional\",\"step\":\"integration\",\"tests\":{\"integration\":3},\"why\":\"TestTheBusWhole failed\"},{\"outcome\":\"passed\",\"seat\":\"mesh-wants\",\"status\":\"required\",\"step\":\"composition\"},{\"outcome\":\"bypassed\",\"status\":\"bypass\",\"step\":\"review\"},{\"outcome\":\"passed\",\"status\":\"required\",\"step\":\"approval\"}],\"v\":1}", wire: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"end-count\":1,\"ended\":\"2026-11-10T10:20:00Z\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"outcome\":\"passed\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"source\":3589,\"started\":\"2026-11-10T10:00:00Z\",\"steps\":[{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"fingerprint\":\"fp-0123\",\"node\":\"anchor\",\"outcome\":\"passed\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"},{\"artifact\":\"nats:program\",\"carried-from\":\"main.11.nats\",\"fingerprint\":\"fp-0123\",\"outcome\":\"carried\",\"status\":\"required\",\"step\":\"unit\",\"tests\":{\"unit\":42}},{\"artifact\":\"nats:program\",\"fingerprint\":\"fp-0123\",\"node\":\"home-server\",\"outcome\":\"failed\",\"seat\":\"node-build-go\",\"status\":\"optional\",\"step\":\"integration\",\"tests\":{\"integration\":3},\"why\":\"TestTheBusWhole failed\"},{\"outcome\":\"passed\",\"seat\":\"mesh-wants\",\"status\":\"required\",\"step\":\"composition\"},{\"outcome\":\"bypassed\",\"status\":\"bypass\",\"step\":\"review\"},{\"outcome\":\"passed\",\"status\":\"required\",\"step\":\"approval\"}],\"v\":1}",
|
||||
{name: "a take-in's pipeline kept, its steps naming their mover", subject: "", given: "{\"branch\":\"main\",\"call\":\"0123456789abcdef\",\"end-count\":1,\"ended\":\"2026-11-10T10:20:00Z\",\"movers\":[{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"repository\":\"mesh-networking\",\"tier\":1}],\"outcome\":\"passed\",\"pipeline\":\"main.3589\",\"revision\":12,\"source\":3589,\"started\":\"2026-11-10T10:00:00Z\",\"steps\":[{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"node\":\"anchor\",\"outcome\":\"passed\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"},{\"artifact\":\"nats:program\",\"carried-from\":\"main.3588\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"outcome\":\"carried\",\"status\":\"required\",\"step\":\"unit\",\"tests\":{\"unit\":42}},{\"artifact\":\"nats:program\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"node\":\"home-server\",\"outcome\":\"failed\",\"seat\":\"node-build-go\",\"status\":\"optional\",\"step\":\"integration\",\"tests\":{\"integration\":3},\"why\":\"TestTheBusWhole failed\"},{\"module\":\"nats\",\"outcome\":\"passed\",\"seat\":\"mesh-wants\",\"status\":\"required\",\"step\":\"composition\"},{\"module\":\"nats\",\"outcome\":\"bypassed\",\"status\":\"bypass\",\"step\":\"review\"},{\"module\":\"nats\",\"outcome\":\"passed\",\"status\":\"required\",\"step\":\"approval\"}],\"v\":1}", wire: "{\"branch\":\"main\",\"call\":\"0123456789abcdef\",\"end-count\":1,\"ended\":\"2026-11-10T10:20:00Z\",\"movers\":[{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"repository\":\"mesh-networking\",\"tier\":1}],\"outcome\":\"passed\",\"pipeline\":\"main.3589\",\"revision\":12,\"source\":3589,\"started\":\"2026-11-10T10:00:00Z\",\"steps\":[{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"node\":\"anchor\",\"outcome\":\"passed\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"},{\"artifact\":\"nats:program\",\"carried-from\":\"main.3588\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"outcome\":\"carried\",\"status\":\"required\",\"step\":\"unit\",\"tests\":{\"unit\":42}},{\"artifact\":\"nats:program\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"node\":\"home-server\",\"outcome\":\"failed\",\"seat\":\"node-build-go\",\"status\":\"optional\",\"step\":\"integration\",\"tests\":{\"integration\":3},\"why\":\"TestTheBusWhole failed\"},{\"module\":\"nats\",\"outcome\":\"passed\",\"seat\":\"mesh-wants\",\"status\":\"required\",\"step\":\"composition\"},{\"module\":\"nats\",\"outcome\":\"bypassed\",\"status\":\"bypass\",\"step\":\"review\"},{\"module\":\"nats\",\"outcome\":\"passed\",\"status\":\"required\",\"step\":\"approval\"}],\"v\":1}",
|
||||
decode: func(b []byte) (any, error) {
|
||||
var v PipelinesByBranchRevisionModuleValue
|
||||
var v PipelinesByBranchSourceValue
|
||||
err := json.Unmarshal(b, &v)
|
||||
return v, err
|
||||
}, subjectIs: nil},
|
||||
{name: "a pipeline a publication started, with the version it names (design 47 G 550)", subject: "", given: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"end-count\":1,\"ended\":\"2026-11-10T10:20:00Z\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"outcome\":\"passed\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"source\":3589,\"started\":\"2026-11-10T10:00:00Z\",\"steps\":[{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"fingerprint\":\"fp-0123\",\"node\":\"anchor\",\"outcome\":\"passed\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"},{\"artifact\":\"nats:program\",\"carried-from\":\"main.11.nats\",\"fingerprint\":\"fp-0123\",\"outcome\":\"carried\",\"status\":\"required\",\"step\":\"unit\",\"tests\":{\"unit\":42}},{\"artifact\":\"nats:program\",\"fingerprint\":\"fp-0123\",\"node\":\"home-server\",\"outcome\":\"failed\",\"seat\":\"node-build-go\",\"status\":\"optional\",\"step\":\"integration\",\"tests\":{\"integration\":3},\"why\":\"TestTheBusWhole failed\"},{\"outcome\":\"passed\",\"seat\":\"mesh-wants\",\"status\":\"required\",\"step\":\"composition\"},{\"outcome\":\"bypassed\",\"status\":\"bypass\",\"step\":\"review\"},{\"outcome\":\"passed\",\"status\":\"required\",\"step\":\"approval\"}],\"v\":1,\"version\":\"0.1.15\"}", wire: "{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"end-count\":1,\"ended\":\"2026-11-10T10:20:00Z\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"outcome\":\"passed\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"source\":3589,\"started\":\"2026-11-10T10:00:00Z\",\"steps\":[{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"fingerprint\":\"fp-0123\",\"node\":\"anchor\",\"outcome\":\"passed\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"},{\"artifact\":\"nats:program\",\"carried-from\":\"main.11.nats\",\"fingerprint\":\"fp-0123\",\"outcome\":\"carried\",\"status\":\"required\",\"step\":\"unit\",\"tests\":{\"unit\":42}},{\"artifact\":\"nats:program\",\"fingerprint\":\"fp-0123\",\"node\":\"home-server\",\"outcome\":\"failed\",\"seat\":\"node-build-go\",\"status\":\"optional\",\"step\":\"integration\",\"tests\":{\"integration\":3},\"why\":\"TestTheBusWhole failed\"},{\"outcome\":\"passed\",\"seat\":\"mesh-wants\",\"status\":\"required\",\"step\":\"composition\"},{\"outcome\":\"bypassed\",\"status\":\"bypass\",\"step\":\"review\"},{\"outcome\":\"passed\",\"status\":\"required\",\"step\":\"approval\"}],\"v\":1,\"version\":\"0.1.15\"}",
|
||||
{name: "a pipeline a publish started, its mover the package's dependent, with the version released for it", subject: "", given: "{\"branch\":\"main\",\"end-count\":1,\"ended\":\"2026-11-10T10:20:00Z\",\"movers\":[{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"repository\":\"mesh-networking\",\"tier\":1,\"version\":\"0.1.15\"}],\"outcome\":\"passed\",\"pipeline\":\"main.3589.published.mesh-sdk.0.1.21\",\"published\":{\"artifact\":\"mesh-sdk\",\"version\":\"0.1.21\"},\"revision\":12,\"source\":3589,\"started\":\"2026-11-10T10:00:00Z\",\"steps\":[{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"node\":\"anchor\",\"outcome\":\"passed\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"},{\"artifact\":\"nats:program\",\"carried-from\":\"main.3588\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"outcome\":\"carried\",\"status\":\"required\",\"step\":\"unit\",\"tests\":{\"unit\":42}},{\"artifact\":\"nats:program\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"node\":\"home-server\",\"outcome\":\"failed\",\"seat\":\"node-build-go\",\"status\":\"optional\",\"step\":\"integration\",\"tests\":{\"integration\":3},\"why\":\"TestTheBusWhole failed\"},{\"module\":\"nats\",\"outcome\":\"passed\",\"seat\":\"mesh-wants\",\"status\":\"required\",\"step\":\"composition\"},{\"module\":\"nats\",\"outcome\":\"bypassed\",\"status\":\"bypass\",\"step\":\"review\"},{\"module\":\"nats\",\"outcome\":\"passed\",\"status\":\"required\",\"step\":\"approval\"}],\"v\":1}", wire: "{\"branch\":\"main\",\"end-count\":1,\"ended\":\"2026-11-10T10:20:00Z\",\"movers\":[{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"repository\":\"mesh-networking\",\"tier\":1,\"version\":\"0.1.15\"}],\"outcome\":\"passed\",\"pipeline\":\"main.3589.published.mesh-sdk.0.1.21\",\"published\":{\"artifact\":\"mesh-sdk\",\"version\":\"0.1.21\"},\"revision\":12,\"source\":3589,\"started\":\"2026-11-10T10:00:00Z\",\"steps\":[{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"node\":\"anchor\",\"outcome\":\"passed\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"},{\"artifact\":\"nats:program\",\"carried-from\":\"main.3588\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"outcome\":\"carried\",\"status\":\"required\",\"step\":\"unit\",\"tests\":{\"unit\":42}},{\"artifact\":\"nats:program\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"node\":\"home-server\",\"outcome\":\"failed\",\"seat\":\"node-build-go\",\"status\":\"optional\",\"step\":\"integration\",\"tests\":{\"integration\":3},\"why\":\"TestTheBusWhole failed\"},{\"module\":\"nats\",\"outcome\":\"passed\",\"seat\":\"mesh-wants\",\"status\":\"required\",\"step\":\"composition\"},{\"module\":\"nats\",\"outcome\":\"bypassed\",\"status\":\"bypass\",\"step\":\"review\"},{\"module\":\"nats\",\"outcome\":\"passed\",\"status\":\"required\",\"step\":\"approval\"}],\"v\":1}",
|
||||
decode: func(b []byte) (any, error) {
|
||||
var v PipelinesByBranchRevisionModuleValue
|
||||
var v PipelinesByBranchSourcePublishedPackageVersionValue
|
||||
err := json.Unmarshal(b, &v)
|
||||
return v, err
|
||||
}, subjectIs: nil},
|
||||
{name: "a kept result", subject: "", given: "{\"digest\":\"sha256:aa\",\"level\":\"unit\",\"package\":\"git.novox.be/novox/nats\",\"pipeline\":\"main.12.nats\"}", wire: "{\"digest\":\"sha256:aa\",\"level\":\"unit\",\"package\":\"git.novox.be/novox/nats\",\"pipeline\":\"main.12.nats\"}",
|
||||
{name: "a kept result", subject: "", given: "{\"digest\":\"sha256:aa\",\"level\":\"unit\",\"package\":\"git.novox.be/novox/nats\",\"pipeline\":\"main.3589\"}", wire: "{\"digest\":\"sha256:aa\",\"level\":\"unit\",\"package\":\"git.novox.be/novox/nats\",\"pipeline\":\"main.3589\"}",
|
||||
decode: func(b []byte) (any, error) { var v KeptByLevelDigestValue; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "the queue's counter", subject: "", given: "3", wire: "3",
|
||||
decode: func(b []byte) (any, error) { var v QueueByQueueNextValue; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "a waiting pipeline in the queue", subject: "", given: "{\"pipeline\":\"main.3590\"}", wire: "{\"pipeline\":\"main.3590\"}",
|
||||
decode: func(b []byte) (any, error) {
|
||||
var v QueueByWaitingSequenceValue
|
||||
err := json.Unmarshal(b, &v)
|
||||
return v, err
|
||||
}, subjectIs: nil},
|
||||
{name: "a pipeline waiting its turn, its seq given", subject: "", given: "{\"branch\":\"main\",\"call\":\"fedcba9876543210\",\"movers\":[{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0124\",\"module\":\"nats\",\"repository\":\"mesh-networking\",\"tier\":1}],\"outcome\":\"waiting\",\"pipeline\":\"main.3590\",\"revision\":13,\"seq\":2,\"source\":3590,\"steps\":[],\"v\":1}", wire: "{\"branch\":\"main\",\"call\":\"fedcba9876543210\",\"movers\":[{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0124\",\"module\":\"nats\",\"repository\":\"mesh-networking\",\"tier\":1}],\"outcome\":\"waiting\",\"pipeline\":\"main.3590\",\"revision\":13,\"seq\":2,\"source\":3590,\"steps\":[],\"v\":1}",
|
||||
decode: func(b []byte) (any, error) {
|
||||
var v PipelinesByBranchSourceValue
|
||||
err := json.Unmarshal(b, &v)
|
||||
return v, err
|
||||
}, subjectIs: nil},
|
||||
{name: "run asks one member at a commit", subject: "", given: "{\"members\":[{\"branch\":\"feature/1966-x\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"module\":\"nats\"}]}", wire: "{\"members\":[{\"branch\":\"feature/1966-x\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"module\":\"nats\"}]}",
|
||||
decode: func(b []byte) (any, error) { var v RunInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "run answers its id and pipelines", subject: "", given: "{\"pipelines\":[\"feature~2f1966-x.0.nats\"],\"run\":\"run-m2kx9a\"}", wire: "{\"pipelines\":[\"feature~2f1966-x.0.nats\"],\"run\":\"run-m2kx9a\"}",
|
||||
decode: func(b []byte) (any, error) { var v RunAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "review of a commit", subject: "", given: "{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"outcome\":\"passed\",\"said\":\"reads well\"}", wire: "{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"outcome\":\"passed\",\"said\":\"reads well\"}",
|
||||
decode: func(b []byte) (any, error) { var v ReviewInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "review answers its step", subject: "", given: "{\"pipeline\":\"main.12.nats\",\"result\":{\"outcome\":\"passed\",\"status\":\"optional\",\"step\":\"review\"}}", wire: "{\"pipeline\":\"main.12.nats\",\"result\":{\"outcome\":\"passed\",\"status\":\"optional\",\"step\":\"review\"}}",
|
||||
{name: "review answers its step", subject: "", given: "{\"pipeline\":\"main.3589\",\"result\":{\"outcome\":\"passed\",\"status\":\"optional\",\"step\":\"review\"}}", wire: "{\"pipeline\":\"main.3589\",\"result\":{\"outcome\":\"passed\",\"status\":\"optional\",\"step\":\"review\"}}",
|
||||
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.12.nats\",\"step\":\"lint\",\"what\":\"started\"}],\"outputs\":[\"main.12.nats.lint.nats:program\"],\"pipeline\":{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"outcome\":\"running\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"source\":3589,\"steps\":[{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"fingerprint\":\"fp-0123\",\"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.12.nats\",\"step\":\"lint\",\"what\":\"started\"}],\"outputs\":[\"main.12.nats.lint.nats:program\"],\"pipeline\":{\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"outcome\":\"running\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"source\":3589,\"steps\":[{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"fingerprint\":\"fp-0123\",\"node\":\"anchor\",\"outcome\":\"passed\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"}],\"v\":1}}",
|
||||
{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: "accept asks with why", subject: "", given: "{\"artifact\":\"nats:program\",\"pipeline\":\"main.12.nats\",\"step\":\"integration\",\"why\":\"flaky upstream, issue 1966\"}", wire: "{\"artifact\":\"nats:program\",\"pipeline\":\"main.12.nats\",\"step\":\"integration\",\"why\":\"flaky upstream, issue 1966\"}",
|
||||
{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.12.nats\",\"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.12.nats\",\"revision\":12,\"since\":\"2026-11-10T10:00:00Z\",\"source\":3589,\"step\":\"unit\",\"v\":1}]}",
|
||||
{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}]}",
|
||||
decode: func(b []byte) (any, error) { var v StandsAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "kept answers by digest", subject: "", given: "{\"fill\":{\"bytes\":300,\"cap\":134217728,\"store\":\"kept\"},\"kept\":[{\"digest\":\"sha256:aa\",\"level\":\"unit\",\"package\":\"git.novox.be/novox/nats\",\"pipeline\":\"main.12.nats\"}]}", wire: "{\"fill\":{\"bytes\":300,\"cap\":134217728,\"store\":\"kept\"},\"kept\":[{\"digest\":\"sha256:aa\",\"level\":\"unit\",\"package\":\"git.novox.be/novox/nats\",\"pipeline\":\"main.12.nats\"}]}",
|
||||
{name: "kept answers by digest", subject: "", given: "{\"fill\":{\"bytes\":300,\"cap\":134217728,\"store\":\"kept\"},\"kept\":[{\"digest\":\"sha256:aa\",\"level\":\"unit\",\"package\":\"git.novox.be/novox/nats\",\"pipeline\":\"main.3589\"}]}", wire: "{\"fill\":{\"bytes\":300,\"cap\":134217728,\"store\":\"kept\"},\"kept\":[{\"digest\":\"sha256:aa\",\"level\":\"unit\",\"package\":\"git.novox.be/novox/nats\",\"pipeline\":\"main.3589\"}]}",
|
||||
decode: func(b []byte) (any, error) { var v KeptAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "C1/AC3 stands answers a waiting test step with its ask and the run it waits on", subject: "", given: "{\"stands\":[{\"artifact\":\"nats:tools\",\"ask\":\"t1a2\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"on\":\"build node\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"shared\":[{\"ask\":\"t1a2\",\"run\":\"main.12.unit.d1\"}],\"since\":\"2026-11-17T10:00:00Z\",\"source\":3589,\"step\":\"unit\",\"v\":1}]}", wire: "{\"stands\":[{\"artifact\":\"nats:tools\",\"ask\":\"t1a2\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"on\":\"build node\",\"pipeline\":\"main.12.nats\",\"revision\":12,\"shared\":[{\"ask\":\"t1a2\",\"run\":\"main.12.unit.d1\"}],\"since\":\"2026-11-17T10:00:00Z\",\"source\":3589,\"step\":\"unit\",\"v\":1}]}",
|
||||
{name: "C1/AC3 stands answers a waiting test step with its ask and the run it waits on", subject: "", given: "{\"stands\":[{\"artifact\":\"nats:tools\",\"ask\":\"t1a2\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"on\":\"build node\",\"pipeline\":\"main.3589\",\"revision\":12,\"shared\":[{\"ask\":\"t1a2\",\"run\":\"main.12.unit.d1\"}],\"since\":\"2026-11-17T10:00:00Z\",\"source\":3589,\"step\":\"unit\",\"v\":1}]}", wire: "{\"stands\":[{\"artifact\":\"nats:tools\",\"ask\":\"t1a2\",\"branch\":\"main\",\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"on\":\"build node\",\"pipeline\":\"main.3589\",\"revision\":12,\"shared\":[{\"ask\":\"t1a2\",\"run\":\"main.12.unit.d1\"}],\"since\":\"2026-11-17T10:00:00Z\",\"source\":3589,\"step\":\"unit\",\"v\":1}]}",
|
||||
decode: func(b []byte) (any, error) { var v StandsAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "C1 test-runs answers each run with its packages, readers and the fill", subject: "", given: "{\"fill\":{\"bytes\":2048,\"cap\":16777216,\"store\":\"test-runs\"},\"runs\":[{\"ask\":\"t1a2\",\"digest\":\"d1\",\"ended\":\"2026-11-17T10:05:00Z\",\"key\":\"main.12.unit.d1\",\"level\":\"unit\",\"node\":\"anchor\",\"outcome\":\"failed\",\"output\":\"t1a2\",\"packages\":[{\"digest\":\"sha256:aa\",\"package\":\"git.novox.be/novox/nats/internal/x\"}],\"readers\":[{\"artifact\":\"nats:program\",\"pipeline\":\"main.12.nats\"},{\"artifact\":\"nats:tools\",\"pipeline\":\"main.12.nats\"}],\"said\":\"1 test failed\",\"seat\":\"node-build-go\",\"started\":\"2026-11-17T10:00:00Z\",\"tests\":{\"unit\":42}},{\"ask\":\"t1a2\",\"digest\":\"d1\",\"ended\":\"2026-11-17T10:05:00Z\",\"gone\":\"the run's output is gone\",\"key\":\"main.12.unit.d1\",\"level\":\"unit\",\"node\":\"anchor\",\"outcome\":\"failed\",\"output\":\"t1a2\",\"readers\":[{\"artifact\":\"nats:program\",\"pipeline\":\"main.12.nats\"},{\"artifact\":\"nats:tools\",\"pipeline\":\"main.12.nats\"}],\"said\":\"1 test failed\",\"seat\":\"node-build-go\",\"started\":\"2026-11-17T10:00:00Z\",\"tests\":{\"unit\":42}}]}", wire: "{\"fill\":{\"bytes\":2048,\"cap\":16777216,\"store\":\"test-runs\"},\"runs\":[{\"ask\":\"t1a2\",\"digest\":\"d1\",\"ended\":\"2026-11-17T10:05:00Z\",\"key\":\"main.12.unit.d1\",\"level\":\"unit\",\"node\":\"anchor\",\"outcome\":\"failed\",\"output\":\"t1a2\",\"packages\":[{\"digest\":\"sha256:aa\",\"package\":\"git.novox.be/novox/nats/internal/x\"}],\"readers\":[{\"artifact\":\"nats:program\",\"pipeline\":\"main.12.nats\"},{\"artifact\":\"nats:tools\",\"pipeline\":\"main.12.nats\"}],\"said\":\"1 test failed\",\"seat\":\"node-build-go\",\"started\":\"2026-11-17T10:00:00Z\",\"tests\":{\"unit\":42}},{\"ask\":\"t1a2\",\"digest\":\"d1\",\"ended\":\"2026-11-17T10:05:00Z\",\"gone\":\"the run's output is gone\",\"key\":\"main.12.unit.d1\",\"level\":\"unit\",\"node\":\"anchor\",\"outcome\":\"failed\",\"output\":\"t1a2\",\"readers\":[{\"artifact\":\"nats:program\",\"pipeline\":\"main.12.nats\"},{\"artifact\":\"nats:tools\",\"pipeline\":\"main.12.nats\"}],\"said\":\"1 test failed\",\"seat\":\"node-build-go\",\"started\":\"2026-11-17T10:00:00Z\",\"tests\":{\"unit\":42}}]}",
|
||||
{name: "C1 test-runs answers each run with its packages, readers and the fill", subject: "", given: "{\"fill\":{\"bytes\":2048,\"cap\":16777216,\"store\":\"test-runs\"},\"runs\":[{\"ask\":\"t1a2\",\"digest\":\"d1\",\"ended\":\"2026-11-17T10:05:00Z\",\"key\":\"main.12.unit.d1\",\"level\":\"unit\",\"node\":\"anchor\",\"outcome\":\"failed\",\"output\":\"t1a2\",\"packages\":[{\"digest\":\"sha256:aa\",\"package\":\"git.novox.be/novox/nats/internal/x\"}],\"readers\":[{\"artifact\":\"nats:program\",\"pipeline\":\"main.3589\"},{\"artifact\":\"nats:tools\",\"pipeline\":\"main.3589\"}],\"said\":\"1 test failed\",\"seat\":\"node-build-go\",\"started\":\"2026-11-17T10:00:00Z\",\"tests\":{\"unit\":42}},{\"ask\":\"t1a2\",\"digest\":\"d1\",\"ended\":\"2026-11-17T10:05:00Z\",\"gone\":\"the run's output is gone\",\"key\":\"main.12.unit.d1\",\"level\":\"unit\",\"node\":\"anchor\",\"outcome\":\"failed\",\"output\":\"t1a2\",\"readers\":[{\"artifact\":\"nats:program\",\"pipeline\":\"main.3589\"},{\"artifact\":\"nats:tools\",\"pipeline\":\"main.3589\"}],\"said\":\"1 test failed\",\"seat\":\"node-build-go\",\"started\":\"2026-11-17T10:00:00Z\",\"tests\":{\"unit\":42}}]}", wire: "{\"fill\":{\"bytes\":2048,\"cap\":16777216,\"store\":\"test-runs\"},\"runs\":[{\"ask\":\"t1a2\",\"digest\":\"d1\",\"ended\":\"2026-11-17T10:05:00Z\",\"key\":\"main.12.unit.d1\",\"level\":\"unit\",\"node\":\"anchor\",\"outcome\":\"failed\",\"output\":\"t1a2\",\"packages\":[{\"digest\":\"sha256:aa\",\"package\":\"git.novox.be/novox/nats/internal/x\"}],\"readers\":[{\"artifact\":\"nats:program\",\"pipeline\":\"main.3589\"},{\"artifact\":\"nats:tools\",\"pipeline\":\"main.3589\"}],\"said\":\"1 test failed\",\"seat\":\"node-build-go\",\"started\":\"2026-11-17T10:00:00Z\",\"tests\":{\"unit\":42}},{\"ask\":\"t1a2\",\"digest\":\"d1\",\"ended\":\"2026-11-17T10:05:00Z\",\"gone\":\"the run's output is gone\",\"key\":\"main.12.unit.d1\",\"level\":\"unit\",\"node\":\"anchor\",\"outcome\":\"failed\",\"output\":\"t1a2\",\"readers\":[{\"artifact\":\"nats:program\",\"pipeline\":\"main.3589\"},{\"artifact\":\"nats:tools\",\"pipeline\":\"main.3589\"}],\"said\":\"1 test failed\",\"seat\":\"node-build-go\",\"started\":\"2026-11-17T10:00:00Z\",\"tests\":{\"unit\":42}}]}",
|
||||
decode: func(b []byte) (any, error) { var v TestRunsAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "C1 test-runs-drop answers the run it deleted and the readers it ended", subject: "", given: "{\"ended\":[{\"artifact\":\"nats:program\",\"pipeline\":\"main.12.nats\"},{\"artifact\":\"nats:tools\",\"pipeline\":\"main.12.nats\"}],\"run\":{\"ask\":\"t1a2\",\"digest\":\"d1\",\"ended\":\"2026-11-17T10:05:00Z\",\"key\":\"main.12.unit.d1\",\"level\":\"unit\",\"node\":\"anchor\",\"outcome\":\"failed\",\"output\":\"t1a2\",\"packages\":[{\"digest\":\"sha256:aa\",\"package\":\"git.novox.be/novox/nats/internal/x\"}],\"readers\":[{\"artifact\":\"nats:program\",\"pipeline\":\"main.12.nats\"},{\"artifact\":\"nats:tools\",\"pipeline\":\"main.12.nats\"}],\"said\":\"1 test failed\",\"seat\":\"node-build-go\",\"started\":\"2026-11-17T10:00:00Z\",\"tests\":{\"unit\":42}}}", wire: "{\"ended\":[{\"artifact\":\"nats:program\",\"pipeline\":\"main.12.nats\"},{\"artifact\":\"nats:tools\",\"pipeline\":\"main.12.nats\"}],\"run\":{\"ask\":\"t1a2\",\"digest\":\"d1\",\"ended\":\"2026-11-17T10:05:00Z\",\"key\":\"main.12.unit.d1\",\"level\":\"unit\",\"node\":\"anchor\",\"outcome\":\"failed\",\"output\":\"t1a2\",\"packages\":[{\"digest\":\"sha256:aa\",\"package\":\"git.novox.be/novox/nats/internal/x\"}],\"readers\":[{\"artifact\":\"nats:program\",\"pipeline\":\"main.12.nats\"},{\"artifact\":\"nats:tools\",\"pipeline\":\"main.12.nats\"}],\"said\":\"1 test failed\",\"seat\":\"node-build-go\",\"started\":\"2026-11-17T10:00:00Z\",\"tests\":{\"unit\":42}}}",
|
||||
{name: "C1 test-runs-drop answers the run it deleted and the readers it ended", subject: "", given: "{\"ended\":[{\"artifact\":\"nats:program\",\"pipeline\":\"main.3589\"},{\"artifact\":\"nats:tools\",\"pipeline\":\"main.3589\"}],\"run\":{\"ask\":\"t1a2\",\"digest\":\"d1\",\"ended\":\"2026-11-17T10:05:00Z\",\"key\":\"main.12.unit.d1\",\"level\":\"unit\",\"node\":\"anchor\",\"outcome\":\"failed\",\"output\":\"t1a2\",\"packages\":[{\"digest\":\"sha256:aa\",\"package\":\"git.novox.be/novox/nats/internal/x\"}],\"readers\":[{\"artifact\":\"nats:program\",\"pipeline\":\"main.3589\"},{\"artifact\":\"nats:tools\",\"pipeline\":\"main.3589\"}],\"said\":\"1 test failed\",\"seat\":\"node-build-go\",\"started\":\"2026-11-17T10:00:00Z\",\"tests\":{\"unit\":42}}}", wire: "{\"ended\":[{\"artifact\":\"nats:program\",\"pipeline\":\"main.3589\"},{\"artifact\":\"nats:tools\",\"pipeline\":\"main.3589\"}],\"run\":{\"ask\":\"t1a2\",\"digest\":\"d1\",\"ended\":\"2026-11-17T10:05:00Z\",\"key\":\"main.12.unit.d1\",\"level\":\"unit\",\"node\":\"anchor\",\"outcome\":\"failed\",\"output\":\"t1a2\",\"packages\":[{\"digest\":\"sha256:aa\",\"package\":\"git.novox.be/novox/nats/internal/x\"}],\"readers\":[{\"artifact\":\"nats:program\",\"pipeline\":\"main.3589\"},{\"artifact\":\"nats:tools\",\"pipeline\":\"main.3589\"}],\"said\":\"1 test failed\",\"seat\":\"node-build-go\",\"started\":\"2026-11-17T10:00:00Z\",\"tests\":{\"unit\":42}}}",
|
||||
decode: func(b []byte) (any, error) { var v TestRunsDropAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
{name: "place asks a waiting pipeline ahead of its turn, with why", subject: "", given: "{\"pipeline\":\"main.3590\",\"why\":\"the operator wants the fix out first\"}", wire: "{\"pipeline\":\"main.3590\",\"why\":\"the operator wants the fix out first\"}",
|
||||
decode: func(b []byte) (any, error) { var v PlaceInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
|
||||
}
|
||||
for _, c := range cases {
|
||||
v, err := c.decode([]byte(c.given))
|
||||
|
||||
@@ -1,170 +1,68 @@
|
||||
[
|
||||
{
|
||||
"name": "a pipeline started with the steps its policy gives",
|
||||
"name": "a take-in's pipeline started with its two movers",
|
||||
"of": "event:pipeline-started",
|
||||
"subject": "mesh.seat.mesh-pipeline-runner.event.pipeline-started.nats.main.0123456789abcdef0123456789abcdef01234567",
|
||||
"subject": "mesh.seat.mesh-pipeline-runner.event.pipeline-started.main.3589",
|
||||
"given": {
|
||||
"pipeline": "main.12.nats",
|
||||
"module": "nats",
|
||||
"pipeline": "main.3589",
|
||||
"branch": "main",
|
||||
"revision": 12,
|
||||
"source": 3589,
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567",
|
||||
"call": "0123456789abcdef",
|
||||
"v": 1,
|
||||
"steps": [
|
||||
"movers": [
|
||||
{
|
||||
"step": "lint",
|
||||
"artifact": "nats:program",
|
||||
"status": "required"
|
||||
"module": "mesh-sdk",
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567",
|
||||
"fingerprint": "fp-sdk",
|
||||
"repository": "mesh-sdk",
|
||||
"tier": 1
|
||||
},
|
||||
{
|
||||
"step": "review",
|
||||
"status": "bypass"
|
||||
"module": "nats",
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567",
|
||||
"fingerprint": "fp-0123",
|
||||
"repository": "mesh-networking",
|
||||
"tier": 2
|
||||
}
|
||||
],
|
||||
"at": "2026-11-10T10:00:00Z",
|
||||
"fingerprint": "fp-0123"
|
||||
"at": "2026-11-10T10:00:00Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a pipeline ended passed, an optional step failed, over budget and widening named",
|
||||
"name": "a pipeline ended passed: per mover its version, steps and tier, an optional step failed",
|
||||
"of": "event:pipeline-ended",
|
||||
"subject": "mesh.seat.mesh-pipeline-runner.event.pipeline-ended.nats.main.0123456789abcdef0123456789abcdef01234567",
|
||||
"subject": "mesh.seat.mesh-pipeline-runner.event.pipeline-ended.main.3589",
|
||||
"given": {
|
||||
"pipeline": "main.12.nats",
|
||||
"module": "nats",
|
||||
"pipeline": "main.3589",
|
||||
"branch": "main",
|
||||
"revision": 12,
|
||||
"source": 3589,
|
||||
"end-count": 1,
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567",
|
||||
"v": 1,
|
||||
"outcome": "passed",
|
||||
"steps": [
|
||||
{
|
||||
"step": "lint",
|
||||
"artifact": "nats:program",
|
||||
"status": "required",
|
||||
"outcome": "passed",
|
||||
"fingerprint": "fp-0123",
|
||||
"seat": "node-build-go",
|
||||
"node": "anchor",
|
||||
"ask": "m2kx9a1b3c4d5e"
|
||||
},
|
||||
{
|
||||
"step": "unit",
|
||||
"artifact": "nats:program",
|
||||
"status": "required",
|
||||
"outcome": "carried",
|
||||
"fingerprint": "fp-0123",
|
||||
"carried-from": "main.11.nats",
|
||||
"tests": {
|
||||
"unit": 42
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "integration",
|
||||
"artifact": "nats:program",
|
||||
"status": "optional",
|
||||
"outcome": "failed",
|
||||
"why": "TestTheBusWhole failed",
|
||||
"fingerprint": "fp-0123",
|
||||
"seat": "node-build-go",
|
||||
"node": "home-server",
|
||||
"tests": {
|
||||
"integration": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"step": "composition",
|
||||
"status": "required",
|
||||
"outcome": "passed",
|
||||
"seat": "mesh-wants"
|
||||
},
|
||||
{
|
||||
"step": "review",
|
||||
"status": "bypass",
|
||||
"outcome": "bypassed"
|
||||
},
|
||||
{
|
||||
"step": "approval",
|
||||
"status": "required",
|
||||
"outcome": "passed"
|
||||
}
|
||||
],
|
||||
"tests": {
|
||||
"unit": 42,
|
||||
"integration": 3
|
||||
},
|
||||
"over-budget": true,
|
||||
"widens": [
|
||||
{
|
||||
"what": "serving part",
|
||||
"name": "mesh-build-go:program",
|
||||
"said": "its test runner"
|
||||
}
|
||||
],
|
||||
"started": "2026-11-10T10:00:00Z",
|
||||
"ended": "2026-11-10T10:20:00Z",
|
||||
"fingerprint": "fp-0123"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a pipeline ended failed, naming the step that held it, its approval not asked",
|
||||
"of": "event:pipeline-ended",
|
||||
"subject": "mesh.seat.mesh-pipeline-runner.event.pipeline-ended.nats.main.0123456789abcdef0123456789abcdef01234567",
|
||||
"given": {
|
||||
"pipeline": "main.12.nats",
|
||||
"module": "nats",
|
||||
"branch": "main",
|
||||
"revision": 12,
|
||||
"source": 3589,
|
||||
"end-count": 1,
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567",
|
||||
"v": 1,
|
||||
"outcome": "failed",
|
||||
"why": "unit of nats:program failed",
|
||||
"steps": [
|
||||
"call": "0123456789abcdef",
|
||||
"movers": [
|
||||
{
|
||||
"step": "unit",
|
||||
"artifact": "nats:program",
|
||||
"status": "required",
|
||||
"outcome": "failed",
|
||||
"fingerprint": "fp-0123"
|
||||
"module": "mesh-sdk",
|
||||
"fingerprint": "fp-sdk",
|
||||
"version": "0.1.21",
|
||||
"tier": 1,
|
||||
"steps": [
|
||||
{
|
||||
"module": "mesh-sdk",
|
||||
"step": "validate",
|
||||
"status": "required",
|
||||
"outcome": "passed",
|
||||
"seat": "mesh-wants"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"step": "approval",
|
||||
"status": "required",
|
||||
"outcome": "not asked",
|
||||
"why": "unit of nats:program failed"
|
||||
}
|
||||
],
|
||||
"over-budget": true,
|
||||
"fingerprint": "fp-0123"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a group's one pipeline ended on a watched branch",
|
||||
"of": "event:group-ended",
|
||||
"subject": "mesh.seat.mesh-pipeline-runner.event.group-ended.main.registry-1966",
|
||||
"given": {
|
||||
"v": 1,
|
||||
"group": "registry-1966",
|
||||
"branch": "main",
|
||||
"revision": 12,
|
||||
"source": 3589,
|
||||
"outcome": "passed",
|
||||
"pipelines": [
|
||||
{
|
||||
"pipeline": "main.12.nats",
|
||||
"module": "nats",
|
||||
"branch": "main",
|
||||
"revision": 12,
|
||||
"source": 3589,
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567",
|
||||
"v": 1,
|
||||
"group": "registry-1966",
|
||||
"outcome": "passed",
|
||||
"fingerprint": "fp-0123",
|
||||
"steps": [
|
||||
{
|
||||
"step": "lint",
|
||||
@@ -174,13 +72,114 @@
|
||||
"fingerprint": "fp-0123",
|
||||
"seat": "node-build-go",
|
||||
"node": "anchor",
|
||||
"ask": "m2kx9a1b3c4d5e"
|
||||
"ask": "m2kx9a1b3c4d5e",
|
||||
"module": "nats"
|
||||
},
|
||||
{
|
||||
"step": "unit",
|
||||
"artifact": "nats:program",
|
||||
"status": "required",
|
||||
"outcome": "carried",
|
||||
"fingerprint": "fp-0123",
|
||||
"carried-from": "main.3588",
|
||||
"tests": {
|
||||
"unit": 42
|
||||
},
|
||||
"module": "nats"
|
||||
},
|
||||
{
|
||||
"step": "integration",
|
||||
"artifact": "nats:program",
|
||||
"status": "optional",
|
||||
"outcome": "failed",
|
||||
"why": "TestTheBusWhole failed",
|
||||
"fingerprint": "fp-0123",
|
||||
"seat": "node-build-go",
|
||||
"node": "home-server",
|
||||
"tests": {
|
||||
"integration": 3
|
||||
},
|
||||
"module": "nats"
|
||||
},
|
||||
{
|
||||
"step": "composition",
|
||||
"status": "required",
|
||||
"outcome": "passed",
|
||||
"seat": "mesh-wants",
|
||||
"module": "nats"
|
||||
},
|
||||
{
|
||||
"step": "review",
|
||||
"status": "bypass",
|
||||
"outcome": "bypassed",
|
||||
"module": "nats"
|
||||
},
|
||||
{
|
||||
"step": "approval",
|
||||
"status": "required",
|
||||
"outcome": "passed",
|
||||
"module": "nats"
|
||||
}
|
||||
],
|
||||
"fingerprint": "fp-0123"
|
||||
"tier": 2,
|
||||
"version": "0.1.15"
|
||||
}
|
||||
],
|
||||
"ended": "2026-11-10T10:20:00Z"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a pipeline ended failed, naming the step that held it, no version released",
|
||||
"of": "event:pipeline-ended",
|
||||
"subject": "mesh.seat.mesh-pipeline-runner.event.pipeline-ended.main.3589",
|
||||
"given": {
|
||||
"pipeline": "main.3589",
|
||||
"branch": "main",
|
||||
"revision": 12,
|
||||
"source": 3589,
|
||||
"end-count": 1,
|
||||
"v": 1,
|
||||
"outcome": "failed",
|
||||
"why": "unit of nats:program failed",
|
||||
"call": "0123456789abcdef",
|
||||
"movers": [
|
||||
{
|
||||
"module": "nats",
|
||||
"fingerprint": "fp-0123",
|
||||
"steps": [
|
||||
{
|
||||
"step": "unit",
|
||||
"artifact": "nats:program",
|
||||
"status": "required",
|
||||
"outcome": "failed",
|
||||
"fingerprint": "fp-0123",
|
||||
"module": "nats"
|
||||
},
|
||||
{
|
||||
"step": "approval",
|
||||
"status": "required",
|
||||
"outcome": "not asked",
|
||||
"why": "unit of nats:program failed",
|
||||
"module": "nats"
|
||||
}
|
||||
],
|
||||
"tier": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a pipeline over pipelines-at-once waits its turn",
|
||||
"of": "event:wait-held",
|
||||
"subject": "mesh.seat.mesh-pipeline-runner.event.wait-held.main.3590",
|
||||
"given": {
|
||||
"pipeline": "main.3590",
|
||||
"branch": "main",
|
||||
"revision": 13,
|
||||
"source": 3590,
|
||||
"v": 1,
|
||||
"step": "pipeline",
|
||||
"on": "pipelines-at-once",
|
||||
"since": "2026-11-10T10:01:00Z"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -206,7 +205,7 @@
|
||||
"of": "event:step-started",
|
||||
"subject": "mesh.seat.mesh-pipeline-runner.event.step-started.nats.main.0123456789abcdef0123456789abcdef01234567",
|
||||
"given": {
|
||||
"pipeline": "main.12.nats",
|
||||
"pipeline": "main.3589",
|
||||
"module": "nats",
|
||||
"branch": "main",
|
||||
"revision": 12,
|
||||
@@ -230,7 +229,7 @@
|
||||
"of": "event:step-ended",
|
||||
"subject": "mesh.seat.mesh-pipeline-runner.event.step-ended.nats.main.0123456789abcdef0123456789abcdef01234567",
|
||||
"given": {
|
||||
"pipeline": "main.12.nats",
|
||||
"pipeline": "main.3589",
|
||||
"module": "nats",
|
||||
"branch": "main",
|
||||
"revision": 12,
|
||||
@@ -260,7 +259,7 @@
|
||||
"of": "event:step-ended",
|
||||
"subject": "mesh.seat.mesh-pipeline-runner.event.step-ended.nats.main.0123456789abcdef0123456789abcdef01234567",
|
||||
"given": {
|
||||
"pipeline": "main.12.nats",
|
||||
"pipeline": "main.3589",
|
||||
"module": "nats",
|
||||
"branch": "main",
|
||||
"revision": 12,
|
||||
@@ -278,9 +277,9 @@
|
||||
{
|
||||
"name": "an approval waits on the operator",
|
||||
"of": "event:wait-held",
|
||||
"subject": "mesh.seat.mesh-pipeline-runner.event.wait-held.nats.main.0123456789abcdef0123456789abcdef01234567",
|
||||
"subject": "mesh.seat.mesh-pipeline-runner.event.wait-held.main.3589",
|
||||
"given": {
|
||||
"pipeline": "main.12.nats",
|
||||
"pipeline": "main.3589",
|
||||
"module": "nats",
|
||||
"branch": "main",
|
||||
"revision": 12,
|
||||
@@ -297,9 +296,9 @@
|
||||
{
|
||||
"name": "the wait ended answered",
|
||||
"of": "event:wait-ended",
|
||||
"subject": "mesh.seat.mesh-pipeline-runner.event.wait-ended.nats.main.0123456789abcdef0123456789abcdef01234567",
|
||||
"subject": "mesh.seat.mesh-pipeline-runner.event.wait-ended.main.3589",
|
||||
"given": {
|
||||
"pipeline": "main.12.nats",
|
||||
"pipeline": "main.3589",
|
||||
"module": "nats",
|
||||
"branch": "main",
|
||||
"revision": 12,
|
||||
@@ -319,7 +318,7 @@
|
||||
"of": "event:step-started",
|
||||
"subject": "mesh.seat.mesh-pipeline-runner.event.step-started.nats.main.0123456789abcdef0123456789abcdef01234567",
|
||||
"given": {
|
||||
"pipeline": "main.12.nats",
|
||||
"pipeline": "main.3589",
|
||||
"module": "nats",
|
||||
"branch": "main",
|
||||
"revision": 12,
|
||||
@@ -349,7 +348,7 @@
|
||||
"of": "event:step-ended",
|
||||
"subject": "mesh.seat.mesh-pipeline-runner.event.step-ended.nats.main.0123456789abcdef0123456789abcdef01234567",
|
||||
"given": {
|
||||
"pipeline": "main.12.nats",
|
||||
"pipeline": "main.3589",
|
||||
"module": "nats",
|
||||
"branch": "main",
|
||||
"revision": 12,
|
||||
@@ -373,7 +372,7 @@
|
||||
"run": "main.12.unit.d1",
|
||||
"ask": "t1a2",
|
||||
"asked-by": {
|
||||
"pipeline": "main.12.nats",
|
||||
"pipeline": "main.3589",
|
||||
"artifact": "nats:program"
|
||||
}
|
||||
}
|
||||
@@ -387,7 +386,7 @@
|
||||
"of": "event:step-ended",
|
||||
"subject": "mesh.seat.mesh-pipeline-runner.event.step-ended.nats.main.0123456789abcdef0123456789abcdef01234567",
|
||||
"given": {
|
||||
"pipeline": "main.12.nats",
|
||||
"pipeline": "main.3589",
|
||||
"module": "nats",
|
||||
"branch": "main",
|
||||
"revision": 12,
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
[
|
||||
{
|
||||
"name": "a pipeline kept",
|
||||
"of": "state:pipelines/<branch>.<revision>.<module>",
|
||||
"name": "a take-in's pipeline kept, its steps naming their mover",
|
||||
"of": "state:pipelines/<branch>.<source>",
|
||||
"given": {
|
||||
"pipeline": "main.12.nats",
|
||||
"module": "nats",
|
||||
"pipeline": "main.3589",
|
||||
"branch": "main",
|
||||
"revision": 12,
|
||||
"source": 3589,
|
||||
"end-count": 1,
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567",
|
||||
"v": 1,
|
||||
"outcome": "passed",
|
||||
"steps": [
|
||||
@@ -21,7 +19,8 @@
|
||||
"fingerprint": "fp-0123",
|
||||
"seat": "node-build-go",
|
||||
"node": "anchor",
|
||||
"ask": "m2kx9a1b3c4d5e"
|
||||
"ask": "m2kx9a1b3c4d5e",
|
||||
"module": "nats"
|
||||
},
|
||||
{
|
||||
"step": "unit",
|
||||
@@ -29,10 +28,11 @@
|
||||
"status": "required",
|
||||
"outcome": "carried",
|
||||
"fingerprint": "fp-0123",
|
||||
"carried-from": "main.11.nats",
|
||||
"carried-from": "main.3588",
|
||||
"tests": {
|
||||
"unit": 42
|
||||
}
|
||||
},
|
||||
"module": "nats"
|
||||
},
|
||||
{
|
||||
"step": "integration",
|
||||
@@ -45,41 +45,52 @@
|
||||
"node": "home-server",
|
||||
"tests": {
|
||||
"integration": 3
|
||||
}
|
||||
},
|
||||
"module": "nats"
|
||||
},
|
||||
{
|
||||
"step": "composition",
|
||||
"status": "required",
|
||||
"outcome": "passed",
|
||||
"seat": "mesh-wants"
|
||||
"seat": "mesh-wants",
|
||||
"module": "nats"
|
||||
},
|
||||
{
|
||||
"step": "review",
|
||||
"status": "bypass",
|
||||
"outcome": "bypassed"
|
||||
"outcome": "bypassed",
|
||||
"module": "nats"
|
||||
},
|
||||
{
|
||||
"step": "approval",
|
||||
"status": "required",
|
||||
"outcome": "passed"
|
||||
"outcome": "passed",
|
||||
"module": "nats"
|
||||
}
|
||||
],
|
||||
"started": "2026-11-10T10:00:00Z",
|
||||
"ended": "2026-11-10T10:20:00Z",
|
||||
"fingerprint": "fp-0123"
|
||||
"call": "0123456789abcdef",
|
||||
"movers": [
|
||||
{
|
||||
"module": "nats",
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567",
|
||||
"fingerprint": "fp-0123",
|
||||
"repository": "mesh-networking",
|
||||
"tier": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a pipeline a publication started, with the version it names (design 47 G 550)",
|
||||
"of": "state:pipelines/<branch>.<revision>.<module>",
|
||||
"name": "a pipeline a publish started, its mover the package's dependent, with the version released for it",
|
||||
"of": "state:pipelines/<branch>.<source>.published.<package>.<version>",
|
||||
"given": {
|
||||
"pipeline": "main.12.nats",
|
||||
"module": "nats",
|
||||
"pipeline": "main.3589.published.mesh-sdk.0.1.21",
|
||||
"branch": "main",
|
||||
"revision": 12,
|
||||
"source": 3589,
|
||||
"end-count": 1,
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567",
|
||||
"v": 1,
|
||||
"outcome": "passed",
|
||||
"steps": [
|
||||
@@ -91,7 +102,8 @@
|
||||
"fingerprint": "fp-0123",
|
||||
"seat": "node-build-go",
|
||||
"node": "anchor",
|
||||
"ask": "m2kx9a1b3c4d5e"
|
||||
"ask": "m2kx9a1b3c4d5e",
|
||||
"module": "nats"
|
||||
},
|
||||
{
|
||||
"step": "unit",
|
||||
@@ -99,10 +111,11 @@
|
||||
"status": "required",
|
||||
"outcome": "carried",
|
||||
"fingerprint": "fp-0123",
|
||||
"carried-from": "main.11.nats",
|
||||
"carried-from": "main.3588",
|
||||
"tests": {
|
||||
"unit": 42
|
||||
}
|
||||
},
|
||||
"module": "nats"
|
||||
},
|
||||
{
|
||||
"step": "integration",
|
||||
@@ -115,29 +128,45 @@
|
||||
"node": "home-server",
|
||||
"tests": {
|
||||
"integration": 3
|
||||
}
|
||||
},
|
||||
"module": "nats"
|
||||
},
|
||||
{
|
||||
"step": "composition",
|
||||
"status": "required",
|
||||
"outcome": "passed",
|
||||
"seat": "mesh-wants"
|
||||
"seat": "mesh-wants",
|
||||
"module": "nats"
|
||||
},
|
||||
{
|
||||
"step": "review",
|
||||
"status": "bypass",
|
||||
"outcome": "bypassed"
|
||||
"outcome": "bypassed",
|
||||
"module": "nats"
|
||||
},
|
||||
{
|
||||
"step": "approval",
|
||||
"status": "required",
|
||||
"outcome": "passed"
|
||||
"outcome": "passed",
|
||||
"module": "nats"
|
||||
}
|
||||
],
|
||||
"started": "2026-11-10T10:00:00Z",
|
||||
"ended": "2026-11-10T10:20:00Z",
|
||||
"fingerprint": "fp-0123",
|
||||
"version": "0.1.15"
|
||||
"movers": [
|
||||
{
|
||||
"module": "nats",
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567",
|
||||
"fingerprint": "fp-0123",
|
||||
"repository": "mesh-networking",
|
||||
"tier": 1,
|
||||
"version": "0.1.15"
|
||||
}
|
||||
],
|
||||
"published": {
|
||||
"artifact": "mesh-sdk",
|
||||
"version": "0.1.21"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -147,7 +176,43 @@
|
||||
"package": "git.novox.be/novox/nats",
|
||||
"digest": "sha256:aa",
|
||||
"level": "unit",
|
||||
"pipeline": "main.12.nats"
|
||||
"pipeline": "main.3589"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "the queue's counter",
|
||||
"of": "state:queue/queue.next",
|
||||
"given": 3
|
||||
},
|
||||
{
|
||||
"name": "a waiting pipeline in the queue",
|
||||
"of": "state:queue/waiting.<sequence>",
|
||||
"given": {
|
||||
"pipeline": "main.3590"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "a pipeline waiting its turn, its seq given",
|
||||
"of": "state:pipelines/<branch>.<source>",
|
||||
"given": {
|
||||
"pipeline": "main.3590",
|
||||
"branch": "main",
|
||||
"revision": 13,
|
||||
"source": 3590,
|
||||
"call": "fedcba9876543210",
|
||||
"v": 1,
|
||||
"seq": 2,
|
||||
"outcome": "waiting",
|
||||
"steps": [],
|
||||
"movers": [
|
||||
{
|
||||
"module": "nats",
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567",
|
||||
"fingerprint": "fp-0124",
|
||||
"repository": "mesh-networking",
|
||||
"tier": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"name": "review answers its step",
|
||||
"of": "verb:review.answer",
|
||||
"given": {
|
||||
"pipeline": "main.12.nats",
|
||||
"pipeline": "main.3589",
|
||||
"result": {
|
||||
"step": "review",
|
||||
"status": "optional",
|
||||
@@ -50,12 +50,10 @@
|
||||
"of": "verb:show.answer",
|
||||
"given": {
|
||||
"pipeline": {
|
||||
"pipeline": "main.12.nats",
|
||||
"module": "nats",
|
||||
"pipeline": "main.3589",
|
||||
"branch": "main",
|
||||
"revision": 12,
|
||||
"source": 3589,
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567",
|
||||
"v": 1,
|
||||
"outcome": "running",
|
||||
"steps": [
|
||||
@@ -67,14 +65,23 @@
|
||||
"fingerprint": "fp-0123",
|
||||
"seat": "node-build-go",
|
||||
"node": "anchor",
|
||||
"ask": "m2kx9a1b3c4d5e"
|
||||
"ask": "m2kx9a1b3c4d5e",
|
||||
"module": "nats"
|
||||
}
|
||||
],
|
||||
"fingerprint": "fp-0123"
|
||||
"movers": [
|
||||
{
|
||||
"module": "nats",
|
||||
"commit": "0123456789abcdef0123456789abcdef01234567",
|
||||
"fingerprint": "fp-0123",
|
||||
"repository": "mesh-networking",
|
||||
"tier": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"log": [
|
||||
{
|
||||
"pipeline": "main.12.nats",
|
||||
"pipeline": "main.3589",
|
||||
"step": "lint",
|
||||
"artifact": "nats:program",
|
||||
"what": "started",
|
||||
@@ -97,7 +104,7 @@
|
||||
"name": "accept asks with why",
|
||||
"of": "verb:accept.input",
|
||||
"given": {
|
||||
"pipeline": "main.12.nats",
|
||||
"pipeline": "main.3589",
|
||||
"step": "integration",
|
||||
"artifact": "nats:program",
|
||||
"why": "flaky upstream, issue 1966"
|
||||
@@ -109,7 +116,7 @@
|
||||
"given": {
|
||||
"stands": [
|
||||
{
|
||||
"pipeline": "main.12.nats",
|
||||
"pipeline": "main.3589",
|
||||
"module": "nats",
|
||||
"branch": "main",
|
||||
"revision": 12,
|
||||
@@ -134,7 +141,7 @@
|
||||
"package": "git.novox.be/novox/nats",
|
||||
"digest": "sha256:aa",
|
||||
"level": "unit",
|
||||
"pipeline": "main.12.nats"
|
||||
"pipeline": "main.3589"
|
||||
}
|
||||
],
|
||||
"fill": {
|
||||
@@ -150,7 +157,7 @@
|
||||
"given": {
|
||||
"stands": [
|
||||
{
|
||||
"pipeline": "main.12.nats",
|
||||
"pipeline": "main.3589",
|
||||
"module": "nats",
|
||||
"branch": "main",
|
||||
"revision": 12,
|
||||
@@ -188,11 +195,11 @@
|
||||
"started": "2026-11-17T10:00:00Z",
|
||||
"readers": [
|
||||
{
|
||||
"pipeline": "main.12.nats",
|
||||
"pipeline": "main.3589",
|
||||
"artifact": "nats:program"
|
||||
},
|
||||
{
|
||||
"pipeline": "main.12.nats",
|
||||
"pipeline": "main.3589",
|
||||
"artifact": "nats:tools"
|
||||
}
|
||||
],
|
||||
@@ -220,11 +227,11 @@
|
||||
"started": "2026-11-17T10:00:00Z",
|
||||
"readers": [
|
||||
{
|
||||
"pipeline": "main.12.nats",
|
||||
"pipeline": "main.3589",
|
||||
"artifact": "nats:program"
|
||||
},
|
||||
{
|
||||
"pipeline": "main.12.nats",
|
||||
"pipeline": "main.3589",
|
||||
"artifact": "nats:tools"
|
||||
}
|
||||
],
|
||||
@@ -259,11 +266,11 @@
|
||||
"started": "2026-11-17T10:00:00Z",
|
||||
"readers": [
|
||||
{
|
||||
"pipeline": "main.12.nats",
|
||||
"pipeline": "main.3589",
|
||||
"artifact": "nats:program"
|
||||
},
|
||||
{
|
||||
"pipeline": "main.12.nats",
|
||||
"pipeline": "main.3589",
|
||||
"artifact": "nats:tools"
|
||||
}
|
||||
],
|
||||
@@ -283,14 +290,22 @@
|
||||
},
|
||||
"ended": [
|
||||
{
|
||||
"pipeline": "main.12.nats",
|
||||
"pipeline": "main.3589",
|
||||
"artifact": "nats:program"
|
||||
},
|
||||
{
|
||||
"pipeline": "main.12.nats",
|
||||
"pipeline": "main.3589",
|
||||
"artifact": "nats:tools"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "place asks a waiting pipeline ahead of its turn, with why",
|
||||
"of": "verb:place.input",
|
||||
"given": {
|
||||
"pipeline": "main.3590",
|
||||
"why": "the operator wants the fix out first"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -209,6 +209,7 @@
|
||||
"step": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"validate",
|
||||
"build",
|
||||
"lint",
|
||||
"unit",
|
||||
@@ -342,6 +343,7 @@
|
||||
"step": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"validate",
|
||||
"build",
|
||||
"lint",
|
||||
"unit",
|
||||
@@ -394,6 +396,7 @@
|
||||
"step": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"validate",
|
||||
"build",
|
||||
"lint",
|
||||
"unit",
|
||||
@@ -463,6 +466,39 @@
|
||||
},
|
||||
"class": "act"
|
||||
},
|
||||
{
|
||||
"name": "place",
|
||||
"description": "A waiting pipeline placed ahead of its turn, its steps asked now; written in the hand-act log (design 47 H §748, H-A-53).",
|
||||
"input": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"pipeline": {
|
||||
"type": "string",
|
||||
"description": "the pipeline's key"
|
||||
},
|
||||
"why": {
|
||||
"type": "string",
|
||||
"description": "why, written with the caller the runtime proves in the hand-act log"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"pipeline",
|
||||
"why"
|
||||
]
|
||||
},
|
||||
"answer": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"pipeline": {
|
||||
"$ref": "#/defs/Pipeline"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"pipeline"
|
||||
]
|
||||
},
|
||||
"class": "act"
|
||||
},
|
||||
{
|
||||
"name": "ask-again",
|
||||
"description": "A declined approval step asked again (ADR 0666 section 10). Written in the hand-act log.",
|
||||
@@ -587,7 +623,7 @@
|
||||
"events": [
|
||||
{
|
||||
"name": "pipeline-started",
|
||||
"subject": "pipeline-started.<module>.<branch>.<commit-or-group>",
|
||||
"subject": "pipeline-started.<branch>.<source>",
|
||||
"body": {
|
||||
"$ref": "#/defs/PipelineStarted"
|
||||
},
|
||||
@@ -598,7 +634,7 @@
|
||||
},
|
||||
{
|
||||
"name": "pipeline-ended",
|
||||
"subject": "pipeline-ended.<module>.<branch>.<commit-or-group>",
|
||||
"subject": "pipeline-ended.<branch>.<source>",
|
||||
"body": {
|
||||
"$ref": "#/defs/PipelineEnded"
|
||||
},
|
||||
@@ -607,20 +643,9 @@
|
||||
"max-mib": 192
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "group-ended",
|
||||
"subject": "group-ended.<branch>.<group>",
|
||||
"body": {
|
||||
"$ref": "#/defs/GroupEnded"
|
||||
},
|
||||
"keep": {
|
||||
"max-age-days": 90,
|
||||
"max-mib": 64
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "run-started",
|
||||
"subject": "run-started.<module>.<branch>.<commit-or-group>",
|
||||
"subject": "run-started.<module>.<branch>.<commit>",
|
||||
"body": {
|
||||
"$ref": "#/defs/RunStarted"
|
||||
},
|
||||
@@ -631,7 +656,7 @@
|
||||
},
|
||||
{
|
||||
"name": "step-started",
|
||||
"subject": "step-started.<module>.<branch>.<commit-or-group>",
|
||||
"subject": "step-started.<module>.<branch>.<commit>",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepEvent"
|
||||
},
|
||||
@@ -642,7 +667,7 @@
|
||||
},
|
||||
{
|
||||
"name": "step-ended",
|
||||
"subject": "step-ended.<module>.<branch>.<commit-or-group>",
|
||||
"subject": "step-ended.<module>.<branch>.<commit>",
|
||||
"body": {
|
||||
"$ref": "#/defs/StepEvent"
|
||||
},
|
||||
@@ -653,7 +678,7 @@
|
||||
},
|
||||
{
|
||||
"name": "wait-held",
|
||||
"subject": "wait-held.<module>.<branch>.<commit-or-group>",
|
||||
"subject": "wait-held.<branch>.<source>",
|
||||
"body": {
|
||||
"$ref": "#/defs/Wait"
|
||||
},
|
||||
@@ -664,7 +689,7 @@
|
||||
},
|
||||
{
|
||||
"name": "wait-ended",
|
||||
"subject": "wait-ended.<module>.<branch>.<commit-or-group>",
|
||||
"subject": "wait-ended.<branch>.<source>",
|
||||
"body": {
|
||||
"$ref": "#/defs/Wait"
|
||||
},
|
||||
@@ -701,14 +726,44 @@
|
||||
"name": "pipelines",
|
||||
"template": "state",
|
||||
"history": 1,
|
||||
"description": "one key per pipeline, written by compare-and-set; kept in the runner's old state section (ADR 0666 section 4)",
|
||||
"description": "one key per pipeline, one per take-in, written by compare-and-set on its absence (design 47 H §746, §747)",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "<branch>.<revision>.<module>",
|
||||
"key": "<branch>.<source>",
|
||||
"value": {
|
||||
"$ref": "#/defs/Pipeline"
|
||||
},
|
||||
"description": "a pipeline"
|
||||
"description": "a take-in's pipeline"
|
||||
},
|
||||
{
|
||||
"key": "<branch>.<source>.published.<package>.<version>",
|
||||
"value": {
|
||||
"$ref": "#/defs/Pipeline"
|
||||
},
|
||||
"description": "a pipeline a package's publish started, its movers the package's kind-1 dependents the publishing pipeline does not move"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "queue",
|
||||
"template": "state",
|
||||
"history": 1,
|
||||
"description": "the pipelines waiting their turn under pipelines-at-once, the lowest sequence read first by key order (design 47 H §748, H-A-36, H-A-72)",
|
||||
"key-forms": [
|
||||
{
|
||||
"key": "queue.next",
|
||||
"value": {
|
||||
"type": "integer",
|
||||
"description": "the runner's counter: the sequence the next waiting pipeline gets, written by compare-and-set"
|
||||
},
|
||||
"description": "the queue's counter"
|
||||
},
|
||||
{
|
||||
"key": "waiting.<sequence>",
|
||||
"value": {
|
||||
"$ref": "#/defs/Waiting"
|
||||
},
|
||||
"description": "a waiting pipeline, its sequence 20 digits"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -875,9 +930,14 @@
|
||||
"StepResult": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string",
|
||||
"description": "the mover the step is of (design 47 H-A-35)"
|
||||
},
|
||||
"step": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"validate",
|
||||
"build",
|
||||
"lint",
|
||||
"unit",
|
||||
@@ -1041,10 +1101,7 @@
|
||||
"properties": {
|
||||
"pipeline": {
|
||||
"type": "string",
|
||||
"description": "the pipeline's key, <branch>.<revision>.<module>, a branch escaped as a key's name is"
|
||||
},
|
||||
"module": {
|
||||
"type": "string"
|
||||
"description": "the pipeline's key, <branch>.<source>, or <branch>.<source>.published.<package>.<version> for a pipeline a publish started; a branch escaped as a key's name is (design 47 H §746, §747)"
|
||||
},
|
||||
"branch": {
|
||||
"type": "string",
|
||||
@@ -1058,36 +1115,37 @@
|
||||
"type": "integer",
|
||||
"description": "the source revision of the watched branch; the pipeline is keyed by it (ADR 0666 section 9)"
|
||||
},
|
||||
"call": {
|
||||
"type": "string",
|
||||
"description": "the merge call whose source revision the take-in took in (design 47 H §746)"
|
||||
},
|
||||
"movers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/Mover"
|
||||
},
|
||||
"description": "the modules the pipeline moves, its take-in's entries (design 47 H §746)"
|
||||
},
|
||||
"seq": {
|
||||
"type": "integer",
|
||||
"description": "for a pipeline written over pipelines-at-once, its place in the queue: the runner's counter queue.next at its write (design 47 H §748)"
|
||||
},
|
||||
"end-count": {
|
||||
"type": "integer",
|
||||
"description": "how often the pipeline has ended: 1 at its first end, one higher at each end again after a passing rerun, so the assigner takes a later end of the same source revision (design 47 G sections 29, 325)"
|
||||
},
|
||||
"commit": {
|
||||
"type": "string",
|
||||
"description": "the commit the module's entry was last changed at"
|
||||
},
|
||||
"group": {
|
||||
"type": "string",
|
||||
"description": "the gathered group, when the pipeline is its"
|
||||
},
|
||||
"run": {
|
||||
"type": "string",
|
||||
"description": "the run on request's id, for a pipeline of a run; such a pipeline delivers nothing"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string",
|
||||
"description": "the module's build-input fingerprint at the commit"
|
||||
},
|
||||
"v": {
|
||||
"type": "integer",
|
||||
"description": "the layout version"
|
||||
},
|
||||
"repository": {
|
||||
"type": "string"
|
||||
},
|
||||
"outcome": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"waiting",
|
||||
"running",
|
||||
"passed",
|
||||
"failed",
|
||||
@@ -1105,20 +1163,7 @@
|
||||
"items": {
|
||||
"$ref": "#/defs/StepResult"
|
||||
},
|
||||
"description": "every step, approval last"
|
||||
},
|
||||
"tests": {
|
||||
"$ref": "#/defs/TestCounts"
|
||||
},
|
||||
"over-budget": {
|
||||
"type": "boolean",
|
||||
"description": "yes when the module is over its test budget (design 47 G section 419)"
|
||||
},
|
||||
"widens": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/Widening"
|
||||
}
|
||||
"description": "every mover's steps, each naming its mover, approval last"
|
||||
},
|
||||
"started": {
|
||||
"type": "string",
|
||||
@@ -1128,10 +1173,6 @@
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"description": "the version package-published names, for a pipeline the runner started from a publication or from outdated; none for any other (design 47 G 550)"
|
||||
},
|
||||
"unlogged": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -1144,11 +1185,12 @@
|
||||
"description": "for a pipeline a package's publish started, that publish (A-202)"
|
||||
}
|
||||
},
|
||||
"description": "one pipeline as the runner keeps it in its state pipelines, by compare-and-set (design 47 *The runner's kept data*)",
|
||||
"description": "one pipeline of one take-in, its movers the take-in's entries, as the runner keeps it in its state pipelines by compare-and-set (design 47 H §746)",
|
||||
"required": [
|
||||
"module",
|
||||
"pipeline",
|
||||
"branch",
|
||||
"commit",
|
||||
"source",
|
||||
"movers",
|
||||
"outcome",
|
||||
"steps"
|
||||
]
|
||||
@@ -1158,49 +1200,39 @@
|
||||
"properties": {
|
||||
"pipeline": {
|
||||
"type": "string",
|
||||
"description": "the pipeline's key, <branch>.<revision>.<module>, a branch escaped as a key's name is"
|
||||
},
|
||||
"module": {
|
||||
"type": "string"
|
||||
"description": "the pipeline's key, <branch>.<source>, or <branch>.<source>.published.<package>.<version> for a pipeline a publish started; a branch escaped as a key's name is (design 47 H §746, §747)"
|
||||
},
|
||||
"branch": {
|
||||
"type": "string",
|
||||
"description": "the watched branch, or the branch of a run on request"
|
||||
},
|
||||
"revision": {
|
||||
"type": "integer",
|
||||
"description": "the catalog graph revision of the branch the pipeline runs for"
|
||||
},
|
||||
"source": {
|
||||
"type": "integer",
|
||||
"description": "the source revision of the watched branch; the pipeline is keyed by it (ADR 0666 section 9)"
|
||||
},
|
||||
"call": {
|
||||
"type": "string",
|
||||
"description": "the merge call whose source revision the take-in took in (design 47 H §746)"
|
||||
},
|
||||
"revision": {
|
||||
"type": "integer",
|
||||
"description": "the catalog graph revision of the branch the pipeline runs for"
|
||||
},
|
||||
"end-count": {
|
||||
"type": "integer",
|
||||
"description": "how often the pipeline has ended: 1 at its first end, one higher at each end again after a passing rerun, so the assigner takes a later end of the same source revision (design 47 G sections 29, 325)"
|
||||
},
|
||||
"commit": {
|
||||
"type": "string",
|
||||
"description": "the commit the module's entry was last changed at"
|
||||
},
|
||||
"group": {
|
||||
"type": "string",
|
||||
"description": "the gathered group, when the pipeline is its"
|
||||
},
|
||||
"run": {
|
||||
"type": "string",
|
||||
"description": "the run on request's id, for a pipeline of a run; such a pipeline delivers nothing"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string",
|
||||
"description": "the module's build-input fingerprint at the commit"
|
||||
},
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"outcome": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"waiting",
|
||||
"running",
|
||||
"passed",
|
||||
"failed",
|
||||
@@ -1212,24 +1244,12 @@
|
||||
"why": {
|
||||
"type": "string"
|
||||
},
|
||||
"steps": {
|
||||
"movers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/StepResult"
|
||||
}
|
||||
},
|
||||
"tests": {
|
||||
"$ref": "#/defs/TestCounts"
|
||||
},
|
||||
"over-budget": {
|
||||
"type": "boolean",
|
||||
"description": "yes when the module is over its test budget (500 unit or 50 integration tests; design 47 G section 419)"
|
||||
},
|
||||
"widens": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/Widening"
|
||||
}
|
||||
"$ref": "#/defs/MoverEnded"
|
||||
},
|
||||
"description": "per mover its fingerprint, released version, step results and tier, in the delivery order (design 47 H §746, H-A-2)"
|
||||
},
|
||||
"started": {
|
||||
"type": "string",
|
||||
@@ -1240,15 +1260,14 @@
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"description": "a pipeline's end with every step's result, its test counts, the source revision and widens (design 47 *Health and going back*); the assigner writes a want only from one whose every required step passed",
|
||||
"description": "a pipeline's end, said once, with per mover its released version, step results and tier (design 47 H §746); the assigner writes wants only from a passed one",
|
||||
"required": [
|
||||
"v",
|
||||
"pipeline",
|
||||
"module",
|
||||
"branch",
|
||||
"commit",
|
||||
"source",
|
||||
"outcome",
|
||||
"steps"
|
||||
"movers"
|
||||
]
|
||||
},
|
||||
"PipelineStarted": {
|
||||
@@ -1256,78 +1275,38 @@
|
||||
"properties": {
|
||||
"pipeline": {
|
||||
"type": "string",
|
||||
"description": "the pipeline's key, <branch>.<revision>.<module>, a branch escaped as a key's name is"
|
||||
},
|
||||
"module": {
|
||||
"type": "string"
|
||||
"description": "the pipeline's key, <branch>.<source>, or <branch>.<source>.published.<package>.<version> for a pipeline a publish started; a branch escaped as a key's name is (design 47 H §746, §747)"
|
||||
},
|
||||
"branch": {
|
||||
"type": "string",
|
||||
"description": "the watched branch, or the branch of a run on request"
|
||||
},
|
||||
"revision": {
|
||||
"type": "integer",
|
||||
"description": "the catalog graph revision of the branch the pipeline runs for"
|
||||
},
|
||||
"source": {
|
||||
"type": "integer",
|
||||
"description": "the source revision of the watched branch; the pipeline is keyed by it (ADR 0666 section 9)"
|
||||
},
|
||||
"commit": {
|
||||
"call": {
|
||||
"type": "string",
|
||||
"description": "the commit the module's entry was last changed at"
|
||||
"description": "the merge call whose source revision the take-in took in (design 47 H §746)"
|
||||
},
|
||||
"group": {
|
||||
"type": "string",
|
||||
"description": "the gathered group, when the pipeline is its"
|
||||
"revision": {
|
||||
"type": "integer",
|
||||
"description": "the catalog graph revision of the branch the pipeline runs for"
|
||||
},
|
||||
"movers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/Mover"
|
||||
},
|
||||
"description": "the pipeline's movers"
|
||||
},
|
||||
"run": {
|
||||
"type": "string",
|
||||
"description": "the run on request's id, for a pipeline of a run; such a pipeline delivers nothing"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string",
|
||||
"description": "the module's build-input fingerprint at the commit"
|
||||
},
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"steps": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"step": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"build",
|
||||
"lint",
|
||||
"unit",
|
||||
"integration",
|
||||
"composition",
|
||||
"review",
|
||||
"approval"
|
||||
]
|
||||
},
|
||||
"artifact": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"required",
|
||||
"optional",
|
||||
"bypass"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"step",
|
||||
"status"
|
||||
]
|
||||
},
|
||||
"description": "the steps the policy gives it"
|
||||
},
|
||||
"at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
@@ -1337,67 +1316,13 @@
|
||||
"description": "for a pipeline a package's publish started, that publish (A-202)"
|
||||
}
|
||||
},
|
||||
"description": "a pipeline's start",
|
||||
"description": "a pipeline's start, said at its write, a waiting one's too (design 47 H §746, H-A-52)",
|
||||
"required": [
|
||||
"v",
|
||||
"pipeline",
|
||||
"module",
|
||||
"branch",
|
||||
"commit"
|
||||
]
|
||||
},
|
||||
"GroupEnded": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"v": {
|
||||
"type": "integer"
|
||||
},
|
||||
"group": {
|
||||
"type": "string"
|
||||
},
|
||||
"branch": {
|
||||
"type": "string"
|
||||
},
|
||||
"revision": {
|
||||
"type": "integer"
|
||||
},
|
||||
"source": {
|
||||
"type": "integer",
|
||||
"description": "the group's one source revision of the watched branch"
|
||||
},
|
||||
"outcome": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"running",
|
||||
"passed",
|
||||
"failed",
|
||||
"refused",
|
||||
"superseded",
|
||||
"cancelled"
|
||||
]
|
||||
},
|
||||
"why": {
|
||||
"type": "string"
|
||||
},
|
||||
"pipelines": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/PipelineEnded"
|
||||
},
|
||||
"description": "every member module's pipeline, each ended"
|
||||
},
|
||||
"ended": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"description": "a group's one pipeline's end on a watched branch, said once every member's modules have ended; a group's wants are written on it alone (ADR 0666 section 9)",
|
||||
"required": [
|
||||
"v",
|
||||
"group",
|
||||
"branch",
|
||||
"outcome",
|
||||
"pipelines"
|
||||
"source",
|
||||
"movers"
|
||||
]
|
||||
},
|
||||
"Member": {
|
||||
@@ -1457,7 +1382,7 @@
|
||||
"properties": {
|
||||
"pipeline": {
|
||||
"type": "string",
|
||||
"description": "the pipeline's key, <branch>.<revision>.<module>, a branch escaped as a key's name is"
|
||||
"description": "the pipeline's key, <branch>.<source>, or <branch>.<source>.published.<package>.<version> for a pipeline a publish started; a branch escaped as a key's name is (design 47 H §746, §747)"
|
||||
},
|
||||
"module": {
|
||||
"type": "string"
|
||||
@@ -1478,10 +1403,6 @@
|
||||
"type": "string",
|
||||
"description": "the commit the module's entry was last changed at"
|
||||
},
|
||||
"group": {
|
||||
"type": "string",
|
||||
"description": "the gathered group, when the pipeline is its"
|
||||
},
|
||||
"run": {
|
||||
"type": "string",
|
||||
"description": "the run on request's id, for a pipeline of a run; such a pipeline delivers nothing"
|
||||
@@ -1516,10 +1437,11 @@
|
||||
"properties": {
|
||||
"pipeline": {
|
||||
"type": "string",
|
||||
"description": "the pipeline's key, <branch>.<revision>.<module>, a branch escaped as a key's name is"
|
||||
"description": "the pipeline's key, <branch>.<source>, or <branch>.<source>.published.<package>.<version> for a pipeline a publish started; a branch escaped as a key's name is (design 47 H §746, §747)"
|
||||
},
|
||||
"module": {
|
||||
"type": "string"
|
||||
"type": "string",
|
||||
"description": "for a step's wait, the mover whose step waits (design 47 H-A-72)"
|
||||
},
|
||||
"branch": {
|
||||
"type": "string",
|
||||
@@ -1537,10 +1459,6 @@
|
||||
"type": "string",
|
||||
"description": "the commit the module's entry was last changed at"
|
||||
},
|
||||
"group": {
|
||||
"type": "string",
|
||||
"description": "the gathered group, when the pipeline is its"
|
||||
},
|
||||
"run": {
|
||||
"type": "string",
|
||||
"description": "the run on request's id, for a pipeline of a run; such a pipeline delivers nothing"
|
||||
@@ -1555,15 +1473,17 @@
|
||||
"step": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"validate",
|
||||
"build",
|
||||
"lint",
|
||||
"unit",
|
||||
"integration",
|
||||
"composition",
|
||||
"review",
|
||||
"approval"
|
||||
"approval",
|
||||
"pipeline"
|
||||
],
|
||||
"description": "a pipeline step a wait inside a pipeline is in"
|
||||
"description": "the pipeline step a wait is in, or pipeline for a pipeline waiting its turn (design 47 H §748)"
|
||||
},
|
||||
"artifact": {
|
||||
"type": "string"
|
||||
@@ -1573,7 +1493,8 @@
|
||||
"enum": [
|
||||
"person",
|
||||
"build node",
|
||||
"revision view"
|
||||
"revision view",
|
||||
"pipelines-at-once"
|
||||
],
|
||||
"description": "what the step waits on (design 47 *Health and going back*)"
|
||||
},
|
||||
@@ -1601,11 +1522,10 @@
|
||||
"description": "the run the step waits on, where the runner knows it: a test step's run key and ask (design 47 G §731, A-469v)"
|
||||
}
|
||||
},
|
||||
"description": "a step's wait, held and ended; a wait on a person is said as waiting on that person, never a stall (ADR 0283)",
|
||||
"description": "a step's wait, held and ended; a wait on a person is said as waiting on that person, never a stall (ADR 0283); said on <branch>.<source> (design 47 H-A-72)",
|
||||
"required": [
|
||||
"v",
|
||||
"pipeline",
|
||||
"module",
|
||||
"branch",
|
||||
"step",
|
||||
"on",
|
||||
@@ -1835,6 +1755,101 @@
|
||||
"level",
|
||||
"digest"
|
||||
]
|
||||
},
|
||||
"Mover": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"commit": {
|
||||
"type": "string",
|
||||
"description": "the commit the module's entry was last changed at"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string",
|
||||
"description": "the module's build-input fingerprint at the commit"
|
||||
},
|
||||
"repository": {
|
||||
"type": "string"
|
||||
},
|
||||
"tier": {
|
||||
"type": "integer",
|
||||
"description": "the mover's tier in the pipeline's delivery order, from 1 (ADR 0666 section 14; design 47 H §746)"
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"description": "the version released for the mover in this pipeline (version-released), absent until one is (design 47 H-A-52)"
|
||||
},
|
||||
"widens": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/Widening"
|
||||
}
|
||||
},
|
||||
"tests": {
|
||||
"$ref": "#/defs/TestCounts"
|
||||
},
|
||||
"over-budget": {
|
||||
"type": "boolean",
|
||||
"description": "yes when the module is over its test budget (design 47 G section 419)"
|
||||
}
|
||||
},
|
||||
"description": "one module a pipeline moves: an entry of its take-in.taken, with what the pipeline found of it (design 47 H §746, H-A-35, H-A-72)",
|
||||
"required": [
|
||||
"module",
|
||||
"commit",
|
||||
"fingerprint",
|
||||
"repository",
|
||||
"tier"
|
||||
]
|
||||
},
|
||||
"MoverEnded": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"module": {
|
||||
"type": "string"
|
||||
},
|
||||
"fingerprint": {
|
||||
"type": "string",
|
||||
"description": "the module's build-input fingerprint the pipeline ran at"
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"description": "the version released for the mover, absent when none was released"
|
||||
},
|
||||
"steps": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/defs/StepResult"
|
||||
},
|
||||
"description": "the mover's step results, each naming its module (design 47 H-A-72)"
|
||||
},
|
||||
"tier": {
|
||||
"type": "integer",
|
||||
"description": "the mover's tier in the delivery order, from 1 (ADR 0666 section 14)"
|
||||
}
|
||||
},
|
||||
"description": "one mover at its pipeline's end (design 47 H §746)",
|
||||
"required": [
|
||||
"module",
|
||||
"fingerprint",
|
||||
"steps",
|
||||
"tier"
|
||||
]
|
||||
},
|
||||
"Waiting": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"pipeline": {
|
||||
"type": "string",
|
||||
"description": "the pipeline's key, <branch>.<source>, or <branch>.<source>.published.<package>.<version> for a pipeline a publish started; a branch escaped as a key's name is (design 47 H §746, §747)"
|
||||
}
|
||||
},
|
||||
"description": "a pipeline waiting its turn under pipelines-at-once (design 47 H §748, H-A-72)",
|
||||
"required": [
|
||||
"pipeline"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+137
-111
@@ -16,6 +16,7 @@ export declare const verbs: {
|
||||
readonly rerun: "rerun";
|
||||
readonly accept: "accept";
|
||||
readonly cancel: "cancel";
|
||||
readonly place: "place";
|
||||
readonly askAgain: "ask-again";
|
||||
readonly testRuns: "test-runs";
|
||||
readonly testRunsDrop: "test-runs-drop";
|
||||
@@ -24,7 +25,6 @@ export declare const verbs: {
|
||||
export declare const events: {
|
||||
readonly pipelineStarted: "pipeline-started";
|
||||
readonly pipelineEnded: "pipeline-ended";
|
||||
readonly groupEnded: "group-ended";
|
||||
readonly runStarted: "run-started";
|
||||
readonly stepStarted: "step-started";
|
||||
readonly stepEnded: "step-ended";
|
||||
@@ -39,51 +39,45 @@ export declare const family: { readonly name: "mesh-pipeline-runner.events"; rea
|
||||
|
||||
export declare const pipelineStartedStream: "SEAT_mesh-pipeline-runner_pipeline-started";
|
||||
|
||||
export declare function pipelineStartedSubject(module: string, branch: string, commitOrGroup: string): string;
|
||||
export declare function pipelineStartedSubject(branch: string, source: string): string;
|
||||
|
||||
export declare const pipelineStartedSubjectAll: "mesh.seat.mesh-pipeline-runner.event.pipeline-started.*.*.*";
|
||||
export declare const pipelineStartedSubjectAll: "mesh.seat.mesh-pipeline-runner.event.pipeline-started.*.*";
|
||||
|
||||
export declare const pipelineEndedStream: "SEAT_mesh-pipeline-runner_pipeline-ended";
|
||||
|
||||
export declare function pipelineEndedSubject(module: string, branch: string, commitOrGroup: string): string;
|
||||
export declare function pipelineEndedSubject(branch: string, source: string): string;
|
||||
|
||||
export declare const pipelineEndedSubjectAll: "mesh.seat.mesh-pipeline-runner.event.pipeline-ended.*.*.*";
|
||||
|
||||
export declare const groupEndedStream: "SEAT_mesh-pipeline-runner_group-ended";
|
||||
|
||||
export declare function groupEndedSubject(branch: string, group: string): string;
|
||||
|
||||
export declare const groupEndedSubjectAll: "mesh.seat.mesh-pipeline-runner.event.group-ended.*.*";
|
||||
export declare const pipelineEndedSubjectAll: "mesh.seat.mesh-pipeline-runner.event.pipeline-ended.*.*";
|
||||
|
||||
export declare const runStartedStream: "SEAT_mesh-pipeline-runner_run-started";
|
||||
|
||||
export declare function runStartedSubject(module: string, branch: string, commitOrGroup: string): string;
|
||||
export declare function runStartedSubject(module: string, branch: string, commit: string): string;
|
||||
|
||||
export declare const runStartedSubjectAll: "mesh.seat.mesh-pipeline-runner.event.run-started.*.*.*";
|
||||
|
||||
export declare const stepStartedStream: "SEAT_mesh-pipeline-runner_step-started";
|
||||
|
||||
export declare function stepStartedSubject(module: string, branch: string, commitOrGroup: string): string;
|
||||
export declare function stepStartedSubject(module: string, branch: string, commit: string): string;
|
||||
|
||||
export declare const stepStartedSubjectAll: "mesh.seat.mesh-pipeline-runner.event.step-started.*.*.*";
|
||||
|
||||
export declare const stepEndedStream: "SEAT_mesh-pipeline-runner_step-ended";
|
||||
|
||||
export declare function stepEndedSubject(module: string, branch: string, commitOrGroup: string): string;
|
||||
export declare function stepEndedSubject(module: string, branch: string, commit: string): string;
|
||||
|
||||
export declare const stepEndedSubjectAll: "mesh.seat.mesh-pipeline-runner.event.step-ended.*.*.*";
|
||||
|
||||
export declare const waitHeldStream: "SEAT_mesh-pipeline-runner_wait-held";
|
||||
|
||||
export declare function waitHeldSubject(module: string, branch: string, commitOrGroup: string): string;
|
||||
export declare function waitHeldSubject(branch: string, source: string): string;
|
||||
|
||||
export declare const waitHeldSubjectAll: "mesh.seat.mesh-pipeline-runner.event.wait-held.*.*.*";
|
||||
export declare const waitHeldSubjectAll: "mesh.seat.mesh-pipeline-runner.event.wait-held.*.*";
|
||||
|
||||
export declare const waitEndedStream: "SEAT_mesh-pipeline-runner_wait-ended";
|
||||
|
||||
export declare function waitEndedSubject(module: string, branch: string, commitOrGroup: string): string;
|
||||
export declare function waitEndedSubject(branch: string, source: string): string;
|
||||
|
||||
export declare const waitEndedSubjectAll: "mesh.seat.mesh-pipeline-runner.event.wait-ended.*.*.*";
|
||||
export declare const waitEndedSubjectAll: "mesh.seat.mesh-pipeline-runner.event.wait-ended.*.*";
|
||||
|
||||
export declare const fillingSubject: "mesh.seat.mesh-pipeline-runner.event.filling";
|
||||
|
||||
@@ -93,16 +87,35 @@ export declare const roomSubject: "mesh.seat.mesh-pipeline-runner.event.room";
|
||||
|
||||
export declare const states: {
|
||||
readonly pipelines: "pipelines";
|
||||
readonly queue: "queue";
|
||||
readonly kept: "kept";
|
||||
readonly stepLog: "step-log";
|
||||
readonly stepOutputs: "step-outputs";
|
||||
};
|
||||
|
||||
/** The key of one value of the state pipelines under the form "<branch>.<revision>.<module>". */
|
||||
export declare function pipelinesByBranchRevisionModuleKey(branch: string, revision: string, module: string): string;
|
||||
/** The key of one value of the state pipelines under the form "<branch>.<source>". */
|
||||
export declare function pipelinesByBranchSourceKey(branch: string, source: string): string;
|
||||
|
||||
/** The parts of a key of the form "<branch>.<revision>.<module>", or undefined for a key of another form. */
|
||||
export declare function parsePipelinesByBranchRevisionModuleKey(_key: string): { branch: string; revision: string; module: string } | undefined;
|
||||
/** The parts of a key of the form "<branch>.<source>", or undefined for a key of another form. */
|
||||
export declare function parsePipelinesByBranchSourceKey(_key: string): { branch: string; source: string } | undefined;
|
||||
|
||||
/** The key of one value of the state pipelines under the form "<branch>.<source>.published.<package>.<version>". */
|
||||
export declare function pipelinesByBranchSourcePublishedPackageVersionKey(branch: string, source: string, packagePart: string, version: string): string;
|
||||
|
||||
/** The parts of a key of the form "<branch>.<source>.published.<package>.<version>", or undefined for a key of another form. */
|
||||
export declare function parsePipelinesByBranchSourcePublishedPackageVersionKey(_key: string): { branch: string; source: string; packagePart: string; version: string } | undefined;
|
||||
|
||||
/** The key of one value of the state queue under the form "queue.next". */
|
||||
export declare function queueByQueueNextKey(): string;
|
||||
|
||||
/** The parts of a key of the form "queue.next", or undefined for a key of another form. */
|
||||
export declare function parseQueueByQueueNextKey(_key: string): { } | undefined;
|
||||
|
||||
/** The key of one value of the state queue under the form "waiting.<sequence>". */
|
||||
export declare function queueByWaitingSequenceKey(sequence: string): string;
|
||||
|
||||
/** The parts of a key of the form "waiting.<sequence>", or undefined for a key of another form. */
|
||||
export declare function parseQueueByWaitingSequenceKey(_key: string): { sequence: string } | undefined;
|
||||
|
||||
/** The key of one value of the state kept under the form "<level>.<digest>". */
|
||||
export declare function keptByLevelDigestKey(level: string, digest: string): string;
|
||||
@@ -140,21 +153,6 @@ export interface Fill {
|
||||
"store": string;
|
||||
}
|
||||
|
||||
/** a group's one pipeline's end on a watched branch, said once every member's modules have ended; a group's wants are written on it alone (ADR 0666 section 9) */
|
||||
export interface GroupEnded {
|
||||
"branch": string;
|
||||
"ended"?: string;
|
||||
"group": string;
|
||||
"outcome": "running" | "passed" | "failed" | "refused" | "superseded" | "cancelled";
|
||||
/** every member module's pipeline, each ended */
|
||||
"pipelines": PipelineEnded[];
|
||||
"revision"?: number;
|
||||
/** the group's one source revision of the watched branch */
|
||||
"source"?: number;
|
||||
"v": number;
|
||||
"why"?: string;
|
||||
}
|
||||
|
||||
/** a package's passing result the runner keeps, by the digest of what its tests read (ADR 0666 section 8) */
|
||||
export interface KeptResult {
|
||||
/** sha256:<hex> of what the package's tests read */
|
||||
@@ -191,101 +189,107 @@ export interface Member {
|
||||
"module": string;
|
||||
}
|
||||
|
||||
/** one pipeline as the runner keeps it in its state pipelines, by compare-and-set (design 47 *The runner's kept data*) */
|
||||
/** one module a pipeline moves: an entry of its take-in.taken, with what the pipeline found of it (design 47 H §746, H-A-35, H-A-72) */
|
||||
export interface Mover {
|
||||
/** the commit the module's entry was last changed at */
|
||||
"commit": string;
|
||||
/** the module's build-input fingerprint at the commit */
|
||||
"fingerprint": string;
|
||||
"module": string;
|
||||
/** yes when the module is over its test budget (design 47 G section 419) */
|
||||
"over-budget"?: boolean;
|
||||
"repository": string;
|
||||
"tests"?: TestCounts;
|
||||
/** the mover's tier in the pipeline's delivery order, from 1 (ADR 0666 section 14; design 47 H §746) */
|
||||
"tier": number;
|
||||
/** the version released for the mover in this pipeline (version-released), absent until one is (design 47 H-A-52) */
|
||||
"version"?: string;
|
||||
"widens"?: Widening[];
|
||||
}
|
||||
|
||||
/** one mover at its pipeline's end (design 47 H §746) */
|
||||
export interface MoverEnded {
|
||||
/** the module's build-input fingerprint the pipeline ran at */
|
||||
"fingerprint": string;
|
||||
"module": string;
|
||||
/** the mover's step results, each naming its module (design 47 H-A-72) */
|
||||
"steps": StepResult[];
|
||||
/** the mover's tier in the delivery order, from 1 (ADR 0666 section 14) */
|
||||
"tier": number;
|
||||
/** the version released for the mover, absent when none was released */
|
||||
"version"?: string;
|
||||
}
|
||||
|
||||
/** one pipeline of one take-in, its movers the take-in's entries, as the runner keeps it in its state pipelines by compare-and-set (design 47 H §746) */
|
||||
export interface Pipeline {
|
||||
/** the watched branch, or the branch of a run on request */
|
||||
"branch": string;
|
||||
/** the commit the module's entry was last changed at */
|
||||
"commit": string;
|
||||
/** the merge call whose source revision the take-in took in (design 47 H §746) */
|
||||
"call"?: string;
|
||||
/** how often the pipeline has ended: 1 at its first end, one higher at each end again after a passing rerun, so the assigner takes a later end of the same source revision (design 47 G sections 29, 325) */
|
||||
"end-count"?: number;
|
||||
"ended"?: string;
|
||||
/** the module's build-input fingerprint at the commit */
|
||||
"fingerprint"?: string;
|
||||
/** the gathered group, when the pipeline is its */
|
||||
"group"?: string;
|
||||
"module": string;
|
||||
"outcome": "running" | "passed" | "failed" | "refused" | "superseded" | "cancelled";
|
||||
/** yes when the module is over its test budget (design 47 G section 419) */
|
||||
"over-budget"?: boolean;
|
||||
/** the pipeline's key, <branch>.<revision>.<module>, a branch escaped as a key's name is */
|
||||
"pipeline"?: string;
|
||||
/** the modules the pipeline moves, its take-in's entries (design 47 H §746) */
|
||||
"movers": Mover[];
|
||||
"outcome": "waiting" | "running" | "passed" | "failed" | "refused" | "superseded" | "cancelled";
|
||||
/** the pipeline's key, <branch>.<source>, or <branch>.<source>.published.<package>.<version> for a pipeline a publish started; a branch escaped as a key's name is (design 47 H §746, §747) */
|
||||
"pipeline": string;
|
||||
/** for a pipeline a package's publish started, that publish (A-202) */
|
||||
"published"?: Published;
|
||||
"repository"?: string;
|
||||
/** the catalog graph revision of the branch the pipeline runs for */
|
||||
"revision"?: number;
|
||||
/** the run on request's id, for a pipeline of a run; such a pipeline delivers nothing */
|
||||
"run"?: string;
|
||||
/** for a pipeline written over pipelines-at-once, its place in the queue: the runner's counter queue.next at its write (design 47 H §748) */
|
||||
"seq"?: number;
|
||||
/** the source revision of the watched branch; the pipeline is keyed by it (ADR 0666 section 9) */
|
||||
"source"?: number;
|
||||
"source": number;
|
||||
"started"?: string;
|
||||
/** every step, approval last */
|
||||
/** every mover's steps, each naming its mover, approval last */
|
||||
"steps": StepResult[];
|
||||
"tests"?: TestCounts;
|
||||
/** the step-log entries of the steps that ended and are not appended to the step log yet, in order; written with the step's end in one write and cleared when appended (design 47 G sections 486, 606) */
|
||||
"unlogged"?: LogEntry[];
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
/** the version package-published names, for a pipeline the runner started from a publication or from outdated; none for any other (design 47 G 550) */
|
||||
"version"?: string;
|
||||
/** for a pipeline that did not pass, the steps that held it */
|
||||
"why"?: string;
|
||||
"widens"?: Widening[];
|
||||
}
|
||||
|
||||
/** a pipeline's end with every step's result, its test counts, the source revision and widens (design 47 *Health and going back*); the assigner writes a want only from one whose every required step passed */
|
||||
/** a pipeline's end, said once, with per mover its released version, step results and tier (design 47 H §746); the assigner writes wants only from a passed one */
|
||||
export interface PipelineEnded {
|
||||
/** the watched branch, or the branch of a run on request */
|
||||
"branch": string;
|
||||
/** the commit the module's entry was last changed at */
|
||||
"commit": string;
|
||||
/** the merge call whose source revision the take-in took in (design 47 H §746) */
|
||||
"call"?: string;
|
||||
/** how often the pipeline has ended: 1 at its first end, one higher at each end again after a passing rerun, so the assigner takes a later end of the same source revision (design 47 G sections 29, 325) */
|
||||
"end-count"?: number;
|
||||
"ended"?: string;
|
||||
/** the module's build-input fingerprint at the commit */
|
||||
"fingerprint"?: string;
|
||||
/** the gathered group, when the pipeline is its */
|
||||
"group"?: string;
|
||||
"module": string;
|
||||
"outcome": "running" | "passed" | "failed" | "refused" | "superseded" | "cancelled";
|
||||
/** yes when the module is over its test budget (500 unit or 50 integration tests; design 47 G section 419) */
|
||||
"over-budget"?: boolean;
|
||||
/** the pipeline's key, <branch>.<revision>.<module>, a branch escaped as a key's name is */
|
||||
/** per mover its fingerprint, released version, step results and tier, in the delivery order (design 47 H §746, H-A-2) */
|
||||
"movers": MoverEnded[];
|
||||
"outcome": "waiting" | "running" | "passed" | "failed" | "refused" | "superseded" | "cancelled";
|
||||
/** the pipeline's key, <branch>.<source>, or <branch>.<source>.published.<package>.<version> for a pipeline a publish started; a branch escaped as a key's name is (design 47 H §746, §747) */
|
||||
"pipeline": string;
|
||||
/** the catalog graph revision of the branch the pipeline runs for */
|
||||
"revision"?: number;
|
||||
/** the run on request's id, for a pipeline of a run; such a pipeline delivers nothing */
|
||||
"run"?: string;
|
||||
/** the source revision of the watched branch; the pipeline is keyed by it (ADR 0666 section 9) */
|
||||
"source"?: number;
|
||||
"source": number;
|
||||
"started"?: string;
|
||||
"steps": StepResult[];
|
||||
"tests"?: TestCounts;
|
||||
"v": number;
|
||||
"why"?: string;
|
||||
"widens"?: Widening[];
|
||||
}
|
||||
|
||||
export interface PipelineStartedStepsItem {
|
||||
"artifact"?: string;
|
||||
"status": "required" | "optional" | "bypass";
|
||||
"step": "build" | "lint" | "unit" | "integration" | "composition" | "review" | "approval";
|
||||
}
|
||||
|
||||
/** a pipeline's start */
|
||||
/** a pipeline's start, said at its write, a waiting one's too (design 47 H §746, H-A-52) */
|
||||
export interface PipelineStarted {
|
||||
"at"?: string;
|
||||
/** the watched branch, or the branch of a run on request */
|
||||
"branch": string;
|
||||
/** the commit the module's entry was last changed at */
|
||||
"commit": string;
|
||||
/** the module's build-input fingerprint at the commit */
|
||||
"fingerprint"?: string;
|
||||
/** the gathered group, when the pipeline is its */
|
||||
"group"?: string;
|
||||
"module": string;
|
||||
/** the pipeline's key, <branch>.<revision>.<module>, a branch escaped as a key's name is */
|
||||
/** the merge call whose source revision the take-in took in (design 47 H §746) */
|
||||
"call"?: string;
|
||||
/** the pipeline's movers */
|
||||
"movers": Mover[];
|
||||
/** the pipeline's key, <branch>.<source>, or <branch>.<source>.published.<package>.<version> for a pipeline a publish started; a branch escaped as a key's name is (design 47 H §746, §747) */
|
||||
"pipeline": string;
|
||||
/** for a pipeline a package's publish started, that publish (A-202) */
|
||||
"published"?: Published;
|
||||
@@ -294,9 +298,7 @@ export interface PipelineStarted {
|
||||
/** the run on request's id, for a pipeline of a run; such a pipeline delivers nothing */
|
||||
"run"?: string;
|
||||
/** the source revision of the watched branch; the pipeline is keyed by it (ADR 0666 section 9) */
|
||||
"source"?: number;
|
||||
/** the steps the policy gives it */
|
||||
"steps"?: PipelineStartedStepsItem[];
|
||||
"source": number;
|
||||
"v": number;
|
||||
}
|
||||
|
||||
@@ -347,10 +349,8 @@ export interface StepEvent {
|
||||
"commit": string;
|
||||
/** the module's build-input fingerprint at the commit */
|
||||
"fingerprint"?: string;
|
||||
/** the gathered group, when the pipeline is its */
|
||||
"group"?: string;
|
||||
"module": string;
|
||||
/** the pipeline's key, <branch>.<revision>.<module>, a branch escaped as a key's name is */
|
||||
/** the pipeline's key, <branch>.<source>, or <branch>.<source>.published.<package>.<version> for a pipeline a publish started; a branch escaped as a key's name is (design 47 H §746, §747) */
|
||||
"pipeline": string;
|
||||
"result": StepResult;
|
||||
/** the catalog graph revision of the branch the pipeline runs for */
|
||||
@@ -376,6 +376,8 @@ export interface StepResult {
|
||||
"ended"?: string;
|
||||
/** the artifact's build-input fingerprint the step ran at */
|
||||
"fingerprint"?: string;
|
||||
/** the mover the step is of (design 47 H-A-35) */
|
||||
"module"?: string;
|
||||
/** the node whose holder ended it */
|
||||
"node"?: string;
|
||||
/** for a waiting step, who or what it waits on: a person, a build node, the revision view */
|
||||
@@ -393,7 +395,7 @@ export interface StepResult {
|
||||
"started"?: string;
|
||||
/** the step's status in the module's policy */
|
||||
"status": "required" | "optional" | "bypass";
|
||||
"step": "build" | "lint" | "unit" | "integration" | "composition" | "review" | "approval";
|
||||
"step": "validate" | "build" | "lint" | "unit" | "integration" | "composition" | "review" | "approval";
|
||||
"tests"?: TestCounts;
|
||||
/** what the outcome rests on: the part not heard, the seat with no holder, what a waiting step waits on */
|
||||
"why"?: string;
|
||||
@@ -455,7 +457,7 @@ export interface ToolchainUsed {
|
||||
"version": string;
|
||||
}
|
||||
|
||||
/** a step's wait, held and ended; a wait on a person is said as waiting on that person, never a stall (ADR 0283) */
|
||||
/** a step's wait, held and ended; a wait on a person is said as waiting on that person, never a stall (ADR 0283); said on <branch>.<source> (design 47 H-A-72) */
|
||||
export interface Wait {
|
||||
"artifact"?: string;
|
||||
/** the step's own ask, where it has one (design 47 G §731) */
|
||||
@@ -466,14 +468,13 @@ export interface Wait {
|
||||
"commit"?: string;
|
||||
/** the module's build-input fingerprint at the commit */
|
||||
"fingerprint"?: string;
|
||||
/** the gathered group, when the pipeline is its */
|
||||
"group"?: string;
|
||||
/** for its end, how it ended: answered, ran, superseded */
|
||||
"how"?: string;
|
||||
"module": string;
|
||||
/** for a step's wait, the mover whose step waits (design 47 H-A-72) */
|
||||
"module"?: string;
|
||||
/** what the step waits on (design 47 *Health and going back*) */
|
||||
"on": "person" | "build node" | "revision view";
|
||||
/** the pipeline's key, <branch>.<revision>.<module>, a branch escaped as a key's name is */
|
||||
"on": "person" | "build node" | "revision view" | "pipelines-at-once";
|
||||
/** the pipeline's key, <branch>.<source>, or <branch>.<source>.published.<package>.<version> for a pipeline a publish started; a branch escaped as a key's name is (design 47 H §746, §747) */
|
||||
"pipeline": string;
|
||||
/** the catalog graph revision of the branch the pipeline runs for */
|
||||
"revision"?: number;
|
||||
@@ -484,13 +485,19 @@ export interface Wait {
|
||||
"since": string;
|
||||
/** the source revision of the watched branch; the pipeline is keyed by it (ADR 0666 section 9) */
|
||||
"source"?: number;
|
||||
/** a pipeline step a wait inside a pipeline is in */
|
||||
"step": "build" | "lint" | "unit" | "integration" | "composition" | "review" | "approval";
|
||||
/** the pipeline step a wait is in, or pipeline for a pipeline waiting its turn (design 47 H §748) */
|
||||
"step": "validate" | "build" | "lint" | "unit" | "integration" | "composition" | "review" | "approval" | "pipeline";
|
||||
"v": number;
|
||||
/** for a wait on a person, who: the operator, a reviewer */
|
||||
"who"?: string;
|
||||
}
|
||||
|
||||
/** a pipeline waiting its turn under pipelines-at-once (design 47 H §748, H-A-72) */
|
||||
export interface Waiting {
|
||||
/** the pipeline's key, <branch>.<source>, or <branch>.<source>.published.<package>.<version> for a pipeline a publish started; a branch escaped as a key's name is (design 47 H §746, §747) */
|
||||
"pipeline": string;
|
||||
}
|
||||
|
||||
/** a part serving a step the change alters, or an acting rule, a grant or a credential it widens, computed by the running runner (ADR 0666 section 23) */
|
||||
export interface Widening {
|
||||
/** the part, rule, grant or credential */
|
||||
@@ -570,7 +577,7 @@ export interface WhyCarriedInput {
|
||||
"artifact"?: string;
|
||||
/** the pipeline's key */
|
||||
"pipeline": string;
|
||||
"step": "build" | "lint" | "unit" | "integration" | "composition" | "review" | "approval";
|
||||
"step": "validate" | "build" | "lint" | "unit" | "integration" | "composition" | "review" | "approval";
|
||||
}
|
||||
|
||||
/** is what why-carried answers. */
|
||||
@@ -613,7 +620,7 @@ export interface RerunInput {
|
||||
"artifact"?: string;
|
||||
/** the pipeline's key */
|
||||
"pipeline": string;
|
||||
"step": "build" | "lint" | "unit" | "integration" | "composition" | "review" | "approval";
|
||||
"step": "validate" | "build" | "lint" | "unit" | "integration" | "composition" | "review" | "approval";
|
||||
/** why, written with the caller the runtime proves in the hand-act log */
|
||||
"why": string;
|
||||
}
|
||||
@@ -629,7 +636,7 @@ export interface AcceptInput {
|
||||
"artifact"?: string;
|
||||
/** the pipeline's key */
|
||||
"pipeline": string;
|
||||
"step": "build" | "lint" | "unit" | "integration" | "composition" | "review" | "approval";
|
||||
"step": "validate" | "build" | "lint" | "unit" | "integration" | "composition" | "review" | "approval";
|
||||
/** why, written with the caller the runtime proves in the hand-act log */
|
||||
"why": string;
|
||||
}
|
||||
@@ -652,6 +659,19 @@ export interface CancelAnswer {
|
||||
"pipeline": Pipeline;
|
||||
}
|
||||
|
||||
/** is what place takes. */
|
||||
export interface PlaceInput {
|
||||
/** the pipeline's key */
|
||||
"pipeline": string;
|
||||
/** why, written with the caller the runtime proves in the hand-act log */
|
||||
"why": string;
|
||||
}
|
||||
|
||||
/** is what place answers. */
|
||||
export interface PlaceAnswer {
|
||||
"pipeline": Pipeline;
|
||||
}
|
||||
|
||||
/** is what ask-again takes. */
|
||||
export interface AskAgainInput {
|
||||
/** the pipeline's key */
|
||||
@@ -702,9 +722,6 @@ export type PipelineStartedEvent = PipelineStarted;
|
||||
/** is the body of the event pipeline-ended. */
|
||||
export type PipelineEndedEvent = PipelineEnded;
|
||||
|
||||
/** is the body of the event group-ended. */
|
||||
export type GroupEndedEvent = GroupEnded;
|
||||
|
||||
/** is the body of the event run-started. */
|
||||
export type RunStartedEvent = RunStarted;
|
||||
|
||||
@@ -729,8 +746,17 @@ export type FullEvent = Fill;
|
||||
/** is the body of the event room. */
|
||||
export type RoomEvent = Fill;
|
||||
|
||||
/** is one value of the state pipelines under the key <branch>.<revision>.<module>. */
|
||||
export type PipelinesByBranchRevisionModuleValue = Pipeline;
|
||||
/** is one value of the state pipelines under the key <branch>.<source>. */
|
||||
export type PipelinesByBranchSourceValue = Pipeline;
|
||||
|
||||
/** is one value of the state pipelines under the key <branch>.<source>.published.<package>.<version>. */
|
||||
export type PipelinesByBranchSourcePublishedPackageVersionValue = Pipeline;
|
||||
|
||||
/** is one value of the state queue under the key queue.next. */
|
||||
export type QueueByQueueNextValue = number;
|
||||
|
||||
/** is one value of the state queue under the key waiting.<sequence>. */
|
||||
export type QueueByWaitingSequenceValue = Waiting;
|
||||
|
||||
/** is one value of the state kept under the key <level>.<digest>. */
|
||||
export type KeptByLevelDigestValue = KeptResult;
|
||||
|
||||
@@ -16,6 +16,7 @@ export const verbs = {
|
||||
rerun: "rerun",
|
||||
accept: "accept",
|
||||
cancel: "cancel",
|
||||
place: "place",
|
||||
askAgain: "ask-again",
|
||||
testRuns: "test-runs",
|
||||
testRunsDrop: "test-runs-drop",
|
||||
@@ -24,7 +25,6 @@ export const verbs = {
|
||||
export const events = {
|
||||
pipelineStarted: "pipeline-started",
|
||||
pipelineEnded: "pipeline-ended",
|
||||
groupEnded: "group-ended",
|
||||
runStarted: "run-started",
|
||||
stepStarted: "step-started",
|
||||
stepEnded: "step-ended",
|
||||
@@ -39,67 +39,59 @@ export const family = { name: "mesh-pipeline-runner.events", maxAgeDays: 7 };
|
||||
|
||||
export const pipelineStartedStream = "SEAT_mesh-pipeline-runner_pipeline-started";
|
||||
|
||||
export function pipelineStartedSubject(module, branch, commitOrGroup) {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.pipeline-started." + module + "." + branch + "." + commitOrGroup;
|
||||
export function pipelineStartedSubject(branch, source) {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.pipeline-started." + branch + "." + source;
|
||||
}
|
||||
|
||||
export const pipelineStartedSubjectAll = "mesh.seat.mesh-pipeline-runner.event.pipeline-started.*.*.*";
|
||||
export const pipelineStartedSubjectAll = "mesh.seat.mesh-pipeline-runner.event.pipeline-started.*.*";
|
||||
|
||||
export const pipelineEndedStream = "SEAT_mesh-pipeline-runner_pipeline-ended";
|
||||
|
||||
export function pipelineEndedSubject(module, branch, commitOrGroup) {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.pipeline-ended." + module + "." + branch + "." + commitOrGroup;
|
||||
export function pipelineEndedSubject(branch, source) {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.pipeline-ended." + branch + "." + source;
|
||||
}
|
||||
|
||||
export const pipelineEndedSubjectAll = "mesh.seat.mesh-pipeline-runner.event.pipeline-ended.*.*.*";
|
||||
|
||||
export const groupEndedStream = "SEAT_mesh-pipeline-runner_group-ended";
|
||||
|
||||
export function groupEndedSubject(branch, group) {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.group-ended." + branch + "." + group;
|
||||
}
|
||||
|
||||
export const groupEndedSubjectAll = "mesh.seat.mesh-pipeline-runner.event.group-ended.*.*";
|
||||
export const pipelineEndedSubjectAll = "mesh.seat.mesh-pipeline-runner.event.pipeline-ended.*.*";
|
||||
|
||||
export const runStartedStream = "SEAT_mesh-pipeline-runner_run-started";
|
||||
|
||||
export function runStartedSubject(module, branch, commitOrGroup) {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.run-started." + module + "." + branch + "." + commitOrGroup;
|
||||
export function runStartedSubject(module, branch, commit) {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.run-started." + module + "." + branch + "." + commit;
|
||||
}
|
||||
|
||||
export const runStartedSubjectAll = "mesh.seat.mesh-pipeline-runner.event.run-started.*.*.*";
|
||||
|
||||
export const stepStartedStream = "SEAT_mesh-pipeline-runner_step-started";
|
||||
|
||||
export function stepStartedSubject(module, branch, commitOrGroup) {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.step-started." + module + "." + branch + "." + commitOrGroup;
|
||||
export function stepStartedSubject(module, branch, commit) {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.step-started." + module + "." + branch + "." + commit;
|
||||
}
|
||||
|
||||
export const stepStartedSubjectAll = "mesh.seat.mesh-pipeline-runner.event.step-started.*.*.*";
|
||||
|
||||
export const stepEndedStream = "SEAT_mesh-pipeline-runner_step-ended";
|
||||
|
||||
export function stepEndedSubject(module, branch, commitOrGroup) {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.step-ended." + module + "." + branch + "." + commitOrGroup;
|
||||
export function stepEndedSubject(module, branch, commit) {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.step-ended." + module + "." + branch + "." + commit;
|
||||
}
|
||||
|
||||
export const stepEndedSubjectAll = "mesh.seat.mesh-pipeline-runner.event.step-ended.*.*.*";
|
||||
|
||||
export const waitHeldStream = "SEAT_mesh-pipeline-runner_wait-held";
|
||||
|
||||
export function waitHeldSubject(module, branch, commitOrGroup) {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.wait-held." + module + "." + branch + "." + commitOrGroup;
|
||||
export function waitHeldSubject(branch, source) {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.wait-held." + branch + "." + source;
|
||||
}
|
||||
|
||||
export const waitHeldSubjectAll = "mesh.seat.mesh-pipeline-runner.event.wait-held.*.*.*";
|
||||
export const waitHeldSubjectAll = "mesh.seat.mesh-pipeline-runner.event.wait-held.*.*";
|
||||
|
||||
export const waitEndedStream = "SEAT_mesh-pipeline-runner_wait-ended";
|
||||
|
||||
export function waitEndedSubject(module, branch, commitOrGroup) {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.wait-ended." + module + "." + branch + "." + commitOrGroup;
|
||||
export function waitEndedSubject(branch, source) {
|
||||
return "mesh.seat.mesh-pipeline-runner.event.wait-ended." + branch + "." + source;
|
||||
}
|
||||
|
||||
export const waitEndedSubjectAll = "mesh.seat.mesh-pipeline-runner.event.wait-ended.*.*.*";
|
||||
export const waitEndedSubjectAll = "mesh.seat.mesh-pipeline-runner.event.wait-ended.*.*";
|
||||
|
||||
export const fillingSubject = "mesh.seat.mesh-pipeline-runner.event.filling";
|
||||
|
||||
@@ -109,32 +101,87 @@ export const roomSubject = "mesh.seat.mesh-pipeline-runner.event.room";
|
||||
|
||||
export const states = {
|
||||
pipelines: "pipelines",
|
||||
queue: "queue",
|
||||
kept: "kept",
|
||||
stepLog: "step-log",
|
||||
stepOutputs: "step-outputs",
|
||||
};
|
||||
|
||||
/** The key of one value of the state pipelines under the form "<branch>.<revision>.<module>". */
|
||||
export function pipelinesByBranchRevisionModuleKey(branch, revision, module) {
|
||||
return branch + "." + revision + "." + module;
|
||||
/** The key of one value of the state pipelines under the form "<branch>.<source>". */
|
||||
export function pipelinesByBranchSourceKey(branch, source) {
|
||||
return branch + "." + source;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<branch>.<revision>.<module>", or undefined for a key of another form. */
|
||||
export function parsePipelinesByBranchRevisionModuleKey(_key) {
|
||||
/** The parts of a key of the form "<branch>.<source>", or undefined for a key of another form. */
|
||||
export function parsePipelinesByBranchSourceKey(_key) {
|
||||
let _rest = _key;
|
||||
const _at0 = _rest.indexOf(".");
|
||||
if (_at0 <= 0) return undefined;
|
||||
const branch = _rest.slice(0, _at0);
|
||||
_rest = _rest.slice(_at0 + 1);
|
||||
const _at2 = _rest.indexOf(".");
|
||||
if (_at2 <= 0) return undefined;
|
||||
const revision = _rest.slice(0, _at2);
|
||||
_rest = _rest.slice(_at2 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const module = _rest;
|
||||
const source = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { branch, revision, module };
|
||||
return { branch, source };
|
||||
}
|
||||
|
||||
/** The key of one value of the state pipelines under the form "<branch>.<source>.published.<package>.<version>". */
|
||||
export function pipelinesByBranchSourcePublishedPackageVersionKey(branch, source, packagePart, version) {
|
||||
return branch + "." + source + ".published." + packagePart + "." + version;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "<branch>.<source>.published.<package>.<version>", or undefined for a key of another form. */
|
||||
export function parsePipelinesByBranchSourcePublishedPackageVersionKey(_key) {
|
||||
let _rest = _key;
|
||||
const _at0 = _rest.indexOf(".");
|
||||
if (_at0 <= 0) return undefined;
|
||||
const branch = _rest.slice(0, _at0);
|
||||
_rest = _rest.slice(_at0 + 1);
|
||||
const _at2 = _rest.indexOf(".published.");
|
||||
if (_at2 <= 0) return undefined;
|
||||
const source = _rest.slice(0, _at2);
|
||||
_rest = _rest.slice(_at2 + 11);
|
||||
const _at4 = _rest.indexOf(".");
|
||||
if (_at4 <= 0) return undefined;
|
||||
const packagePart = _rest.slice(0, _at4);
|
||||
_rest = _rest.slice(_at4 + 1);
|
||||
if (_rest === "") return undefined;
|
||||
const version = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { branch, source, packagePart, version };
|
||||
}
|
||||
|
||||
/** The key of one value of the state queue under the form "queue.next". */
|
||||
export function queueByQueueNextKey() {
|
||||
return "queue.next";
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "queue.next", or undefined for a key of another form. */
|
||||
export function parseQueueByQueueNextKey(_key) {
|
||||
let _rest = _key;
|
||||
if (!_rest.startsWith("queue.next")) return undefined;
|
||||
_rest = _rest.slice(10);
|
||||
if (_rest !== "") return undefined;
|
||||
return { };
|
||||
}
|
||||
|
||||
/** The key of one value of the state queue under the form "waiting.<sequence>". */
|
||||
export function queueByWaitingSequenceKey(sequence) {
|
||||
return "waiting." + sequence;
|
||||
}
|
||||
|
||||
/** The parts of a key of the form "waiting.<sequence>", or undefined for a key of another form. */
|
||||
export function parseQueueByWaitingSequenceKey(_key) {
|
||||
let _rest = _key;
|
||||
if (!_rest.startsWith("waiting.")) return undefined;
|
||||
_rest = _rest.slice(8);
|
||||
if (_rest === "") return undefined;
|
||||
const sequence = _rest;
|
||||
_rest = "";
|
||||
if (_rest !== "") return undefined;
|
||||
return { sequence };
|
||||
}
|
||||
|
||||
/** The key of one value of the state kept under the form "<level>.<digest>". */
|
||||
|
||||
Reference in New Issue
Block a user