package agent import ( "strings" "git.novox.be/novox/mesh-contracts/go/seats/nodeengine" ) // 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) or it waits for a lower rank of its pipeline (§771), 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, ":"), nodeengine.WaitStepPlacing: 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) }