W13.5: the node agent asks mesh-recovery for a restore point before a form change and restores it at a revert
Before a move across a kept data's form change the node agent asks snapshot-kept and waits for the ended of its own act; at a revert it stops the newer build (Env.Stop), asks kept-points, asks restore-kept with the snapshot of the point of the form and fingerprint it reverts from, waits for restored, applies the reverted build, and calls the point's catch-up as the module's tool through the tool runner. The wait is in the have (ask-at, act), bounded by a bounds key of the state bounds (recovery-wait-minutes, 90), and each ending is read as the table of 560 says. The manifest consumes mesh-recovery's ended and restored and invokes its three verbs. Builds: design 47 G §296, §297, §554, §555, §560, §630, §631, §632, §633, A-77, A-92, A-98, A-108 Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
"git.novox.be/novox/mesh-delivery/contracts/go/seats/meshcatalog"
|
||||
"git.novox.be/novox/mesh-delivery/contracts/go/seats/meshwants"
|
||||
"git.novox.be/novox/mesh-delivery/modules/mesh-delivery-builder/builds"
|
||||
"git.novox.be/novox/mesh-sdk/go/catalogue"
|
||||
|
||||
"github.com/novox/mesh-host/internal/agent"
|
||||
)
|
||||
@@ -514,3 +515,32 @@ func EntryCall(ask func(ctx context.Context, seat, verb string, args any) (json.
|
||||
|
||||
// noEntryWords are the words the seat's holder refuses an unknown fingerprint in.
|
||||
const noEntryWords = "no entry of fingerprint"
|
||||
|
||||
// FormChanges are the kept data whose form differs between the manifests of the build a module runs and the one a want moves it
|
||||
// to, each read from the entry the composer holds of its fingerprint (design 47 G §296, §297). An entry not held is an error: the
|
||||
// node agent then says it is not known and the move goes on.
|
||||
func (c *Composer) FormChanges(_ context.Context, module, runningFp, appliedFp string) ([]catalogue.FormChange, error) {
|
||||
if !c.byEntries() {
|
||||
return nil, fmt.Errorf("this engine reads no entry by fingerprint")
|
||||
}
|
||||
read := func(fp string) (catalogue.Manifest, error) {
|
||||
e, state := c.entryOf(fp)
|
||||
if state != meshcatalogclient.EntryAnswered {
|
||||
return catalogue.Manifest{}, fmt.Errorf("the entry of %s is %s", fp, state)
|
||||
}
|
||||
_, raw, err := entryManifest(e)
|
||||
if err != nil {
|
||||
return catalogue.Manifest{}, err
|
||||
}
|
||||
return catalogue.Decode(raw)
|
||||
}
|
||||
running, err := read(runningFp)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%s's running manifest: %w", module, err)
|
||||
}
|
||||
applied, err := read(appliedFp)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("%s's wanted manifest: %w", module, err)
|
||||
}
|
||||
return catalogue.FormChanges(running, applied), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user