MH-0: an entry whose ask failed is asked again, at most entry-asks times, then unanswered
The node-engine consumes the entries client's asking again (H-A-60, H-A-110): the setting entry-asks (default 5; module.json config and file resource, read at the engine's start) goes to Entries.Asks; Entries.AskAgain is called at each link's start and on each catalog-revision the composer hears (the shadow's cache too); the finding entry-unanswered joins the engine's finding kinds, written with a journal line when an entry ends unanswered and cleared when it is answered or no longer wanted; the shadow's wait and the have's hold end on it instead of waiting without bound. Builds: design 47 H, H-A-60, H-A-110 Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy
This commit is contained in:
@@ -627,6 +627,11 @@ func nodeAgent(ctx context.Context, opts options, signer ed25519.PublicKey, trus
|
||||
say("the finding that the catalog half holds no entry of " + fp + " cannot be kept: " + err.Error())
|
||||
}
|
||||
},
|
||||
entryUnanswered: func(fp string, asks int, unanswered bool) {
|
||||
if err := seatwait.SayEntryUnanswered(run, findings, node, findings.observer(), fp, asks, unanswered, time.Now); err != nil {
|
||||
say("the finding that the entry of " + fp + " is unanswered cannot be kept: " + err.Error())
|
||||
}
|
||||
},
|
||||
seatList: seats,
|
||||
seatListFailed: err != nil,
|
||||
running: func() []compositions.Composed {
|
||||
@@ -690,10 +695,14 @@ func nodeAgent(ctx context.Context, opts options, signer ed25519.PublicKey, trus
|
||||
// nothing and keeps running what it runs; a assignment it cannot watch stops the agent, said, and it begins again.
|
||||
composer := selfComposer(session, node, hooks, say)
|
||||
composer.AlsoEntryAgain = shadow.EntryAgain
|
||||
composer.AlsoEntriesAskAgain = shadow.EntriesAskAgain
|
||||
composer.OnEngine = session.Own.Set // the first composing names the engine's own module on a first start (§527, §634)
|
||||
machinesNow.Store(composer) // the machines a failing network part points at, by the assignments (issue 774)
|
||||
composerNow.Store(composer) // what the verb compose asks a pass of, this run's alone
|
||||
session.SetManifestOf(composer.ManifestOf) // the event running names the manifest of the build that runs
|
||||
// The link is open: each entry whose ask failed in transport is asked again (design 47 H, H-A-60).
|
||||
composer.EntriesAskAgain(run)
|
||||
shadow.EntriesAskAgain(run)
|
||||
go followRunning(run, session, composer, say)
|
||||
go followBuildEnds(run, session, composer, say)
|
||||
apply.UseEngineModule(composer.EngineModule) // the guard of the engine's own trees fixes no name (§527)
|
||||
@@ -1132,7 +1141,9 @@ type composerHooks struct {
|
||||
kept func(kept map[string][]string)
|
||||
// entryNotFound is selfcompose.Env's EntryNotFound.
|
||||
entryNotFound func(fp string, notFound bool)
|
||||
held func(module string) (compositions.Seals, []string, error)
|
||||
// entryUnanswered is selfcompose.Env's EntryUnanswered.
|
||||
entryUnanswered func(fp string, asks int, unanswered bool)
|
||||
held func(module string) (compositions.Seals, []string, error)
|
||||
// vaultAuthority and certify are selfcompose.Env's VaultAuthority and Certify.
|
||||
vaultAuthority func() string
|
||||
certify func(ctx context.Context) error
|
||||
@@ -1191,7 +1202,7 @@ func composerEnv(session *link.Session, node string, say func(string), hooks com
|
||||
Hear: session.Hear,
|
||||
// And a moved module's templates archive, in the artifact store, as every archive is fetched (issue 1126).
|
||||
Fetch: apply.Fetch,
|
||||
Running: hooks.running, Unseal: hooks.unseal, Refused: hooks.refused, Held: hooks.held, Kept: hooks.kept, EntryNotFound: hooks.entryNotFound,
|
||||
Running: hooks.running, Unseal: hooks.unseal, Refused: hooks.refused, Held: hooks.held, Kept: hooks.kept, EntryNotFound: hooks.entryNotFound, EntryUnanswered: hooks.entryUnanswered, EntryAsks: entryAsks(),
|
||||
VaultAuthority: hooks.vaultAuthority, Certify: hooks.certify}
|
||||
if hooks.seatList != nil {
|
||||
env.SeatList, env.SeatListChanged = hooks.seatList.reader, hooks.seatList.changed
|
||||
|
||||
Reference in New Issue
Block a user