Skip to content

feat(taosctl): validate pagination args across command groups#1401

Merged
jaylfc merged 1 commit into
devfrom
feat/taosctl-arg-validation
Jun 23, 2026
Merged

feat(taosctl): validate pagination args across command groups#1401
jaylfc merged 1 commit into
devfrom
feat/taosctl-arg-validation

Conversation

@jaylfc

@jaylfc jaylfc commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Adds a shared tinyagentos/cli/taosctl/argtypes.py (positive_int for --limit, nonneg_int for --offset) and applies it across the merged command groups so non-positive limits and negative offsets fail at parse time instead of being forwarded to the server as guaranteed-invalid calls.

Generalizes the per-command validator CodeRabbit flagged on the dashboard group (#1399) into one shared helper, applied consistently across the pagination surface.

Touched groups

catalog, knowledge, memory, search, templates, jobs, benchmarks, mail, scheduler, browsing_history. Each --limit -> positive_int, each --offset -> nonneg_int. Ports, seeds, durations, and intervals are left alone (different semantics).

Tests

New tests/test_taosctl_argtypes.py unit-tests both validators and confirms a representative group (memory list) rejects --limit 0 / --offset -1 without dispatching, while valid paging still dispatches. Full taosctl suite: 264 passed (incl. route-coverage gate).

Follow-up

The dashboard group (#1399, gating) carries an inline _positive_int; once it merges it can be deduped to import the shared helper.

Add a shared argtypes module (positive_int for --limit, nonneg_int for
--offset) and apply it across the merged command groups (catalog, knowledge,
memory, search, templates, jobs, benchmarks, mail, scheduler,
browsing_history). Non-positive limits and negative offsets now fail at parse
time instead of being forwarded to the server as guaranteed-invalid calls.

Centralizes the per-command validator CodeRabbit flagged on the dashboard group
so the whole pagination surface behaves consistently.
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@jaylfc, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 25 minutes and 14 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1b31ae07-2ea8-4f48-a6f4-c20d786bd796

📥 Commits

Reviewing files that changed from the base of the PR and between 89b79bb and afe37d5.

📒 Files selected for processing (12)
  • tests/test_taosctl_argtypes.py
  • tinyagentos/cli/taosctl/argtypes.py
  • tinyagentos/cli/taosctl/commands/benchmarks.py
  • tinyagentos/cli/taosctl/commands/browsing_history.py
  • tinyagentos/cli/taosctl/commands/catalog.py
  • tinyagentos/cli/taosctl/commands/jobs.py
  • tinyagentos/cli/taosctl/commands/knowledge.py
  • tinyagentos/cli/taosctl/commands/mail.py
  • tinyagentos/cli/taosctl/commands/memory.py
  • tinyagentos/cli/taosctl/commands/scheduler.py
  • tinyagentos/cli/taosctl/commands/search.py
  • tinyagentos/cli/taosctl/commands/templates.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/taosctl-arg-validation

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gitar-bot

gitar-bot Bot commented Jun 23, 2026

Copy link
Copy Markdown

Note

Your trial team has used its Gitar budget, so automatic reviews are paused. Upgrade now to unlock full capacity. Comment "Gitar review" to trigger a review manually.
Learn more about usage limits

Code Review ✅ Approved

Centralizes pagination argument validation in a shared utility and applies it across ten command groups. This ensures non-positive limits and negative offsets are caught during parsing, with no issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Important

Your trial ends in 4 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more.

Was this helpful? React with 👍 / 👎 | Gitar

@jaylfc jaylfc enabled auto-merge (squash) June 23, 2026 13:02
@jaylfc jaylfc merged commit f61a965 into dev Jun 23, 2026
9 of 10 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in TinyAgentOS Roadmap Jun 23, 2026
jaylfc added a commit that referenced this pull request Jun 23, 2026
Replace the dashboard group's inline _positive_int with the shared
tinyagentos/cli/taosctl/argtypes.positive_int (landed in #1401), removing the
duplicate now that both are on dev. Behaviour unchanged; --limit still rejects
non-positive values at parse time.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant