Fix notification mark-read ID bounds - #718
Conversation
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. |
|
gittensory · advisory review Reviewed 4 changed file(s) — two independent AI reviewers. Suggested action: ✅ Safe to merge — both reviewers found no blocking issues. Reviewer A · Suggestions
Worth double-checking
Reviewer B · Suggestions
Worth double-checking
|
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
# Conflicts: # test/unit/mcp-notifications.test.ts
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 2147713 | Commit Preview URL Branch Preview URL |
Jun 14 2026, 02:19 PM |
Motivation
idsarray (count or long strings) is forwarded into an SQLINpredicate.ids: []explicit as a no-op instead of being interpreted as omission and clearing all delivered notifications.Description
MAX_NOTIFICATION_MARK_READ_IDS = 100andMAX_NOTIFICATION_DELIVERY_ID_LENGTH = 128insrc/db/repositories.ts.markNotificationDeliveriesReadto return early for an emptyidsarray and to throw aRangeErrorwhen the array is too large or any ID is too long, before building SQL.INfilter whenidsis present (non-omitted) so empty arrays do not clear all notifications.src/mcp/server.tsusingzodto reject oversized client requests early.test/unit/notifications-service.test.tsandtest/unit/mcp-notifications.test.ts(empty-array semantics and oversized-filter rejection).Testing
npm run typecheckwhich completed successfully.npx vitest run test/unit/notifications-service.test.ts test/unit/mcp-notifications.test.tsand all tests passed (2 files, 15 tests).Codex Task