From c529ca259f6c50cee2af60fb2af938c1515edfc8 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 12 Nov 2026 18:40:16 +0100 Subject: [PATCH] seatgen -check passes at the join: the catalog client's test imports no bus client MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit branches_test.go named nats.ErrNoResponders for a call that reached no holder, so the generator's check refused the contracts module ("a client uses only its seat's contract and mesh-sdk's runtime", ADR 0625 §3), met twice at join 11. The test now gives the words a runtime passes that refusal on with, which busretry.Undelivered reads the same way. Builds: design 47 G A-170 (the regenerated contracts, checked in place) Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h --- .../go/clients/meshcatalogclient/branches_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/mesh-delivery-contracts/go/clients/meshcatalogclient/branches_test.go b/modules/mesh-delivery-contracts/go/clients/meshcatalogclient/branches_test.go index 2dfade9d..0b44efa6 100644 --- a/modules/mesh-delivery-contracts/go/clients/meshcatalogclient/branches_test.go +++ b/modules/mesh-delivery-contracts/go/clients/meshcatalogclient/branches_test.go @@ -3,6 +3,7 @@ package meshcatalogclient import ( "context" "encoding/json" + "errors" "fmt" "slices" "strings" @@ -14,7 +15,6 @@ import ( "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-sdk/sourcebranches" "git.novox.be/novox/mesh-sdk/go/busretry" "git.novox.be/novox/mesh-sdk/go/views" - "github.com/nats-io/nats.go" ) // fakeWiring is a part's reader: it keeps the views adopted, by `.`, and says each drop. @@ -255,7 +255,11 @@ func TestEntriesAreAskedOnceAnsweredOrNotFound(t *testing.T) { if rows := viaConn.Rows(); len(rows) != 1 || rows[0].State != EntryNotFound || rows[0].Detail == "" || len(toldConn) == 0 { t.Fatalf("the holder's answer through a process's call: rows %+v, told %d", rows, len(toldConn)) } - unreached := NewEntries(func(string, any) (json.RawMessage, error) { return nil, nats.ErrNoResponders }) + // A call that reached no holder, in the words a runtime passes the bus's refusal on with (busretry.Undelivered): a client's + // test imports only its seat's contract and mesh-sdk's runtime (ADR 0625 §3), never the bus's client. + unreached := NewEntries(func(string, any) (json.RawMessage, error) { + return nil, errors.New("nats: no responders available for request") + }) unreached.Changed = func(r EntryRow) { t.Errorf("a call that reached no holder told %+v", r) } if err := unreached.Again(ctx, "src2:x"); err == nil { t.Fatal("again of an entry never needed answers no error")