feat(engine): shadow would-have-acted report at /report (JEF-143)#63
Merged
thejefflarson merged 1 commit intoJun 25, 2026
Conversation
Aggregate the durable decision journal (JEF-141) into a read-only /report view (HTML + /report.json) on the dashboard server: the shadow diff that gates exiting shadow (JEF-50) — over a configurable rolling window, the workloads protector WOULD have isolated, how often the breach condition held, the projected would-be cut lifetime, and the proven paths the model deliberately left alone (the trust evidence). - Fold each entry's breach decisions into would-act episodes (runs of consecutive exploitable verdicts); lifetime runs from the first exploitable verdict to the clear (or to now if still open). - Short-lived (lifted within a threshold, default 5m) is visually distinct from sustained — the likely-false-positive tell. - Left-alone count: proven-but-cleared paths, alongside the would-act count, framed as a diff. - Coverage-gap: exploitable verdicts with no CVE backing are flagged as the ones to scrutinize first. - Empty journal → honest "no decisions yet" state. - Headline counts mirrored to OTLP per pass, like the bake metrics. Window/threshold are query-configurable (?days=N / ?hours=N / ?short_lived_secs=N). Read-side aggregation only; no new signals, no action. Engine stays shadow. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VtjoJttCvBY4dzCoE4f9vP
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.
Closes JEF-143.
What
Nothing answered the question that gates exiting shadow (JEF-50): over the last N days, how many cuts would protector have made, on what, and were any wrong? This adds a read-only
/reportview (HTML +/report.json) on the dashboard server that aggregates the durable decision journal (JEF-141) into that diff.Framed as a diff: "over the last N protector would have isolated N workloads and deliberately left M proven-but-cleared paths alone" — the left-alone half is the trust evidence.
short-lived, likely FP) from a sustained one. An open episode is never short-lived (still standing).CVE-backing it is flaggedcoverage gapas the would-act to scrutinize first.Window + thresholds are query-configurable:
?days=N,?hours=N,?short_lived_secs=N. Read-side aggregation only — no new signals, no action; the engine stays shadow.Where
engine/src/engine/dashboard.rs— theReport/WouldActEntry/LeftAloneEntrytypes, the pureaggregate_reportfold, the HTML panel + standalone page, and the/report+/report.jsonroutes (mirrors the/bakepanel +json_viewpatterns, reuses the existingescape/shortconventions).engine/src/engine/mod.rs— shares theDecisionJournal(Arc) with the dashboard, and mirrors the report headline to four OTLP gauges per pass. Stayed out ofreason/{adjudicate,proof}.rs(JEF-134 in flight).Tests
14 new unit tests covering: verdict classification, coverage-gap detection, empty-journal state, window filtering, sustained/short-lived/open lifetime classification, left-alone, recurring episodes, sustained-first ranking, query defaults, the HTML render, and the disabled-journal OTLP helper.
Decisions for the architect
Breachrecord carries no structured enrichment metadata, so a coverage-gap would-act is detected as an exploitable verdict whose text contains noCVE-token. If a richer enrichment-coverage signal is wanted, theDecision::Breachrecord would need to carry it (out of scope here).🤖 Generated with Claude Code