Repository navigation
fix: unambiguous AllowlistApprover constructors + documented decision pipeline - #70
Merged
Merged
Conversation
… pipeline Found while re-reading the #68 tests: AllowlistApprover::new's two arguments read as 'allow these, deny the rest', but the pipeline is pattern-match -> Allow with default applying to NON-matches, so new(vec!["bomb"], Decision::Deny) actually ALLOWS bomb. - Document the pipeline on new() with the concrete trap example (behavior unchanged: 0.2.0 is published on crates.io and interactive UX relies on it), now codified by a regression test. - allow_only(patterns): allow exactly these, deny the rest. - deny_only(patterns): deny exactly these, allow the rest (Destructive stays always-denied). Implemented with an explicit deny_mode flag so deny_only cannot be expressed as the misleading shape that started this.
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
This was referenced Sep 12, 2026
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 (description of the change)
AllowlistApprovergainsallow_only(patterns)(allow exactly these, deny the rest) anddeny_only(patterns)(deny exactly these, allow the rest; Destructive stays always-denied), implemented via an explicitdeny_modeflag.new()keeps its behavior (0.2.0 is published on crates.io) but now documents the decision pipeline with the concrete trap example, and a regression test codifies it.Why (the problem you're solving)
Found while re-reading the #68 tests:
new's two arguments read as 'allow these, deny the rest', but the pipeline is pattern-match → Allow withdefaultapplying only to NON-matches — sonew(vec!["bomb"], Decision::Deny)actually allows bomb. The misleading shape is what made the original guarded-replay livelock test look correct for months.Testing (how you verified this works)