The build seat's ask run and the checker seat's verb input: a checking program built from a change (issue 1921, B0) #170

Merged
mesh-tools merged 6 commits from feat/b0-checking-program into main 2026-11-07 00:32:40 +00:00
2 changed files with 11 additions and 0 deletions
Showing only changes of commit bdf44cd8e0 - Show all commits
+6
View File
@@ -118,6 +118,12 @@ func AskWhat(a delivery.StepAsk) string {
}
case a.Compose != nil:
parts = append(parts, "compose", str(a.Compose.Fetch, "repository")+"@"+short(str(a.Compose.Fetch, "commit")))
case a.Run != nil:
parts = append(parts, "run "+a.Run.Program.Package, a.Run.Program.Repository+"@"+short(a.Run.Program.Commit))
if len(a.Run.Args) > 0 {
parts = append(parts, strings.Join(a.Run.Args, " "))
}
parts = append(parts, fmt.Sprintf("%d heads", len(a.Run.Heads)))
}
return strings.Join(parts, ", ")
}
+5
View File
@@ -159,4 +159,9 @@ func TestAskWhat(t *testing.T) {
if got, want := AskWhat(build), "delivery ask, module mesh-x, fp abcdef012345"; got != want {
t.Errorf("build = %q", got)
}
// 1921: a run ask's step names the program, where it is built, its arguments and how many heads it reads.
run := delivery.StepAsk{Kind: "check", Run: &delivery.RunJob{Program: delivery.RunProgram{Repository: "novox/mesh-delivery", Commit: "fedcba9876543210", Package: "./cmd/mesh-checking-program"}, Heads: []delivery.RunHead{{}, {}}, Args: []string{"-verdict"}}}
if got, want := AskWhat(run), "check ask, run ./cmd/mesh-checking-program, novox/mesh-delivery@fedcba987654, -verdict, 2 heads"; got != want {
t.Errorf("run = %q", got)
}
}