From bdf44cd8e0924d0a102e65ec773d9cf90154dd9a Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 6 Nov 2026 22:23:30 +0100 Subject: [PATCH] A run ask's step says which program it runs, from where, with which arguments, over how many heads (issue 1921) Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i --- go/buildstep/stale.go | 6 ++++++ go/buildstep/stale_test.go | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/go/buildstep/stale.go b/go/buildstep/stale.go index bd7deb7..674b36d 100644 --- a/go/buildstep/stale.go +++ b/go/buildstep/stale.go @@ -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, ", ") } diff --git a/go/buildstep/stale_test.go b/go/buildstep/stale_test.go index 8db343f..95b17d8 100644 --- a/go/buildstep/stale_test.go +++ b/go/buildstep/stale_test.go @@ -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) + } }