fix(planning): consult the plan model only when no deterministic strategy applies

Propose built every strategy to record the alternatives, and the model
strategy's build is a live call to the plan role, so planning a direct
action spent a model call on an alternative that could never be selected
(B2, docs/planning.md). The model is now recorded as "not consulted" once
a deterministic draft is chosen, and the approver's reason no longer lists
it among the alternatives considered. A test counts the calls both ways.
This commit is contained in:
Andy Dixon
2026-10-05 19:35:20 +01:00
parent b6538600d1
commit 5cf3813a2e
3 changed files with 42 additions and 1 deletions
+1 -1
View File
@@ -372,7 +372,7 @@ func (e *Executor) explain(p Plan, it volition.Intention, st Step, c capabilitie
}
var alts []string
for _, a := range p.Alternatives {
if !a.Selected && a.Why != "already failed" {
if !a.Selected && a.Why != "already failed" && !strings.HasPrefix(a.Why, "not consulted") {
alts = append(alts, a.Strategy)
}
}