mesh-build-go reads a check's toolchain from the job, answers with the Delivery SDK's CheckAnswer and typed FetchAnswer, and takes the toolchains value from the Delivery SDK; askrun_gaps.go and toolchain.go are gone (B5j; ADR 0584 clause 2, ADR 0634 section 6; issue 1966)

Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
2026-11-05 16:24:13 +01:00
parent 634abead7d
commit ef81dc2712
16 changed files with 54 additions and 237 deletions
@@ -11,7 +11,6 @@ import (
"testing"
"time"
buildstep "git.novox.be/novox/mesh-catalog/modules/mesh-build-go/buildstep"
sdkstep "git.novox.be/novox/mesh-delivery/sdk/buildstep"
"git.novox.be/novox/mesh-sdk/go/health"
)
@@ -19,17 +18,17 @@ import (
// keptStates stands in for the toolchains and the steps states.
type keptStates struct {
mu sync.Mutex
toolchains map[string]buildstep.Toolchain
toolchains map[string]sdkstep.Toolchain
steps map[string][]sdkstep.Step
ended chan string
}
func newStates() *keptStates {
return &keptStates{toolchains: map[string]buildstep.Toolchain{}, steps: map[string][]sdkstep.Step{}, ended: make(chan string, 16)}
return &keptStates{toolchains: map[string]sdkstep.Toolchain{}, steps: map[string][]sdkstep.Step{}, ended: make(chan string, 16)}
}
func (s *keptStates) putToolchain(key string, value any) (uint64, error) {
tc, err := buildstep.DecodeToolchain(value.(json.RawMessage))
tc, err := sdkstep.DecodeToolchain(value.(json.RawMessage))
if err != nil {
return 0, err
}
@@ -53,7 +52,7 @@ func (s *keptStates) putStep(key string, value any) (uint64, error) {
return 1, nil
}
func (s *keptStates) toolchain(key string) (buildstep.Toolchain, bool) {
func (s *keptStates) toolchain(key string) (sdkstep.Toolchain, bool) {
s.mu.Lock()
defer s.mu.Unlock()
tc, ok := s.toolchains[key]
@@ -88,7 +87,7 @@ func TestStartWritesTheToolchainAndHealthIsHealthy(t *testing.T) {
ctx, stop := context.WithCancel(context.Background())
defer stop()
go m.Start(ctx)
var tc buildstep.Toolchain
var tc sdkstep.Toolchain
for deadline := time.Now().Add(3 * time.Second); time.Now().Before(deadline); time.Sleep(5 * time.Millisecond) {
if got, ok := states.toolchain("ace.typescript"); ok {
tc = got