strawberry/src
trvon f4adc12a74
gate: judge the model against a calibrated rarity comparator
The rarity-greedy comparator acted on every evaluated window, so it spent
each hour's budget on the first ~15 windows and scored 0 hits in every
cell. Criteria 2 and 3 of the Stage 4 gate were void against it.

rarity_calibrated keeps the same rarity value, chooser, costs and budget,
and adds a per-node threshold frozen before the evaluated span: the m-th
largest value over the trailing 24 h of label-free history between the
warm-up and the --eval-after bound, with m set so expected spend matches
the hourly budget. Without that history the comparator is uncalibrated
and the gate fails by name; it never falls back to another rule.

rarity_greedy (the old first-come rule) and rarity_hindsight (per-hour
ordering, not causal) are reported as diagnostics and never judged.
fleet gate pools counts, keeps thresholds per node, and fails a pooled
cell when any node is uncalibrated or lacks the comparator.

Contract change: in `fleet gate --json`, rarity_hits and
rarity_cpu_seconds now describe the calibrated comparator; the old
numbers are rarity_greedy_hits and rarity_greedy_cpu_seconds.

Pre-registration: docs/evaluation/stage4-rarity-baseline-preregistration.md,
sha256 4916c95cd2581e3749acfe46c3ccf827aa5ce98c06150b49b978fc70da013f95,
indexed in YAMS at 2026-11-20T18:55:48Z, before the code. This commit is
dated after the registration time in that document (2026-11-21T00:00Z);
the YAMS record is what predates it.

Checked: meson suite 58/58, scripts/fleet_e2e.sh, clang-tidy and the
strict analyzer on the changed TUs. Not run: fold on the changed TUs,
make fuzz, the live Docker tests and the perf KPI. The comparator has
not been run on validation-range data.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-20 19:20:55 -07:00
..
bpf Build on macOS: portable syscalls, sockets and tray 2026-10-27 09:54:54 -06:00
learn gate: judge the model against a calibrated rarity comparator 2026-11-20 19:20:55 -07:00
platform Monitor execs and file writes on macOS with Endpoint Security 2026-10-27 09:55:21 -06:00
store store: incremental read-only refresh (fixes the tray spinning a core) 2026-11-15 08:46:00 -07:00
behavior_engine.cpp Review fixes #4/#5: ptrace medium middle-ground + reject fleet-train flags elsewhere 2026-11-10 16:17:01 -07:00
cli_commands.cpp gate: judge the model against a calibrated rarity comparator 2026-11-20 19:20:55 -07:00
cli_commands.hpp CLI: safe terminal output, completions, no accidental daemons; UX guide 2026-10-27 09:41:19 -06:00
config.cpp yara: rule partitions — scan each file only with the rules that can match it 2026-11-15 06:58:39 -07:00
control_server.cpp Privacy: attribute tracker contacts to programs via OpenSnitch events 2026-10-28 06:15:28 -06:00
correlation_engine.cpp Findings: reconcile evidence and harden policy rebuilds 2026-11-03 06:55:47 -07:00
correlation_persistence.hpp Findings: reconcile evidence and harden policy rebuilds 2026-11-03 06:55:47 -07:00
crash_safety.cpp Build on macOS: portable syscalls, sockets and tray 2026-10-27 09:54:54 -06:00
daemon_app.cpp detection: ctime in the scan key, retry after a failed scan, never hold live execs 2026-11-19 16:21:34 -07:00
daemon_states.cpp Correlate outside the pipeline lock; per-exec logs opt-in 2026-10-26 07:06:05 -06:00
database.cpp store: incremental read-only refresh (fixes the tray spinning a core) 2026-11-15 08:46:00 -07:00
detection_pipeline.cpp detection: mark a timed-out scan incomplete without bypassing quarantine 2026-11-19 16:48:19 -07:00
doctor.cpp Daemon memory: budget scan buffers, stream large images on the launch path, report throttling 2026-11-14 15:36:14 -07:00
evidence_store.cpp profiling: pinned Tracy client, headless capture script, scan bench, tray + scan-stage zones 2026-11-14 18:29:57 -07:00
exec_guard.cpp exec guard: answer a cache hit without holding the cache lock 2026-11-19 17:29:38 -07:00
file_watch.cpp Monitor execs and file writes on macOS with Endpoint Security 2026-10-27 09:55:21 -06:00
fleet.cpp macOS: build and test fixes found re-validating on the Mac (57/57 green) 2026-11-15 08:35:34 -07:00
fleet_export.cpp Fleet F1: merge dedup per node+window, overlay newest-per-node, export --since 2026-11-12 06:50:03 -07:00
fleet_gate.cpp gate: judge the model against a calibrated rarity comparator 2026-11-20 19:20:55 -07:00
fleet_merge.cpp fleet: node-share cap never below the fair share 1/N 2026-11-14 11:29:06 -07:00
hash_utils.cpp Daemon memory: budget scan buffers, stream large images on the launch path, report throttling 2026-11-14 15:36:14 -07:00
image_file.hpp detection: ctime in the scan key, retry after a failed scan, never hold live execs 2026-11-19 16:21:34 -07:00
incident_report.cpp Integrate features into the daemon, build and docs 2026-10-25 18:17:30 -06:00
inspection_executor.cpp Stage 4: execute a promoted model's inspections, under guardrails 2026-10-27 21:03:57 -06:00
installed_files.cpp Build on macOS: portable syscalls, sockets and tray 2026-10-27 09:54:54 -06:00
ioc_list.cpp Privacy: tracker list feeds (advisory only, never block) 2026-10-28 05:25:53 -06:00
ioc_set.cpp Add policy, threat-intel feeds and OpenSnitch containment 2026-10-25 18:17:05 -06:00
json_util.hpp Add --replay, and keep non-UTF-8 host strings from breaking JSON 2026-10-26 21:49:04 -06:00
main.cpp gate: judge the model against a calibrated rarity comparator 2026-11-20 19:20:55 -07:00
meson.build Stage 4 over fleet data: per-node 3x3 policy evaluation, pooled fleet promotion gate 2026-11-15 09:18:04 -07:00
opensnitch.cpp Privacy: attribute tracker contacts to programs via OpenSnitch events 2026-10-28 06:15:28 -06:00
opensnitch_events.cpp Privacy: fix macOS link of the Little Snitch source (environ) 2026-10-28 18:59:56 -06:00
policy.cpp Findings: reconcile evidence and harden policy rebuilds 2026-11-03 06:55:47 -07:00
process_monitor.cpp Monitor execs and file writes on macOS with Endpoint Security 2026-10-27 09:55:21 -06:00
process_query.cpp Integrate features into the daemon, build and docs 2026-10-25 18:17:30 -06:00
redact.cpp Unify file ids, record uid/comm, redact command lines 2026-10-26 17:58:48 -06:00
resource_governor.cpp governor: release a memory episode on the memory hold, not the current RSS 2026-11-17 13:52:37 -07:00
retro_hunt.cpp Retro-hunt: re-scan binaries seen before when the rules change 2026-10-27 08:59:38 -06:00
rule_partition.cpp yara: rule partitions — scan each file only with the rules that can match it 2026-11-15 06:58:39 -07:00
rule_updater.cpp Rules R1: ship pinned yara-forge-core source snapshot in the release (no per-node fetch) 2026-11-11 13:21:12 -07:00
scanner_health.cpp Add the store's disk floor, retention, verify and compact 2026-10-26 06:19:29 -06:00
telemetry.cpp Unify file ids, record uid/comm, redact command lines 2026-10-26 17:58:48 -06:00
term_safe.hpp Stage 4: execute a promoted model's inspections, under guardrails 2026-10-27 21:03:57 -06:00
thread_priority.cpp Build on macOS: portable syscalls, sockets and tray 2026-10-27 09:54:54 -06:00
thread_priority.hpp Add resource governor, scan profiles and KPI harness 2026-10-25 18:17:16 -06:00
tracker_set.cpp Privacy: attribute tracker contacts to programs via OpenSnitch events 2026-10-28 06:15:28 -06:00
yara_scanner.cpp yara: drop partition subsets before reload and trim glibc heap 2026-11-19 18:22:57 -07:00