Skip to content

Reuse authorized page-review results within profile reads - #252

Merged
kinqsradio merged 1 commit into
mainfrom
fix/profile-page-review
Oct 30, 2026
Merged

kinqsradio merged 1 commit into
mainfrom
fix/profile-page-review

Conversation

@kinqsradio

Copy link
Copy Markdown
Member

Profile page-review reads currently evaluate the same authorization-heavy eligible set twice per lane, once for complete counts and again for bounded display rows. Materialize that set once within a single SQL statement and reuse it for both projections. Counts still cover all eligible rows before limits; source authority, active/terminal ordering, truncation and the primary repeatable-read contract remain intact. No authorization result survives the statement.

Also uses portable AbortSignal cancellation checks in the shared client, preserving AbortError when React Native signals lack throwIfAborted or reason.

Validation: 20 PostgreSQL integration checks covering page review, profiles and maintained-page API; 27 focused client/profile/live-dispatch checks; shared client build, backend types/build and scoped formatting. Two alternating local benchmark passes at 0/48/240 seeded runs produced identical complete outputs. Function-body queries fell 26→24 per full profile read (9→8 per page-review call). In the second pass, full-profile median at 240 runs was 104.62→78.77ms; this is an isolated fixture result, not a production latency claim. The database container was restored to its prior stopped state. Hosted CI is not awaited at the owner’s request; production verification follows the authorized update.bat rollout.

@kinqsradio
kinqsradio merged commit 5018759 into main Oct 30, 2026
1 check passed
@kinqsradio
kinqsradio deleted the fix/profile-page-review branch November 2, 2026 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant