Skip to content

docs(adr): document the fail-closed dependency contract (ADR-0030) - #487

Open
Destynova2 wants to merge 1 commit into
mainfrom
docs/adr-fail-closed-contract
Open

docs(adr): document the fail-closed dependency contract (ADR-0030)#487
Destynova2 wants to merge 1 commit into
mainfrom
docs/adr-fail-closed-contract

Conversation

@Destynova2

Copy link
Copy Markdown
Contributor

What

Turns the competitive-analysis finding into a durable contract. The deadliest
gateway defect the analysis surfaces is silent fail-open — LiteLLM's own P0
was budget enforcement failing open on a Redis outage.

I audited grob's hot path for the same class and found it is already
fail-closed
on every authorizing dependency:

Dependency On failure Evidence
Config load won't start config.rs:204
Budget cap block (BudgetExceeded) budget.rs:164/176 — spend is in-memory, no external counter store to fail open on
DLP block (detection → ?) dispatch/mod.rs:331 — deterministic, no "unavailable" state
HIT authorization deny on explicit-no, dropped channel and timeout retry.rs:794-806
Secret resolution resolved before registry build ADR trail #280/#284
Audit / metrics / pricing continue (degrade) off the decision path

Notably grob avoids the LiteLLM Redis fail-open structurally (in-memory
synchronous reservation), not by patching around it.

Why an ADR and not a code change

There is no bug to fix — the behaviour is correct. The risk is that a future
refactor silently re-introduces a fail-open (exactly how LiteLLM regressed).
ADR-0030 records the authorizing → block / observing → continue
classification so reviewers have an explicit line to hold, and flags the one real
gap: test coverage of the dependency-unavailable variants (poisoned mutex,
wedged policy backend), tracked in #485.

Part of the #484/#485/#486 backlog from the competitive analysis.

🤖 Generated with Claude Code

Competitive analysis of LiteLLM et al. shows silent fail-open (a security
dependency becomes unavailable and the request proceeds anyway) is the deadliest
gateway defect — LiteLLM's own P0 was budget enforcement failing open on a Redis
outage.

Audited grob's hot path: budget, DLP, HIT authorization, secret resolution and
config load are all already fail-closed (budget reserves in-memory with no
external counter store to fail open on; HIT denies on explicit-no, dropped
channel AND timeout; invalid config never starts). No behaviour change — this
ADR records the classification (authorizing → block, observing → continue) so a
future refactor cannot re-introduce a fail-open by accident, and gives reviewers
a line to hold. The remaining gap is test coverage of the dependency-unavailable
variants, tracked in the fail-closed-granularity issue (#485).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant