Skip to content

fix: Search limit validation - #30

Merged
royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
Rudra-G-23:fix/search-limit-validation
Sep 16, 2026
Merged

royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
Rudra-G-23:fix/search-limit-validation

Conversation

@Rudra-G-23

Copy link
Copy Markdown
Contributor

Summary

Closes #22

  • Validate limit and candidates before database access in search().
  • Raise ValueError when either value is non-positive.
  • Add regression tests covering zero and negative values.
  • Ensure invalid values are rejected before opening a database cursor.

Testing

@github-actions

Copy link
Copy Markdown

Welcome, @Rudra-G-23, and thanks for your first pull request to VaultRAG.

A quick look at CONTRIBUTING.md covers how things are set up and run here.

I'll review this shortly. Ask anything in the thread if something is unclear.

@royalpinto007
royalpinto007 merged commit 522c712 into AgentPostmortem:main Sep 16, 2026
7 checks passed
@github-actions

Copy link
Copy Markdown

Merged. Thanks a lot, @Rudra-G-23.

Good, focused change. Exactly the kind of thing VaultRAG needs.

If VaultRAG is useful to you, a star goes a long way.

Happy to see more from you whenever you have the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

search() passes limit/candidates into SQL with no guard

2 participants