C2b: a seat verb's no responders is a transport fault when the assigner names a holder of the seat; a seat nothing holds fails at once (ADR 0664 §1, issue 1748)

Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
2026-11-09 23:12:35 +01:00
parent b9cfa4fe16
commit 89ec9429db
16 changed files with 88 additions and 9 deletions
@@ -17,6 +17,7 @@ import (
"git.novox.be/novox/mesh-catalog/modules/mesh-build-go/buildstep"
builds "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-builder/builds"
sdkstep "git.novox.be/novox/mesh-delivery/sdk/buildstep"
)
// pushed are the blobs the fake holder took, by digest, for the tests that read an archive back.
@@ -130,6 +131,18 @@ func TestARefusedPushFailsNotStoredAndNoPackedFileStays(t *testing.T) {
if c.words != "" && (err == nil || !strings.HasPrefix(err.Error(), builds.NotStored+"tools: ") || !strings.Contains(err.Error(), c.words)) {
t.Errorf("a refused publish answered %v", err)
}
if c.noSeat {
// ADR 0664 §1: with a holder named by the assigner the same words are a transport fault, the bus gives the ask again.
m.Call = func(key string, _ any) (json.RawMessage, error) {
if key == buildstep.AssignerHolders {
return json.RawMessage(`{"seats":[{"seat":"oci-artifact-registry","holders":[{"module":"mesh-registry","node":"novox"}]}],"holds":1}`), nil
}
return nil, errors.New("nats: no responders available for request")
}
if _, err := m.build(context.Background(), buildArgs()); err == nil || !sdkstep.IsPassing(err) || !strings.Contains(err.Error(), "the holder is silent") {
t.Errorf("no responders with a holder named answered %v, want a transport fault", err)
}
}
var archives []string
filepath.WalkDir(work, func(p string, d os.DirEntry, err error) error {
if err == nil && strings.HasSuffix(p, ".tar.gz") {