Add account filter to activity API#821
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThe PR adds an ChangesAccount filtering for activity endpoint
Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
yui-stingray
left a comment
There was a problem hiding this comment.
Reviewed current head 9de63c43ab47bd9ecd2961a674c68beddadc13b7.
No blockers found. I inspected app/activity.py, app/serializers.py, tests/test_activity.py, docs/agent-guide.md, and docs/api-examples.md. The new account query parameter is normalized before reaching the serializer, and the serializer now applies the exact account filter to both proof-backed activity rows and pending payout rows before computing totals. The existing q filter still works as a narrower search inside the account-scoped slice.
Validation I ran on the PR head:
pytest tests/test_activity.py tests/test_activity_routes.py tests/test_docs_public_urls.py -q --capture=no->41 passed, 1 warning- targeted
ruff checkandruff format --checkon the changed Python/test files -> passed mypy app/activity.py app/serializers.py-> passedpython scripts/docs_smoke.py->docs smoke okgit diff --check origin/main...HEAD-> passedgit merge-tree --write-tree origin/main HEAD-> clean
GitHub also shows the hosted quality check and CodeRabbit status passing on this head, with no actionable CodeRabbit comments. I did not review or change payout execution, wallet material, treasury mutation, private data, exchange, bridge, cash-out, or price behavior.
|
Holding this for another useful current-head non-author human review before acceptance. This changes public API behavior, so I am keeping the 2-review bar. CI and CodeRabbit are green; no |
aunysillyme
left a comment
There was a problem hiding this comment.
Approved. Verified locally on commit 9de63c4. Ran unit tests (tests/test_activity.py - 7 passed, full suite - 707 passed) and verified ruff linter/formatting checks. The implementation of account-scoped filtering for activity feed and pending activity rows is clean, robust, and correctly resolves issue #786.
Summary
account=filter for/api/v1/activity.Bounty / Source
/claim #761
Source: #786 identified that
/api/v1/activity?account=...was accepted but returned the global feed instead of a scoped account view.Validation
python -m pytest tests/test_activity.py tests/test_activity_routes.py tests/test_docs_public_urls.py -q-> 41 passed, 1 warningpython -m ruff check app/activity.py app/serializers.py tests/test_activity.py tests/test_activity_routes.py tests/test_docs_public_urls.pypython -m ruff format --check app/activity.py app/serializers.py tests/test_activity.py tests/test_activity_routes.py tests/test_docs_public_urls.pypython scripts/docs_smoke.pypython -m mypy app/activity.py app/serializers.pygit diff --check origin/main...HEADScope
No payout execution, treasury mutation, wallet mutation, bridge/exchange/off-ramp/cash-out behavior, price/liquidity claims, private data, secrets, or admin-token behavior changed.
Summary by CodeRabbit
New Features
accountquery parameter.Documentation
accountfilter in the user and API guides.Bug Fixes
accountquery parameter, including control character and duplicate parameter checks.Tests