[CI] (6b2dc8b) rails/fizzy - #3734
Closed
wizard-ci-bot[bot] wants to merge 1 commit into
Closed
Conversation
Author
PR Evaluation ReportSummaryThis PR integrates PostHog into a Ruby on Rails app ("fizzy") by adding both
Confidence score: 4/5 👍
File changes
App sanity check
|
| Criteria | Result | Description |
|---|---|---|
| App builds and runs | Yes | Valid Ruby syntax, correct gem names, proper initializer structure |
| Preserves existing env vars & configs | Yes | Existing controller logic preserved; only PostHog additions |
| No syntax or type errors | Yes | All Ruby syntax is valid |
| Correct imports/exports | Yes | require 'posthog' matches posthog-ruby gem convention; posthog-rails auto-loads |
| Minimal, focused changes | Yes | All changes directly support PostHog integration |
| Pre-existing issues | .env file contains a real API key locally (not committed) |
Not introduced by this PR |
Issues
.env.examplenot committed: The.env.examplefile was created locally withPOSTHOG_PROJECT_TOKENandPOSTHOG_HOSTplaceholders but is not in the committed changeset. New developers cloning the repo won't know which env vars to set without reading the initializer. Should be committed. [MEDIUM]
Other completed criteria
- Build configuration is valid — gems added to Gemfile with proper syntax
- Existing app functionality preserved —
Current.account.cancelcall maintained, only PostHog capture added after it current_userhelper method properly delegates toCurrent.userfor posthog-rails user context
PostHog implementation ⚠️
| Criteria | Result | Description |
|---|---|---|
| PostHog SDKs installed | Yes | Both posthog-ruby (~> 3.21) and posthog-rails gems added to Gemfile |
| PostHog client initialized | Yes | PostHog.init block in initializer with PostHog::Rails.configure for exception tracking, ActiveJob, and user context |
| capture() | Yes | 10 meaningful capture calls across controllers |
| identify() | N/A | Server-only app |
| Error tracking | Yes | auto_capture_exceptions: true, report_rescued_exceptions: true, auto_instrument_active_job: true |
| Reverse proxy | N/A | Server-only app |
Issues
posthog_distinct_idcan return nil:User#posthog_distinct_idreturnsnilwhenidentity_idis blank. Multiple controllers callPostHog.capture(distinct_id: Current.user.posthog_distinct_id, ...)without a nil guard. This would passnilas the distinct_id, potentially causing events to be dropped or orphaned. Add a fallback (e.g.,identity_id.to_swithout theifguard, or useid.to_sas fallback). [MEDIUM]
Other completed criteria
- API key loaded from
ENV["POSTHOG_PROJECT_TOKEN"]— not hardcoded - Host loaded from
ENV["POSTHOG_HOST"]— configurable per environment - Uses
PostHog.capture()andPostHog.identify()class-level methods as documented for Rails posthog_distinct_idmethod on User model follows the documented pattern for automatic user associationuser_id_method: :posthog_distinct_idcorrectly configured in Rails config- Identify calls at sign-in and sign-up correctly set person properties via
properties:hash - Consistent distinct_id strategy using
identity_idacross both User model and direct identity references
PostHog insights and events ✅
| Filename | PostHog events | Description |
|---|---|---|
sessions/magic_links_controller.rb |
user_signed_in, identify |
Identifies user and captures sign-in with authentication method |
signups/completions_controller.rb |
user_signed_up, identify |
Identifies user with email/name and captures sign-up with account_id |
account/cancellations_controller.rb |
account_cancelled |
Captures account deletion with account_id |
boards_controller.rb |
board_created |
Captures board creation with board_id and all_access flag |
cards_controller.rb |
card_created |
Captures card creation with board_id and creation_type (draft/published) |
cards/comments_controller.rb |
comment_created |
Captures comment creation with card_id and board_id |
cards/publishes_controller.rb |
card_published |
Captures card publication with card_id and board_id |
join_codes_controller.rb |
account_joined |
Captures join code redemption with account_id |
account/exports_controller.rb |
account_export_started |
Captures data export initiation |
account/imports_controller.rb |
account_import_started |
Captures data import initiation |
| Automatic (posthog-rails) | capturedException |
Auto-captures controller exceptions, rescued exceptions, and ActiveJob failures |
Issues
No issues — events are well-structured and enable clear funnels.
Other completed criteria
- Events represent real user actions across the full product lifecycle (signup → create board → create card → publish → comment)
- Events enable product insights: signup-to-activation funnel, content creation funnel, churn analysis via
account_cancelled - All events include contextual properties (IDs, types, methods)
- No PII in capture properties — email set only via
identify()person properties - Consistent snake_case naming convention following
[object]_[verb]pattern
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:
6b2dc8bApp:
rails/fizzyApp directory:
apps/rails/fizzyWorkbench branch:
wizard-ci-6b2dc8b-rails-fizzyWizard branch:
release-please--branches--main--components--wizardContext Mill branch:
mainPostHog (MCP) branch:
masterTimestamp: 2026-09-01T15:56:10.895Z
Duration: 511.2s
YARA Scanner