Repository navigation
test(rules): an inherited operator allowlist keeps its default deny - #104
Conversation
Add a test verifying that inheriting operator layers preserves a config layer whose default is deny with an explicit allow rule, so allowlisted tools stay callable while others remain blocked. Auto-committed-on: cuttlefish Co-authored-by: Medulla <medulla@tinyhumans.ai>
Tiny Sweeper reviewReviewed head: Verdict: Ready for maintainer review · Priority: none Diagnostics and supporting detailsFull summaryPull request purpose (title): test(rules): an inherited operator allowlist keeps its default deny. This pull-request is a test-only follow-up to #103, adding `inherit_operator_layers_keeps_a_default_deny_allowlist` to confirm that `inherit_operator_layers` preserves a `config` layer carrying `default: deny` plus a single allow rule, so the inherited set admits the listed tool and refuses others. No production code and no public API change are involved. Validation results are reported only as stated in the pull-request description. Review snapshot
Completeness: Complete What changedA single test is added to `crates/tinytools/src/rules/mod_tests.rs`. It constructs a rule set with a `config` layer set to `default: deny` and one allow rule matching `file_read`, calls `inherit_operator_layers`, then asserts the inherited set evaluates `file_read` as callable and `shell` as not callable on `Surface::Call`. No production code is modified; the change pins inheritance behavior that preserves non-permissive layers and their allowlists. The review lanes found the test consistent with the implementation and with existing helpers in the file. Features
TestsNo supported feature-to-test mapping was produced. Test execution is not inferred. FindingsNo active actionable findings. Before mergeNone. Agent review detailscritique
security
tests
commits
description
Evidence and run details
|
|
Warning Review limit reached
This review includes 1 billable file and costs up to $0.25. Or wait 50 minutes for your next included review. View limit details
CodeRabbit Verify
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Follow-up to #103, which merged before this commit landed. Adds
inherit_operator_layers_keeps_a_default_deny_allowlist, which checks that aconfiglayer withdefault: denyand one allow rule still admits only the listed tool afterinherit_operator_layers. This was CodeRabbit's suggestion on #103.Public API: none. Test only.
Validation:
cargo fmt --all -- --checkok;cargo clippy -p tinytools --all-targets --all-features -- -D warningsok;cargo test -p tinytools inherit_operator: 2 passed.