The node agent runs in the node-engine: watches the wants and compositions on the link, applies one module's composition, asks the backup, writes the haves (R6-A A1, A5, A6)

This commit is contained in:
2026-10-24 16:39:51 +02:00
parent d5dd7761c6
commit 3303797bfb
8 changed files with 776 additions and 103 deletions
+12 -1
View File
@@ -127,6 +127,17 @@ func (s *Scheduler) RecordWindowsIn(w *Windows) {
// work on the predecessor's data, under the predecessor's service, which is the one thing an
// adopted node must not do. Nil on a converged node, where nothing is held.
func (s *Scheduler) Sync(d *declaration.Declaration, held map[string]bool) {
s.sync(d, held, nil)
}
// SyncModule is Sync for one module's declaration (novox/hq ADR 0539 §9): the schedules of that module are armed,
// re-armed or forgotten, and the schedules of every other module are left as they are. owns says whether a scheduled
// step's id is the module's.
func (s *Scheduler) SyncModule(d *declaration.Declaration, held map[string]bool, owns func(id string) bool) {
s.sync(d, held, owns)
}
func (s *Scheduler) sync(d *declaration.Declaration, held map[string]bool, owns func(id string) bool) {
s.mu.Lock()
defer s.mu.Unlock()
@@ -177,7 +188,7 @@ func (s *Scheduler) Sync(d *declaration.Declaration, held map[string]bool) {
}
for id := range s.jobs {
if !seen[id] {
if !seen[id] && (owns == nil || owns(id)) {
delete(s.jobs, id)
}
}