Node-engine: the placement's bucket and read names come from the assigner client (ADR 0634 §4; issue 1966)

Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
2026-11-05 15:36:05 +01:00
parent c35cc1d9e4
commit 669589b76b
2 changed files with 10 additions and 4 deletions
+9 -3
View File
@@ -3,6 +3,12 @@
// reads through grants composed in code, so the holder's name is kept here, in its own code (ADR 0634 §1, finding F4).
package buckets
import (
assigner "git.novox.be/novox/mesh-contracts/placement/go/clients/meshmoduleassignerclient"
seat "git.novox.be/novox/mesh-contracts/placement/go/seats/meshmoduleassigner"
wants "git.novox.be/novox/mesh-contracts/placement/go/seats/meshwants"
)
// The node-engine's own states and the have state, written by every node's engine for its own keys.
const (
// Have holds a module's have on a node, `<node>.<module>`, and the node's own facts, `<node>.node`.
@@ -20,9 +26,9 @@ const HaveHistory = 20
// module as every state is (ADR 0634 §1, finding F4: the holder's name is kept here, in the engine's code).
const (
// Placement holds a node's placement, `<node>.node`, and each of its modules, `<node>.<module>`.
Placement = "mesh-delivery-assigner_placement"
Placement = assigner.PlacementBucket
// PlacementCandidates holds a node's candidate of a proposal, `<proposal>.<node>`.
PlacementCandidates = "mesh-delivery-assigner_candidates"
PlacementCandidates = assigner.Module + "_" + seat.StateCandidates
// Wants holds what each node should run, `want.<node>.<module>` and `want.<node>.node`.
Wants = "mesh-delivery-assigner_wants"
Wants = assigner.Module + "_" + wants.StateWants
)
+1 -1
View File
@@ -28,7 +28,7 @@ import (
const (
// The holders' names are kept here, in the engine's own code, as the names of the states a manifest's reads use
// (ADR 0634 §1, finding F4); a seat's contract names a state locally, not the module that holds it.
PlacementRead = "mesh-delivery-assigner.placement"
PlacementRead = meshmoduleassignerclient.PlacementRead
ModulesRead = "mesh-delivery-indexer.modules"
ManifestsRead = "mesh-delivery-indexer.manifests"
BuildsRead = "mesh-delivery-builder.builds"