From 497f87176ba27559b80d50048eaf4f9dd315937b Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 11 Nov 2026 21:16:18 +0100 Subject: [PATCH] The builder, checker, view and watchman read a step key as SD4 has it: ParseStepKey answers asker, node and id MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The join with CT-SD4 (6351e988) gives ParseStepKey four values (G §484, §649); the callers that read only the node or the id follow. Builds: design 47 G §484, §649 Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ --- modules/mesh-delivery-builder/buildrun/steps.go | 2 +- modules/mesh-delivery-builder/internal/build/stuck.go | 2 +- modules/mesh-delivery-checker/internal/check/bounded.go | 2 +- modules/mesh-delivery-view/internal/view/usage.go | 2 +- modules/mesh-delivery-watchman/internal/watch/mirror.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/mesh-delivery-builder/buildrun/steps.go b/modules/mesh-delivery-builder/buildrun/steps.go index 37e9bed8..37566008 100644 --- a/modules/mesh-delivery-builder/buildrun/steps.go +++ b/modules/mesh-delivery-builder/buildrun/steps.go @@ -48,7 +48,7 @@ func (r Runner) Run(ctx context.Context, module, node, tool string, args map[str if answer.Key == "" { return nil, fmt.Errorf("%s on %s answered no step key: %s", tool, node, raw) } - if n, _, err := buildstep.ParseStepKey(answer.Key); err != nil || n != node { + if _, n, _, err := buildstep.ParseStepKey(answer.Key); err != nil || n != node { return nil, fmt.Errorf("%s on %s answered the step key %q, which is not a key of that node", tool, node, answer.Key) } wait, cancel := context.WithTimeoutCause(ctx, r.Bound, fmt.Errorf("the step %s did not end within %s", answer.Key, r.Bound)) diff --git a/modules/mesh-delivery-builder/internal/build/stuck.go b/modules/mesh-delivery-builder/internal/build/stuck.go index 77860c0f..04f3fd1a 100644 --- a/modules/mesh-delivery-builder/internal/build/stuck.go +++ b/modules/mesh-delivery-builder/internal/build/stuck.go @@ -325,7 +325,7 @@ func (r StuckReader) Stuck(module string) (map[string]any, error) { } byID := make(map[string]string, len(ks)) for _, k := range ks { - if _, id, err := buildstep.ParseStepKey(k); err == nil { + if _, _, id, err := buildstep.ParseStepKey(k); err == nil { byID[id] = k } } diff --git a/modules/mesh-delivery-checker/internal/check/bounded.go b/modules/mesh-delivery-checker/internal/check/bounded.go index 5e8918c9..de61fc25 100644 --- a/modules/mesh-delivery-checker/internal/check/bounded.go +++ b/modules/mesh-delivery-checker/internal/check/bounded.go @@ -60,7 +60,7 @@ func capKeys(keys []string, narrow string) ([]string, string) { // longer id is the later and equal lengths compare as text. A key that is no step key goes last. func newestFirst(keys []string) { id := func(k string) (string, bool) { - _, id, err := buildstep.ParseStepKey(k) + _, _, id, err := buildstep.ParseStepKey(k) return id, err == nil } sort.Slice(keys, func(i, j int) bool { diff --git a/modules/mesh-delivery-view/internal/view/usage.go b/modules/mesh-delivery-view/internal/view/usage.go index 611af31f..190d6baa 100644 --- a/modules/mesh-delivery-view/internal/view/usage.go +++ b/modules/mesh-delivery-view/internal/view/usage.go @@ -339,7 +339,7 @@ func (u UsageReader) Usage() UsageAnswer { } var recent []keyAt for _, k := range keys { - _, id, err := buildstep.ParseStepKey(k) + _, _, id, err := buildstep.ParseStepKey(k) if err != nil { continue } diff --git a/modules/mesh-delivery-watchman/internal/watch/mirror.go b/modules/mesh-delivery-watchman/internal/watch/mirror.go index 01fdc06d..96e5a228 100644 --- a/modules/mesh-delivery-watchman/internal/watch/mirror.go +++ b/modules/mesh-delivery-watchman/internal/watch/mirror.go @@ -33,7 +33,7 @@ func (w *Watchman) Step(language, key string, value []byte, op Op) { w.say("no pulse for the step %s: %v", key, err) return } - node, id, err := buildstep.ParseStepKey(key) + _, node, id, err := buildstep.ParseStepKey(key) if err != nil { return }