Skip to content

[PM-34023] Remove 2FA account recovery flag#7815

Merged
eliykat merged 10 commits into
mainfrom
ac/pm-34023/remove-recover-2fa-flag
Jun 17, 2026
Merged

[PM-34023] Remove 2FA account recovery flag#7815
eliykat merged 10 commits into
mainfrom
ac/pm-34023/remove-recover-2fa-flag

Conversation

@eliykat

@eliykat eliykat commented Jun 16, 2026

Copy link
Copy Markdown
Member

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-34023

📔 Objective

Remove the 2FA account recovery flag and associated cleanup.

  • Delete feature flag and branching logic
  • Delete v1 command (v2 not renamed in this PR so as to preserve the diff)
  • Delete deprecated route (reset-password) - no longer used by clients
  • Updated and added to integration tests

This flag is only consumed by web, so no backwards compatibility period is necessary.

Clients PR: bitwarden/clients#21291

📸 Screenshots

@eliykat eliykat requested a review from a team as a code owner June 16, 2026 06:00
@eliykat eliykat requested a review from BTreston June 16, 2026 06:00
@eliykat eliykat added the ai-review Request a Claude code review label Jun 16, 2026
@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

🤖 Bitwarden Claude Code Review

Overall Assessment: APPROVE

Reviewed the removal of the AdminResetTwoFactor (pm-15489) feature flag and associated cleanup: deletion of the v1 AdminRecoverAccountCommand and its interface, removal of the flag-branching logic in OrganizationUsersController.RecoverAccount, removal of the FeatureDisabledError and the validator's flag gate, and removal of the deprecated reset-password backward-compat route. Verified no remaining references to the deleted flag, command, or route exist in the codebase (the surviving PutResetPasswordEnrollment endpoint and AccountRecovery.v2 are unrelated and untouched). Unit and integration tests were correctly updated to exercise the single surviving v2 code path, with the integration tests asserting key replacement, forced password reset, security stamp rotation, and password verification.

No findings.

Code Review Details

No issues identified. The feature-flag removal is complete and internally consistent — dead flag-off branches are removed, the v2 path is the sole remaining route, and test coverage maps cleanly to the retained behavior.

@codecov

codecov Bot commented Jun 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.21%. Comparing base (a7e9480) to head (5dd60c9).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7815      +/-   ##
==========================================
- Coverage   65.72%   61.21%   -4.52%     
==========================================
  Files        2210     2209       -1     
  Lines       97820    97704     -116     
  Branches     8832     8815      -17     
==========================================
- Hits        64296    59812    -4484     
- Misses      31298    35768    +4470     
+ Partials     2226     2124     -102     

☔ 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.

@djsmith85 djsmith85 added feature-flag t:feature Change Type - Feature Development labels Jun 16, 2026
BTreston
BTreston previously approved these changes Jun 16, 2026
@eliykat eliykat requested a review from BTreston June 16, 2026 22:01
@eliykat eliykat enabled auto-merge (squash) June 16, 2026 22:02
@sonarqubecloud

Copy link
Copy Markdown

@eliykat eliykat merged commit 19cb812 into main Jun 17, 2026
44 checks passed
@eliykat eliykat deleted the ac/pm-34023/remove-recover-2fa-flag branch June 17, 2026 13:54
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 feature-flag t:feature Change Type - Feature Development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants