The node-engine no longer reads a want's parts: the parts check (G 524) and its hold parts-differ are removed, the digests of a build are resolved through the registry seats from the want's version, and a candidate's added module is resolved from its version alone. Builds: design 47 H §750, §764; H-A-37, H-A-38 Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy
39 lines
1.4 KiB
Go
39 lines
1.4 KiB
Go
package agent
|
|
|
|
import "strings"
|
|
|
|
// EntryAsked and EntryMissing open the detail of a have held for the entry the want names (design 47 G section 421 and
|
|
// section 614): the entry is asked of the catalog half and not yet answered, or the half answered that it holds none. Both
|
|
// are the phase held, and each names the fingerprint.
|
|
const (
|
|
EntryAsked = "entry-asked:"
|
|
EntryMissing = "entry-missing:"
|
|
)
|
|
|
|
// judgedAgain says a held have is a hold the node-engine judges again at a start, not one that waits for the operator's answer:
|
|
// its wait's reason (the structured field the have carries) is that its entry is not held (§421), whatever words its detail
|
|
// opens with. Only a failed backup or restore point waits for an answer (ADR 0568 §4); g14, 2026-11-18: feh held "whether ..." with the reason entry-missing was kept the same way.
|
|
func judgedAgain(h Have) bool {
|
|
if h.Wait == nil {
|
|
return false
|
|
}
|
|
switch h.Wait.Reason {
|
|
case strings.TrimSuffix(EntryAsked, ":"), strings.TrimSuffix(EntryMissing, ":"):
|
|
return true
|
|
}
|
|
return false
|
|
}
|
|
|
|
// heldReason is the opening of a detail held for an entry: EntryAsked or EntryMissing.
|
|
func heldReason(why string) string {
|
|
if strings.HasPrefix(why, EntryAsked) {
|
|
return EntryAsked
|
|
}
|
|
return EntryMissing
|
|
}
|
|
|
|
// heldForEntry says whether why is a hold for the entry a want names.
|
|
func heldForEntry(why string) bool {
|
|
return strings.HasPrefix(why, EntryAsked) || strings.HasPrefix(why, EntryMissing)
|
|
}
|