fix: resolve PostHog clients through configured DI - #1780
Conversation
|
Warning Review limit reached
Next review available in: 18 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
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 |
📊 Benchmark Results✅ All benchmarks passed
Updated: 2026-08-08T08:05:05.726Z · Commit: b28a3a6 |
|
Required |
Outcome
@croco/integrations-posthognow exports a typedPOSTHOG_CONFIG_TOKENandregisterPostHogConfig()startup path. Registration validates the API key and HTTP(S) host, resolves and freezes environment-provided host values, and remains usable before a logger is registered.PostHogClientinjects the configuration token, soContainer.get(PostHogClient)works after documented setup. Missing registration and invalid values produce stable Croco diagnostics. Existing mutablePostHogConfiginput typing and direct construction remain supported.Fixes #1705
Verification
pnpm --filter @croco/integrations-posthog test— 13 passedpnpm public-api:check— 115 package snapshots matchedpnpm problem-registry:check— 581/581 codes matchedpnpm package-manifests:check— 115 manifests normalizedpnpm strict-contract-typecheck— 503 baseline diagnostics matchedpnpm check— 24/25 repository gates passed; 1 not applicablepnpm changeset-required:check -- --base origin/trunk --head HEAD— passedReview gates
Validation gap
The full API-doc drift check built 4,527 pages and also reported existing drift in unrelated packages. The affected PostHog pages were regenerated with TypeDoc and exact signatures were rechecked after the final compatibility change.