Skip to content

fix(cli): honor page size for filtered cleanup - #280

Open
nightcityblade wants to merge 1 commit into
griddynamics:mainfrom
nightcityblade:fix/issue-267
Open

fix(cli): honor page size for filtered cleanup#280
nightcityblade wants to merge 1 commit into
griddynamics:mainfrom
nightcityblade:fix/issue-267

Conversation

@nightcityblade

Copy link
Copy Markdown

Summary

  • pass the configured page_size to tag- and prefix-filtered cleanup queries
  • add a parametrized regression test covering both filtered branches

Why

cleanup-dataset --tags and --prefix silently used DocumentService's default limit of 1000 instead of RAGFLOW_PAGE_SIZE. Deployments configured above that default could therefore under-delete matching documents without warning. The unfiltered branch already honors the configured page size; this makes all three paths consistent.

Validation

  • PYTHONPATH=src/rosetta-cli venv/bin/python -m pytest -q src/rosetta-cli/tests/test_cleanup_command.py src/rosetta-cli/tests/test_command_auth_order.py — 5 passed
  • PYTHONPATH=src/rosetta-cli venv/bin/python -m pytest -q src/rosetta-cli/tests — 39 passed
  • uvx ruff check src/rosetta-cli/tests/test_cleanup_command.py — passed
  • uvx ruff check --select E9,F63,F7,F82 src/rosetta-cli/rosetta_cli/commands/cleanup_command.py — passed
  • uvx ruff format --check src/rosetta-cli/tests/test_cleanup_command.py — passed
  • ROSETTIFY_PLUGINS_LOG_LEVEL=warn venv/bin/python scripts/pre_commit.py — passed

Checklist

  • Scope is narrow and explicit
  • New behavior has regression coverage
  • Local validation passes
  • Commit includes the required DCO sign-off

AI assistance was used to inspect the issue, implement the focused change, and run validation. I reviewed every changed line.

Closes #267

Signed-off-by: nightcityblade <nightcityblade@gmail.com>
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.

[ROSETTA] cleanup-dataset --tags/--prefix filters ignore configured page_size

1 participant