ENG-11 grants: a node's engine hears the status view's settled, on which it retries a failed pull from a store's holder (design 51)

Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
This commit is contained in:
2026-11-04 12:34:50 +01:00
parent 7cd5bfb31b
commit 8975c37a0a
4 changed files with 11 additions and 6 deletions
@@ -946,6 +946,10 @@ func everyNodesCompositions(t *testing.T) {
perms[u.Username()] = p
}
view, plex, one := perms["one.mesh-delivery-view"], perms["one.plex"], perms["node.one"]
// ENG-11 (design 51): a node's engine hears the status view's settled, and a module not named does not.
if !MaySubscribe(one, "mesh.mod.mesh-delivery-view.event.settled") || MaySubscribe(plex, "mesh.mod.mesh-delivery-view.event.settled") {
t.Error("the node-engine does not hear the view's settled, or a module not named does")
}
for _, node := range []string{"one", "two"} {
bucket := "composed-" + node
if !MayPublish(view, "$JS.API.DIRECT.GET.KV_"+bucket+".$KV."+bucket+"."+node+".node") ||
@@ -84,8 +84,9 @@ func NodeAgentAsks(node string) ([]string, error) {
}
// NodeAgentHears are the events a node's node-engine subscribes while it applies a want: the backup holder's word that a
// backup is taken (`backed-up`), from whichever module holds node-backup on its machine (restic today).
var NodeAgentHears = []string{"mesh.mod." + BackupHolderModule + ".event.backed-up"}
// backup is taken (`backed-up`), from whichever module holds node-backup on its machine (restic today); and the status
// view's `settled`, on which it retries a pull from a store's holder that failed (design 51, ENG-11).
var NodeAgentHears = []string{"mesh.mod." + BackupHolderModule + ".event.backed-up", "mesh.mod." + ViewModule + ".event.settled"}
// BackupHolderModule is the module that holds node-backup on every node, restic: the one whose word a node-engine hears.
// A second holder of the seat is a change of this grant.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long