strawberry/tests
trvon 1c9b005645
store: incremental read-only refresh (fixes the tray spinning a core)
Root cause, from the Tracy capture the CPU watcher took when the tray spun
(2026-11-15 08:15, 67% for 15 s): database.reload_read_only rebuilt the whole
evidence view from every segment — mean 1.4 s, max 1.7 s, 4x in 20 s — because
every 3 s poll that saw the daemon append evidence triggered a full reload.

- store::scan_store_read_only_from + ReadCursor (per segment: id, sealed,
  bytes, records delivered). When the previously seen segments are an
  unchanged prefix (same ids, sealed ones byte-identical), only records
  appended since are delivered: the rest of the previously last segment
  (skipping what was applied) and new segments. Any other change —
  compaction, retention, reduction, a rewritten or shrunk segment — delivers
  everything and the caller rebuilds.
- Database read-only refresh uses it; records apply in the same order a full
  rebuild uses, so the view is identical. read_only_reload_counts() reports
  full vs incremental refreshes.

Live, on the real evidence store: the change-driven reload went from ~1.4 s
to 2.8 ms; the tray did ~97 ms of work in a 60 s window.

Test (test_incremental_view, seeded property): a long-lived reader
refreshing across random appends, upserts, seals and a compaction always
equals a freshly opened reader; appends refresh incrementally (42-49 per run),
the compaction forces a rebuild, and no change reports no change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-15 08:46:00 -07:00
..
fixtures Rules R1: ship pinned yara-forge-core source snapshot in the release (no per-node fetch) 2026-11-11 13:21:12 -07:00
behavior_live.cpp Add exec prevention, behavior telemetry and persistence watch 2026-10-25 18:17:16 -06:00
cli_replay_fixture.cpp Replay: add strict read-only training summaries 2026-11-03 06:54:17 -07:00
es_live_payload.cpp Monitor execs and file writes on macOS with Endpoint Security 2026-10-27 09:55:21 -06:00
exec_guard_live.cpp KPI: bound collection and reject incomplete measurements 2026-11-03 06:57:00 -07:00
file_watch_live.cpp Add exec prevention, behavior telemetry and persistence watch 2026-10-25 18:17:16 -06:00
fleet_inspect.cpp fleet-inspect: print manifest time range and window start min/max 2026-11-14 12:16:32 -07:00
fleet_seed.cpp Stage 6: strawberry-fleet-seed dev tool (deterministic synthetic telemetry store for fleet validation; gap #4a) 2026-11-08 09:27:09 -07:00
live_bpf_daemon_smoke.cpp Integrate features into the daemon, build and docs 2026-10-25 18:17:30 -06:00
live_bpf_pipeline_smoke.cpp Integrate features into the daemon, build and docs 2026-10-25 18:17:30 -06:00
macos_es_live.cpp Monitor execs and file writes on macOS with Endpoint Security 2026-10-27 09:55:21 -06:00
meson.build store: incremental read-only refresh (fixes the tray spinning a core) 2026-11-15 08:46:00 -07:00
model_score.cpp Review fixes: write->exec feature constant, accurate comments, tag-safe CI 2026-11-10 16:09:03 -07:00
process_monitor_live_smoke.cpp Attach the fork tracepoint on current kernels 2026-10-25 21:33:39 -06:00
scan_bench.cpp yara: rule partitions — scan each file only with the rules that can match it 2026-11-15 06:58:39 -07:00
source_invariants.py Stage 6: export rarity-delta record (per-TupleKind count-min, bounded decode) + harden R13 for braced initializers 2026-11-07 19:39:22 -07:00
store_compare.hpp Drop unqlite-cpp and import legacy databases 2026-10-25 18:46:21 -06:00
test_behavior_engine.cpp Review fixes #4/#5: ptrace medium middle-ground + reject fleet-train flags elsewhere 2026-11-10 16:17:01 -07:00
test_cli.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
test_cli_replay.py Findings: reconcile evidence and harden policy rebuilds 2026-11-03 06:55:47 -07:00
test_config.cpp yara: rule partitions — scan each file only with the rules that can match it 2026-11-15 06:58:39 -07:00
test_control_server.cpp Privacy: attribute tracker contacts to programs via OpenSnitch events 2026-10-28 06:15:28 -06:00
test_correlation_engine.cpp Findings: reconcile evidence and harden policy rebuilds 2026-11-03 06:55:47 -07:00
test_correlation_incremental.cpp Findings: reconcile evidence and harden policy rebuilds 2026-11-03 06:55:47 -07:00
test_crash_safety.cpp Build on macOS: portable syscalls, sockets and tray 2026-10-27 09:54:54 -06:00
test_daemon_runtime.cpp Findings: reconcile evidence and harden policy rebuilds 2026-11-03 06:55:47 -07:00
test_database.cpp Integrate features into the daemon, build and docs 2026-10-25 18:17:30 -06:00
test_doctor.cpp Daemon memory: budget scan buffers, stream large images on the launch path, report throttling 2026-11-14 15:36:14 -07:00
test_evidence_store.cpp Replace web UI with a Qt tray app 2026-10-25 18:17:03 -06:00
test_exec_guard.cpp Add exec prevention, behavior telemetry and persistence watch 2026-10-25 18:17:16 -06:00
test_fault_injection.cpp Pipeline: keep oversized cache refusals unscanned 2026-11-03 06:57:35 -07:00
test_features.cpp Stage 3.5b2: replace exec-lineage with write->exec data-flow feature 2026-11-08 16:37:06 -07:00
test_fleet.cpp Stage 6: node identity (fleet.hpp) — pure node_uid + wrapper 2026-11-07 18:59:51 -07:00
test_fleet_export.cpp Fleet F1: merge dedup per node+window, overlay newest-per-node, export --since 2026-11-12 06:50:03 -07:00
test_fleet_merge.cpp fleet: node-share cap never below the fair share 1/N 2026-11-14 11:29:06 -07:00
test_fleet_overlay.cpp Stage 6: export populates fleet_bits from a local overlay (export_store fleet_surprisal callback; run_export loads fleet-overlay.sbo) 2026-11-08 08:09:47 -07:00
test_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
test_incident_report.cpp Integrate features into the daemon, build and docs 2026-10-25 18:17:30 -06:00
test_incremental_view.cpp store: incremental read-only refresh (fixes the tray spinning a core) 2026-11-15 08:46:00 -07:00
test_inspection_executor.cpp Stage 4: execute a promoted model's inspections, under guardrails 2026-10-27 21:03:57 -06:00
test_installed_files.cpp Record routine indicators as evidence only 2026-10-26 05:37:58 -06:00
test_invariants.cpp Fleet F1: merge dedup per node+window, overlay newest-per-node, export --since 2026-11-12 06:50:03 -07:00
test_learn.cpp Learn: handle extreme restored rarity clocks 2026-11-03 06:52:20 -07:00
test_model.cpp Stage 4 groundwork: window features, inspection MLP, model files 2026-10-27 09:53:25 -06:00
test_opensnitch.cpp Monitor execs and file writes on macOS with Endpoint Security 2026-10-27 09:55:21 -06:00
test_opensnitch_events.cpp Privacy: macOS tracker source via Little Snitch log-traffic (WS2 macOS) 2026-10-28 18:54:27 -06:00
test_perf_kpi.py KPI: bound collection and reject incomplete measurements 2026-11-03 06:57:00 -07:00
test_platform_process.cpp Read process facts on macOS without procfs 2026-10-27 09:55:09 -06:00
test_policy.cpp Findings: reconcile evidence and harden policy rebuilds 2026-11-03 06:55:47 -07:00
test_process_monitor.cpp Integrate features into the daemon, build and docs 2026-10-25 18:17:30 -06:00
test_process_query.cpp Integrate features into the daemon, build and docs 2026-10-25 18:17:30 -06:00
test_redact.cpp Unify file ids, record uid/comm, redact command lines 2026-10-26 17:58:48 -06:00
test_repeat_aggregator.cpp Detection: unify the two repeat-aggregation sinks + IOC severity resolution 2026-10-28 17:39:48 -06:00
test_replay.cpp macOS: build and test fixes found re-validating on the Mac (57/57 green) 2026-11-15 08:35:34 -07:00
test_resource_governor.cpp Daemon memory: budget scan buffers, stream large images on the launch path, report throttling 2026-11-14 15:36:14 -07:00
test_retro_hunt.cpp Retro-hunt: re-scan binaries seen before when the rules change 2026-10-27 08:59:38 -06:00
test_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
test_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
test_runtime_pipeline.cpp yara engine: range/fast-mode scanning API, ELF load ranges, engine A/B bench, opt-in guard partial scan 2026-11-14 18:51:10 -07:00
test_shadow.cpp Stage 4: keep the live rarity model across daemon restarts 2026-10-27 23:25:01 -06:00
test_store_codec.cpp Add compressed event store 2026-10-25 18:17:17 -06:00
test_store_differential.cpp Drop unqlite-cpp and import legacy databases 2026-10-25 18:46:21 -06:00
test_store_import.cpp Drop unqlite-cpp and import legacy databases 2026-10-25 18:46:21 -06:00
test_store_log.cpp Add the store's disk floor, retention, verify and compact 2026-10-26 06:19:29 -06:00
test_store_maintenance.cpp Add the store's disk floor, retention, verify and compact 2026-10-26 06:19:29 -06:00
test_store_manifest.cpp Add compressed event store 2026-10-25 18:17:17 -06:00
test_store_reduce.cpp Store 7c/7d: tunable merge horizon + CPR interleave-aware merge mode 2026-11-12 06:50:09 -07:00
test_store_segment.cpp Bound finding size and say why a store write is refused 2026-10-26 06:43:46 -06:00
test_telemetry.cpp Unify file ids, record uid/comm, redact command lines 2026-10-26 17:58:48 -06:00
test_trace.cpp Stage 4: ship a training trace set; install traces 2026-10-28 04:50:04 -06:00
test_tracker_set.cpp Privacy: tracker list feeds (advisory only, never block) 2026-10-28 05:25:53 -06:00
test_train.cpp test: deflake gradient-check tolerance for cross-toolchain FP 2026-11-11 17:33:51 -07:00
test_yara_scanner.cpp macOS: build and test fixes found re-validating on the Mac (57/57 green) 2026-11-15 08:35:34 -07:00