docs(adr): document the fail-closed dependency contract (ADR-0030) - #487
Open
Destynova2 wants to merge 1 commit into
Open
docs(adr): document the fail-closed dependency contract (ADR-0030)#487Destynova2 wants to merge 1 commit into
Destynova2 wants to merge 1 commit into
Conversation
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>
Destynova2
enabled auto-merge (squash)
July 28, 2026 18:10
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.
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:
config.rs:204BudgetExceeded)budget.rs:164/176— spend is in-memory, no external counter store to fail open on?)dispatch/mod.rs:331— deterministic, no "unavailable" stateretry.rs:794-806Notably 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 → continueclassification 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