Repository navigation
Calculate AI credit quotas as base × quantity - #520
Draft
mitchelljkotler wants to merge 1 commit into
Draft
mitchelljkotler wants to merge 1 commit into
mitchelljkotler wants to merge 1 commit into
Conversation
Squarelet's release 6 reshapes every entitlement so base x quantity grants what base + extra users x per user did: a plan is quantity 1, and extra credits are a pack line whose quantity is how many it holds. The factories take that shape and the seat tests become pack quantities, with the same numbers. Deploy only after Squarelet's migrate_entitlement_shape has run on production; before it, a credit pack grants nothing under this formula. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0151rwxtvLg1vKEiz7XsJfzf
This branch has not been deployed
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.
Calculates an organization's AI credit quota as
base × quantity, the formula Squarelet's release 6 prepares for.Fixes #491. Part of MuckRock/squarelet#769.
Behaviour changes
_calc_ent_ai_creditsreturnsbase_ai_credits × quantity. It no longer readsai_credits_per_userorminimum_users. After release 6, every Squarelet entitlement hasminimum_users: 1andper_user = base(packs:base = per-unit value), which makes the two formulas identical. A plan is quantity 1; extra credits are a pack line, whose quantity is how many packs it holds.Migrations
None.
What to check
migrate_entitlement_shapehas run on production.ai_credits_per_monthas before.🤖 Generated with Claude Code
https://claude.ai/code/session_0151rwxtvLg1vKEiz7XsJfzf