feat(gov): GET /gov/receipts/recent for activity card (PR 6c)#6
feat(gov): GET /gov/receipts/recent for activity card (PR 6c)#6
Conversation
New authenticated endpoint backing the "Your activity" card on the governance page. Returns the user's most recent vote receipts (limit clamped to [1, 50]) via voteReceipts.listRecent. Tests use an injected monotonic clock on the repo so submitted-at ordering is deterministic when rows land in the same millisecond. Made-with: Cursor
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e37aae3e85
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const parsed = Number.parseInt(rawLimit, 10); | ||
| if (!Number.isInteger(parsed) || parsed <= 0) { |
There was a problem hiding this comment.
Parse limit with strict numeric validation
Using Number.parseInt here accepts partially numeric strings (for example limit=2abc, limit=1.5, or limit=1e3) and silently coerces them instead of returning 400 invalid_limit. That makes malformed client requests look successful and can produce unexpected result counts, despite the route contract documenting an integer limit in [1, 50].
Useful? React with 👍 / 👎.
…x round 1) Number.parseInt silently accepts partially-numeric strings (limit=2abc → 2, limit=1.5 → 1, limit=1e3 → 1). The route contract documents an integer in [1, 50] and clients depend on that being enforced; malformed queries now 400 invalid_limit instead of returning an arbitrary row count. Made-with: Cursor
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Backend companion for PR 6c on `sysnode-info` (syscoin/sysnode-info#9).
Adds a single authenticated endpoint backing the new "Your activity" card on the governance page:
Tests
381 / 381 passing (21 suites). New cases cover:
Test plan
Made with Cursor