📝 Document the session-gate exemption to the load* loader convention - #3318
Open
posthog-eu[bot] wants to merge 1 commit into
Open
posthog-eu[bot] wants to merge 1 commit into
posthog-eu[bot] wants to merge 1 commit into
Conversation
Contributor
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
The loader placement rule in CLAUDE.md said every loader uses a `load*` prefix, then named `getCurrent*`, `getActive*`, and `require*` session gates in the same sentence. The session gates keep those names because `get*` vs `require*` encodes whether the gate returns null or redirects. - State the session-gate exemption in CLAUDE.md. - Rename `getSeatUsage` to `loadSeatUsage` (a plain read, not a gate) and its call sites. - Add the loader export-name rule to check:structure so the convention cannot drift again. Generated-By: PostHog Desktop Task-Id: 33240b31-a6f7-4e54-83fc-d41a5113cef0
posthog-eu
Bot
force-pushed
the
posthog-self-driving/docsloaders-document-the-session-gate-30bf39
branch
from
September 18, 2026 19:27
e2d992e to
0445b74
Compare
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.
Description
Documents the session-gate exemption to the
load*loader naming convention, and enforces the convention incheck:structure.Problem
CLAUDE.mdtold contributors two incompatible things in one sentence: every loader uses aload*prefix, then namedgetCurrent*,getActive*, andrequire*session gates as the gates a loader should call.check:structurevalidated only file names, so nothing caught the drift.Changes
getCurrent*/getActive*/require*names becauseget*vsrequire*encodes whether the gate returns null or redirects — real information a rename would lose. Those three prefixes are the only exemption; every other loader usesload*.getSeatUsage→loadSeatUsage: it is a plain read with no gate behavior, so it takes theload*prefix. Updated its three call sites inmembers-page.tsxandsettings/billing/page.tsx.check:structure: now checks every value exported from aloaders.tsfile against the allowed prefixes, so the convention cannot drift again. Passes on all 28 exports.Fixes RAL-1637.
Checklist
Please check off all the following items with an "x" in the boxes before requesting a review.
Created with PostHog Desktop from this inbox report, addressing RAL-1637.