pub fn failure_note(
call: &HookCall,
error: &str,
limit: usize,
) -> (String, Vec<String>)Expand description
What this seat knows that bears on a tool that just failed. The pack is
searched on the command and the error it gave, and a hit has to pass the
prompt hook’s tests. It must also share FAILURE_SHARED_WORDS subject
words with the command and the error, where a prompt needs one, since an
error is long and noisy, and its lexical match on those words must reach
FAILURE_LEXICAL_MIN, which only naming that subject reaches. Those
are the second scorer, so the pack’s count of the ballots that named a
hit is not read: where many lessons tie on the words the pack scores,
which of them a ballot keeps at its cut is arbitrary. The floor is the
lexical match of the hits that
pass those tests, not the fused score: the pack decays that score by
age, and age only ranks. What passes is read most relevant first, see
[sort_by_relevance]. One handed over earlier in the session is left
out. Calls that worked are not searched.