Skip to content

review: no observed traffic is not safe to enforce; the command line and the API say they are unguarded - #276

Merged
avi-papineni merged 4 commits into
mainfrom
review/no-observed-traffic-is-not-safe
Nov 28, 2026
Merged

avi-papineni merged 4 commits into
mainfrom
review/no-observed-traffic-is-not-safe

Conversation

@avi-papineni

Copy link
Copy Markdown
Contributor

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_to are 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 as observed, 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.

  • Condition (a caveat line in the review, the first failing condition shown for a workload in the mode-change dialog): "No traffic was recorded in simulation in this range — no observed traffic stands behind this verdict". It replaces the old caveat; the two never appear together.
  • Headline: "Not safe to enforce yet". When nothing would be dropped, the sentence under it no longer reads "No observed traffic would be dropped, …", because that would be true of nothing:
    • alone: "Nothing was observed in simulation in this range, so the review cannot show what enforcing would drop."
    • with a sync condition: "Nothing was observed in simulation in this range, and not every workload in scope is simulating on its latest policy."
    • with evidence gaps: "Nothing was observed in simulation in this range, and evidence is missing from part of it: traffic in it may have gone unseen."
    • with both: "Nothing was observed in simulation in this range, evidence is missing from part of it, and not every workload in scope is simulating on its latest policy."
  • Order: would-block, evidence gaps, no traffic, then the workload conditions (degraded, offline, pending, visibility).
  • The safe verdict's "Observed for …" qualification is unchanged. A safe verdict now always rests on covered windows.

Every consumer of the verdict.

  • The review page (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.
  • The promote dialog (ui/src/routes/review/PromoteDialog.tsx): !verdict.safe holds 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.
  • The mode-change dialog (ui/src/routes/fleet/ModeChangeDialog.tsx, used by the fleet's Change mode for selected… and the workload page's change…): enforceEvidence puts 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.
  • The would-block view (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 -h help now read:
    usage: innerwall workload set-mode <workload-id> visibility|simulation|enforced
    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.
    
    -h prints the flags under it.
  • api/openapi.yaml, POST /mode-changes description, 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 with make console-api, and only its doc comment changes.
  • docs/reference/innerwall-cli.md and the promotion guide already said this in prose. They now use the same words.
  • ROADMAP.md: the server-side evidence guard stays backlog and now cites control plane and command line accept a change to enforced with no evidence and no acknowledgment #256.

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 evidence rule now 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 remain unguarded by decision and say so where they are used. The server-side guard remains backlog, to be decided in its own ADR because it changes the contract.

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, and npm run build in ui/ pass.
  • New Vitest cases cover:
    • no flows at all: not safe, the condition present, the old caveat absent;
    • one flow: the condition absent;
    • would-block traffic only, a truncated read, and a five-workload scope where one workload saw traffic;
    • the condition beside a sync condition, beside evidence gaps, with both, beside visibility, and in scopes with nothing simulating;
    • enforceEvidence on a workload with no traffic;
    • the review page;
    • the promote dialog and the workload page's mode-change dialog, each holding the confirm until acknowledged.
  • The new failing-path cases fail against the previous model.ts and Takes.tsx.
  • Three existing expectations encoded the old behavior and are updated. The safe caveat case is now the no-traffic case. The gaps-with-no-windows case now also lists no-traffic. The workload page's one-step change to enforced now gives its workload one observed flow.
  • The Go change is help text and a usage function. It is formatted with gofmt; CI compiles and tests it.

Fixes #257.
Closes #256.


Generated by Claude Code

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
@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

No ADR contradictions found (full-corpus audit, triggered because the diff touches docs/adr/0001-visibility-before-enforcement.md).

Diff-anchored findings

None. Summary of what was checked:

  • ADR-0001 amendment is correctly in-place, not a supersession. The PR edits decision 2 and the Consequences bullet of docs/adr/0001-visibility-before-enforcement.md to add "a range in which nothing was recorded in simulation is no evidence at all" and adds a new dated note under ## Amendments: **2026-11-28 (issues #257 and #256).**. This follows docs/adr/README.md's convention for an in-place amendment: "additive detail, clarification, narrowing of scope, or correction of a subsidiary point while the core decision stands," with "the change" recorded "in a dated note ... referencing the ADR or pull request that carries the new detail." The core decision — visibility → simulation → enforcement as the default path, with promotion gated behind an explicit acknowledgment "whenever the evidence does not support it" — stands; the amendment only narrows what counts as supporting evidence (a scope with zero observed traffic in the range no longer counts), consistent with the prior 2026-11-25 amendment's pattern of narrowing/extending the same evidence-gate concept. No Supersedes: header was added, and none was needed.
  • No server-side behavior change, consistent with the amendment's own text that "the command line and the surface remain unguarded by decision": cmd/innerwall/workload.go only changes set-mode's usage/help string, and api/openapi.yaml only adds a doc paragraph to POST /mode-changes's description (confirmed no schema/parameter/response change in the diff). This doesn't touch CLAUDE.md's hard rule that operator REST handlers hold no domain logic of their own (ADR-0007 as amended, ADR-0021) — nothing here adds logic to a handler.
  • UI changes implement, rather than contradict, the amended decision: ui/src/routes/review/model.ts adds a no-traffic condition that fails the verdict when neither rollup covered a window in the range and at least one workload is simulating, matching the amendment's "evidence rule... treats a range with no traffic recorded in simulation as evidence that does not support enforcement," scoped to the whole scope as the amendment specifies ("any traffic recorded on any of its workloads, however little, satisfies it"), and explicitly not asked of a scope with nothing simulating (visibility traffic is recorded as observed, not a simulated decision, matching the amendment note's own carve-out).
  • Docs kept in step: ARCHITECTURE.md, ROADMAP.md, CHANGELOG.md, docs/guides/promotion-and-enforcement.md, docs/guides/simulation-review.md, and docs/reference/innerwall-cli.md all cite "ADR-0001 as amended" consistent with the existing pattern used for the 2026-10-06/2026-11-25 amendments. No dangling references (ADR numbers, issues, or headings) introduced.

Full-corpus audit (all 23 ADRs + CLAUDE.md hard rules)

  • Status lines and Supersedes/Superseded by headers agree across the corpus: ADR-0005 ("Superseded by ADR-0017") ↔ ADR-0017 (Supersedes: ADR-0005); ADR-0004/ADR-0016 correctly show no supersession relationship (ADR-0016's 2026-09-13 amendment note removed an earlier Supersedes: ADR-0004 header and corrected the body in place; both remain Status: Accepted). All other ADRs are plain Status: Accepted with no dangling supersession claims.
  • Every ADR's ## Amendments section (where present) follows the README convention: a dated note citing the originating PR/issue, stating the core decision stands, and correcting only a subsidiary point in the body text — none restates the whole document or touches a core decision.
  • Each of CLAUDE.md's hard-rule citations (ADR-0002, 0003, 0006, 0007, 0008, 0009, 0010, 0011, 0012, 0016, 0017, 0018, 0020, 0021, 0022, 0023) still matches the current text of the ADR it cites; no drift found.
  • No dangling references found: every ADR number cited anywhere in docs/adr/ resolves to a file that exists in the corpus.

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>
@avi-papineni
avi-papineni merged commit 268a149 into main Nov 28, 2026
13 checks passed
@avi-papineni
avi-papineni deleted the review/no-observed-traffic-is-not-safe branch November 28, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants