Commit graph

6 commits

Author SHA1 Message Date
trvon
a5f2dbedfc
KPI: bound collection and reject incomplete measurements
Use suspend-aware BOOTTIME waits and owned-container cleanup without changing the workload. Reject missing coverage and preserve producer/report failures. Include runtime/helper regressions, constrained build-job support and live exec-guard crash safety. Document the failed live/idle gates without relaxing thresholds or claiming production acceptance.
2026-11-03 06:57:00 -07:00
trvon
bbfda149a5
Stage 4: execute a promoted model's inspections, under guardrails
Some checks failed
Build and Test / build (debug, clang) (push) Has been cancelled
Build and Test / build (debug, gcc) (push) Has been cancelled
Build and Test / build (release, clang) (push) Has been cancelled
Build and Test / build (release, gcc) (push) Has been cancelled
Build and Test / macos (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
A promoted model (promoted.sbm, written only by `model promote` after the
gate) can now request real inspections. Only two, both additive:

- memory_scan: through the daemon's memory-scan queue;
- deep_rescan: the root's image re-scanned on demand; new matches are
  recorded as indicators of kind model_inspection (findings titled "YARA
  match found by a deeper rescan the inspection model requested") and
  positive labels.

watch_subtree has no mechanism and rescan_on_next_rules is the retro-hunt's
job, so both are masked out of acting decisions (kExecutableActions), and
replay's policy evaluation uses the same action set.

Guardrails:
- InspectionExecutor (bounded queue, one low-priority worker, submit()
  never blocks); WorkClass::model_inspect lets the governor defer it, and
  a deferred decision is dropped.
- Each action rechecks that the promoted model is still active at the
  decision's generation (demoting or replacing it revokes queued work),
  that the root's node id and raw image path still match (decisions carry
  root_image, not the feature template), and skips protected processes.
  A deep rescan discards its result if the process, image or rules changed
  during the scan.
- An acting decision is durably written before it is dispatched; every
  attempt becomes an inspection_outcome record (queued, scanned, skipped,
  deferred, revoked, queue_full, failed).
- Source invariant R10: no file may couple learning types to the
  exec-guard, OpenSnitch or policy APIs (daemon_app.cpp and main.cpp, the
  wiring points, are reviewed by hand). Models never block, contain, kill
  or create findings directly.
- Config model_act and model_lambda; status model block reports acting
  stats; timings.model_inspection.

docs/evaluation/stage4-execution-gate.md amends the gate's method (not its
thresholds): executable action set, greedy promoted decisions, budgets as
estimated inspection seconds by scan profile.

Also: TerminalSafeBuf's destructor no longer lets an exception escape;
the health message clamps huge durations; replay timestamp overflow; the
Docker test build runs with -j2.

Tests: test_inspection_executor (every skip and execute path, revocation,
queue limits); shadow and replay acting cases; R10 fixture; fault injection
and invariant updates. Validation reported by the session that wrote it:
48/48 local, 46/46 Docker plus privileged live checks, 20 fuzz targets
(9.5M runs), three paired KPI runs without regressions (no acting model
was loaded, so active-inspection cost is not measured yet).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 21:03:57 -06:00
trvon
ad1676a594
Integrate features into the daemon, build and docs
Some checks failed
Build and Test / build (debug, clang) (push) Has been cancelled
Build and Test / build (debug, gcc) (push) Has been cancelled
Build and Test / build (release, clang) (push) Has been cancelled
Build and Test / build (release, gcc) (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
Wire the policy, feeds, containment, exec guard, behavior, governor,
crash safety and event store into the daemon, detection pipeline, CLI
and meson build (zstd now required); Dockerfile, conan, systemd unit
(LimitCORE=0, resource limits) and installer updates; existing tests
adapted (store paths are directories now). Detections are counted and
notified even when evidence cannot be persisted (persist_failures in
status). prevention_timeout_ms is clamped and behavior dedupe handles
out-of-order events. Docs: API contract, developer guide, plan, UX,
agent rules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 18:17:30 -06:00
trvon
22a653f617 Implement runtime pipeline, reporting, and local UI 2026-04-26 16:31:01 -04:00
copilot-swe-agent[bot]
c1a3cf73c0 Replace MongoDB with embedded UnQLite database and implement XDG-compliant storage
Co-authored-by: trvon <6031322+trvon@users.noreply.github.com>
2025-10-18 18:29:38 +00:00
copilot-swe-agent[bot]
971250f58a Add build verification, Docker support, and comprehensive documentation
Co-authored-by: trvon <6031322+trvon@users.noreply.github.com>
2025-10-18 18:00:04 +00:00