pub struct Ctx<'a> {
pub session: &'a str,
pub check: &'a str,
pub channel: &'static str,
pub lessons: &'a Path,
pub summary: &'a Summary,
pub tokens: u32,
pub had: &'a [String],
pub alpha: f64,
}Expand description
The check a decision is made for.
Fields§
§session: &'a str§check: &'a strThe check’s id (check_id).
channel: &'static strstop or live.
lessons: &'a PathThe lessons file the conscience reads (hook.rs lessons_path): the store whose outcomes count.
summary: &'a SummaryThe selection summary loaded beside lessons (select/summary.rs load).
tokens: u32The check’s pool tokens (shown_tokens, the graded record’s tokens); 0 unknown, the
baseline’s. The fit and the gate’s ledger value the check at the logged tokens, so the learned
policy decides at them too: the gain the gate admits is then the gain its ledger records.
had: &'a [String]The lessons this session already had delivered (asked, delivered early or handed over free:
hook.rs had_in over the state read at the decision, decide) or has waiting in its queue to be
asked or handed over by another check (hook.rs waiting_in), in any order. Such a lesson may
still be asked, but never takes a free slot (the delivery would drop it as given before or queued
twice, conscience.rs graded_without), and is never a placebo (draw_placebo). Only those among the
applies count (nofree, what the graded record logs), so a replay passes the record’s nofree;
empty for a record from before it, whose hook decided without.
alpha: f64The collective’s tolerance in force at the check (alpha: its risk in collectives.json, else
policy::ALPHA), read once by the hook and logged on the graded record (Log::alpha), so a
replay decides under the α the hook had (alpha_of the record’s), not whatever the config says
for the replayed path now (a store copy maps to no collective).