[CI] (e2f7ab0) rails/fizzy#2431
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
Closed
Conversation
Author
|
Now I have all the information needed to write the review. PR Evaluation ReportSummaryThis PR integrates PostHog into a Ruby on Rails app ("fizzy") by adding the
Confidence score: 3/5 🤔
File changes
App sanity check ❌
Issues
|
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | posthog-ruby and posthog-rails gems in Gemfile + posthog-js script snippet in layout |
| PostHog client initialized | Yes | PostHog.init in initializer with api_key/host from ENV; PostHog::Rails.configure with auto_capture_exceptions, ActiveJob instrumentation; posthog-js init in _head.html.erb |
| capture() | Yes | 13 meaningful capture calls across controllers using PostHog.capture class method |
| identify() | Yes | PostHog.identify in join_codes, magic_links, signups/completions; frontend posthog.identify from meta tag. However, distinct_id_for_identity uses "anonymous" fallback which merges all unknown users |
| Error tracking | Yes | auto_capture_exceptions: true, report_rescued_exceptions: true, auto_instrument_active_job: true, plus manual capture_exception calls with positional args (correct) |
| Reverse proxy | No | Frontend snippet sends directly to PostHog host; no reverse proxy configured |
Issues
- Hardcoded
"anonymous"distinct ID fallback:PosthogTrackable.distinct_id_for_identityreturns"anonymous"when identity is nil. Every unauthenticated user who triggers a capture/identify would be merged into one person profile, severely corrupting data. Use a per-request unique ID (e.g.,SecureRandom.uuid) or skip the capture entirely when identity is unavailable. [CRITICAL] - No reverse proxy: The posthog-js snippet loads from PostHog's CDN and sends data directly to
us.i.posthog.com. Ad blockers will block these requests. Configure a reverse proxy through the Rails app or a CDN. [MEDIUM] - Frontend
api_hostfragile whenPOSTHOG_HOSTunset: The meta tag for host renders as empty content when the env var is nil. The JSposthog.initgetsapi_host: ""which will break. Add a default likeENV.fetch("POSTHOG_HOST", "https://us.i.posthog.com"). [MEDIUM] - Potential nil
distinct_idin rescue blocks: Inmagic_links_controller.rbandsignups_controller.rb, if an exception occurs beforedistinct_idis assigned,capture_exceptionreceives nil. In signups,identitymay also be undefined in the rescue scope. [LOW]
Other completed criteria
- API key correctly loaded from
ENV["POSTHOG_PROJECT_TOKEN"]— not hardcoded in source - Host correctly loaded from
ENV["POSTHOG_HOST"] - Uses
PostHog.capture()class-level methods as required by posthog-rails (not instance methods) capture_exceptionuses positional args correctly (not keyword args)PostHog::Rails.configurecorrectly setsuser_id_method: :posthog_distinct_id- Frontend snippet uses
person_profiles: 'identified_only'— good practice posthog_distinct_iddefined on User model for automatic user association in error reports
PostHog insights and events ✅
| Filename | PostHog events | Description |
|---|---|---|
signups_controller.rb |
signup_started |
Tracks initial signup form submission with signup method |
signups/completions_controller.rb |
signup_completed, identify |
Tracks signup completion and identifies user with account context |
sessions/magic_links_controller.rb |
magic_link_authenticated, identify |
Tracks magic link login with method info and identifies user |
join_codes_controller.rb |
join_code_redeemed, identify |
Tracks join code redemption and identifies joining user |
cards_controller.rb |
card_created |
Tracks card creation with board context and creation type (draft vs published) |
cards/comments_controller.rb |
comment_created |
Tracks comment creation with card/board context |
webhooks_controller.rb |
webhook_created |
Tracks webhook creation with subscribed actions count |
webhooks/activations_controller.rb |
webhook_activated |
Tracks webhook activation |
account/exports_controller.rb |
account_export_requested |
Tracks account export requests |
account/imports_controller.rb |
account_import_started, capturedException |
Tracks imports with exception handling |
account/cancellations_controller.rb |
account_cancelled |
Tracks account deletion with actor role |
users/data_exports_controller.rb |
data_export_requested |
Tracks personal data export requests |
users/verifications_controller.rb |
user_verified |
Tracks user verification completion |
| Multiple controllers | capturedException (auto) |
Automatic exception capture via auto_capture_exceptions: true |
Issues
No issues with event quality.
Other completed criteria
- Events represent real user actions across the full product lifecycle (signup → login → use → export → cancel)
- Events enable product insights: signup funnel (started → completed), card creation trends, webhook adoption, account churn
- Events include relevant contextual properties (account_id, board_id, card_id, creation_type, signup_method, etc.)
- No PII in capture event properties — names and emails only appear in
identifyperson properties (correct placement) - Event names use consistent
snake_casenaming with descriptive[object]_[verb]convention
Reviewed by wizard workbench PR evaluator
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.
Automated wizard CI run
Source: wizard-pr
Trigger ID:
e2f7ab0App:
rails/fizzyApp directory:
apps/rails/fizzyWorkbench branch:
wizard-ci-e2f7ab0-rails-fizzyWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-07-06T22:12:04.485Z
Duration: 472.2s
YARA Scanner