fix(oracle): validate REGEXP_INSTR return option - #1805
Conversation
Assisted-by: OpenAI:gpt-5 Percentage of AI-generated code: 100%
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthrough
ChangesREGEXP_INSTR validation
Estimated code review effort: 2 (Simple) | ~5 minutes Merge Risk: ⚪ Minimal · up to The change restricts REGEXP_INSTR return_option to the supported values 0 and 1 and adds regression coverage for invalid input; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation The pull request satisfies issue Full details: Out of Scope Changes checkExplanation All changes are directly related to issue Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Root cause
The validation checked only the lower bound, while the execution path treated every nonzero value as the end-of-match option.
Validation
Closes #1799
Summary by CodeRabbit
Bug Fixes
regexp_instrvalidation so thereturn_optionaccepts only0or1.2, now return an appropriate out-of-range error.Tests
return_optionvalues are rejected.