Node-engine: the have, the node's facts, the record, the health report and the data items are the seat's contract types, written through the node-engine client; the interim bridge is gone (Have group, ADR 0634 §1, §4; issue 1966)

Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
2026-11-05 15:21:48 +01:00
parent 5906e18028
commit 7eb7b9fa62
44 changed files with 650 additions and 549 deletions
+5 -4
View File
@@ -31,6 +31,7 @@ import (
"encoding/hex"
"encoding/json"
"fmt"
"git.novox.be/novox/mesh-contracts/go/seats/nodeengine"
engcomp "github.com/novox/mesh-host/internal/compositions"
"regexp"
"sort"
@@ -49,7 +50,7 @@ const ResourceID = "bus-users"
// Written is what the follower last did: the source it took the list from, the list's digest there, the file's digest
// on the machine after the write, how many users the list holds, when, and why a write failed.
type Written = delivery.UserListWritten
type Written = nodeengine.UserListWritten
// Env is everything the follower needs of the node.
type Env struct {
@@ -336,13 +337,13 @@ func (f *Follower) settleGrants(ctx context.Context, again bool) {
}
moved := file.module != f.cur.module || pathOf(file.resource) != pathOf(f.cur.resource)
f.cur = file
if !again && !moved && f.state.Source != "" && f.state.Revision == rev && f.written {
if !again && !moved && f.state.Source != "" && f.state.Revision == int64(rev) && f.written {
f.mu.Unlock()
return
}
f.mu.Unlock()
w := Written{Source: delivery.GrantsUserListSource, Revision: rev, Wanted: g.Digest, At: f.env.Now().UTC(),
w := Written{Source: delivery.GrantsUserListSource, Revision: int64(rev), Wanted: g.Digest, At: f.env.Now().UTC(),
Follows: delivery.FollowGrants, Key: f.key(), Unwatched: f.unwatchedNow()}
var err error
var changed bool
@@ -370,7 +371,7 @@ func (f *Follower) settleGrants(ctx context.Context, again bool) {
}
}
if err == nil {
w.Users = Users(body)
w.Users = int64(Users(body))
if err = f.guard(resource, body); err != nil {
if disk, derr := f.env.OnDisk(resource); derr == nil && disk != nil {
w.Digest = Digest(disk)
+1 -1
View File
@@ -109,7 +109,7 @@ func TestTheBusNodeWritesTheGrantsPartsUserListAlone(t *testing.T) {
failWrite bool
onDisk string
wantWrites []string // contents written, in order
wantUsers int
wantUsers int64
wantErr string
wantRefused bool
grants []gput