Repository navigation
perf(posts): scan authorized filter sources once - #1182
Open
seonghobae wants to merge 2 commits into
Open
seonghobae wants to merge 2 commits into
seonghobae wants to merge 2 commits into
Conversation
|
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 59 minutes. View limit details
✨ Finishing Touches: 💡 1
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. Comment |
This branch has not been 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.
Change
Compute Board filter choices from one materialized, authorized eligible-Post set. The two option categories retain current Voice assignments and the primary-Voice fallback, lookup labels, ordering, and ABAC scope. ADR 0212 receives an explicit amendment for this query shape. No API, schema, release number, or numerical weight changes.
Observed bottleneck
On the canonical synthetic Compose stack, authenticated k6 HTTP runs reached 15.58 requests/s at 4 VUs (p95 906 ms) and 17.81 requests/s at up to 12 VUs (p95 2.38 s), with zero HTTP failures. PostgreSQL reached about 406% CPU while the worker, Valkey, and gateway remained much lower. A separate authorized Board read took about 936 ms; Lineage took about 67 ms. This identifies PostgreSQL Board work as the measured bottleneck, not a production capacity or SLO claim.
The existing filter query took 226–238 ms in three direct PostgreSQL observations. The candidate query returned identical option codes and labels on the same source, taking 92–144 ms in three observations. This is a query-level comparison; the running Compose API still serves the protected-main code, so no post-change k6 improvement is claimed.
Verification
DeprecationWarningtreated as an error. Documentation hygiene and the focused filter contract: 7 passed. A new case proves that an additional Voice enters the filter only while its carrying Post remains authorized.git diff --check: passed.Delivery limits
Exact-head hosted checks, independent approval, and enforced review/check rules remain required. The current ruleset inspection exposed only a non-fast-forward rule. This PR must not merge or auto-merge while that protection gap remains. Authenticated rendered Voice UI and synthetic k6 acceptance on this candidate head remain unverified.