Skip to content

Allow seeder to create a Free org with Secrets Manager - #8187

Merged
theMickster merged 1 commit into
mainfrom
seeder/free-org-can-have-sm
Aug 17, 2026
Merged

Allow seeder to create a Free org with Secrets Manager#8187
theMickster merged 1 commit into
mainfrom
seeder/free-org-can-have-sm

Conversation

@nthompson-bitwarden

Copy link
Copy Markdown
Contributor

🎟️ Tracking

https://bitwarden.atlassian.net/browse/QA-1864

📔 Objective

The seeder rejected any Free org that requested Secrets Manager with a 400, because PlanFeatures.EnableSecretsManager only allow-listed Teams/Enterprise plans. This diverges from production, where Bitwarden offers a free Secrets Manager tier.

Add a PlanType.Free case that provisions the real free-tier base values (2 seats, 3 service accounts, per the FreePlan mock). Paid plans keep their existing smSeats-defaults-to-org.Seats behavior. Families and legacy plans still throw, matching production (they have no Secrets Manager tier).

Update the stale OrganizationSeed doc comments and the unit tests: add a Free positive-path test and repoint the throw test at FamiliesAnnually.

The seeder rejected any Free org that requested Secrets Manager with a 400,
because PlanFeatures.EnableSecretsManager only allow-listed Teams/Enterprise
plans. This diverges from production, where Bitwarden offers a free Secrets
Manager tier.

Add a PlanType.Free case that provisions the real free-tier base values
(2 seats, 3 service accounts, per the FreePlan mock). Paid plans keep their
existing smSeats-defaults-to-org.Seats behavior. Families and legacy plans
still throw, matching production (they have no Secrets Manager tier).

Update the stale OrganizationSeed doc comments and the unit tests: add a
Free positive-path test and repoint the throw test at FamiliesAnnually.
@nthompson-bitwarden nthompson-bitwarden added the t:misc Change Type - ¯\_(ツ)_/¯ Prefer using other type labels label Aug 11, 2026
@nthompson-bitwarden nthompson-bitwarden added the ai-review Request a Claude code review label Aug 11, 2026
@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

Reviewed the seeder change that adds a PlanType.Free arm to PlanFeatures.EnableSecretsManager, returning base values of 2 seats and 3 service accounts. The values match FreeSecretsManagerFeatures in test/Core.Test/Billing/Mocks/Plans/FreePlan.cs (BaseSeats = 2, BaseServiceAccount = 3), consistent with how the other plan arms mirror their mock plans. Paid-plan behavior (SmSeats defaulting to org.Seats) is unchanged, Families and legacy plans still throw, and the refactor to a tuple switch preserves the explicit-override path. Doc comments on OrganizationSeed and the unit tests were updated in step with the behavior, including a Free positive-path test and the throw test repointed at FamiliesAnnually.

Code Review Details

No findings. Test coverage aligns with the change and CI (build plus Run tests) is green.

@codecov

codecov Bot commented Aug 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 63.87%. Comparing base (ad319f0) to head (ea7364e).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8187      +/-   ##
==========================================
- Coverage   63.87%   63.87%   -0.01%     
==========================================
  Files        2352     2352              
  Lines      102209   102209              
  Branches     9227     9227              
==========================================
- Hits        65287    65286       -1     
- Misses      34698    34699       +1     
  Partials     2224     2224              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@theMickster
theMickster merged commit 7a04cf5 into main Aug 17, 2026
51 of 53 checks passed
@theMickster
theMickster deleted the seeder/free-org-can-have-sm branch August 17, 2026 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review t:misc Change Type - ¯\_(ツ)_/¯ Prefer using other type labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants