The checker's seat serves a checking program's input, a verdict names the program that judged it, and the build step's part carries the run ask (issue 1921, milestone 47/G D1)
B0's run job, its input verb and judged-by move from mesh-sdk's go/delivery into the Delivery domain's contracts, with B0's JSON names: the part build-step carries StepAsk.run and the defs RunJob, RunProgram, RunHead, RunInput and RunAnswer beside compose (the lead's ruling on Q1), and a step's result the run's exit, output and said. Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
@@ -129,6 +129,11 @@ export type PlacedBeside = buildStep.PlacedBeside;
|
||||
export type Program = buildStep.Program;
|
||||
export type ResumeAnswer = buildStep.ResumeAnswer;
|
||||
export type ResumeInput = buildStep.ResumeInput;
|
||||
export type RunAnswer = buildStep.RunAnswer;
|
||||
export type RunHead = buildStep.RunHead;
|
||||
export type RunInput = buildStep.RunInput;
|
||||
export type RunJob = buildStep.RunJob;
|
||||
export type RunProgram = buildStep.RunProgram;
|
||||
export type Step = buildStep.Step;
|
||||
export type StepAsk = buildStep.StepAsk;
|
||||
export type StepAskBuild = buildStep.StepAskBuild;
|
||||
|
||||
@@ -197,6 +197,51 @@ export interface Program {
|
||||
"path": string;
|
||||
}
|
||||
|
||||
/** what a run ask's step answers: whether this run built the program or took the one kept under its key, the key, the program's exit, the last line of its standard output and the first of its standard error */
|
||||
export interface RunAnswer {
|
||||
"built": boolean;
|
||||
"exit": number;
|
||||
"key": string;
|
||||
/** raw when it is JSON, else a JSON string */
|
||||
"output"?: unknown;
|
||||
"said"?: string;
|
||||
}
|
||||
|
||||
/** one commit a run's program reads */
|
||||
export interface RunHead {
|
||||
"commit": string;
|
||||
"repository": string;
|
||||
}
|
||||
|
||||
/** a run's input by reference: the seat verb the asker serves it on (seat:<seat>.<verb>), the sha256 of its bytes and its size, at most 256 KiB */
|
||||
export interface RunInput {
|
||||
/** 64 lowercase hex digits */
|
||||
"digest": string;
|
||||
/** bytes */
|
||||
"size": number;
|
||||
"verb": string;
|
||||
}
|
||||
|
||||
/** a run ask's job: where its program is built, the heads it reads (each laid read-only at its repository's path), its input by reference, its arguments and what it is for */
|
||||
export interface RunJob {
|
||||
/** the program's arguments, each a word or a flag */
|
||||
"args"?: string[];
|
||||
/** the commits the program reads, a repository at most once */
|
||||
"heads": RunHead[];
|
||||
"input": RunInput;
|
||||
"program": RunProgram;
|
||||
/** what the run is for, for a reader of the ask */
|
||||
"reader"?: string;
|
||||
}
|
||||
|
||||
/** where a run's program is built: the repository and full commit fetched, the Go module's directory in it and the program's import path */
|
||||
export interface RunProgram {
|
||||
"commit": string;
|
||||
"dir": string;
|
||||
"package": string;
|
||||
"repository": string;
|
||||
}
|
||||
|
||||
/** one step a build module runs on a node */
|
||||
export interface Step {
|
||||
/** when (RFC 3339 time) */
|
||||
@@ -268,16 +313,20 @@ export interface StepAsk {
|
||||
"needs"?: string[];
|
||||
/** package to the tagged version a build pins */
|
||||
"packages"?: Record<string, string>;
|
||||
/** a run: a program built from a change and run in the build seat's sandbox over the heads, its input asked of a verb of the asker's seat; the Go seat's check stream alone carries it, as a compose */
|
||||
"run"?: RunJob;
|
||||
/** the layout version */
|
||||
"v"?: number;
|
||||
}
|
||||
|
||||
/** what a step answered, by the kind of ask: a build's artifacts, toolchain, imports and out-of-step modules; a check's fetch and levels; a compose's built, key and verdict; a declined ask's declined, needs and lacks. The fields of the kinds do not meet, so one layout holds the four */
|
||||
/** what a step answered, by the kind of ask: a build's artifacts, toolchain, imports and out-of-step modules; a check's fetch and levels; a compose's built, key and verdict; a run's built, key, exit, output and said; a declined ask's declined, needs and lacks. The fields of the kinds do not meet, so one layout holds the five */
|
||||
export interface StepResult {
|
||||
"artifacts"?: BuiltArtifact[];
|
||||
"built"?: boolean;
|
||||
/** the holder declined the ask: its node lacks what the ask needs */
|
||||
"declined"?: boolean;
|
||||
/** a run's program's exit status */
|
||||
"exit"?: number;
|
||||
"fetch"?: FetchAnswer;
|
||||
"imports"?: string[];
|
||||
"key"?: string;
|
||||
@@ -287,6 +336,10 @@ export interface StepResult {
|
||||
/** what the declined ask needs */
|
||||
"needs"?: string[];
|
||||
"out-of-step"?: string[];
|
||||
/** a run's program's last line of standard output: raw when it is JSON, else a JSON string */
|
||||
"output"?: unknown;
|
||||
/** a run's program's first line of standard error, or why the step could not run it */
|
||||
"said"?: string;
|
||||
"toolchain"?: ToolchainUsed;
|
||||
/** the compose-candidate verdict (the composer's own layout) */
|
||||
"verdict"?: unknown;
|
||||
|
||||
Reference in New Issue
Block a user