Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 0dfe16a The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 28 minutes. View limit details
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. |
1922818 to
84a70a7
Compare
listBadgeAwards uses the shared valid_badge_definition_uri. bind_values moves into listWhere.lua (add_in builds on it) so activityList and listMeasurements drop their copies. listLocations' add_in is a different helper (skips nil, joins placeholders with ',') and becomes add_optional_in. No behavior change: list golden is byte-identical.
actorFollowList, organizationList, profileList, listLocations, listEvmLinks, listFeatures and the badge list/search handlers decode cursors with decode_record_cursor. Empty cursors now answer 'cursor is malformed' and cursors over 8192 characters are rejected (listFeatures: was 32768); error name InvalidRequest is unchanged. A test builds each endpoint's largest possible cursor (max DID and record key) and checks it is under the cap and accepted on replay (largest: 5338 of 8192 characters). listRecentFollows and listVocabTags keep their own decoders: their cursors carry caller-supplied values (before, author filter) with no size bound.
query_string_values reads a repeated parameter (single value, list, <=100 strings, no keyed or sparse tables) and unique_query_values validates, optionally normalizes and de-duplicates. The 17 per-endpoint parsers keep only their own item rules and messages. profile, badge, EVM-link, location and feature lists now also reject keyed or sparse tables; HappyView already turns k[x], k[2], k.x into unknown parameters before Lua runs (new HTTP test), so requests behave as before. listFeatures' sparse message now matches the rest.
…y parsers listContributions uses query_string_values (identical messages; golden unchanged). listVocabTags, getReactionCounts and feedActorReactions keep their own parsers because their required-ness, count message, duplicate handling or shape message differ; each now says so. AGENTS.md names the new shared array helpers, and the allowlist reasons for the module-local query wrappers and listFeatures' occur-once check say why they differ.
The handler now rejects cursors over 8192 characters like every other list endpoint, so the schema says the same. Regenerated docs snapshots, OpenAPI, skill snapshot and the client.
84a70a7 to
a6acbbd
Compare
a6acbbd to
0dfe16a
Compare
|
SonarCloud annotation |
|
❌ The last analysis has failed. |
Problem
After the pure refactor in #107, the remaining copies differed in small ways: empty or over-long cursors, and keyed or sparse repeated parameters, were handled differently per endpoint.
Fix
decode_record_cursor) and one repeated-parameter parser (query_string_values/unique_query_values) on every list endpoint. Allowlist now 25, each with a specific reason.InvalidRequest:cursor is malformed(was... or belongs to another sortDirection) on 12 list endpoints.listFeatureswas 32768. API-issued cursors are at most 5338 characters (test added).<name> must use repeated query valueson the lenient filters;listFeaturesmessage aligned. HappyView already rejectsk[x],k[2],k.xbefore Lua (HTTP test added).listFeaturesLexicon cursormaxLength32768 → 8192, matching the other list Lexicons. Docs snapshots, OpenAPI, skill snapshot and client regenerated.listRecentFollowsandlistVocabTagskeep their own cursor decoders: their cursors embed unbounded caller values.Stacked on #107.