server icon indicating copy to clipboard operation
server copied to clipboard

[PM-27884][PM-27886][PM-27885] - Add Cipher Archives

Open jaasen-livefront opened this issue 1 month ago â€ĸ 6 comments

đŸŽŸī¸ Tracking

https://bitwarden.atlassian.net/browse/PM-27884 https://bitwarden.atlassian.net/browse/PM-27885 https://bitwarden.atlassian.net/browse/PM-27886

📔 Objective

This is the first step in the process of migrating the cipher archiveDate to use the Cipher.Archives data column

Key Changes

  • Added sql and migration scripts to create the column

Updated the following:

  • Cipher Repository
  • Archive Ciphers Command
  • Unarchive Ciphers Command
  • CipherDetailsQuery

Notes

  • No behavior changes yet; archive logic still uses Cipher.ArchivedDate.

Testing Notes

Testing was done with archiving/unarchiving via the web client without issue.

📸 Screenshots

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

đŸĻŽ Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or â„šī¸ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or âš ī¸ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or â™ģī¸ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

jaasen-livefront avatar Nov 14 '25 02:11 jaasen-livefront

Logo Checkmarx One – Scan Summary & Details – 37b9168b-ee98-4073-b018-264c3e4ab73a

Great job! No new security vulnerabilities introduced in this pull request

github-actions[bot] avatar Nov 14 '25 03:11 github-actions[bot]

Codecov Report

:x: Patch coverage is 55.26316% with 34 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 58.30%. Comparing base (7cfdb4d) to head (a8639eb). :warning: Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
src/Api/Vault/Controllers/CiphersController.cs 0.00% 22 Missing :warning:
...tyFramework/Vault/Repositories/CipherRepository.cs 73.91% 3 Missing and 3 partials :warning:
...ork/Repositories/Queries/UserCipherDetailsQuery.cs 76.47% 3 Missing and 1 partial :warning:
src/Core/Vault/Commands/ArchiveCiphersCommand.cs 0.00% 0 Missing and 1 partial :warning:
src/Core/Vault/Models/Data/CipherDetails.cs 50.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6578      +/-   ##
==========================================
+ Coverage   54.39%   58.30%   +3.91%     
==========================================
  Files        1916     1921       +5     
  Lines       84769    85258     +489     
  Branches     7579     7636      +57     
==========================================
+ Hits        46107    49708    +3601     
+ Misses      36902    33703    -3199     
- Partials     1760     1847      +87     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar Nov 14 '25 03:11 codecov[bot]

https://bitwarden.atlassian.net/wiki/spaces/EN/pages/2130739201/Vault+Technical+Breakdown+Archive+For+Premium+Database+Revamp?focusedCommentId=2168389739 -- needs discussion please.

withinfocus avatar Nov 14 '25 14:11 withinfocus

https://bitwarden.atlassian.net/wiki/spaces/EN/pages/2130739201/Vault+Technical+Breakdown+Archive+For+Premium+Database+Revamp?focusedCommentId=2168389739 -- needs discussion please.

@withinfocus I've reached out to the vault team regarding your comment!

jaasen-livefront avatar Nov 14 '25 17:11 jaasen-livefront

@shane-melton I've resolved all the issues in https://github.com/bitwarden/server/pull/6578/commits/24b7457cf16d24ac397da7247b6c18fd0b8d4bb4. The only remaining issue to resolve is the change to UserCipherDetails.sql which I think we can revert entirely.

We're also going to need to retain @ArchivedDate in the Cipher_Create and Cipher_CreateWithCollections procs until we remove it entirely from the Cipher entity as it's passed in as part of the params from the repository in CreateAsync

jaasen-livefront avatar Dec 10 '25 23:12 jaasen-livefront

Claude finished @jaasen-livefront's task in 3m 45s —— View job


Code Review Complete

The bitwarden-code-reviewer agent has completed its analysis and posted detailed inline comments and a comprehensive summary review.


claude[bot] avatar Dec 12 '25 17:12 claude[bot]

@claude Stop reviewing this PR.

shane-melton avatar Dec 12 '25 23:12 shane-melton

@claude Stop reviewing this PR.

😂😂😂

gbubemismith avatar Dec 12 '25 23:12 gbubemismith

Claude finished @shane-melton's task in 15s —— View job


Review Stopped

I've stopped reviewing this PR as requested.


claude[bot] avatar Dec 12 '25 23:12 claude[bot]

Claude finished @gbubemismith's task in 16s —— View job


Status

No action needed - standing by for any requests! 😄

I noticed Shane asked me to stop reviewing earlier. I'll wait for explicit requests before taking any action on this PR.


claude[bot] avatar Dec 12 '25 23:12 claude[bot]

@claude Stop reviewing this PR

jaasen-livefront avatar Dec 13 '25 00:12 jaasen-livefront

Claude finished @jaasen-livefront's task in 14s —— View job


Review Stopped

I've stopped reviewing this PR as requested. Standing by for any future requests!


View job

claude[bot] avatar Dec 13 '25 00:12 claude[bot]

@jrmccannon Ready for another look when you have a chance. ;)

jaasen-livefront avatar Dec 16 '25 18:12 jaasen-livefront

@jrmccannon Sorry just need one last approval. Ty!

jaasen-livefront avatar Dec 16 '25 23:12 jaasen-livefront