Repository navigation
Conversation
keep_count=0 previously used own_files[:-0], which removes nothing. Treat zero as purge-all for the current pricing source and add regression tests. Fixes browser-use#6235
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Heads up: you’re close to your flex budget. Increase your flex budget so reviews don’t pause.
View guided diff | Re-trigger cubic
Summary
TokenCost.clean_old_caches(keep_count=0)so it removes all pricing cache files for the current source URL instead of keeping them (own_files[:-0]is empty in Python).keep_countis 0 so purge semantics run even when files exist.Closes #6235
Test plan
uv run pytest -vxs tests/ci/test_token_cost_clean_old_caches.pySummary by cubic
Fixes
TokenCost.clean_old_caches(keep_count=0)so it now deletes all pricing cache files for the current source URL, instead of keeping them all becauseown_files[:-0]evaluates to an empty list in Python. Also skips the early return whenkeep_countis 0 so purge semantics run correctly.Adds CI regression tests for keep counts 0 and 1, verifying that other sources and malformed cache files are left untouched. Closes #6235.
Written for commit 37f505d. Summary will update on new commits.