Module state is hq ADR 0201 after all: the derived-value record moved to 0202 on hq main

This commit is contained in:
jochen
2026-10-04 11:02:43 +02:00
parent b149e9fcd6
commit 779ea67ea6
9 changed files with 21 additions and 21 deletions
+3 -3
View File
@@ -51,7 +51,7 @@ type Registration struct {
// code subscribes; the runtime binds the module's consumer once and calls deliver for every event,
// acknowledging it on the bus when deliver returns nil.
//
// State and Watch reach the module's state (novox/hq ADR 0202): State answers `get`, `put`, `delete`
// State and Watch reach the module's state (novox/hq ADR 0201): State answers `get`, `put`, `delete`
// and `keys`; Watch hands deliver the current values and then every change, and returns once the
// current values are delivered — the watch is the child's, and stops when the child does.
type Bus interface {
@@ -110,7 +110,7 @@ type child struct {
next int64
dead chan struct{}
why error
// watches are the state watches this child asked for, stopped when it exits (ADR 0202): a child
// watches are the state watches this child asked for, stopped when it exits (ADR 0201): a child
// that starts again watches again, as its code runs again.
watches []func()
}
@@ -234,7 +234,7 @@ func Start(module, entry string, env []string, mesh Bus, logf func(string, ...an
// Each change is asked of this child, in order, naming the watch it is for by
// the id the child asked it with — two watches of one state are two handlers;
// the watch is answered once the current values have been handed over, so a
// bundle that awaits it has the whole of the state before it goes on (ADR 0202).
// bundle that awaits it has the whole of the state before it goes on (ADR 0201).
var stop func()
watch := m.ID
stop, err = mesh.Watch(m.Params, func(change json.RawMessage) error {