Skip to content

Conversation

@cd-bitwarden
Copy link
Contributor

🎟️ Tracking

📔 Objective

📸 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

@claude
Copy link

claude bot commented Nov 19, 2025

Claude finished @cd-bitwarden's task —— View job


PR Review Complete

Todo List:

  • Read existing PR comments and reviews
  • Examine git diff to understand changes
  • Read package.json to see dependency modification
  • Evaluate PR title and description quality
  • Check for any related code changes or impacts
  • Provide comprehensive review feedback

Summary

This PR reverts jest-mock-extended from v4.0.0 back to v3.0.7 due to compatibility issues with the project's current Jest 29 installation (jest-preset-angular 14.6.1 and ts-jest 29.4.5). The revert includes updating numerous test files to use the v3 API (.toBeCalled() instead of .toHaveBeenCalled() family of matchers).

Findings

💭 Finding 1: PR documentation is insufficient

The PR template is minimally filled out:

  • ❌ Missing: Jira ticket reference in "🎟️ Tracking" section
  • ❌ Missing: Clear objective explaining what changed and why
  • ❌ Missing: Test plan or verification steps
Suggested PR description improvements
## 🎟️ Tracking
[Add Jira ticket reference]

## 📔 Objective
Revert jest-mock-extended from v4.0.0 to v3.0.7 to fix Docker build failures in CI.

The upgrade to jest-mock-extended v4 was incompatible with our current Jest 29 
installation. jest-mock-extended v4 requires Jest 30, which would require a 
larger migration effort including updates to jest-preset-angular and ts-jest.

This PR reverts the dependency and all associated test changes to restore CI stability.

## Test Plan
- ✅ Verify npm ci succeeds in Docker build
- ✅ Verify all tests pass with reverted version
- ✅ Confirm no breaking changes to test behavior

💭 Finding 2: Consider documenting the migration path

Since this is blocking an upgrade, it would be helpful to:

  • Document why jest-mock-extended v4 is desirable (if applicable)
  • Create a tracking issue for upgrading to Jest 30 + jest-mock-extended v4 in the future
  • Note any benefits that would come from the v4 upgrade

This would help prevent future attempts to upgrade without the necessary Jest migration.

Positive Observations

👍 The commit message on b3b6df8 is excellent - it clearly explains:

  • What was changed
  • Why the change was necessary
  • What the consequences were of the attempted upgrade
  • How this fixes the CI issue

👍 The revert is comprehensive, covering all test files that were modified in the original upgrade attempt

👍 The change is minimal and focused solely on the dependency reversion and related test updates

Recommendation

Approve with suggestions: The technical changes are sound and necessary to restore CI stability. The only improvements needed are documentation-related (PR description and potential future tracking).


@github-actions
Copy link
Contributor

github-actions bot commented Nov 19, 2025

Logo
Checkmarx One – Scan Summary & Details9dc456f8-b774-42d4-bfa9-2f7cbb4275b8

New Issues (1)

Checkmarx found the following issues in this Pull Request

Severity Issue Source File / Package Checkmarx Insight
MEDIUM CVE-2025-8129 Npm-koa-2.16.1
detailsRecommended version: 2.16.3
Description: A vulnerability, which was classified as problematic, was found in KoaJS Koa versions through 2.16.1 and versions 3.0.0-alpha0 through 3.0.0. Affec...
Attack Vector: NETWORK
Attack Complexity: LOW

ID: bZfn0bv%2Bm4gXtjI0IoqM4HBMtipU7KrHekYvZvz1HBw%3D
Vulnerable Package

@cd-bitwarden cd-bitwarden requested a review from a team as a code owner November 19, 2025 21:16
@cd-bitwarden cd-bitwarden requested a review from a team as a code owner November 20, 2025 16:14
@cd-bitwarden cd-bitwarden requested a review from quexten November 20, 2025 16:14
quexten
quexten previously approved these changes Nov 20, 2025
Copy link
Contributor

@quexten quexten left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving km changes

The update to jest-mock-extended v4.0.0 was incompatible with the project's current Jest 29 installation. jest-mock-extended v4 requires Jest 30, which would require a larger migration effort.

Changes:
- Downgrade jest-mock-extended from 4.0.0 to 3.0.7
- Revert test changes to use v3 API (toBeCalled instead of toHaveBeenCalled)
- Revert snapshot files to original state

This fixes the Docker build failure in CI where npm ci was failing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
The "Get pkg-fetch" step was failing because New-Item throws an error
if the directory already exists. This can happen with GitHub Actions
runner caching or when retrying failed jobs.

Added -Force parameter to New-Item commands to handle existing
directories gracefully.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@codecov
Copy link

codecov bot commented Nov 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 41.25%. Comparing base (db16c20) to head (a73b845).
⚠️ Report is 19 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17506      +/-   ##
==========================================
+ Coverage   41.11%   41.25%   +0.13%     
==========================================
  Files        3543     3546       +3     
  Lines      101843   102040     +197     
  Branches    15265    15308      +43     
==========================================
+ Hits        41872    42095     +223     
+ Misses      58208    58180      -28     
- Partials     1763     1765       +2     

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

3 participants