mesh/delivery merged: source.main moved to novox/mesh-host@87bdc95a3d65
mesh/check pass 7b42c94a4d78 on 87bdc95a3d65 | unit 1679 run, 333 kept, 31 skipped | integration 1692 run, 333 kept, 26 skipped | over bound: unit (sl…
The link serves the seat node-engine when it opens, before the node agent starts the reader of the seat list; since ADR 0635 catalogue holds no seat until then, so the engine registered no verb at all. Nobody answered manifest-reads, compose, composition or the hand acts on novox, shanks and now ace, and the assigner kept ace's old statement, holding its own successor on seats the new engine states. Quick and thorough fix are one here: the only seat-list read at start is this one (the composer waits for the list, the reads statement restates). Claude-Session: https://claude.ai/code/session_01NcbgfFfQ4Z9UE5jK32PmE5
36 lines
1.2 KiB
Go
36 lines
1.2 KiB
Go
package link
|
|
|
|
import (
|
|
"slices"
|
|
"testing"
|
|
|
|
"git.novox.be/novox/mesh-sdk/go/catalogue"
|
|
"git.novox.be/novox/mesh-sdk/go/seatlist/seatlisttest"
|
|
)
|
|
|
|
// The seats the tests judge against are given to catalogue as the node-engine gives the ones it read from the bus
|
|
// (novox/hq ADR 0635 §1); catalogue compiles none.
|
|
func init() { catalogue.UseSeats(catalogue.SeatsFromDefinitions(seatlisttest.Definitions())) }
|
|
|
|
// Before the engine holds a seat list it serves its seat's verbs from the bootstrapped definition (issue 1966: served from
|
|
// the empty list, it answered no verb and the assigner kept an old statement).
|
|
func TestServedEngineSeatBeforeTheList(t *testing.T) {
|
|
held := catalogue.Seats()
|
|
defer catalogue.UseSeats(held)
|
|
for _, tc := range []struct {
|
|
name string
|
|
seats []catalogue.Seat
|
|
}{{"no list held", nil}, {"list held", held}} {
|
|
catalogue.UseSeats(tc.seats)
|
|
var names []string
|
|
for _, v := range ServedEngineSeat().Serves {
|
|
names = append(names, v.Name)
|
|
}
|
|
for _, want := range []string{ActManifestReads, ActComposition, ActHandOver} {
|
|
if !slices.Contains(names, want) {
|
|
t.Errorf("%s: the engine serves %v, without %s", tc.name, names, want)
|
|
}
|
|
}
|
|
}
|
|
}
|