R10: a step's output is read where its build seat's holder keeps it

runner_step_output (pipeline, mover, step) reads the step from the state
pipelines and asks the verb output of the build seat's holder on the node
its step key names, by the step's ask, once per artifact the step ran for;
a step that reads a shared run is answered by that run's ask. The runner
keeps no output of its own: the objects step-outputs go, with the step's
and the log entry's output and show's outputs; the runner seat's form
rises to 4. The manifest invokes the three build seats' output.

Builds: design 47 H2 §791; H-A-412 (1)
This commit is contained in:
2026-11-22 01:34:54 +01:00
parent 84989dafb2
commit 38ad9ed84d
31 changed files with 287 additions and 290 deletions
@@ -14,13 +14,13 @@ const Seat = "mesh-pipeline-runner"
// Form is the form of the seat's values, events and answers this contract was generated at (design 47 H2 §780):
// a reader of a value of another form says "form N, this reader knows M".
const Form = 3
const Form = 4
// The forms and the digest of the fields this contract was generated from: the generator's compare fails a definition
// whose fields changed while its forms did not (design 47 H2 §780).
const (
generatedForms = "3"
generatedFieldsDigest = "AcceptAnswer=224df0394653 Accepted=d2b011e5090f AskAgainAnswer=224df0394653 CancelAnswer=a0dcc32b3f57 EndAgainAnswer=a0dcc32b3f57 Fill=7a76c9ceb157 FillingEvent=5bd4df78ed84 FullEvent=5bd4df78ed84 KeptAnswer=dfe0d48bc169 KeptByLevelDigestValue=f06c90f7da7f KeptResult=af5f81f189b7 ListAnswer=75717fd670a7 LogEntry=b5c78894cc5b Member=8a103baec01f Mover=5db376275bcf MoverEnded=4b35095f6829 Pipeline=2663792125bf PipelineEnded=523f8fc0fe41 PipelineEndedEvent=cb44007f7173 PipelineEndedPhases=9d1c33ce4cc4 PipelineEndedPhasesBuild=a08d49692a09 PipelineEndedPhasesComposition=a08d49692a09 PipelineEndedPhasesIntegration=a08d49692a09 PipelineEndedPhasesLint=a08d49692a09 PipelineEndedPhasesUnit=a08d49692a09 PipelineEndedPhasesValidate=a08d49692a09 PipelineStarted=a3d000f095db PipelineStartedEvent=eaa401af4117 PipelinesByBranchRevisionUnfinishedModuleValue=693580eed498 PipelinesByBranchRevisionValue=693580eed498 PipelinesByBranchRunRunValue=693580eed498 PipelinesByBranchSourcePublishedPackageVersionValue=693580eed498 PipelinesByStepsPipelineMoverValue=94de99db7816 PlaceAnswer=a0dcc32b3f57 PlaceUnfinishedAnswer=ed94ced4513a Published=d9af3024dacc QueueByQueueNextValue=765a2918a728 QueueByRunningPipelineValue=ed94ced4513a QueueByWaitingSequenceValue=99605298ae13 RePinnedEvent=92fd04bfa6d3 RerunAnswer=9b7efd0df344 ReviewAnswer=f397b8965179 RoomEvent=5bd4df78ed84 RunAnswer=96bd45aa2e62 RunStarted=b280617410c3 RunStartedEvent=0767a9358fa3 Shared=c981cf6aa860 SharedAskedBy=c9b30cc4d0d0 ShowAnswer=5beff763f531 StandsAnswer=0afa3693bf3b StartAnswer=ed94ced4513a StepEndedEvent=799020642c19 StepEvent=64f18c40ed5d StepLogByPipelineValue=ffdde090a101 StepOutputsByPipelineStepArtifactValue=a2f06147f4b6 StepResult=94c2bea6ddcd StepStartedEvent=799020642c19 TestCounts=9c1332427159 TestRun=ca5a87f3b6b8 TestRunPackage=a7d30558470d TestRunReader=c9b30cc4d0d0 TestRunsAnswer=7ab81a45ca33 TestRunsDropAnswer=8ee70b35469d ToolchainUsed=43b6d42376fb Wait=21e4ee7a3ef1 WaitEndedEvent=2bf6d38041c0 WaitHeldEvent=2bf6d38041c0 Waiting=ed94ced4513a WhyCarriedAnswer=8e2fcea6479f Widening=e2790a307466"
generatedForms = "4"
generatedFieldsDigest = "AcceptAnswer=224df0394653 Accepted=d2b011e5090f AskAgainAnswer=224df0394653 CancelAnswer=a0dcc32b3f57 EndAgainAnswer=a0dcc32b3f57 Fill=7a76c9ceb157 FillingEvent=5bd4df78ed84 FullEvent=5bd4df78ed84 KeptAnswer=dfe0d48bc169 KeptByLevelDigestValue=f06c90f7da7f KeptResult=af5f81f189b7 ListAnswer=75717fd670a7 LogEntry=b059967b2ae4 Member=8a103baec01f Mover=5db376275bcf MoverEnded=4b35095f6829 Pipeline=2663792125bf PipelineEnded=523f8fc0fe41 PipelineEndedEvent=cb44007f7173 PipelineEndedPhases=9d1c33ce4cc4 PipelineEndedPhasesBuild=a08d49692a09 PipelineEndedPhasesComposition=a08d49692a09 PipelineEndedPhasesIntegration=a08d49692a09 PipelineEndedPhasesLint=a08d49692a09 PipelineEndedPhasesUnit=a08d49692a09 PipelineEndedPhasesValidate=a08d49692a09 PipelineStarted=a3d000f095db PipelineStartedEvent=eaa401af4117 PipelinesByBranchRevisionUnfinishedModuleValue=693580eed498 PipelinesByBranchRevisionValue=693580eed498 PipelinesByBranchRunRunValue=693580eed498 PipelinesByBranchSourcePublishedPackageVersionValue=693580eed498 PipelinesByStepsPipelineMoverValue=94de99db7816 PlaceAnswer=a0dcc32b3f57 PlaceUnfinishedAnswer=ed94ced4513a Published=d9af3024dacc QueueByQueueNextValue=765a2918a728 QueueByRunningPipelineValue=ed94ced4513a QueueByWaitingSequenceValue=99605298ae13 RePinnedEvent=92fd04bfa6d3 RerunAnswer=9b7efd0df344 ReviewAnswer=f397b8965179 RoomEvent=5bd4df78ed84 RunAnswer=96bd45aa2e62 RunStarted=b280617410c3 RunStartedEvent=0767a9358fa3 Shared=c981cf6aa860 SharedAskedBy=c9b30cc4d0d0 ShowAnswer=ab5b72044ab6 StandsAnswer=0afa3693bf3b StartAnswer=ed94ced4513a StepEndedEvent=799020642c19 StepEvent=64f18c40ed5d StepLogByPipelineValue=ffdde090a101 StepResult=e1947a0a8dca StepStartedEvent=799020642c19 TestCounts=9c1332427159 TestRun=ca5a87f3b6b8 TestRunPackage=a7d30558470d TestRunReader=c9b30cc4d0d0 TestRunsAnswer=7ab81a45ca33 TestRunsDropAnswer=8ee70b35469d ToolchainUsed=43b6d42376fb Wait=21e4ee7a3ef1 WaitEndedEvent=2bf6d38041c0 WaitHeldEvent=2bf6d38041c0 Waiting=ed94ced4513a WhyCarriedAnswer=8e2fcea6479f Widening=e2790a307466"
)
const (
@@ -163,11 +163,10 @@ const SubjectFull = "mesh.seat.mesh-pipeline-runner.event.full"
const SubjectRoom = "mesh.seat.mesh-pipeline-runner.event.room"
const (
StatePipelines = "pipelines"
StateQueue = "queue"
StateKept = "kept"
StateStepLog = "step-log"
StateStepOutputs = "step-outputs"
StatePipelines = "pipelines"
StateQueue = "queue"
StateKept = "kept"
StateStepLog = "step-log"
)
// PipelinesByBranchRevisionKey is the key of one value of the state pipelines under the form "<branch>.<revision>".
@@ -492,44 +491,6 @@ func DecodeStepLogByPipelineValue(raw []byte) (StepLogByPipelineValue, int, erro
return v, formRead(raw), nil
}
// StepOutputsByPipelineStepArtifactKey is the key of one value of the state step-outputs under the form "<pipeline>.<step>.<artifact>".
func StepOutputsByPipelineStepArtifactKey(pipeline, step, artifact string) string {
return pipeline + "." + step + "." + artifact
}
// ParseStepOutputsByPipelineStepArtifactKey reads the parts of a key of the form "<pipeline>.<step>.<artifact>", in the order of the form; the last result is false for a key of another form.
func ParseStepOutputsByPipelineStepArtifactKey(key 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, ".")
if !found2 || v2 == "" {
return "", "", "", false
}
rest = after2
if rest == "" {
return "", "", "", false
}
v4 := rest
rest = ""
if rest != "" {
return "", "", "", false
}
return v0, v2, v4, true
}
// DecodeStepOutputsByPipelineStepArtifactValue reads one value of the state step-outputs under the form "<pipeline>.<step>.<artifact>" as another part wrote it: a field StepOutputsByPipelineStepArtifactValue does not know is left unread, never refused; the form read is answered, 1 when absent (design 47 H2 §780).
func DecodeStepOutputsByPipelineStepArtifactValue(raw []byte) (StepOutputsByPipelineStepArtifactValue, int, error) {
var v StepOutputsByPipelineStepArtifactValue
if err := json.Unmarshal(raw, &v); err != nil {
return v, 0, err
}
return v, formRead(raw), nil
}
// Accepted is a failed optional step a person accepted, recorded in the hand-act log.
type Accepted struct {
At *time.Time `json:"at,omitempty"`
@@ -575,10 +536,8 @@ type LogEntry struct {
// the keys of the kept results the step wrote or carried, <level>.<digest>, which the runner ages by their last-read (design 47 G sections 330, 470)
Kept []string `json:"kept,omitempty"`
// the module of the mover whose step the entry is of (H-A-190)
Module string `json:"module,omitempty"`
Outcome string `json:"outcome,omitempty"`
// the output's name in step-outputs
Output string `json:"output,omitempty"`
Module string `json:"module,omitempty"`
Outcome string `json:"outcome,omitempty"`
Pipeline string `json:"pipeline"`
Step string `json:"step"`
What string `json:"what"`
@@ -951,8 +910,6 @@ type StepResult struct {
On string `json:"on,omitempty"`
// never passed for a step that ran nothing (design 47 *Pipeline steps and the policy*)
Outcome string `json:"outcome"`
// the step's output, by its name in the runner's objects step-outputs
Output string `json:"output,omitempty"`
// the step was asked again by the runner's rerun
Rerun bool `json:"rerun,omitempty"`
// the seat that serves the step, whose holder alone may end it (ADR 0666 section 21)
@@ -1220,9 +1177,7 @@ type ShowAnswer struct {
Form int64 `json:"form,omitempty"`
Log []LogEntry `json:"log,omitempty"`
// the cursor of the next page, opaque; empty at the end (design 47 H2 §779)
Next string `json:"next,omitempty"`
// the outputs' names in step-outputs
Outputs []string `json:"outputs,omitempty"`
Next string `json:"next,omitempty"`
Pipeline Pipeline `json:"pipeline"`
// how many steps the filters hold in all (design 47 H2 §789)
Total int64 `json:"total,omitempty"`
@@ -1590,9 +1545,6 @@ type KeptByLevelDigestValue = KeptResult
// StepLogByPipelineValue is one value of the state step-log under the key <pipeline>.
type StepLogByPipelineValue = LogEntry
// StepOutputsByPipelineStepArtifactValue is one value of the state step-outputs under the key <pipeline>.<step>.<artifact>.
type StepOutputsByPipelineStepArtifactValue = string
// DecodeRunAnswer reads a RunAnswer as another part wrote it: a field this reader does not know is left unread, never refused; the form read is answered, 1 when absent (design 47 H2 §780).
func DecodeRunAnswer(raw []byte) (RunAnswer, int, error) {
var v RunAnswer
@@ -101,7 +101,7 @@ func TestFixtures(t *testing.T) {
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.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.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}}",
{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\"}],\"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\"}],\"pipeline\":{\"branch\":\"main\",\"movers\":[{\"commit\":\"0123456789abcdef0123456789abcdef01234567\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"repository\":\"mesh-networking\",\"tier\":1}],\"outcome\":\"running\",\"pipeline\":\"main.3589\",\"revision\":12,\"source\":3589,\"steps\":[{\"artifact\":\"nats:program\",\"ask\":\"m2kx9a1b3c4d5e\",\"fingerprint\":\"fp-0123\",\"module\":\"nats\",\"node\":\"anchor\",\"outcome\":\"passed\",\"seat\":\"node-build-go\",\"status\":\"required\",\"step\":\"lint\"}],\"v\":1}}",
decode: func(b []byte) (any, error) { var v ShowAnswer; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
{name: "rerun names the mover's module", subject: "", given: "{\"module\":\"nats\",\"pipeline\":\"main.3589\",\"step\":\"unit\",\"why\":\"a flaky test, issue 1966\"}", wire: "{\"module\":\"nats\",\"pipeline\":\"main.3589\",\"step\":\"unit\",\"why\":\"a flaky test, issue 1966\"}",
decode: func(b []byte) (any, error) { var v RerunInput; err := json.Unmarshal(b, &v); return v, err }, subjectIs: nil},
@@ -88,9 +88,6 @@
"at": "2026-11-10T10:00:00Z"
}
],
"outputs": [
"main.12.nats.lint.nats:program"
],
"fill": [
{
"store": "pipelines",
@@ -86,7 +86,7 @@
},
{
"name": "show",
"description": "One pipeline whole: its record with every mover's steps, or one mover's steps alone when it names the mover, its step log and its outputs, with the stores' fill. Reads only.",
"description": "One pipeline whole: its record with every mover's steps (one mover's steps alone when it names the mover) and its step log, with the stores' fill. Reads only.",
"input": {
"type": "object",
"properties": {
@@ -137,13 +137,6 @@
"$ref": "#/defs/LogEntry"
}
},
"outputs": {
"type": "array",
"items": {
"type": "string"
},
"description": "the outputs' names in step-outputs"
},
"fill": {
"type": "array",
"items": {
@@ -985,7 +978,7 @@
"name": "step-log",
"template": "log",
"max-age-days": 100,
"description": "one entry per step's start and end, its output by name; kept on the runner's old streams section",
"description": "one entry per step's start and end; a step's output is read where the build seat's holder keeps it (design 47 H2 §791); kept on the runner's old streams section",
"key-forms": [
{
"key": "<pipeline>",
@@ -995,21 +988,6 @@
"description": "an entry of a pipeline's log"
}
]
},
{
"name": "step-outputs",
"template": "objects",
"description": "a lint or test step's output, named in the step log; kept in the runner's old objects section",
"key-forms": [
{
"key": "<pipeline>.<step>.<artifact>",
"value": {
"type": "string",
"description": "the output, UTF-8 text"
},
"description": "one step's output"
}
]
}
],
"defs": {
@@ -1222,10 +1200,6 @@
"accepted": {
"$ref": "#/defs/Accepted"
},
"output": {
"type": "string",
"description": "the step's output, by its name in the runner's objects step-outputs"
},
"started": {
"type": "string",
"format": "date-time"
@@ -1931,10 +1905,6 @@
"cancelled"
]
},
"output": {
"type": "string",
"description": "the output's name in step-outputs"
},
"at": {
"type": "string",
"format": "date-time"
@@ -2233,5 +2203,5 @@
]
}
},
"form": 3
"form": 4
}
@@ -95,7 +95,6 @@ export declare const states: {
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>". */
@@ -158,12 +157,6 @@ export declare function stepLogByPipelineKey(pipeline: string): string;
/** The parts of a key of the form "<pipeline>", or undefined for a key of another form. */
export declare function parseStepLogByPipelineKey(_key: string): { pipeline: string } | undefined;
/** The key of one value of the state step-outputs under the form "<pipeline>.<step>.<artifact>". */
export declare function stepOutputsByPipelineStepArtifactKey(pipeline: string, step: string, artifact: string): string;
/** The parts of a key of the form "<pipeline>.<step>.<artifact>", or undefined for a key of another form. */
export declare function parseStepOutputsByPipelineStepArtifactKey(_key: string): { pipeline: string; step: string; artifact: string } | undefined;
/** a failed optional step a person accepted, recorded in the hand-act log */
export interface Accepted {
"at"?: string;
@@ -211,8 +204,6 @@ export interface LogEntry {
/** the module of the mover whose step the entry is of (H-A-190) */
"module"?: string;
"outcome"?: "running" | "waiting" | "passed" | "failed" | "nothing to run" | "bypassed" | "carried" | "could not run" | "waiting for a build node" | "did not build" | "accepted" | "declined" | "superseded" | "cancelled";
/** the output's name in step-outputs */
"output"?: string;
"pipeline": string;
"step": "build" | "lint" | "unit" | "integration" | "composition" | "review" | "approval";
"what": "started" | "ended";
@@ -523,8 +514,6 @@ export interface StepResult {
"on"?: string;
/** never passed for a step that ran nothing (design 47 *Pipeline steps and the policy*) */
"outcome": "running" | "waiting" | "passed" | "failed" | "nothing to run" | "bypassed" | "carried" | "could not run" | "waiting for a build node" | "did not build" | "accepted" | "not asked" | "declined" | "superseded" | "cancelled";
/** the step's output, by its name in the runner's objects step-outputs */
"output"?: string;
/** the step was asked again by the runner's rerun */
"rerun"?: boolean;
/** the seat that serves the step, whose holder alone may end it (ADR 0666 section 21) */
@@ -706,8 +695,6 @@ export interface ShowAnswer {
"log"?: LogEntry[];
/** the cursor of the next page, opaque; empty at the end (design 47 H2 §779) */
"next"?: string;
/** the outputs' names in step-outputs */
"outputs"?: string[];
"pipeline": Pipeline;
/** how many steps the filters hold in all (design 47 H2 §789) */
"total"?: number;
@@ -1026,6 +1013,3 @@ export type KeptByLevelDigestValue = KeptResult;
/** is one value of the state step-log under the key <pipeline>. */
export type StepLogByPipelineValue = LogEntry;
/** is one value of the state step-outputs under the key <pipeline>.<step>.<artifact>. */
export type StepOutputsByPipelineStepArtifactValue = string;
@@ -109,7 +109,6 @@ export const states = {
queue: "queue",
kept: "kept",
stepLog: "step-log",
stepOutputs: "step-outputs",
};
/** The key of one value of the state pipelines under the form "<branch>.<revision>". */
@@ -303,26 +302,3 @@ export function parseStepLogByPipelineKey(_key) {
return { pipeline };
}
/** The key of one value of the state step-outputs under the form "<pipeline>.<step>.<artifact>". */
export function stepOutputsByPipelineStepArtifactKey(pipeline, step, artifact) {
return pipeline + "." + step + "." + artifact;
}
/** The parts of a key of the form "<pipeline>.<step>.<artifact>", or undefined for a key of another form. */
export function parseStepOutputsByPipelineStepArtifactKey(_key) {
let _rest = _key;
const _at0 = _rest.indexOf(".");
if (_at0 <= 0) return undefined;
const pipeline = _rest.slice(0, _at0);
_rest = _rest.slice(_at0 + 1);
const _at2 = _rest.indexOf(".");
if (_at2 <= 0) return undefined;
const step = _rest.slice(0, _at2);
_rest = _rest.slice(_at2 + 1);
if (_rest === "") return undefined;
const artifact = _rest;
_rest = "";
if (_rest !== "") return undefined;
return { pipeline, step, artifact };
}
@@ -11,8 +11,6 @@ import (
"time"
"git.novox.be/novox/mesh-contracts/health-and-repair/go/clients/meshhandactsclient"
"git.novox.be/novox/mesh-sdk/go/buscalls"
"git.novox.be/novox/mesh-sdk/go/busstate"
"git.novox.be/novox/mesh-sdk/go/health"
"git.novox.be/novox/mesh-sdk/go/views"
@@ -139,22 +137,16 @@ type HealthAnswer struct {
}
// StoresFill is each of the runner's stores' fill through the bundle's calls (design 47 G §366, §623, A-214): the states
// pipelines and kept by `mesh/state.info`, step-outputs by the object store's fill and step-log by the log's; the runner's
// pipelines and kept by `mesh/state.info` and step-log by the log's; the runner's
// process writes nothing for it. A store whose fill cannot be read is an error naming it.
func StoresFill(state func(string) (*stdio.StateInfo, error), objects func(string) (buscalls.Fill, error),
log func(string) (*stdio.LogInfo, error), now func() time.Time) func() ([]seat.Fill, error) {
func StoresFill(state func(string) (*stdio.StateInfo, error), log func(string) (*stdio.LogInfo, error),
now func() time.Time) func() ([]seat.Fill, error) {
return func() ([]seat.Fill, error) {
at := now().UTC()
var out []seat.Fill
for _, name := range []string{seat.StatePipelines, seat.StateStepOutputs, seat.StateKept, seat.StateStepLog} {
for _, name := range []string{seat.StatePipelines, seat.StateKept, seat.StateStepLog} {
f := seat.Fill{Store: name, At: &at}
switch name {
case seat.StateStepOutputs:
o, err := objects(name)
if err != nil {
return nil, fmt.Errorf("%s: %w", name, err)
}
f.Bytes, f.Cap = int64(o.Bytes), int64(o.MaxBytes)
case seat.StateStepLog:
l, err := log(name)
if err != nil {
@@ -182,14 +174,13 @@ func main() {
os.Exit(1)
}
fill := StoresFill(func(n string) (*stdio.StateInfo, error) { return stdio.State(n).Info() },
func(n string) (buscalls.Fill, error) { return busstate.ObjectsOf(n).Fill() },
func(n string) (*stdio.LogInfo, error) { return stdio.Log(n).Info() }, time.Now)
r := pipeline.Reads{Pipelines: kept{stdio.State(seat.StatePipelines)}, Kept: kept{stdio.State(seat.StateKept)}, Fill: fill}
tools := append(Tools(r), FirstViewTools(os.Getenv(stdio.ServedAs), stdio.State(views.StatusState), meshhandactsclient.Recorder{Ask: stdio.Ask}, time.Now)...)
tools = append(tools, UnloggedTools(stdio.State(seat.StatePipelines), stdio.Log(seat.StateStepLog), meshhandactsclient.Recorder{Ask: stdio.Ask},
func(f string, a ...any) { fmt.Fprintf(os.Stderr, "[mesh-delivery-pipeline-tools] "+f+"\n", a...) })...)
tools = append(tools, ShowTools(r)...)
tools = append(tools, CancelTool(r.List, stdio.Ask), RerunTool(stdio.Ask))
tools = append(tools, CancelTool(r.List, stdio.Ask), RerunTool(stdio.Ask), StepOutputTool(r, stdio.Ask))
tools = append(tools, VerbTools(stdio.Ask)...)
tools = append(tools, TestRunsTools(stdio.Ask)...)
tools = append(tools, HealthTool(r.Pipelines, kept{stdio.State(pipeline.StateConsumers)}, kept{stdio.State(views.StatusState)}, stalledBound, time.Now,
@@ -9,8 +9,6 @@ import (
"testing"
"time"
"git.novox.be/novox/mesh-sdk/go/buscalls"
stdio "git.novox.be/novox/mesh-sdk/go"
"git.novox.be/novox/mesh-sdk/go/views"
@@ -170,7 +168,7 @@ func TestUnloggedAppendIsAHandAct(t *testing.T) {
}
}
// StoresFill reads the two states through the state call, the object store and the log through their own, in the seat's order,
// StoresFill reads the two states through the state call and the log through its own, in the seat's order,
// and names a store it could not read (design 47 G §366, §623, A-214).
func TestStoresFillIsReadThroughTheBundlesCalls(t *testing.T) {
now := func() time.Time { return time.Date(2026, 11, 12, 8, 0, 0, 0, time.UTC) }
@@ -180,20 +178,16 @@ func TestStoresFillIsReadThroughTheBundlesCalls(t *testing.T) {
asked = append(asked, "state:"+n)
return &stdio.StateInfo{Bytes: 5, MaxBytes: 64}, nil
},
func(n string) (buscalls.Fill, error) {
asked = append(asked, "objects:"+n)
return buscalls.Fill{Bytes: 7, MaxBytes: 70}, nil
},
func(n string) (*stdio.LogInfo, error) {
asked = append(asked, "log:"+n)
return &stdio.LogInfo{Bytes: 9, MaxBytes: 90}, nil
}, now)
got, err := fill()
want := "state:pipelines objects:step-outputs state:kept log:step-log"
if err != nil || strings.Join(asked, " ") != want || len(got) != 4 || got[1].Bytes != 7 || got[3].Cap != 90 || got[2].Store != "kept" {
want := "state:pipelines state:kept log:step-log"
if err != nil || strings.Join(asked, " ") != want || len(got) != 3 || got[1].Bytes != 5 || got[2].Cap != 90 || got[1].Store != "kept" {
t.Fatalf("fill %+v, %v, asked %v; want %q", got, err, asked, want)
}
failing := StoresFill(func(string) (*stdio.StateInfo, error) { return nil, errors.New("no bus") }, nil, nil, now)
failing := StoresFill(func(string) (*stdio.StateInfo, error) { return nil, errors.New("no bus") }, nil, now)
if _, err := failing(); err == nil || !strings.Contains(err.Error(), "pipelines") {
t.Errorf("a store unread: %v", err)
}
@@ -0,0 +1,66 @@
package main
import (
"encoding/json"
"fmt"
nodebuildgo "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-contracts/go/seats/nodebuildgo"
stdio "git.novox.be/novox/mesh-sdk/go"
"git.novox.be/novox/mesh-sdk/go/buscalls"
"mesh-delivery-pipeline/internal/pipeline"
)
// StepOutput is one step's output as its build seat's holder keeps it (design 47 H2 §791): where it was read and the
// verb output's answer (its last 64 KB, its size, the failing tests with their words, or no longer kept).
type StepOutput struct {
Artifact string `json:"artifact,omitempty"`
Seat string `json:"seat"`
Node string `json:"node"`
nodebuildgo.OutputAnswer
}
// StepOutputTool is runner_step_output (design 47 H2 §791): a step's output read where it is kept. It reads the step from
// the runner's state pipelines and asks the verb output of the build seat's holder on the node the step key names, one
// call per artifact the step ran for; the runner keeps no output of its own. The three build seats' output take one input
// and give one answer (nodebuildgo's; the manifest invokes each).
func StepOutputTool(r pipeline.Reads, ask func(key string, body any) (json.RawMessage, error)) stdio.Tool {
return stdio.Tool{Name: Prefix + "_step_output",
Description: "A step's output, read where its build seat's holder keeps it: the pipeline's key, the mover and the " +
"step (lint, unit, integration, ...). Answers per artifact the node and ask it ran as, the output's last 64 KB, " +
"its size and the failing tests with their words, or no-longer-kept past the outputs' max-age.",
Input: map[string]any{"type": "object", "properties": map[string]any{
"pipeline": map[string]any{"type": "string", "description": "the pipeline's key"},
"mover": map[string]any{"type": "string", "description": "the mover's module"},
"step": map[string]any{"type": "string", "description": "the step's kind"},
}, "required": []string{"pipeline", "mover", "step"}},
Run: func(a map[string]any) (any, error) {
str := func(k string) string { s, _ := a[k].(string); return s }
return stepOutputs(r, ask, str("pipeline"), str("mover"), str("step"))
}}
}
func stepOutputs(r pipeline.Reads, ask func(string, any) (json.RawMessage, error), key, mover, step string) ([]StepOutput, error) {
at, err := r.StepOutputs(key, mover, step)
if err != nil {
return nil, err
}
var out []StepOutput
for _, o := range at {
address := "seat:" + o.Seat + "." + nodebuildgo.VerbOutput + "@" + o.Node
raw, err := ask(address, nodebuildgo.OutputInput{Ask: o.Ask})
if err != nil {
return nil, fmt.Errorf("%s of ask %s: %w", address, o.Ask, err)
}
answer, said, ok := buscalls.Unwrap(raw)
if !ok {
return nil, fmt.Errorf("%s of ask %s answered: %s", address, o.Ask, said)
}
got := StepOutput{Artifact: o.Artifact, Seat: o.Seat, Node: o.Node}
if err := json.Unmarshal(answer, &got.OutputAnswer); err != nil {
return nil, fmt.Errorf("%s of ask %s answered what is not its output: %w", address, o.Ask, err)
}
out = append(out, got)
}
return out, nil
}
@@ -0,0 +1,41 @@
package main
import (
"encoding/json"
"strings"
"testing"
nodebuildgo "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-contracts/go/seats/nodebuildgo"
seat "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-contracts/go/seats/meshpipelinerunner"
"mesh-delivery-pipeline/internal/pipeline"
)
// design 47 H2 §791: runner_step_output asks the verb output of the build seat's holder on the node the step key names, by
// the step's ask, and answers the holder's words; a holder's refusal is said, never an empty answer.
func TestStepOutputAsksTheHolderOnItsNode(t *testing.T) {
p := seat.Pipeline{Pipeline: "main.7", Movers: []seat.Mover{{Module: "app"}}, Steps: []seat.StepResult{
{Module: "app", Step: seat.StepResultStepUnit, Artifact: "app:program", Seat: nodebuildgo.Seat, Node: "n2", Ask: "a-unit",
Outcome: seat.StepResultOutcomeFailed}}}
raw, _ := json.Marshal(p)
r := pipeline.Reads{Pipelines: queueOf{"main.7": string(raw)}}
var asked []string
answer := `{"ask":"a-unit","output":"--- FAIL: TestX","size":15,"failing":[{"test":"TestX","words":"want 2"}]}`
ask := func(key string, b any) (json.RawMessage, error) {
asked = append(asked, key+" "+b.(nodebuildgo.OutputInput).Ask)
return json.RawMessage(answer), nil
}
got, err := stepOutputs(r, ask, "main.7", "app", "unit")
if err != nil || len(got) != 1 || strings.Join(asked, ",") != "seat:node-build-go.output@n2 a-unit" ||
got[0].Node != "n2" || got[0].Ask != "a-unit" || got[0].Size != 15 || len(got[0].Failing) != 1 {
t.Fatalf("got %+v, %v, asked %v", got, err, asked)
}
out, _ := json.Marshal(got[0])
if !strings.Contains(string(out), `"ask":"a-unit"`) || !strings.Contains(string(out), `"node":"n2"`) {
t.Errorf("the answer as JSON %s names no ask or node", out)
}
answer = `{"error":"ask a-old was never run here","error-kind":"refused"}`
if _, err := stepOutputs(r, ask, "main.7", "app", "unit"); err == nil {
t.Error("a holder's refusal answered as an output")
}
}
@@ -14,7 +14,6 @@ import (
seat "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-contracts/go/seats/meshpipelinerunner"
"git.novox.be/novox/mesh-sdk/go/buscompose"
"git.novox.be/novox/mesh-sdk/go/catalogue"
"git.novox.be/novox/mesh-sdk/go/keys"
"git.novox.be/novox/mesh-sdk/go/process"
@@ -138,26 +137,15 @@ func (k keptStore) Delete(key string) error { return k.kv.Delete(k.ctx, key) }
// newAger is the ageing over the runner's own stores.
func newAger(ctx context.Context, js jetstream.JetStream, cred process.Account, pipelines *pipeline.MoverStore, kept, aged jetstream.KeyValue, logf func(string, ...any)) *pipeline.Ager {
return &pipeline.Ager{Log: stepLog{ctx: ctx, js: js, module: cred.Module}.Read, Aged: agedState{ctx: ctx, kv: aged},
Pipelines: pipelines, Kept: keptStore{ctx: ctx, kv: kept}, Logf: logf,
Outputs: func(name string) error {
o, err := js.ObjectStore(ctx, catalogue.ObjectsBucket(cred.Module, seat.StateStepOutputs))
if err != nil {
return err
}
if err := o.Delete(ctx, name); err != nil && !errors.Is(err, jetstream.ErrObjectNotFound) {
return err
}
return nil
}}
Pipelines: pipelines, Kept: keptStore{ctx: ctx, kv: kept}, Logf: logf}
}
// storeFills reads the fill of the runner's stores against their caps: pipelines and kept (their key-value streams), step-outputs
// (its object store's) and step-log (its log's), as the bus's own streams say it (design 47 G §366, §486).
// storeFills reads the fill of the runner's stores against their caps: pipelines and kept (their key-value streams) and
// step-log (its log's), as the bus's own streams say it (design 47 G §366, §486).
func storeFills(ctx context.Context, js jetstream.JetStream, cred process.Account, now func() time.Time) func() ([]seat.Fill, error) {
streams := []struct{ store, stream string }{
{seat.StatePipelines, "KV_" + ownBucket(cred.Module, seat.StatePipelines)},
{seat.StateKept, "KV_" + ownBucket(cred.Module, seat.StateKept)},
{seat.StateStepOutputs, "OBJ_" + catalogue.ObjectsBucket(cred.Module, seat.StateStepOutputs)},
{seat.StateStepLog, buscompose.LogStreamName(cred.Module, seat.StateStepLog)},
}
return func() ([]seat.Fill, error) {
@@ -4,7 +4,6 @@ import (
"context"
"encoding/json"
"errors"
"fmt"
"sort"
"strings"
"time"
@@ -14,7 +13,6 @@ import (
builds "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-contracts/go/seats/meshbuilds"
seat "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-contracts/go/seats/meshpipelinerunner"
nodebuildgo "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-contracts/go/seats/nodebuildgo"
"git.novox.be/novox/mesh-sdk/go/catalogue"
"git.novox.be/novox/mesh-sdk/go/keys"
"git.novox.be/novox/mesh-sdk/go/process"
@@ -84,8 +82,8 @@ func (s kvState) Keys(filter string) ([]string, error) {
return out, nil
}
// newHearer is the hearer over the runner's own states: pipelines, kept, the step log on its stream and step-outputs on its
// objects (§27). Each store is opened where it is used, so one the grants part has not made yet fails that write loudly.
// newHearer is the hearer over the runner's own states: pipelines, kept and the step log on its stream
// (§27). Each store is opened where it is used, so one the grants part has not made yet fails that write loudly.
func newHearer(ctx context.Context, js jetstream.JetStream, cred process.Account, pipelines pipeline.Updater, kept jetstream.KeyValue,
say func(string, any) error, logf func(string, ...any)) *pipeline.Hearer {
return &pipeline.Hearer{Store: pipelines, Say: say, Logf: logf, Name: cred.Module,
@@ -96,14 +94,6 @@ func newHearer(ctx context.Context, js jetstream.JetStream, cred process.Account
_, err = kept.Put(ctx, key, raw)
}
return err
},
Output: func(key string, data []byte) error {
o, err := js.ObjectStore(ctx, catalogue.ObjectsBucket(cred.Module, seat.StateStepOutputs))
if err != nil {
return fmt.Errorf("the objects %s are not open: %w", seat.StateStepOutputs, err)
}
_, err = o.PutBytes(ctx, key, data)
return err
}}
}
@@ -47,9 +47,8 @@ type Ager struct {
Updater
Delete(key string) error
}
// Outputs deletes an object of step-outputs, Kept reads and deletes a key of the state kept.
Outputs func(name string) error
Kept interface {
// Kept reads and deletes a key of the state kept.
Kept interface {
Get(key string) (seat.KeptResult, bool, error)
Delete(key string) error
}
@@ -169,13 +168,6 @@ func (a *Ager) ageEntry(r Retention, e seat.LogEntry, now time.Time) {
case RetentionTestRuns:
a.ageRun(r, e)
case Retention7.Name:
if e.Output != "" && a.Outputs != nil {
if err := a.Outputs(e.Output); err != nil {
a.logf("aged: the output %s is not deleted: %v", e.Output, err)
} else {
a.logf("aged: deleted the output %s (%s)", e.Output, r.Name)
}
}
a.deletePipeline(r, e.Pipeline, true)
case Retention30.Name:
for _, key := range e.Kept {
@@ -48,7 +48,6 @@ type agedFixture struct {
aged agedState
pipes *agedPipelines
kept *keptStore
outputs []string
journal []string
readFrom []uint64
}
@@ -58,8 +57,7 @@ var agedNow = time.Date(2026, 11, 12, 12, 0, 0, 0, time.UTC)
func newAgedFixture() *agedFixture {
f := &agedFixture{aged: agedState{}, pipes: &agedPipelines{memStore: memStore{}}, kept: &keptStore{m: map[string]seat.KeptResult{}}}
f.ager = &Ager{Aged: f.aged, Pipelines: f.pipes, Kept: f.kept, Now: func() time.Time { return agedNow },
Outputs: func(n string) error { f.outputs = append(f.outputs, n); return nil },
Logf: func(format string, a ...any) { f.journal = append(f.journal, sprintf(format, a...)) },
Logf: func(format string, a ...any) { f.journal = append(f.journal, sprintf(format, a...)) },
Log: func(from uint64, limit int) ([]LoggedEntry, error) {
f.readFrom = append(f.readFrom, from)
var out []LoggedEntry
@@ -86,7 +84,7 @@ func (f *agedFixture) pipeline(branch string, source int64, outcome string, run
func days(n int) time.Time { return agedNow.Add(-time.Duration(n) * 24 * time.Hour) }
// The runner ages its own kept data in the step log's order, by the retentions of the design: at 7 days an output and the
// The runner ages its own kept data in the step log's order, by the retentions of the design: at 7 days the
// pipeline that did not pass or is not its branch's newest, at 30 days a kept result not read for 30 days, at 90 days a passed
// pipeline that is not its branch's newest; each retention keeps its own sequence in the state aged (design 47 G §330).
func TestTheRunnerAgesItsOwnKeptDataByTheStepLogsOrder(t *testing.T) {
@@ -99,16 +97,13 @@ func TestTheRunnerAgesItsOwnKeptDataByTheStepLogsOrder(t *testing.T) {
f.kept.m["unit.sha256:a"] = seat.KeptResult{Digest: "sha256:a", Level: "unit", LastRead: &stale}
f.kept.m["unit.sha256:b"] = seat.KeptResult{Digest: "sha256:b", Level: "unit", LastRead: &fresh}
f.log = []LoggedEntry{
{1, seat.LogEntry{Pipeline: old, Output: "out-1", At: days(100)}},
{2, seat.LogEntry{Pipeline: failed, Output: "out-2", Kept: []string{"unit.sha256:a", "unit.sha256:b"}, At: days(35)}},
{3, seat.LogEntry{Pipeline: passed, Output: "out-3", At: days(10)}},
{4, seat.LogEntry{Pipeline: newest, Output: "out-4", At: days(9)}},
{5, seat.LogEntry{Pipeline: newest, Output: "out-5", At: days(1)}},
{1, seat.LogEntry{Pipeline: old, At: days(100)}},
{2, seat.LogEntry{Pipeline: failed, Kept: []string{"unit.sha256:a", "unit.sha256:b"}, At: days(35)}},
{3, seat.LogEntry{Pipeline: passed, At: days(10)}},
{4, seat.LogEntry{Pipeline: newest, At: days(9)}},
{5, seat.LogEntry{Pipeline: newest, At: days(1)}},
}
f.ager.Age()
if got := strings.Join(f.outputs, ","); got != "out-1,out-2,out-3,out-4" {
t.Errorf("outputs deleted past 7 days: %s", got)
}
if got := strings.Join(f.pipes.deleted, ","); got != failed+","+old {
t.Errorf("pipelines deleted: %s, want %s (the failed one at 7 days, the old passed one at 90; the passed at 7 stays; the newest stays)", got, failed+","+old)
}
@@ -118,16 +113,16 @@ func TestTheRunnerAgesItsOwnKeptDataByTheStepLogsOrder(t *testing.T) {
if f.aged["7d"] != 4 || f.aged["30d"] != 2 || f.aged["90d"] != 1 {
t.Errorf("sequences aged: %v, want 4, 2 and 1 (the entries past each retention)", f.aged)
}
for _, want := range []string{"deleted the output out-1 (7d)", "deleted the pipeline " + failed + " (7d)", "deleted the kept result unit.sha256:a (30d", "deleted the pipeline " + old + " (90d)"} {
for _, want := range []string{"deleted the pipeline " + failed + " (7d)", "deleted the kept result unit.sha256:a (30d", "deleted the pipeline " + old + " (90d)"} {
if !strings.Contains(strings.Join(f.journal, "\n"), want) {
t.Errorf("the journal names no %q:\n%s", want, strings.Join(f.journal, "\n"))
}
}
// A second step's end reads onward from the moved sequences and deletes nothing again.
f.readFrom, f.outputs = nil, nil
f.readFrom, f.pipes.deleted = nil, nil
f.ager.Age()
if len(f.outputs) != 0 || f.readFrom[0] != 5 {
t.Errorf("the second ageing read from %v and deleted %v; want it to read from 5", f.readFrom, f.outputs)
if len(f.pipes.deleted) != 0 || f.readFrom[0] != 5 {
t.Errorf("the second ageing read from %v and deleted %v; want it to read from 5", f.readFrom, f.pipes.deleted)
}
}
@@ -135,11 +130,11 @@ func TestTheRunnerAgesItsOwnKeptDataByTheStepLogsOrder(t *testing.T) {
func TestOneStepEndAgesAtMostTwentyEntries(t *testing.T) {
f := newAgedFixture()
for i := uint64(1); i <= 25; i++ {
f.log = append(f.log, LoggedEntry{i, seat.LogEntry{Pipeline: "x", Output: "o" + strconv.FormatUint(i, 10), At: days(50)}})
f.log = append(f.log, LoggedEntry{i, seat.LogEntry{Pipeline: "x" + strconv.FormatUint(i, 10), At: days(50)}})
}
f.ager.Age()
if len(f.outputs) != AgedPerStep || f.aged["7d"] != 20 {
t.Fatalf("%d outputs deleted, sequence %d; want 20 and 20", len(f.outputs), f.aged["7d"])
if f.aged["7d"] != AgedPerStep {
t.Fatalf("sequence %d aged at 7 days; want 20", f.aged["7d"])
}
}
@@ -133,7 +133,7 @@ func TestAnAsksBoundCountsFromThePullAndEndsItsStep(t *testing.T) {
// H-A-252: the pipeline's one validate ask names no mover (H-A-51), and its holder's end names the mover whose body it took:
// it is matched by its ask alone and ends the validate step of every mover under it, whichever mover it names.
func TestAValidateEndNamingOneMoverEndsEveryMoversValidate(t *testing.T) {
h, store, _, _, _, _ := fixture()
h, store, _, _, _ := fixture()
p, rev, _ := store.Get(pkey)
p.Movers = []seat.Mover{{Module: "app", Commit: "c1", Fingerprint: "src2:aa"}, {Module: "lib", Commit: "c2", Fingerprint: "src2:bb"}}
p.Steps = []seat.StepResult{
@@ -17,7 +17,7 @@ import (
// lint step asked of node-build-go.
func twoMovers(t *testing.T) (*Hearer, memStore, map[string]any, *[]string) {
t.Helper()
h, store, _, _, _, _ := fixture()
h, store, _, _, _ := fixture()
bodies := map[string]any{}
order := &[]string{}
h.Say = func(subject string, body any) error {
@@ -57,7 +57,7 @@ func TestAFailedRequiredStepIsTheFindingOfItsCommit(t *testing.T) {
{"required passed", "lint", "passed", "alice", nil, false, ""},
} {
t.Run(c.name, func(t *testing.T) {
h, store, _, _, _, _ := fixture()
h, store, _, _, _ := fixture()
p := store[pkey]
p.p.Movers[0].Repository = "novox/app"
store[pkey] = p
@@ -97,7 +97,7 @@ func TestAFailedRequiredStepIsTheFindingOfItsCommit(t *testing.T) {
// The owner of a failed head whose author could not be read is written at the next step end of that commit (A-191).
func TestTheOwnerOfAFailedHeadIsWrittenAtTheNextStepEnd(t *testing.T) {
h, store, _, _, _, _ := fixture()
h, store, _, _, _ := fixture()
f := newHeld()
known := false
h.Failures = &Failures{Findings: f, Now: h.Now, Author: func(string, string) (string, error) {
@@ -20,7 +20,7 @@ var ErrFull = errors.New("a store of the runner is full")
// Fills says each of the runner's stores' fill before it is full (design 47 G §366): `filling` past 80 % of the cap, `full` at
// the cap, and `room` below 70 % once it said either; a store full refuses a new pipeline, loudly, and nothing is dropped to make room.
type Fills struct {
// Read is each store's fill now: pipelines, step-outputs, kept and step-log.
// Read is each store's fill now: pipelines, kept and step-log.
Read func() ([]seat.Fill, error)
// Say says one of the seat's events, filling, full or room, with the store's fill.
Say func(event string, f seat.Fill) error
@@ -227,7 +227,7 @@ func TestMoverKeys(t *testing.T) {
for i := range 1000 {
mod := fmt.Sprintf("module-%03d", i%129)
p.Unlogged = append(p.Unlogged, seat.LogEntry{Pipeline: key, Module: mod, Step: seat.StepResultStepBuild, Artifact: mod + ":program",
What: seat.LogEntryWhatEnded, Outcome: seat.StepResultOutcomeNotAsked, Output: strings.Repeat("o", 200), At: at.Add(time.Duration(i) * time.Millisecond)})
What: seat.LogEntryWhatEnded, Outcome: seat.StepResultOutcomeNotAsked, Kept: []string{strings.Repeat("o", 200)}, At: at.Add(time.Duration(i) * time.Millisecond)})
}
if _, err := s.Update(key, p, rev); err != nil {
return err.Error()
@@ -22,7 +22,7 @@ func TestTheRunnerSaysNoPin(t *testing.T) {
if ok, err := s.Start(Begin{Branch: "main", Source: 7, Revision: 12, Movers: []seat.Mover{{Module: "a", Commit: "c1"}}}); !ok || err != nil {
t.Fatalf("start: %v %v", ok, err)
}
h, store, _, _, _, _ := fixture()
h, store, _, _, _ := fixture()
h.Say = say
p := store[pkey]
p.p.Revision = 12
@@ -262,7 +262,7 @@ func TestTheBuildHoldsTheApprovalWhateverThePolicyNames(t *testing.T) {
// fingerprint; an end naming two entries is refused (A-97, A-99).
func TestTheBuildStepsEndIsTakenOnItsOneEntry(t *testing.T) {
bs := stepSeatOf(t, builds.Seat)
h, store, _, _, _, _ := fixture()
h, store, _, _, _ := fixture()
e := store[pkey]
e.p.Steps = append([]seat.StepResult{{Module: "app", Step: seat.StepResultStepBuild, Status: seat.StepResultStatusRequired, Outcome: seat.StepResultOutcomeRunning,
Ask: "b1", Seat: builds.Seat}}, e.p.Steps...)
@@ -24,7 +24,7 @@ type Kept interface {
type Reads struct {
Pipelines Kept
Kept Kept
// Fill is each of the runner's stores' fill now, pipelines, step-outputs, kept and step-log, read through the bundle's calls
// Fill is each of the runner's stores' fill now, pipelines, kept and step-log, read through the bundle's calls
// (the state's `mesh/state.info`, the object store's and the log's fill; design 47 G §366, §623, A-214); nil says none.
Fill func() ([]seat.Fill, error)
}
@@ -44,7 +44,7 @@ func (r Reads) fills() ([]seat.Fill, error) {
// MaxAnswer is the most a read answers (design 47 H2 §789, §811): 768 KB, the rest read from its cursor.
const MaxAnswer = 768 << 10
// Show is one pipeline, with its steps and the names of their outputs in step-outputs (§83), or, naming a mover, the
// Show is one pipeline, with its steps (§83), or, naming a mover, the
// pipeline's record with that mover's steps alone (H-A-187). Its filters mover, step and state apply while it reads, and it
// answers at most MaxAnswer with capped, the filters' total and the cursor of the next page (design 47 H2 §789, §779).
func (r Reads) Show(in seat.ShowInput) (seat.ShowAnswer, error) {
@@ -79,18 +79,12 @@ func (r Reads) Show(in seat.ShowInput) (seat.ShowAnswer, error) {
size := sizeOf(a)
for i := from; i < len(held); i++ {
n := sizeOf(held[i]) + 1
if s := held[i]; s.Output != "" {
n += len(s.Output) + 3
}
if size+n > MaxAnswer && len(a.Pipeline.Steps) > 0 {
a.Capped, a.Next = true, pageCursor(i)
break
}
size += n
a.Pipeline.Steps = append(a.Pipeline.Steps, held[i])
if held[i].Output != "" {
a.Outputs = append(a.Outputs, held[i].Output)
}
}
return a, nil
}
@@ -41,7 +41,7 @@ func TestReads(t *testing.T) {
put(t, pipes, "main.7.alpha", seat.Pipeline{Pipeline: "main.7.alpha", Branch: "main",
Source: 7, Outcome: seat.PipelineOutcomeRunning, Started: &t0, Steps: []seat.StepResult{
{Module: "alpha", Step: seat.StepResultStepLint, Artifact: "alpha:program", Status: "required", Outcome: seat.StepResultOutcomePassed,
Started: &t0, Ended: &t1, Output: "main.7.alpha.lint.alpha:program"},
Started: &t0, Ended: &t1, Seat: "node-build-go", Node: "n1", Ask: "a-lint"},
{Module: "alpha", Step: seat.StepResultStepUnit, Artifact: "alpha:program", Status: "required", Outcome: seat.StepResultOutcomeCarried,
CarriedFrom: "main.6.alpha"},
{Module: "alpha", Step: seat.StepResultStepApproval, Status: "required", Outcome: seat.StepResultOutcomeWaiting, On: seat.WaitOnPerson,
@@ -60,7 +60,7 @@ func TestReads(t *testing.T) {
}
pipes["next.8"] = withRevs
put(t, pipes, "steps.next.8.epsilon", seat.PipelinesByStepsPipelineMoverValue{Steps: []seat.StepResult{{Module: "epsilon",
Step: seat.StepResultStepBuild, Status: "required", Outcome: seat.StepResultOutcomePassed, Output: "next.8.build.epsilon:program"}}})
Step: seat.StepResultStepBuild, Status: "required", Outcome: seat.StepResultOutcomePassed}}})
put(t, pipes, "steps.next.8.delta", seat.PipelinesByStepsPipelineMoverValue{Steps: []seat.StepResult{{Module: "delta",
Step: seat.StepResultStepBuild, Status: "required", Outcome: seat.StepResultOutcomePassed}, {Module: "delta",
Step: seat.StepResultStepApproval, Status: "required", Outcome: seat.StepResultOutcomeWaiting, On: seat.WaitOnPerson, Started: &t2}},
@@ -81,10 +81,19 @@ func TestReads(t *testing.T) {
got func() (string, error)
want string
}{
{"show answers the pipeline whole and its outputs", func() (string, error) {
{"show answers the pipeline whole", func() (string, error) {
a, err := r.Show(seat.ShowInput{Pipeline: "main.7.alpha"})
return a.Pipeline.Movers[0].Module + " " + strings.Join(a.Outputs, ","), err
}, "alpha main.7.alpha.lint.alpha:program"},
return fmt.Sprint(a.Pipeline.Movers[0].Module, " ", len(a.Pipeline.Steps)), err
}, "alpha 3"},
// design 47 H2 §791: a step's output is read where its build seat's holder keeps it, on the node its step key names.
{"a step's output is where its holder ran its ask", func() (string, error) {
at, err := r.StepOutputs("main.7.alpha", "alpha", seat.StepResultStepLint)
return fmt.Sprint(at), err
}, "[{alpha:program node-build-go n1 a-lint}]"},
{"a step that ran on no node keeps no output", func() (string, error) {
_, err := r.StepOutputs("main.7.alpha", "alpha", seat.StepResultStepUnit)
return "", err
}, "error: no output of the pipeline main.7.alpha's step unit of alpha is kept: unit alpha:program ran on no node (carried)"},
{"show refuses a pipeline it does not hold", func() (string, error) {
_, err := r.Show(seat.ShowInput{Pipeline: "main.9.alpha"})
return "", err
@@ -95,8 +104,8 @@ func TestReads(t *testing.T) {
for _, st := range a.Pipeline.Steps {
s = append(s, st.Module+" "+st.Step)
}
return strings.Join(s, ", ") + " | " + strings.Join(a.Outputs, ","), err
}, "delta build, delta approval, epsilon build | next.8.build.epsilon:program"},
return strings.Join(s, ", "), err
}, "delta build, delta approval, epsilon build"},
{"show naming a mover answers its steps alone", func() (string, error) {
a, err := r.Show(seat.ShowInput{Pipeline: "next.8", Mover: "epsilon"})
var s []string
@@ -174,17 +183,17 @@ func TestReads(t *testing.T) {
}
}
// show carries each store's fill (pipelines, step-outputs, kept, step-log) and kept the kept store's, read through the bundle's state
// show carries each store's fill (pipelines, kept, step-log) and kept the kept store's, read through the bundle's state
// call, never counted from the keys; a fill that cannot be read is an error, not an answer without it (design 47 G §366, §623, A-214).
func TestShowAndKeptCarryTheStoresFill(t *testing.T) {
pipes, kept := memKept{}, memKept{}
put(t, pipes, "main.7.alpha", seat.Pipeline{Pipeline: "main.7.alpha", Movers: []seat.Mover{{Module: "alpha"}}})
fills := []seat.Fill{{Store: seat.StatePipelines, Bytes: 10, Cap: 100}, {Store: seat.StateStepOutputs, Bytes: 20, Cap: 200},
{Store: seat.StateKept, Bytes: 30, Cap: 300}, {Store: seat.StateStepLog, Bytes: 40, Cap: 400}}
fills := []seat.Fill{{Store: seat.StatePipelines, Bytes: 10, Cap: 100}, {Store: seat.StateKept, Bytes: 30, Cap: 300},
{Store: seat.StateStepLog, Bytes: 40, Cap: 400}}
r := Reads{Pipelines: pipes, Kept: kept, Fill: func() ([]seat.Fill, error) { return fills, nil }}
shown, err := r.Show(seat.ShowInput{Pipeline: "main.7.alpha"})
if err != nil || len(shown.Fill) != 4 || shown.Fill[1].Store != seat.StateStepOutputs || shown.Fill[3].Cap != 400 {
t.Errorf("show: %+v, %v; want the four stores' fill", shown.Fill, err)
if err != nil || len(shown.Fill) != 3 || shown.Fill[1].Store != seat.StateKept || shown.Fill[2].Cap != 400 {
t.Errorf("show: %+v, %v; want the three stores' fill", shown.Fill, err)
}
k, err := r.KeptResults(seat.KeptInput{})
if err != nil || k.Fill == nil || k.Fill.Store != seat.StateKept || k.Fill.Bytes != 30 {
@@ -0,0 +1,74 @@
package pipeline
import (
"fmt"
"strings"
)
// OutputAt is where one step's output is kept (design 47 H2 §791): by the holder of the build seat the step was asked of,
// on the node the step key `<node>.<ask id>` names, read through that seat's verb `output` with the ask.
type OutputAt struct {
Artifact string `json:"artifact,omitempty"`
Seat string `json:"seat"`
Node string `json:"node"`
Ask string `json:"ask"`
}
// StepOutputs names where the output of a mover's step of a pipeline is kept, one per artifact the step ran for: the runner
// keeps no output of its own (§791), so runner_step_output asks each holder. A step that reads a shared run is answered by
// that run's ask and the seat its asking step was asked of. A step no build seat ran on a node is refused, naming why.
func (r Reads) StepOutputs(pipeline, mover, step string) ([]OutputAt, error) {
mover, step = strings.TrimSpace(mover), strings.TrimSpace(step)
if mover == "" || step == "" {
return nil, fmt.Errorf("name the pipeline, the mover and the step")
}
p, ok, err := r.pipeline(pipeline)
if err != nil {
return nil, err
}
if !ok {
return nil, fmt.Errorf("no pipeline %q in pipelines", pipeline)
}
seatOf := map[string]string{}
for _, s := range p.Steps {
if s.Ask != "" && s.Seat != "" {
seatOf[s.Ask] = s.Seat
}
}
var out []OutputAt
var why []string
for _, s := range p.Steps {
if s.Module != mover || s.Step != step {
continue
}
at := OutputAt{Artifact: s.Artifact, Seat: s.Seat, Node: s.Node, Ask: s.Ask}
if at.Ask == "" && len(s.Shared) > 0 {
at.Ask = s.Shared[0].Ask
}
if at.Seat == "" {
at.Seat = seatOf[at.Ask]
}
switch {
case at.Ask == "" || at.Node == "":
why = append(why, fmt.Sprintf("%s %s ran on no node (%s)", step, nameOf(s.Artifact, mover), s.Outcome))
case !BoundSeat(at.Seat):
why = append(why, fmt.Sprintf("%s %s was asked of %s, which keeps no output", step, nameOf(s.Artifact, mover), at.Seat))
default:
out = append(out, at)
}
}
if len(out) == 0 {
if len(why) == 0 {
return nil, fmt.Errorf("the pipeline %s holds no step %s of %s", p.Pipeline, step, mover)
}
return nil, fmt.Errorf("no output of the pipeline %s's step %s of %s is kept: %s", p.Pipeline, step, mover, strings.Join(why, "; "))
}
return out, nil
}
func nameOf(artifact, mover string) string {
if artifact != "" {
return artifact
}
return mover
}
@@ -135,8 +135,6 @@ type Hearer struct {
// Keep writes one package's passing result into the state kept, under its key (§27): only from a step's end the
// runner took, so a kept result is its seat holder's alone.
Keep func(key string, k seat.KeptResult) error
// Output keeps a step's output under key in the objects step-outputs.
Output func(key string, data []byte) error
// Asker publishes an approval step's ask (§37); Name is the runner's own name, the asker a warrant names.
Asker Asker
Name string
@@ -299,18 +297,6 @@ func (h *Hearer) OnStepEndedPinned(bs StepSeat, subject string, ev StepEnded, sh
if ev.Tests != nil {
s.Tests = &seat.TestCounts{Unit: ev.Tests.Unit, Integration: ev.Tests.Integration}
}
if ev.Output != "" && h.Output != nil {
// A mover's build step names no artifact: its output is kept under its module, so two movers' never meet (§746).
art := s.Artifact
if art == "" {
art = s.Module
}
name := seat.StepOutputsByPipelineStepArtifactKey(keys.EscapeName(ev.Pipeline), s.Step, keys.EscapeName(art))
if err := h.Output(name, []byte(ev.Output)); err != nil {
return p, fmt.Errorf("the output of ask %s cannot be kept: %w", ev.ID, err)
}
s.Output = name
}
var keptKeys []string
for _, k := range ev.Kept {
keptKeys = append(keptKeys, seat.KeptByLevelDigestKey(keys.EscapeName(k.Level), keys.EscapeName(k.Digest)))
@@ -555,7 +541,7 @@ func (h *Hearer) endIfNothingOpen(key string) (bool, error) {
// endEntry is the step log's entry of a step's end, with the keys of the kept results it wrote or carried.
func endEntry(key string, s seat.StepResult, at time.Time, kept ...string) seat.LogEntry {
return seat.LogEntry{Pipeline: key, Module: s.Module, Step: s.Step, Artifact: s.Artifact, What: seat.LogEntryWhatEnded, Outcome: s.Outcome,
Output: s.Output, Kept: kept, At: at}
Kept: kept, At: at}
}
// sayStepEnded is the one place a step's step-ended is said (design 47 H2 §784): it writes the journal line "step ended
@@ -76,7 +76,7 @@ const pkey = "main.5"
// fixture is a pipeline of app with a required lint asked of node-build-go, an optional unit asked of the same seat and an
// approval step waiting, and a hearer over it.
func fixture() (*Hearer, memStore, *[]string, *askRecorder, map[string]seat.KeptResult, map[string]string) {
func fixture() (*Hearer, memStore, *[]string, *askRecorder, map[string]seat.KeptResult) {
store := memStore{pkey: {p: seat.Pipeline{V: 1, Pipeline: pkey, Branch: "main", Source: 5,
Outcome: seat.PipelineOutcomeRunning, Steps: []seat.StepResult{
{Module: "app", Artifact: "program", Step: seat.StepResultStepLint, Status: seat.StepResultStatusRequired, Outcome: seat.StepResultOutcomeRunning, Ask: "a1", Seat: nodebuildgo.Seat},
@@ -85,17 +85,15 @@ func fixture() (*Hearer, memStore, *[]string, *askRecorder, map[string]seat.Kept
said := &[]string{}
asker := &askRecorder{}
kept := map[string]seat.KeptResult{}
outs := map[string]string{}
h := &Hearer{Store: store, Name: "mesh-pipeline-runner", Asker: asker,
Say: func(subject string, _ any) error {
*said = append(*said, subject[strings.Index(subject, ".event.")+7:])
return nil
},
Log: func(seat.LogEntry) error { return nil },
Keep: func(k string, v seat.KeptResult) error { kept[k] = v; return nil },
Output: func(k string, d []byte) error { outs[k] = string(d); return nil },
Now: func() time.Time { return time.Date(2026, 11, 11, 12, 0, 0, 0, time.UTC) }}
return h, store, said, asker, kept, outs
Log: func(seat.LogEntry) error { return nil },
Keep: func(k string, v seat.KeptResult) error { kept[k] = v; return nil },
Now: func() time.Time { return time.Date(2026, 11, 11, 12, 0, 0, 0, time.UTC) }}
return h, store, said, asker, kept
}
func ended(ask, step, outcome string) StepEnded {
@@ -106,7 +104,7 @@ var goSeat = StepSeat{Seat: nodebuildgo.Seat, Prefix: "mesh.seat.node-build-go.e
// A step's end is taken only as the runner asked it (design 47 G §24; ADR 0666 §21).
func TestStepEndedIsTakenOnlyAsAsked(t *testing.T) {
h, store, _, _, _, _ := fixture()
h, store, _, _, _ := fixture()
other := ended("a1", "lint", "passed")
other.Fingerprint = "src2:bb"
wrongNode := ended("a1", "lint", "passed")
@@ -150,21 +148,17 @@ func TestStepEndedIsTakenOnlyAsAsked(t *testing.T) {
// A taken end is written, kept and said; the pipeline ends once every step ended (§24, §27).
func TestStepEndedEndsThePipeline(t *testing.T) {
h, store, said, _, kept, outs := fixture()
h, store, said, _, kept := fixture()
h.Asker = nil
lint := ended("a1", "lint", "passed")
lint.Output = "all clean"
unit := ended("a2", "unit", "failed")
unit.Kept = []nodebuildgo.KeptResult{{Digest: "sha256:d1", Level: "unit", Package: "app/x"}}
if _, err := h.OnStepEnded(goSeat, goSeat.Prefix+"n1", lint); err != nil {
t.Fatal(err)
}
if p := store[pkey].p; p.Outcome != seat.PipelineOutcomeRunning || p.Steps[0].Node != "n1" || p.Steps[0].Output == "" {
if p := store[pkey].p; p.Outcome != seat.PipelineOutcomeRunning || p.Steps[0].Node != "n1" {
t.Fatalf("after the lint: %+v", p)
}
if len(outs) != 1 {
t.Errorf("outputs kept %v", outs)
}
// Approval waits with no asker, so the pipeline does not end on the last test step alone.
if _, err := h.OnStepEnded(goSeat, goSeat.Prefix+"n1", unit); err != nil {
t.Fatal(err)
@@ -184,7 +178,7 @@ func TestStepEndedEndsThePipeline(t *testing.T) {
// The approval step is asked last, only when every other required step passed, and ended by its warrant (§26, §37).
func TestApprovalIsAskedLastAndEndedByItsWarrant(t *testing.T) {
h, store, said, asker, _, _ := fixture()
h, store, said, asker, _ := fixture()
var record *oc.Warrant
h.Where = func(string) (string, *oc.Warrant, error) { return "chosen", record, nil }
if _, err := h.OnStepEnded(goSeat, goSeat.Prefix+"n1", ended("a1", "lint", "passed")); err != nil || len(asker.asked) != 0 {
@@ -230,7 +224,7 @@ func TestApprovalIsAskedLastAndEndedByItsWarrant(t *testing.T) {
t.Fatalf("the record said decline: %+v (%v)", p.Steps[2], err)
}
// (the declined pipeline above is a fresh fixture's: approve it on a new one)
h, store, said, asker, _, _ = fixture()
h, store, said, asker, _ = fixture()
h.Where = func(string) (string, *oc.Warrant, error) { return "chosen", record, nil }
for _, s := range []StepEnded{ended("a1", "lint", "passed"), ended("a2", "unit", "failed")} {
if _, err := h.OnStepEnded(goSeat, goSeat.Prefix+"n1", s); err != nil {
@@ -265,7 +259,7 @@ func TestApprovalEnds(t *testing.T) {
"refused": {oc.WarrantOutcomeRefused, "", seat.StepResultOutcomeDeclined},
"superseded": {oc.WarrantOutcomeReplaced, "", seat.StepResultOutcomeSuperseded},
} {
h, _, _, asker, _, _ := fixture()
h, _, _, asker, _ := fixture()
for _, s := range []StepEnded{ended("a1", "lint", "passed"), ended("a2", "unit", "passed")} {
if _, err := h.OnStepEnded(goSeat, goSeat.Prefix+"n1", s); err != nil {
t.Fatal(err)
@@ -281,7 +275,7 @@ func TestApprovalEnds(t *testing.T) {
t.Errorf("%s: step %q, pipeline %q (%v)", name, p.Steps[2].Outcome, p.Outcome, err)
}
}
h, store, _, asker, _, _ := fixture()
h, store, _, asker, _ := fixture()
if _, err := h.OnStepEnded(goSeat, goSeat.Prefix+"n1", ended("a1", "lint", "failed")); err != nil {
t.Fatal(err)
}
@@ -509,7 +503,7 @@ func TestEachStepEndWritesItsLineOnce(t *testing.T) {
if _ = sayStepEnded(logf, nil, p, seat.StepResult{Step: "validate", Outcome: "not-asked"}, later); lines[1] != "step ended main.5 - validate not-asked in no start" {
t.Errorf("a step with no mover and no start: %q", lines[1])
}
h, _, _, _, _, _ := fixture()
h, _, _, _, _ := fixture()
lines = nil
h.Logf = logf
if _, err := h.OnStepEnded(goSeat, goSeat.Prefix+"n1", ended("a1", "lint", "passed")); err != nil {
@@ -10,7 +10,7 @@ import (
// RN8 (design 47 G §31, §119): a step keeps the node that took its ask. A running pipeline runs to its end: a newer one
// supersedes it no more (design 47 H §748).
func TestATakenAskNamesItsNode(t *testing.T) {
h, store, _, _, _, _ := fixture()
h, store, _, _, _ := fixture()
if _, err := h.Taken("a1", "n7", h.now()); err != nil {
t.Fatal(err)
}
@@ -12,7 +12,7 @@ import (
// it, after reading back the log's last entry of that pipeline, so a stop between the append and the clear logs it once (design
// 47 G §486, §606, §549).
func TestAStepEndedBeforeItsLogEntryIsAppended(t *testing.T) {
h, store, said, _, _, _ := fixture()
h, store, said, _, _ := fixture()
var logged []seat.LogEntry
full := true
h.Log = func(e seat.LogEntry) error {
@@ -25,7 +25,7 @@ func (a *actLog) RecordHandAct(h views.HandAct) error {
func verbsFixture() (Verbs, memStore, *[]string, *stepAsks, *actLog, *[]string) {
reg, entries := placeFixture()
reg.Policy.Steps.Review = "optional"
h, store, said, _, _, _ := fixture()
h, store, said, _, _ := fixture()
p := seat.Pipeline{Pipeline: pkey, Branch: "main", Source: 5,
Outcome: seat.PipelineOutcomeRunning, Movers: []seat.Mover{{Module: "app", Commit: "c1", Fingerprint: "src2:aa", Repository: "o/app"}}}
p.Steps, _ = Place(p, p.Movers[0], reg, entries, time.Unix(1, 0), "the-runner")
@@ -78,8 +78,8 @@ func TestManifest(t *testing.T) {
// RN24 (§368): the version as MAJOR.MINOR, 0.1 with none published.
{"version 0.1", m.Version == "0.1"},
// RN25 (§477, §533, §59): a foundation part whose seat has verbs and events declares its sent store, 256 MiB.
{"old objects section", equalSets(objects, []string{seat.StateStepOutputs, catalogue.SentObjectsLocal})},
{"step-outputs 1 GiB", objectMiB[seat.StateStepOutputs] == 1024},
// design 47 H2 §791: step-outputs goes; a step's output is read where its build seat's holder keeps it.
{"old objects section", equalSets(objects, []string{catalogue.SentObjectsLocal})},
{"sent-objects 256 MiB", objectMiB[catalogue.SentObjectsLocal] == 256},
// §333, §54, §44, §53, §376, §24, §37, §4, §77: what the runner hears.
{"consumes", equalSets(m.Consumes, []string{
@@ -114,14 +114,18 @@ func TestManifest(t *testing.T) {
"seat:node-build-go.delivery.step", "seat:node-build-node.delivery.step", "seat:node-build-image.delivery.step",
// A-231: the queues of the build seats it asks, check for the steps and delivery for a recovery's.
"seat:node-build-go.accept.check", "seat:node-build-go.accept.delivery", "seat:node-build-node.accept.check",
"seat:node-build-node.accept.delivery", "seat:node-build-image.accept.check", "seat:node-build-image.accept.delivery"})},
"seat:node-build-node.accept.delivery", "seat:node-build-image.accept.check", "seat:node-build-image.accept.delivery",
// design 47 H2 §791: runner_step_output reads a step's output where its build seat's holder keeps it.
"seat:node-build-go.output", "seat:node-build-node.output", "seat:node-build-image.output"})},
{"uses operator-channel", equalSets(m.Uses, []string{"operator-channel"})},
// RN25 (§539): the runner's tools carry the prefix runner_.
{"first-view tools", equalSets(m.Tools, []string{"runner_first_views", "runner_first_view_again", "runner_health", "runner_unlogged", "runner_unlogged_append",
"runner_start", "runner_run", "runner_accept", "runner_ask_again", "runner_place", "runner_end_again", "runner_waiting",
"runner_test_runs", "runner_test_runs_drop", "runner_unfinished", "runner_unfinished_drop", "runner_unfinished_place",
// design 47 H2 §789: a pipeline read in parts.
"runner_show", "runner_movers"})},
"runner_show", "runner_movers",
// design 47 H2 §791: a step's output read where it is kept.
"runner_step_output"})},
// A-305 (ADR 0227 rule 8, ADR 0240 rule 2): the process is judged by its unit, as every process of mesh-delivery,
// never by a tool of its own; runner_health stays a tool.
{"health is the unit", healthTool(raw) == "unit"},
+6 -6
View File
@@ -46,7 +46,8 @@
"runner_unfinished_drop",
"runner_unfinished_place",
"runner_show",
"runner_movers"
"runner_movers",
"runner_step_output"
],
"consumes": [
"mesh-delivery-indexer.take-in.taken",
@@ -100,7 +101,10 @@
"seat:node-build-node.accept.check",
"seat:node-build-node.accept.delivery",
"seat:node-build-image.accept.check",
"seat:node-build-image.accept.delivery"
"seat:node-build-image.accept.delivery",
"seat:node-build-go.output",
"seat:node-build-node.output",
"seat:node-build-image.output"
],
"uses": [
"operator-channel"
@@ -250,10 +254,6 @@
}
],
"objects": [
{
"name": "step-outputs",
"max-mib": 1024
},
{
"name": "sent-objects",
"max-mib": 256