Play the config watch in the package seats' whole test, so the held callers list is proven (issue 1966)
mesh/delivery merged: source.main moved to novox/mesh-catalog@462db1c25719
mesh/check checking 067b9a47dafd on 462db1c25719
mesh/delivery merged: source.main moved to novox/mesh-catalog@462db1c25719
mesh/check checking 067b9a47dafd on 462db1c25719
The holder holds its callers by a config watch since the callers were moved off per-call reads; the test's player answered only provision.get. Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ
This commit is contained in:
@@ -6,7 +6,7 @@ package main
|
||||
// the built package-registry bundle, played over its real stdin and stdout as the node's tool runtime plays it, its
|
||||
// `incoming` an object store and its `transfers` and `findings` key-value buckets of a nats-server of this test alone
|
||||
// (so the publish in parts runs through mesh-sdk's parts.BusObjects and BusTransfers, ruling 4 of the lead's 14:0x), the
|
||||
// builder's builder_versions answered on mesh/ask, the config value `callers` on mesh/provision.get, and the forge an
|
||||
// builder's builder_versions answered on mesh/ask, the config value `callers` watched on mesh/provision.watch, and the forge an
|
||||
// httptest server that takes reads only with the tools' token and writes only with the packages account's.
|
||||
//
|
||||
// A Go package the builder numbered goes up in two chunks, is uploaded whole as the packages account and says
|
||||
@@ -123,8 +123,12 @@ func (p *player) handle(m wire) {
|
||||
_ = json.Unmarshal(a.Body, &q)
|
||||
d, ok := p.numbered[q.Name+"@"+q.Version]
|
||||
p.answer(m.ID, map[string]any{"recorded": ok && d == q.Digest, "why": "not numbered with that digest"}, nil)
|
||||
case m.Method == "mesh/provision.get" && a.Kind == "config":
|
||||
p.answer(m.ID, nil, nil) // `callers` unset: design 51's list
|
||||
case m.Method == "mesh/provision.watch" && a.Kind == "config":
|
||||
// The watch of `callers`, as the runtime answers it: the value now as one change (mesh/provision,
|
||||
// named by the watch's id) handed over before the watch is answered, here unset, so design 51's list holds.
|
||||
p.send(map[string]any{"id": "change-" + watchID(m.ID), "method": "mesh/provision", "params": map[string]any{
|
||||
"watch": watchID(m.ID), "change": map[string]any{"kind": "config", "key": a.Key}}})
|
||||
p.answer(m.ID, map[string]any{}, nil)
|
||||
case m.Method == "mesh/seat.publish":
|
||||
p.answer(m.ID, map[string]any{}, p.nc.Publish(a.Subject, a.Body))
|
||||
case m.Method == "mesh/publish":
|
||||
@@ -138,6 +142,15 @@ func (p *player) handle(m wire) {
|
||||
}
|
||||
}
|
||||
|
||||
// watchID is the watch's id as a string, the form the change names it by.
|
||||
func watchID(raw json.RawMessage) string {
|
||||
var id string
|
||||
if json.Unmarshal(raw, &id) != nil {
|
||||
return string(raw)
|
||||
}
|
||||
return id
|
||||
}
|
||||
|
||||
func (p *player) objects(m wire, local, name string, data []byte) {
|
||||
os, err := p.js.ObjectStore(p.ctx, "gitea_"+local)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user