Repository navigation
review: no observed traffic is not safe to enforce; the command line and the API say they are unguarded - #276
Merged
Conversation
The review called a scope safe when every workload in it simulated on its latest policy with no evidence gap and nothing that would be dropped, even when no traffic was recorded in simulation in the range. A workload switched to simulation a moment ago read "Safe to enforce", with only a caveat to say nothing stood behind it, and neither the promotion nor the mode-change dialogs asked for the acknowledgment. An absence of observed drops proves nothing when nothing was observed. No traffic recorded in simulation is now a failing condition of its own, "no-traffic", in place of the caveat. It fires when neither decision's peer-and-service rollup covered a window in the range: a rollup carries its covered bounds whenever it matched anything, so a truncated read is never taken for an empty one. It judges the scope as a whole, as every other condition does, and is not asked of a scope with nothing simulating, where the visibility and already-enforced conditions say no verdict exists. It states that nothing was observed, not why, and sets no minimum time in simulation. The headline's sentence for a scope with no traffic no longer says "No observed traffic would be dropped", which would be true of nothing, and the would-block view no longer shows its all-clear when nothing was observed at all. The promote dialog and both mode-change dialogs read the same composition, so each now asks for the acknowledgment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
ADR-0001 takes a dated amendment. The evidence rule treats a range with no traffic recorded in simulation as evidence that does not support enforcement, so enforcing past it takes the acknowledgment; no minimum duration is set. The command line and the surface stay unguarded by decision and say so; the server-side evidence guard stays backlog. Decision 2 and the consequence are corrected in place. innerwall workload set-mode's usage and help, and the description of POST /mode-changes in api/openapi.yaml, state that a change to enforced is not checked against any evidence and asks for no acknowledgment, and name the simulation review as where the evidence is weighed. The console's typed client is regenerated from the document (make console-api); only its comment changes. No schema, parameter, response or behavior changes. The simulation review guide's condition table gains the no-traffic condition and its advice on a tier that shows no traffic follows it; the promotion guide, the command-line reference, ARCHITECTURE.md and the roadmap entry are brought into step, and the CHANGELOG gains both entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
…affic-is-not-safe Signed-off-by: Claude <noreply@anthropic.com> # Conflicts: # CHANGELOG.md
|
No ADR contradictions found (full-corpus audit, triggered because the diff touches Diff-anchored findingsNone. Summary of what was checked:
Full-corpus audit (all 23 ADRs + CLAUDE.md hard rules)
No superseding ADR is present in this PR, and none was required. |
errcheck flags the unchecked write of set-mode's help. The command line's other writes to a terminal discard the result explicitly; this one does too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
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.
Two ruled changes to how a change to enforced is weighed: no observed traffic now fails the simulation review's verdict (#257), and the command line and the operator surface say that they are unguarded (#256, option 1, documentation only).
No observed traffic fails the verdict (#257)
Before.
composeVerdict(ui/src/routes/review/model.ts) called a scope safe when every workload in it simulated on its latest policy with no evidence gap and nothing that would be dropped, even when no traffic at all was recorded in simulation in the range. A workload switched to simulation a moment ago read "Safe to enforce", with only a caveat ("No flows were stored in this range; no observed traffic stands behind this verdict"). The promotion and the console's mode-change dialogs asked for no acknowledgment. An absence of observed drops proves nothing when nothing was observed.The condition. It has a new id,
no-traffic. It fires when the scope has at least one simulating workload and neither of the review's peer-and-service rollups (verdict=would_block,verdict=allowed) covered a window in the range:effective_from/effective_toare null on both, which is what the old caveat keyed on. The read model sets those bounds whenever a rollup matched any stored window, and leaves them null only when it matched none. They are computed over every group before the limit applies, so a truncated read always has them set and is never taken for an empty one. Traffic recorded in visibility is stored asobserved, which the review does not read, so the condition is not asked of a scope with nothing simulating. There, the visibility and already-enforced conditions already say that no verdict exists, and "nothing was observed" would be untrue.Scope, not workload. The condition judges the scope as a whole, as every other condition does. Any traffic recorded in simulation on any workload in scope, however little, satisfies it. In a scope of five workloads where four saw traffic and one saw none, the condition does not fire. A per-workload statement is not implemented here because it has not been ruled. It is filed as a follow-up issue.
The copy.
Every consumer of the verdict.
ui/src/routes/SimulationReview.tsx): the headline, its sentence, and the caveat lines come from the composition. Promote to enforced… takes the neutral style while the verdict is not safe.ui/src/routes/review/PromoteDialog.tsx):!verdict.safeholds the confirm on "I understand this scope is not safe to enforce yet". With no pairs to drop, the block's line is the first failing condition.ui/src/routes/fleet/ModeChangeDialog.tsx, used by the fleet's Change mode for selected… and the workload page's change…):enforceEvidenceputs a simulating workload with no traffic under "Not safe to enforce for N of M selected", with the condition as its reason. The confirm reads "Enforce anyway on N workloads" and waits on the acknowledgment.ui/src/routes/review/Takes.tsx): its all-clear ("No would-block flows … Enforcing now changes nothing for the traffic seen so far.") showed for a scope where nothing was observed. For that scope it now gives the statement the other filters already give ("No inbound flows into this scope's simulating workloads were stored in the last range. …").The design package prescribes no copy for the review's conditions or sentences; they are the repository's. Its mode-change extension (#94) names "the review's first failing condition" as each row's reason, and that covers the new condition. The package needs no change.
No minimum time in simulation and no minimum covered span is set.
The command line and the surface say they are unguarded (#256)
No behavior change in
internal/fleet,internal/api, or the command.innerwall workload set-mode: its usage error and its-hhelp now read:-hprints the flags under it.api/openapi.yaml,POST /mode-changesdescription, a new paragraph: "A change to enforced is not checked against any evidence and asks for no acknowledgment: the simulation review in the console is where the evidence is weighed, and this operation applies the mode as asked." No schema, parameter, or response changes. The console's typed client is regenerated from the document withmake console-api, and only its doc comment changes.docs/reference/innerwall-cli.mdand the promotion guide already said this in prose. They now use the same words.ADR-0001
A dated amendment (2026-11-28), with decision 2 and the consequence corrected in place. The core decision stands: visibility, then simulation, then enforcement, with the default and the evidence as the guarantee. The amendment records two things:
The simulation review guide (condition table, the verdict, the advice on a tier with no traffic, promoting), the promotion guide, ARCHITECTURE.md and the CHANGELOG are brought into step.
Verification
npm test,npm run lint, andnpm run buildinui/pass.enforceEvidenceon a workload with no traffic;model.tsandTakes.tsx.no-traffic. The workload page's one-step change to enforced now gives its workload one observed flow.gofmt; CI compiles and tests it.Fixes #257.
Closes #256.
Generated by Claude Code