Repository navigation
FIX Offer and keep the QUEUED status in the scanner history filter - #3783
Open
Shivam Sharma (ShivamSharma43) wants to merge 1 commit into
Open
Shivam Sharma (ShivamSharma43) wants to merge 1 commit into
Shivam Sharma (ShivamSharma43) wants to merge 1 commit into
Conversation
SCENARIO_RUN_STATES omitted QUEUED, a run state the backend persists, so the Run status dropdown could not select it and a shared status=QUEUED URL lost its only status and listed runs in every state. Add QUEUED in backend enum order and update the test that called it synthetic. Fixes microsoft#3744 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
Related Issue
None. This is a gap in
RAGPolicy's validation; the sections below are filled in as the template asks.Problem & Solution
Problem.
RAGPolicy.max_retrievals_per_minuteis documented as "maximum retrieval calls per agent per sliding window.0disables rate limiting."RateLimiter.checktreats exactly0as unlimited and otherwise rejects a call oncelen(window) >= limit. A negative limit (for example-1, which many libraries use for "unlimited") passesRAGPolicywithout complaint, and since the window length is never below-1, every retrieval is refused:Nothing points at the configuration as the cause, and each refused call is audited as
rate_limited.Solution.
RAGPolicy.__post_init__raisesValueErrorfor a negativemax_retrievals_per_minute, next to the existing check thatrate_limit_window_secondsis positive. The docstring says so.0still disables rate limiting, and positive limits are unchanged.Impact on Your Work
A policy written with
-1for "no limit" blocked the whole retriever with a rate-limit error that names no misconfiguration. It now fails when the policy is built, with a message that names the field.Timeline
None.
Alternatives Considered
<= 0as "no limit". That would silently turn a typo or a sign error into unlimited retrieval. Raising keeps the choice explicit, and matches howRAGPolicyhandlesrate_limit_window_seconds.RateLimiter.check.RAGPolicyis where a user sets the limit, and #4233 is open onrate_limiter.py'scheck()docstring, so this PR leaves that file alone.Type of Change
Package(s) Affected
Testing
Unit Testing
In
tests/test_policy.py:test_negative_max_retrievals_rejected(-1,-100):RAGPolicyraisesValueErrornamingmax_retrievals_per_minute. Fails on main and passes with the fix.test_zero_max_retrievals_disables_rate_limiting: a policy with0still builds, and aRateLimiterwith its window allows 500 calls in a row.Manual Testing
agent-rag-governancetests: 146 passed.ruff checkon the changed files: no new findings (the existingtyping.List/Optionaland import-order findings in these two files are unchanged).scripts/ci/changed_lines.py+cspell@8.17.3): no issues.Checklist
Attribution & Prior Art
Prior art / related projects (if any):
AI Assistance
I used Claude Code (Claude Opus) to help find the bug and draft the fix and tests. I reviewed the full diff and will handle review comments myself.
IP, Patents, and Licensing
🤖 Generated with Claude Code