Expand description
The daily baseline pass (spec 3.2 §7.10, §9.2 K-I20, §13 Q4; feature proc-baselines).
Once a local day has ended, the kernel’s maintenance tick enqueues one Maintenance
process, the durable run kernel.proc (PROC_TARGET) keyed by the day, so replicas
sharing a run store run it once. It calls adk-eval’s ledger statistics — no
statistics live here — for each partition and each day since its last pass:
| Step | Rule | Where |
|---|---|---|
| Series | one value per local day and dimension, from the partition’s rows; the kernel’s own rows (KERNEL_AGENT) and observations are left out | adk_eval::ledger::daily_series |
| Baseline | median and MAD per dimension and day class over 28 days, after a 14-day warm-up | adk_eval::ledger::check_series |
| Deviation | |recent − baseline| > max(k·MAD, floor), k = 2.5, in both the 7- and the 14-day window | adk_eval::ledger::check_series |
| Meaningful | two dimensions, or one for ten days | adk_eval::ledger::DriftState::advance |
| Cooldown | seven days per dimension after an observation names it | adk_eval::ledger::DriftState::advance |
| Wording | the model phrases what was detected, within the daily budget; a reply that is not a neutral question falls back to the kernel’s template | ObservationPhraser, is_neutral_question, template_question |
The model sees only the dimension names, their directions, run lengths and the
comparison windows — never a ledger row — and is used only after the deterministic
detection found something (K-I20). Each observation is stored, published as
KernelEvent::Observation and audited as kernel.observation.
Structs§
- Baseline
Pass - The daily baseline pass over a
Ledger(spec 3.2 §7.10): what the kernel’skernel.procprocess runs, and what a test or a tool runs directly. - Baseline
Policy - How the kernel runs the daily baseline pass (spec 3.2 §7.10).
- Baseline
Snapshot - A partition’s baselines on the day its last pass tested (spec 3.2 §7.10): the deviation
test of every dimension, with its baseline per day class, warm-up and windows. Stored as
PassState::baselinesand served atGET /api/kernel/proc/baselines. - Detection
- What the deterministic detection found, as the phraser sees it (spec 3.2 §7.10): the dimensions, which way they moved and for how long, and the windows — no value, no row.
- LlmPhraser
- An
ObservationPhraserover anyadk_core::Llm(spec 3.2 §7.10): one request withPHRASING_INSTRUCTIONas its system message and theDetection::promptas its user message, its output capped by the budget’s token limit (at most 1 024) and no sampling parameters. - Pass
Outcome - What one pass did (spec 3.2 §7.10).
Constants§
- PHRASING_
INSTRUCTION - The instruction a model phrases an observation under (spec 3.2 §7.10).
- PROC_
TARGET - The workflow target of the daily pass’s
Maintenanceprocess (spec 3.2 §7.10).
Traits§
- Observation
Phraser - Words a detection as a question (spec 3.2 §7.10): a model, used only after the
deterministic detection found something. The kernel keeps a reply only when it is a
neutral question (
is_neutral_question) and uses its template otherwise.