Skip to content

Allow all Pro users to access retrospectives (ORB-188) - #465

Open
thomasluizon wants to merge 3 commits into
mainfrom
fix/orb-188-collapse-yearly-pro-into-pro
Open

Allow all Pro users to access retrospectives (ORB-188)#465
thomasluizon wants to merge 3 commits into
mainfrom
fix/orb-188-collapse-yearly-pro-into-pro

Conversation

@thomasluizon

@thomasluizon thomasluizon commented Aug 8, 2026

Copy link
Copy Markdown
Owner

Summary

ORB-188 removes the yearly billing interval as an entitlement tier for retrospectives. Annual billing remains unchanged.

Impact

All Pro users, including monthly, yearly, lifetime, and trial users, share the same retrospective entitlement. The retired PostHog isYearlyPro person property is explicitly removed on each subsequent user event, so dashboards filtered on that property may need updating.

Rollout note

Deploy this API change before the client unlock. After this ships, changing AppFeatureFlags.ai_retrospective back to YearlyPro fails closed for every user and must not be used as a rollback.

External interface evidence

The installed PostHog 2.12.1 nuspec identifies upstream source commit 3f50bdc2407f89f6b5cfb3c2f2723ef0fd0735bd. At that commit, IPostHogClient.Capture accepts the event payload as Dictionary<string, object>? properties: https://github.com/PostHog/posthog-dotnet/blob/3f50bdc2407f89f6b5cfb3c2f2723ef0fd0735bd/src/PostHog/IPostHogClient.cs

PostHog's official person properties documentation specifies removal as a $unset array containing the property keys: https://posthog.com/docs/product-analytics/person-properties#how-to-remove-person-properties

Validation

  • dotnet build Orbit.slnx: succeeded with 0 errors
  • dotnet test Orbit.slnx: 5,722 passed, 0 failed, 0 skipped

Links ORB-188.

@thomasluizon

Copy link
Copy Markdown
Owner Author

Implementation approach:

  1. Remove the IsYearlyPro entitlement and change retrospective access to the existing HasProAccess source of truth.
  2. Remove yearly tier parsing from feature flag and agent policy evaluation, and change catalog plus EF seed requirements to Pro.
  3. Add an EF migration that updates the existing ai_retrospective row, including generated migration metadata required by the model change.
  4. Remove the orphaned analytics parameter and PostHog property across the interface, implementations, capture helper, and affected tests.
  5. Update the paygate explanation and focused tests for monthly, yearly, lifetime, trial, free, expired, and stale yearly requirement behavior.
  6. Verify the annual billing surfaces remain intact, then build, run focused tests, commit, run the full suite, push, and monitor required checks.

This keeps billing interval data intact and collapses only the entitlement distinction. Reusing HasProAccess avoids adding another plan concept, while the data migration is necessary because changing HasData does not update a live row.

Salvaged by the orchestrator after the implementing worker's process tree was killed
mid-edit at 2026-08-08T04:29:33Z with this work uncommitted. No implementation code was
written outside the worker's own edits; only the 22 paths it had already touched were
staged, by name. Gate before staging: dotnet build 0 errors, dotnet test Orbit.slnx
5,722 passed 0 failed.
@thomasluizon
thomasluizon marked this pull request as ready for review August 8, 2026 08:10

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 92120036d6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/Orbit.Infrastructure/Services/PostHogProductAnalytics.cs
@thomasluizon

Copy link
Copy Markdown
Owner Author

Connector fix approach:

  1. Keep the existing event and $set plan payload unchanged.
  2. Add PostHog's documented $unset array for isYearlyPro to the same capture properties dictionary so existing person profiles converge when their next user event is captured.
  3. Update only PostHogProductAnalyticsTests to assert the exact unset payload, then run the full solution test suite.

External interface evidence: the installed PostHog 2.12.1 nuspec identifies source commit 3f50bdc2407f89f6b5cfb3c2f2723ef0fd0735bd; at that commit IPostHogClient.Capture accepts Dictionary<string, object>? properties. PostHog's official person properties documentation specifies property removal as a $unset array of property keys: https://posthog.com/docs/product-analytics/person-properties#how-to-remove-person-properties

@sonarqubecloud

sonarqubecloud Bot commented Aug 8, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant