The composition verb reads the revisions the engine publishes (H5)
ADR 0593 §6: composed-<node> is written again, by the node's engine, each composition with its plan. The verb composition finds a published revision by the digest the have and want name, its resources', so a plan on the record does not hide it. The golden node grant also reads the indexer's verdicts, which compose-candidate takes for a candidate's manifests. Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
This commit is contained in:
@@ -1560,6 +1560,19 @@ func TestTheNodesOwnCompositionIsAppliedWhenItDiffersAndARecordMoveWaitsForAYes(
|
|||||||
if _, err := b.ag.Composition(context.Background(), "db", "sha256:"+strings.Repeat("0", 64), false); err == nil {
|
if _, err := b.ag.Composition(context.Background(), "db", "sha256:"+strings.Repeat("0", 64), false); err == nil {
|
||||||
t.Error("a digest no revision has was answered")
|
t.Error("a digest no revision has was answered")
|
||||||
}
|
}
|
||||||
|
// novox/hq ADR 0593 §6: the engine publishes each composition with its plan in its composition state; the verb reads
|
||||||
|
// that revision by the digest its have and want name, its resources' (the plan left out of the digest).
|
||||||
|
planned, _ := delivery.DecodeComposed(draw)
|
||||||
|
planned.Plan = &catalogue.Plan{}
|
||||||
|
praw, err := delivery.EncodeComposed(planned)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
keep(dk, praw)
|
||||||
|
if view, err := b.ag.Composition(context.Background(), "db", ddig, false); err != nil || view.Composition.Digest != ddig ||
|
||||||
|
len(view.Revisions) != 3 || view.Revisions[2].Digest != ddig {
|
||||||
|
t.Errorf("db's published revision with its plan, asked by its digest, reads %+v (%v)", view, err)
|
||||||
|
}
|
||||||
b.comps.put(dk, draw)
|
b.comps.put(dk, draw)
|
||||||
eventually(t, "db's have stays waiting-yes after its composition went back to what runs", func() bool {
|
eventually(t, "db's have stays waiting-yes after its composition went back to what runs", func() bool {
|
||||||
h := b.haves.last("db")
|
h := b.haves.last("db")
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
// file the node-engine's tests run under (novox/hq ADR 0593 §1): the composer of the bus's user list is the grants
|
// file the node-engine's tests run under (novox/hq ADR 0593 §1): the composer of the bus's user list is the grants
|
||||||
// part's own, so this repository holds what it composes for a node rather than calling it. testdata/node.json is that
|
// part's own, so this repository holds what it composes for a node rather than calling it. testdata/node.json is that
|
||||||
// grant for the node NODE, captured from mesh-sdk's buscompose.PermissionsFor at 3d87ddc, with what this release adds
|
// grant for the node NODE, captured from mesh-sdk's buscompose.PermissionsFor at 3d87ddc, with what this release adds
|
||||||
// to it (ADR 0593 §6, §7): the node's writes of its own composition state, and its reads of the indexer's candidates.
|
// to it (ADR 0593 §6, §7): the node's writes of its own composition state, and its reads of the indexer's candidates
|
||||||
|
// and of its verdicts on their manifests.
|
||||||
// When the grants part changes a node's grant, this file changes with it in the same group.
|
// When the grants part changes a node's grant, this file changes with it in the same group.
|
||||||
package nodegrant
|
package nodegrant
|
||||||
|
|
||||||
|
|||||||
+2
@@ -42,6 +42,7 @@
|
|||||||
"$JS.API.DIRECT.GET.KV_mesh-delivery-indexer_candidates.>",
|
"$JS.API.DIRECT.GET.KV_mesh-delivery-indexer_candidates.>",
|
||||||
"$JS.API.DIRECT.GET.KV_mesh-delivery-indexer_manifests.>",
|
"$JS.API.DIRECT.GET.KV_mesh-delivery-indexer_manifests.>",
|
||||||
"$JS.API.DIRECT.GET.KV_mesh-delivery-indexer_modules.>",
|
"$JS.API.DIRECT.GET.KV_mesh-delivery-indexer_modules.>",
|
||||||
|
"$JS.API.DIRECT.GET.KV_mesh-delivery-indexer_verdicts.>",
|
||||||
"$JS.API.DIRECT.GET.KV_mesh-host_acts.$KV.mesh-host_acts.NODE.>",
|
"$JS.API.DIRECT.GET.KV_mesh-host_acts.$KV.mesh-host_acts.NODE.>",
|
||||||
"$JS.API.DIRECT.GET.KV_mesh-host_data.$KV.mesh-host_data.NODE.>",
|
"$JS.API.DIRECT.GET.KV_mesh-host_data.$KV.mesh-host_data.NODE.>",
|
||||||
"$JS.API.DIRECT.GET.KV_mesh-host_health.$KV.mesh-host_health.NODE",
|
"$JS.API.DIRECT.GET.KV_mesh-host_health.$KV.mesh-host_health.NODE",
|
||||||
@@ -59,6 +60,7 @@
|
|||||||
"$JS.API.STREAM.INFO.KV_mesh-delivery-indexer_candidates",
|
"$JS.API.STREAM.INFO.KV_mesh-delivery-indexer_candidates",
|
||||||
"$JS.API.STREAM.INFO.KV_mesh-delivery-indexer_manifests",
|
"$JS.API.STREAM.INFO.KV_mesh-delivery-indexer_manifests",
|
||||||
"$JS.API.STREAM.INFO.KV_mesh-delivery-indexer_modules",
|
"$JS.API.STREAM.INFO.KV_mesh-delivery-indexer_modules",
|
||||||
|
"$JS.API.STREAM.INFO.KV_mesh-delivery-indexer_verdicts",
|
||||||
"$JS.API.STREAM.INFO.KV_mesh-host_acts",
|
"$JS.API.STREAM.INFO.KV_mesh-host_acts",
|
||||||
"$JS.API.STREAM.INFO.KV_mesh-host_data",
|
"$JS.API.STREAM.INFO.KV_mesh-host_data",
|
||||||
"$JS.API.STREAM.INFO.KV_mesh-host_health",
|
"$JS.API.STREAM.INFO.KV_mesh-host_health",
|
||||||
|
|||||||
Reference in New Issue
Block a user