Skip to content

Reject out-of-range inspect limits and scans - #99

Merged
laaielichter merged 1 commit into
laaielichter:mainfrom
yinbowen-dc:fix/inspect-bounds
Nov 10, 2026
Merged

laaielichter merged 1 commit into
laaielichter:mainfrom
yinbowen-dc:fix/inspect-bounds

Conversation

@yinbowen-dc

Copy link
Copy Markdown
Contributor

Validate listing limits (1-200) and sensitive scan sizes (0-1000) before opening an engine. Remove silent clamping, retain zero as no scan, and continue ignoring listing limits when a table is named. Update CLI help and the reference.

Validation: pytest -q (868 passed, 10 skipped in 39.67s), ruff check ., git diff --check. Added regression tests fail against the original implementation and pass with this change. PostgreSQL-specific tests were not run; no external warehouse was contacted.

Closes #97

laaielichter commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

Welcome to Gulliver, @yinbowen-dc, and thank you for three PRs in one go (#99, #100 and #101)! Nobody else has claimed #97, #98 or #93, so they are yours. GitHub can only assign an issue to someone who has commented on it, so please leave a short "I'm on this" comment on each of those three issues, and I'll assign them. Your PR descriptions are a pleasure to read: validation commands, regression tests that fail before the fix, and a clear "Closes".

A few notes so the reviews go smoothly:

  • CI needs the maintainer's approval for a first-time contributor, so it may show as waiting for a short while. That's normal, not a problem with your PR.
  • If main moves while you wait, a quick git merge upstream/main is all that is needed.

If Gulliver is useful to you, a ⭐ on the repo helps other people find it, and it is always appreciated. Whenever you're ready for a next one, #80 (data checks in gulliver.toml) is a bigger, intermediate issue that would suit your careful style.


Generated by Claude Code

@laaielichter laaielichter left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @yinbowen-dc, this matches the "Done when" list for #97. I merged it onto current main in a scratch checkout: ruff check . is clean and pytest -q gives 868 passed, 10 skipped.

What I liked: the bounds are checked before any engine is opened (and the test enforces that), the boundary values 1, 200, 0 and 1000 are tested as valid, --limit is still ignored when a table name is given, and the README line for inspect now states the ranges.

One note: CI for this PR is waiting for the maintainer's approval because it is your first contribution, so it may show as waiting for a while. If main moves before it lands, a quick git merge upstream/main is all that is needed (the CHANGELOG line is the usual place for a small conflict).


Generated by Claude Code

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.

inspect: refuse --limit and --scan outside the range MCP already enforces, instead of quietly clamping

2 participants