fix(google-tasks): couple showHidden with show_completed#159
Conversation
The Tasks API marks completed items as hidden, so hardcoding showHidden=false filtered completed tasks back out even when callers passed show_completed=true, making the parameter a no-op. Send showHidden=true whenever show_completed is true (and false otherwise) so opted-in completed tasks are returned. Fixes #147
3ea7ee5 to
2c8b853
Compare
|
Warning Review limit reached
Next review available in: 57 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary
google_tasks_list_tasksacceptedshow_completed=truebut returned no completed tasks. The Google Tasks API marks completed items as hidden, and the tool hardcodedshowHidden="false", so completed tasks were filtered back out — making the parameter a no-op.Fix
Couple
showHiddenwithshow_completed: sendshowHidden="true"whenshow_completed=true, and"false"otherwise, so opted-in completed (hidden) tasks are returned.Tests
Extended the two existing behavioral tests to assert
showHiddenmoves in lockstep withshowCompleted:test_hides_completed_by_default→ request carriesshowHidden=falsetest_show_completed_opt_in→ request carriesshowHidden=trueWrote the failing assertions first, confirmed they failed for the right reason, then applied the fix.
Verification
uv run pytest tests/providers/google/tasks/→ 59 passedpre-commit(ruff, ruff-format, detect-secrets) passed on touched filesNote
The
tytype-check hook currently fails on a pre-existing, unrelated error insrc/apron_tools/providers/salesforce/tools.py:376(search_recordsunknown argument), reproducible onmainuntouched. Not caused by this change; worth a separate look (possibly atyversion behavior change, sincemake lintruns on PRs and hasn't been flagging it).Fixes #147