pub struct Selection {Show 22 fields
pub policy: &'static str,
pub default: &'static str,
pub source: &'static str,
pub gate: f64,
pub fit: String,
pub at: u64,
pub checks: u64,
pub sessions: u64,
pub deviations: Vec<Count>,
pub fallbacks: Vec<Count>,
pub spend: Vec<Spend>,
pub budget: Option<Budget>,
pub effects: Vec<Estimate>,
pub half_life: Option<u32>,
pub labels: Vec<Count>,
pub declaration: Option<Estimate>,
pub delivery: Option<Rates>,
pub evaluation: Option<Evaluation>,
pub measurement: Option<Measurement>,
pub pool: Vec<Yield>,
pub latency: Vec<Latency>,
pub test: Option<Test>,
}Expand description
Lesson selection (select.rs) as the monitor shows it: one line per collective in borg status and
borg top, in full on borg web’s Conscience tab (/api/select). Every number is read from the
store’s selection summary (select/summary.rs load: its counts, its fit, its monitor) and the
policy’s own functions, never refitted here; only shares, the declaration’s difference and the
latency quantiles are taken of the summary’s counts. A section the summary does not carry yet is
empty, which every surface shows as not measured yet, never as 0. Spend is measured and shown, and
priced only under a budget an engineer set for the collective (budget).
Fields§
§policy: &'static strThe policy a hook started from this environment runs under (select.rs Policy::name): learned
(the default), fixed (BORG_SELECT=fixed), cap or attention under an evaluation switch.
default: &'static strThe policy a hook runs under when no switch is set (select.rs precedence without one): the
fixed rule until the pre-registered checks pass (tasks/todo.md, amendment 2026-10-29).
source: &'static strWhat decides: the policy, or reverted (select.rs REVERTED_SOURCE) when the monitor saw harm
beyond the gate’s share and put the fixed rule back (sticky).
gate: f64The conservative gate’s budget (select.rs Log::gate): the replayed quality (mistakes avoided)
the learned policy may still risk below the fixed rule, at the collective’s risk share (Test::risk,
select/policy.rs remaining_at). Not money. 0 at cold start, where every decision is the fixed
rule’s.
fit: StringThe fit decisions draw from (select/policy.rs Fit::key); empty: the prior.
at: u64The bytes of outcomes.jsonl the summary has folded.
checks: u64The graded checks and the sessions folded.
sessions: u64§deviations: Vec<Count>Per decision type the summary counts, the decisions that differed from the fixed rule’s (part)
of those made (whole): route, the learned checks under the current fit whose routes did, on
evidence or by a played draw of the question-count test (select/summary.rs Gate; the test’s
own draws, all-time, are in test). The pool’s size and early delivery are not counted yet.
fallbacks: Vec<Count>Per reason a learned decision fell back to the fixed rule (select/summary.rs FELL_BACK, named as
the record’s reason: lock_busy, lock_failed, unrecorded), the graded checks it did
(part) of those folded (whole, checks), every reason listed: a guard that binds often shows.
spend: Vec<Spend>What selection spent per cost source: its model calls, stop and live checks (select/summary.rs
Spent). Judging rides in them: a check’s call also judges its session’s pending questions and
placebos (predict.rs judge_section). borg learn’s own calls are not selection’s; borg stats
counts them (stats.rs MODEL_CALL).
budget: Option<Budget>The spend budget an engineer set for the collective and its price; None without one.
effects: Vec<Estimate>Effects with their intervals: grade × route, ask vs free, free vs placebo, dilution, the spread between sessions and between lessons.
half_life: Option<u32>The forgetting half-life chosen, in session ticks; Some(0): no forgetting.
labels: Vec<Count>Label health: the judged share per route, the unclear share, the placebo rate.
declaration: Option<Estimate>Label health: how the apply/skip declaration moves the judge (a random half is judged without it).
delivery: Option<Rates>The delivery rates the fit learned (select/policy.rs Rates): free_stop, free_live and
ask_live weigh a route’s value, later and wait are only shown. None before a fit.
evaluation: Option<Evaluation>The monitor’s off-policy estimate and its health; None before it weighed a labelled apply.
measurement: Option<Measurement>What the checks measure for the learned policy at no cost to the fixed rule’s quality; None before a graded check is folded.
pool: Vec<Yield>The pool’s yield by fill position.
latency: Vec<Latency>Stop check latency per harness against its stop budget.
test: Option<Test>The learned policy’s randomised question-count test; None under another policy while the summary counts none of its checks.
Implementations§
Source§impl Selection
impl Selection
Sourcepub fn of(summary: &Summary, policy: Policy, risk: Option<f64>) -> Selection
pub fn of(summary: &Summary, policy: Policy, risk: Option<f64>) -> Selection
What summary says, under policy and the risk share risk its collective sets (select.rs
risk_of; None: the default): copied from the summary, its fit and its monitor, never refitted.
What it does not hold yet stays empty: not measured.