mesh-grants: a node reads the indexer's candidates and verdicts whole, as its engine reads a key through a short consumer

ADR 0593 §7: compose-candidate's read of one key times out without the consumer grants, so both buckets
are granted as the builder's builds are; the node grant now equals mesh-host's golden node.json.

Claude-Session: https://claude.ai/code/session_01NcbgfJ9Gum47zkFKWRaovL
This commit is contained in:
2026-11-02 18:56:19 +01:00
parent 0b03b9c7c5
commit c62a501bf0
3 changed files with 7 additions and 12 deletions
@@ -30,14 +30,9 @@ func ComposedReads(node string) ([]string, error) {
}
// CandidateReads is what a node's engine is granted of the indexer's candidates and manifest verdicts to answer
// `compose-candidate` (ADR 0593 §7, ADR 0578 §3): binding each bucket and a direct get of one key; no consumer, so it
// neither lists nor watches them.
var CandidateReads = []string{
"$JS.API.DIRECT.GET.KV_" + delivery.CandidatesBucket + ".>",
"$JS.API.STREAM.INFO.KV_" + delivery.CandidatesBucket,
"$JS.API.DIRECT.GET.KV_" + delivery.VerdictsBucket + ".>",
"$JS.API.STREAM.INFO.KV_" + delivery.VerdictsBucket,
}
// `compose-candidate` (ADR 0593 §7, ADR 0578 §3): each bucket read whole as the builder's builds are (a key is read
// through a short consumer), never written.
var CandidateReads = append(readGrants(delivery.CandidatesBucket, ""), readGrants(delivery.VerdictsBucket, "")...)
// EngineComposedBuckets are the composition buckets of every node, as the node-engine's state (ADR 0593 §6): the grants
// part creates each, create-only, with the history ADR 0539 clause 4 keeps (delivery.ComposedHistory), as it creates a
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long