# Changelog

## Score

- CAI 49 → 55 (+6.5)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.

## Lenses

- Code Health 46 → 51 (+5.3)
- Architecture 59 → 64 (+5.7)
- Maturity 58 → 54 (-3.5)
- Readiness 66 → 79 (+13.1)
- Security 46 → 79 (+33.0)
- Accessibility 49 → 53 (+3.7)
- Performance 91 → 91 (+0.0)

## Resolved (20)

- $set (cognitive 274) (lib/document.js)
- Documentation: no architecture or design documentation (README.md)
- Documentation: no project overview (docs/defaults.md)
- Documentation: no project overview (docs/enterprise.md)
- Hotspot: lib/helpers/query/castUpdate.js (lib/helpers/query/castUpdate.js)
- Hotspot: lib/query.js (lib/query.js)
- Hotspot: lib/schemaType.js (lib/schemaType.js)
- Off-boarding risk: anonymized user #1
- Projects may be oversized for their cohesion
- Redundant validation methods with overlapping intent. Both methods appear to validate whether a value is a valid MongoDB ObjectId or a valid hex string representation of one. Having two distinct public methods for the same logical check creates confusion for consumers.
- Scanner failed to run — not a clean result
- Scanner failed to run — not a clean result
- document.Document.$set (cyclomatic 177) (lib/document.js)
- generateSearch.generateContents (cognitive 26) (scripts/generateSearch.js)
- init (cognitive 93) (lib/document.js)
- isExclusive (cognitive 19) (lib/helpers/projection/isExclusive.js)
- query.Query._optionsForExec (cyclomatic 23) (lib/query.js)
- website.mapURLs (cognitive 16) (scripts/website.js)
- website.renderFile (cognitive 21) (scripts/website.js)
- website.renderFile (cyclomatic 19) (scripts/website.js)

## New (45)

- $set (cognitive 241) (lib/document.js)
- $set (cyclomatic 144) (lib/document.js)
- Hotspot: lib/helpers/model/discriminator.js (lib/helpers/model/discriminator.js)
- Hotspot: lib/helpers/updateValidators.js (lib/helpers/updateValidators.js)
- Hotspot: lib/schema/number.js (lib/schema/number.js)
- Off-boarding risk: anonymized user #1
- Repeated repair: lib/cursor/aggregationCursor.js (lib/cursor/aggregationCursor.js)
- Repeated repair: lib/schema/string.js (lib/schema/string.js)
- Repeated repair: lib/types/array/methods/index.js (lib/types/array/methods/index.js)
- doc comments repeat the names (lib/error/browserMissingSchema.js)
- init (cognitive 94) (lib/document.js)
- redundant comment (lib/helpers/populate/getModelsMapForPopulate.js)
- redundant comment (lib/helpers/populate/getModelsMapForPopulate.js)
- redundant comment (lib/helpers/populate/getModelsMapForPopulate.js)
- redundant comment (lib/helpers/query/castUpdate.js)
- redundant comment (lib/helpers/setDefaultsOnInsert.js)
- redundant comment (lib/model.js)
- redundant comment (lib/query.js)
- redundant comment (test/connection_server.js)
- redundant comment (test/docs/date.test.js)
- …and 25 more

## Changes since last survey

- 113 commits — 82 feature/other, 31 fixes

## By area

- (repo) — 51 commits
- (root) — 19 commits
- lib/helpers — 10 commits
- docs/production — 4 commits
- lib/connection.js — 3 commits
- lib/model.js — 3 commits
- lib/query.js — 3 commits
- lib/types — 3 commits
- .github/workflows — 2 commits
- lib/cursor — 2 commits
- lib/schema — 2 commits
- benchmarks/createSimpleMap.js — 1 commit
- benchmarks/findOneAndUpdateSimple.js — 1 commit
- docs/js — 1 commit
- lib/document.js — 1 commit
- lib/schema.js — 1 commit
- scripts/loadSponsorData.js — 1 commit
- test/cursor.destroy.initialization.test.js — 1 commit
- test/docs — 1 commit
- test/schema.validation.test.js — 1 commit

## Notable commits

- fix: Fix WriteError index assignment in error handling
- fix: Merge branch 'master' into fix/gh-6960-pull-in-array-validator
- fix: Merge pull request #16608 from Majny/fix/insertmany-preserve-writeerror
- fix: Merge pull request #16615 from vaidehi-snk/fix/gh-8809-deep-subdoc-push-timestamps
- fix: Merge pull request #16619 from maxymlyskov/fix/keep-earlier-pushed-values-on-push-each
- fix: Merge pull request #16629 from OmBhandwaldar/fix/replaceone-cast-errors
- fix: Merge pull request #16631 from Enesuygurs/fix/enum-false-clear-enum-values
- fix: Merge pull request #16634 from NgoQuocViet2001/fix-map-has-objectid-key
- fix: Merge pull request #16640 from IbrahimHafez1/fix/transaction-retry-reset-documents
- fix: Merge pull request #16642 from ItsM0rty/code-fix/pipeline-timestamp-option
- fix: Merge pull request #16651 from Oleksii-Pavliuk/fix/clone-keeps-timestamps
- fix: Merge pull request #16653 from NotAFlightRisk/fix/model-validate-nested-paths-list
- fix: Merge pull request #16666 from AnkitKumar61/fix/gh-6960-pull-in-array-validator
- fix: Merge pull request #16693 from luantaraschi/fix/addtoset-bigint
- fix: fix(array): avoid converting BigInts to numbers in addToSet()
- fix: fix(connection): don't disable autoIndex/autoCreate for a primary ReadPreference instance
- fix: fix(connection): reset document state before retrying after a transient commit error
- fix: fix(cursor): avoid emitting error if no error listeners when calling destroy() for backwards compatibility
- fix: fix(cursor): propagate error passed to destroy() without re-emitting if error already emitted
- fix: fix(document): allow setting dotted paths 3+ levels deep underneath single nested subdocuments (#16691)
- …and 93 more
