feat(engine): narrowing-delta counter for uncorroborated notable-exec (ADR-0041 §6) - #330
Open
thejefflarson wants to merge 1 commit into
Conversation
… (ADR-0041 §6) Adds a read-only bake instrument that counts/logs breach-relevant chains where a notable exec (interactive shell / package manager) is present on the entry's runtime but the chain is uncorroborated — exactly the cases the retiring blanket notable-exec corroboration arm would have flipped to corroborated. Feeds the Falco-retirement parity matrix (ADR-0041 §6) and the arm-readiness bake (ADR-0037). View only, mirroring the cut_divergence comparator's shape: a pure compute() over the graph + proven chains, an unlabeled OTLP counter beside the existing corroborations counter, and a structured log line per match. No path back into the ledger/actuator/arming state, no config toggle, no wire change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
thejefflarson
enabled auto-merge (squash)
August 7, 2026 02:48
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a view-only narrowing-delta bake instrument (ADR-0041 §6): a structured log +
OTLP counter that fires when a breach-relevant chain has a notable exec (interactive
shell / package manager,
observe::exec_class::notable_exec) present on its entry's on-podruntime, but the chain is
!corroborated. These are exactly the cases the retiring blanketnotable-exec corroboration arm would have flipped to
corroborated— the recall theBehavior::Alertarm currently backstops. This is the Falco-retirement parity-matrix inputand arm-readiness bake instrument (ADR-0037).
Mirrors the
cut_divergence/state::divergenceread-only-bake shape already in the repo:a pure
compute()function, an unlabeled OTLP counter beside the existingcorroborationscounter, and a per-match structured log line — nothing feeds back into the ledger, actuator,
or arming state (ADR-0016).
Design note / decision:
ProvenChaindoesn't carry its entry's runtime signals directly(they're resolved internally inside
reason::proof::prove_with), sonarrowing_delta::computelooks the entry's workload node up directly in the graph (mirroring, but not calling, the
pub(super)chain::actively_exploitedhelper, which is scoped to the broaderis_alarming_nowfamily rather thannotable_execspecifically). This keeps the new moduleentirely outside
reason::proof::corroborate.rs, which a sibling engineer is concurrentlynarrowing for JEF-393 — no changes were made to
corroborates()/corroborated_for.What changed
engine/src/engine/narrowing_delta.rs(new): purecompute(&SecurityGraph, &[ProvenChain]) -> Vec<NarrowingDeltaRecord>andNarrowingDeltaRecord::emit()(structured log).engine/src/engine/narrowing_delta_tests.rs(new): unit tests building the corroborated/uncorroborated states directly (per the ticket's note — doesn't depend on JEF-393 landing first).engine/src/engine/metrics.rs: new unlabeledprotector.engine.narrowing_deltacounter.engine/src/engine/mod.rs: wirescompute()into the per-pass loop alongside the existingcorroborationsaccounting; module declaration.Test plan
cargo test --workspace— full suite green (1217 passed in the engine crate, plus behavior/dashboard/guard suites), including the newnarrowing_deltatests:cargo fmt --all -- --checkcleancargo clippy -p protector --all-targets -- -D warningscleanfile_size_guard/self_containment_guardintegration tests pass (no file over the 1,000-line cap; no ticket-ID breadcrumbs in committed source)soundcheck:pr-reviewself-review: no Critical/High findings (view-only, no user input, unlabeled counter, no new egress)/simplifyself-review pass: diff already clean against reuse/simplification/efficiency/altitudeInvariants preserved
audit-mode observe-only; noPROTECTOR_*_ENABLEtoggle; no wire change.ProvenChain::emit()precedent.engine/src/engine/reason/proof/corroborate.rs(JEF-393's scope).Closes JEF-770