Repository navigation
lua: shared list cursor, IN and sort helpers; reject year-0000 cursors - #91
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
🦋 Changeset detectedLatest commit: f14d46c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 4 seconds. 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. |
Kzoeps
force-pushed
the
lua/shared-list-helpers
branch
from
November 18, 2026 14:38
7f80e4b to
112ddac
Compare
A crafted year-0000 cursor reached SQL on 51 golden cases and returned a 500. listVocabTags keeps its now-unreachable year check; its error text for this case changes to the generic cursor message.
…x list endpoints listRights, listMeasurements, listContributorInformation, listContributions, listAcknowledgements and listWorkscopeTags use the shared cursor decoder and IN helper; acknowledgement also takes parse_sort_direction and cursor_encode from listQuery. created_at_sort(alias) replaces the closed four-source table and the rights/measurement/contributor copies. listContributions keeps its own sort key (its COALESCE has an extra 'epoch' fallback). Golden unchanged.
Kzoeps
force-pushed
the
lua/shared-list-helpers
branch
from
November 18, 2026 15:04
112ddac to
79d7002
Compare
|
❌ The last analysis has failed. |
Open
This was referenced Nov 18, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #90.
Problem
List endpoints carry copied cursor decoding,
created_atsort SQL andIN (...)loops. A cursor with a year-0000 timestamp reached PostgreSQL on many endpoints and returned an HTTP 500.Fix
valid_datetimerejects year 0000, so these cursors now returnInvalidRequest. Per-endpoint year checks are removed.listVocabTagsnow reports this case as "cursor is malformed".decode_cursor(listCursor.lua, one validate callback),add_in(listWhere.lua, empty list givesFALSE) andcreated_at_sort(alias)(createdAtSort.lua).listRights,listMeasurements,listContributorInformation,listContributions,listAcknowledgementsandlistWorkscopeTagsonto them. The SQL golden from tests: add list endpoint SQL golden safety net #90 is unchanged apart from the year-0000 cases.listContributionskeeps its own sort SQL with the unused'epoch'fallback; unifying it would change SQL text, so it is left for a separate change.