H9: an entry asked again by hand is asked again in the shadow's cache too, so a candidate waits no longer on a not-found it holds
Builds: design 47 G §698 (entry-again), §421 (A-308: the shadow reads the entries its wants name) Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
@@ -689,6 +689,7 @@ func nodeAgent(ctx context.Context, opts options, signer ed25519.PublicKey, trus
|
||||
// composition bucket) is never applied. While the seat's assignment holds no key for this node it composes
|
||||
// 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.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
|
||||
|
||||
@@ -505,6 +505,9 @@ func (c *Composer) FirstViews() (views []map[string]any, entries []EntryRow, wan
|
||||
// EntryAgain asks fp's entry of the catalog half again now (the seat's verb entry-again, §698): one the composer keeps, whatever
|
||||
// its state. The entry kept of it is dropped, so a pass holds the module until the answer.
|
||||
func (c *Composer) EntryAgain(ctx context.Context, fp string) error {
|
||||
if c.AlsoEntryAgain != nil {
|
||||
c.AlsoEntryAgain(ctx, fp)
|
||||
}
|
||||
if !c.byEntries() {
|
||||
return fmt.Errorf("this engine reads no entry by fingerprint")
|
||||
}
|
||||
|
||||
@@ -163,7 +163,9 @@ type Composer struct {
|
||||
// OnEngine is told the node-engine's own module each time a composing finds it (design 47 G §527, §634); set before the
|
||||
// composer runs.
|
||||
OnEngine func(module string)
|
||||
env Env
|
||||
// AlsoEntryAgain is told each entry asked again by hand, so the shadow's own cache of entries asks it again too.
|
||||
AlsoEntryAgain func(ctx context.Context, fp string)
|
||||
env Env
|
||||
|
||||
mu sync.Mutex
|
||||
wants map[string]meshwants.WantsByWantNodeModuleValue // by module, the node's own under agent.NodeModule
|
||||
|
||||
@@ -825,3 +825,9 @@ func (c *Composer) sameValue(a, b string) (same, known bool) {
|
||||
}
|
||||
return bytes.Equal(x, y), true
|
||||
}
|
||||
|
||||
// EntryAgain asks fp's entry of the catalog half again in the shadow's own cache, where the node's own composer was asked
|
||||
// again by hand: an entry the shadow holds as not found stays so until it is asked (a build the half had not yet taken in).
|
||||
func (s *Shadow) EntryAgain(ctx context.Context, fp string) {
|
||||
_ = s.c.EntryAgain(ctx, fp) // refuses only an entry the shadow keeps none of
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user