Conversation
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe change updates ChangesOverflow policy validation
Suggested reviewers: Priority: ⬇️ Low — Defer the overflow policy validation fix because it is a narrow API input-handling change that prevents malformed values from causing 500 errors. Merge Risk: ⚪ Minimal · up to The update rejects non-string overflow policies with the existing invalid-input response while preserving valid policy behavior. No current merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
|
||
| overflow_policy = merged.get("overflow_policy") | ||
| if overflow_policy is not None and overflow_policy not in VALID_OVERFLOW_POLICIES: | ||
| if overflow_policy is not None and ( |
There was a problem hiding this comment.
Could you add a test? Nothing in the suite currently touches this validation branch at all. No test references invalid_overflow_policy. so right now nothing proves the fix works and nothing stops it coming back. A single case asserting {"overflow_policy": ["truncate_text"]} returns 400 would cover it.
There was a problem hiding this comment.
Added a test covering the invalid overflow_policy type case. It verifies that passing a list returns the expected 400 INVALID_INPUT response.
Fixes
File path Changed-> packages/sie_server/src/sie_server/api/options.pyI fixed an issue with
overflow_policyvalidation.If an invalid type such as a list or dictionary was passed as
overflow_policy, the server could raise aTypeErrorwhile checking the value against the allowed policies. This resulted in a 500 error even though the problem was with the request itself.The validation now checks that
overflow_policyis a string before checking whether it is one of the supported values.For example, passing:
{ "overflow_policy": ["truncate_text"] }will now be handled as an invalid request and return the existing 400 INVALID_INPUT response instead of causing a 500 error.
Valid
overflow_policyvalues continue to behave exactly as before. No inference behaviour was changed.Testing
Summary by CodeRabbit