Skip to content

Remove the Pro gate from goals - #491

Merged
thomasluizon merged 5 commits into
mainfrom
feature/ticket-326-goals-ungate
Aug 23, 2026
Merged

Remove the Pro gate from goals#491
thomasluizon merged 5 commits into
mainfrom
feature/ticket-326-goals-ungate

Conversation

@thomasluizon

@thomasluizon thomasluizon commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • Removes the plan gate from goal CRUD, progress, metrics, habit linking, and onboarding while preserving authorization, ownership, and relationship caps.
  • Keeps HTTP, MCP, and chat goal review paths behind a dedicated Pro access check.
  • Removes goal plan requirements from agent capabilities and migrates goal_tracking to no plan requirement while deleting the obsolete GoalsProOnly config row.

Verification

  • dotnet build Orbit.slnx --no-restore succeeded with zero errors.
  • dotnet test --no-restore passed all 5,925 tests.
  • EF reports no pending model changes.
  • The generated migration SQL contains one GoalsProOnly delete and one goal_tracking plan update to NULL.

Assumptions

  • I used an empty bootstrap commit because GitHub cannot open the required implementation-free pull request from a branch identical to main. I rejected writing source changes before opening the pull request.

Closes #326

@thomasluizon

Copy link
Copy Markdown
Owner Author

Implementation approach:

  1. Remove the three broad goals gate methods and all goal, habit, and onboarding call branches from the named Domain and Application files, while adding a dedicated one-line Pro gate for AI goal review.
  2. Update the feature seed and generate one EF migration and snapshot change, then hand add only the required AppConfigs delete and matching rollback insert.
  3. Remove plan and feature requirements from the three existing goal capabilities without changing scopes, risk, or confirmation behavior.
  4. Update the affected unit tests to prove free goal access, retained review gating, onboarding creation, and agent policy behavior.
  5. Verify focused tests, commit the implementation, run the full build and test suite plus migration checks, push, and wait for required checks to finish green.

This shape deletes the obsolete gate instead of retaining a dormant configuration fallback. It keeps the cost-bearing AI review behind its own narrow gate rather than preserving plan checks on the core goal loop.

pullfrog[bot]
pullfrog Bot previously approved these changes Aug 23, 2026

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes The current review covers the implementation-free bootstrap commit only.

  • Bootstrap commit: Established the feature branch and pull request without changing source, tests, configuration, contracts, or generated files.
  • Implementation status: No goal gating behavior is present in this diff; the implementation will need review after subsequent commits land.

Pullfrog  | View workflow run | Using GPT Sol𝕏

@thomasluizon

Copy link
Copy Markdown
Owner Author

Implementation is paused on a ticket contradiction before any source commit.

Acceptance criterion 1 requires grep -r "CanAccessGoals\|CanCreateGoals\|CanLinkGoalsToHabits\|GoalsProOnly" src/ tests/ to return nothing. Acceptance criterion 3 and the migration scope require the new migration to contain GoalsProOnly, and the immutable historical migration 20260414173756_SeedGoalsProGateConsistency.cs already contains it.

Recommended resolution: treat criterion 1 as a production and test code search that excludes src/Orbit.Infrastructure/Migrations, while keeping the required migration data operations.

@pullfrog pullfrog 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.

Important

The chat goal-review path is no longer Pro gated, so the entitlement boundary is incomplete.

Reviewed changes I reviewed the goal ungating implementation added since the prior Pullfrog review.

  • Removed broad goal gating: Removed IPayGateService checks from goal CRUD, reads, progress, metrics, habit linking, and onboarding while retaining user ownership filters and relationship limits.
  • Narrowed generated review gating: Added CanUseGoalReview to GetGoalReviewQuery and retained its Pro behavior for HTTP and MCP callers.
  • Migrated goal configuration: Deleted the GoalsProOnly seed and set the goal_tracking plan requirement to null through the EF migration and model snapshot.
  • Updated agent policy and tests: Removed goal capability requirements and adjusted affected handler, onboarding, pay gate, policy, and persistence tests.

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using GPT Sol𝕏

pullfrog[bot]
pullfrog Bot previously approved these changes Aug 23, 2026

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes I reviewed the chat goal review entitlement fix added since the prior reviewed version.

  • Gated chat goal reviews: Added CanUseGoalReview at the start of GoalReviewTool.ExecuteAsync, before any date, progress, or repository work.
  • Covered free user denial: Added a regression test that verifies a pay gate failure is returned without loading goals.

Pullfrog  | View workflow run | Using GPT Sol𝕏

…als-ungate

# Conflicts:
#	architecture.html
#	src/Orbit.Application/Profile/Commands/ApplyOnboardingCommand.cs
@thomasluizon

Copy link
Copy Markdown
Owner Author

@pullfrog review

@sonarqubecloud

Copy link
Copy Markdown

@pullfrog pullfrog 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.

✅ No new issues found.

Reviewed changes I reviewed the complete current diff for goal entitlement changes, review gating, migration state, agent policy, generated architecture artifacts, and affected tests.

  • Core goal access: Removed the broad Pro checks from goal CRUD, reads, progress, metrics, habit linking, and onboarding while preserving user ownership filters, date validation, relationship limits, and destructive-operation confirmation.
  • Goal review entitlement: Added the dedicated CanUseGoalReview boundary to both the MediatR query used by HTTP and MCP and the direct chat tool before cached or repository-backed data can be returned.
  • Configuration and policy: Removed the obsolete GoalsProOnly config, set goal_tracking to no plan requirement, and removed goal capability plan and feature requirements without changing scopes, mutation risk, or confirmation behavior.
  • Verification coverage: Updated handler, pay gate, onboarding, agent policy, cache, concurrency, and goal-completion tests, including a free-user denial regression for the chat review path.

Pullfrog  | View workflow run | Using GPT Sol𝕏

@thomasluizon
thomasluizon merged commit e88f878 into main Aug 23, 2026
23 checks passed
@thomasluizon
thomasluizon deleted the feature/ticket-326-goals-ungate branch August 23, 2026 22:59
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