pub fn learn_in(
home: &Path,
session: Option<&str>,
ask: &dyn Fn(&str) -> Option<Value>,
track: bool,
now: i64,
) -> (usize, usize, usize)Expand description
learn_pending on the store in home. With track, outcomes of asked lessons are recorded
(outcome.rs): a merge into a lesson asked earlier in the episode’s session, and a lesson asked
earlier that the new one supersedes, are asked_then_corrected (outcome::contradicted); at the end of session, and in every session idle for
outcome::IDLE_MS at now, the other asked lessons are asked_not_corrected. So any run
settles, not only the end hook’s; a session it skipped episodes of is not settled as idle.
Only a “not a lesson” verdict is recorded as skipped: an episode whose model call failed stays
waiting (and its session unsettled) for the next run, and after MAX_FAILURES failures in a row
the run stops asking. Returns (new lessons, merges, episodes still waiting for a verdict).