AI Slop Code Risk Monitor

Automattic/mongoose

SlopCodeMonitor badge for Automattic/mongoose Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

MongoDB object modeling designed to work in an asynchronous environment.

1.4 Low pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for Automattic/mongoose, a JavaScript project with 27,461 GitHub stars. SynthScan examined 227,132 lines of code across 654 source files, recording 150 pattern matches distributed across 7 syntactic categories. The legacy adjusted pattern signal is 1.4 (Low pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

1.4
Adjusted Signal
1.4
Raw Pattern Score
100%
Time Factor
2026-10-30
Last Push
27.5K
Stars
JavaScript
Language
227.1K
Lines of Code
654
Files
150
Pattern Hits
2026-10-31
Scan Date
0.02
HC Hit Rate

Risk Review · Payload v1

Use each vector to guide manual verification of the underlying findings.

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.

Cognitive Ownership Risk 2.3/100 · LOW

Can maintainers explain intent, assumptions, and trade-offs? 98 finding(s).

Hallucinated Dependency & Supply Chain Risk 4.6/100 · LOW

Are imports declared and package/API names verified? 52 finding(s).

Agent Over-Engineering Ratio 1.9/100 · LOW

Are wrappers, guards, and repeated structures necessary? 85 finding(s).

PR Review Velocity Impact 6.1/100 · LOW

Which changes need focused human review? 150 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 15HIGH 0MEDIUM 1LOW 134

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 150 distinct pattern matches across 7 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hallucination Indicators15 hits · 175 pts
SeverityFileLineSnippetContext
CRITICALtest/model.discriminator.test.js2120 assert.equal(Triangle.schema.s.hooks._pres.get('save').filter(hook => hook.fn.name === 'testHook12472').length, 2);CODE
CRITICALtest/model.discriminator.test.js2121 assert.equal(Square.schema.s.hooks._pres.get('save').filter(hook => hook.fn.name === 'testHook12472').length, 1);CODE
CRITICALtest/model.discriminator.test.js2151 assert.equal(Triangle.schema.s.hooks._pres.get('save').filter(hook => hook.fn.name === 'testHook12604').length, 2);CODE
CRITICALtest/model.discriminator.test.js2152 assert.equal(Square.schema.s.hooks._pres.get('save').filter(hook => hook.fn.name === 'testHook12604').length, 1);CODE
CRITICALtest/model.populate.test.js11965 assert.deepStrictEqual(obj.rubric.parameters.param1.evaluationPrompts.map(prompt => prompt.name), ['Test Prompt', 'TCODE
CRITICALtest/model.populate.test.js11966 assert.deepStrictEqual(obj.rubric.parameters.param2.evaluationPrompts.map(prompt => prompt.name), ['Test Prompt 3'])CODE
CRITICALtest/document.test.js6260 mongoose.Schema.Types.Boolean.convertToTrue.add('aye');CODE
CRITICALtest/document.test.js6261 mongoose.Schema.Types.Boolean.convertToFalse.add('nay');CODE
CRITICAL⚡test/document.test.js6273 mongoose.Schema.Types.Boolean.convertToTrue.delete('aye');CODE
CRITICAL⚡test/document.test.js6274 mongoose.Schema.Types.Boolean.convertToFalse.delete('nay');CODE
CRITICAL⚡test/document.test.js6282 mongoose.Schema.Types.Boolean.convertToFalse.add(null);CODE
CRITICALtest/docs/transactions.test.js25 !db.client.topology.s.description.type.includes('ReplicaSet')) {CODE
CRITICALdocs/schematypes.md464mongoose.Schema.Types.Boolean.convertToFalse.add('nay');CODE
CRITICALlib/schema/boolean.js177 * mongoose.Schema.Types.Boolean.convertToTrue.add('affirmative');COMMENT
CRITICALlib/schema/boolean.js199 * mongoose.Schema.Types.Boolean.convertToFalse.add('nay');COMMENT
Hyper-Verbose Identifiers85 hits · 86 pts
SeverityFileLineSnippetContext
LOWtypes/index.d.ts1232 export function overwriteMiddlewareResult(val: any): Kareem.OverwriteResult;CODE
LOWtypes/index.d.ts1236 export function overwriteMiddlewareArguments(val: any): Kareem.OverwriteArguments;CODE
LOWtest/document.populate.test.js846 beforeEach(function setupVirtualPopulateModels() {CODE
LOWtest/document.populate.test.js900 beforeEach(function setupEmbeddedGetterPopulateModels() {CODE
LOWtest/model.middleware.test.js388 it('static hooks async stack traces (gh-15317) (gh-5982)', async function staticHookAsyncStackTrace() {CODE
LOWtest/model.discriminator.querying.test.js155 async function checkHydratesCorrectModels(fields) {CODE
LOWtest/model.discriminator.querying.test.js399 async function checkHydratesCorrectModels(fields, checkUndefinedRevenue) {CODE
LOWtest/model.test.js10298function generateRandomCollectionName() {CODE
LOWtest/model.updateOne.test.js3381 function getPaymentWithDotSeparatedPaths() {CODE
LOWtest/model.updateOne.test.js3755 function createDollarPathTestContext() {CODE
LOWtest/document.test.js14954 it('works with save() validation errors', async function asyncSaveValidationErrors() {CODE
LOWtest/document.test.js15122 it('works with async pre deleteOne errors on subdocuments', async function asyncSubdocPreDeleteOneErrors() {CODE
LOWtest/document.test.js15220 it('works with aggregate server errors', async function asyncAggregateServerErrors() {CODE
LOWtest/encryptedSchema.test.js17function schemaHasEncryptedProperty(schema, path) {CODE
LOWtest/model.insertMany.test.js834 it('async stack traces with server error (gh-15317)', async function insertManyWithServerError() {CODE
LOWtest/types/schema.test.ts1997function testInferRawDocTypeFromSchema() {CODE
LOWtest/types/schema.test.ts2019function testInferHydratedDocTypeFromSchema() {CODE
LOWtest/types/schema.test.ts2110function testNewSchemaWithMethodsAndVirtuals() {CODE
LOWtest/types/schema.test.ts2370function allowNullFalseInferredTypes() {CODE
LOWtest/types/schema.test.ts2409function staticReturnsSchemaWithStaticAdded() {CODE
LOWtest/types/document.test.ts201function autoTypedDocumentConnection() {CODE
LOWtest/types/document.test.ts710 function autoInferredWithCustomVersionKey() {CODE
LOWtest/types/document.test.ts775 function withoutSchemaLevelOptions() {CODE
LOWtest/types/document.test.ts807 function withCustomVersionKeyAndSchemaToObject() {CODE
LOWtest/types/document.test.ts876function testCombinedFlattenOptions() {CODE
LOWtest/types/models.test.ts56async function standardSchemaModelValidate(): Promise<void> {CODE
LOWtest/types/models.test.ts100async function modelValidateReturnsCastedObject(): Promise<void> {CODE
LOWtest/types/models.test.ts436async function overwriteBulkWriteContents() {CODE
LOWtest/types/models.test.ts543function schemaInstanceMethodsAndQueryHelpers() {CODE
LOW⚡test/types/models.test.ts1258async function customModelInstanceWithStatics() {CODE
LOWtest/types/base.test.ts113function baseConnectionAndCollection() {CODE
LOWtest/types/schemaTypeOptions.test.ts37function validatorMessageFunctions() {CODE
LOWtest/types/create.test.ts133async function createWithAggregateErrors() {CODE
LOWtest/types/connection.test.ts115function schemaInstanceMethodsAndQueryHelpersOnConnection() {CODE
LOWtest/types/schema.create.test.ts1890function testInferRawDocTypeFromSchema() {CODE
LOWtest/types/schema.create.test.ts1914async function testInferHydratedDocTypeFromSchema() {CODE
LOWtest/types/schema.create.test.ts2039function allowNullFalseInferredTypes() {CODE
LOWdocs/js/sidebar-collapse.js4 function scrollActiveSidebarLinkIntoView() {CODE
LOWdocs/source/api.js248function normalizeMarkdownDescription(description) {CODE
LOWlib/aggregate.js1087 return traceAggregate(async function maybeTracedConnectionAggregate() {CODE
LOWlib/query.js3449function prepareDiscriminatorCriteria(query) {CODE
LOWlib/query.js4026function convertNewToReturnDocument(options) {CODE
LOWlib/queryHelpers.js27exports.preparePopulationOptionsMQ = function preparePopulationOptionsMQ(query, options) {CODE
LOWlib/connection.js1678Connection.prototype.authMechanismDoesNotRequirePassword = function authMechanismDoesNotRequirePassword() {CODE
LOWlib/connection.js1696Connection.prototype.optionsProvideAuthenticationData = function optionsProvideAuthenticationData(options) {CODE
LOWlib/document.js4731function applySchemaTypeTransforms(self, json) {CODE
LOWlib/cursor/queryCursor.js330 return cursorNextChannel.trace(function maybeTracedQueryCursorNext() {CODE
LOWlib/plugins/trackTransaction.js17function trackTransactionPreDeleteOne() {CODE
LOWlib/plugins/sharding.js32function shardingPluginPreDeleteOne() {CODE
LOWlib/plugins/sharding.js36function shardingPluginPreUpdateOne() {CODE
LOWlib/schema/array.js657function createLogicalQueryOperatorHandler(op) {CODE
LOWlib/schema/array.js658 return function logicalQueryOperatorHandler(val, context) {CODE
LOWlib/schema/string.js737function formatMaxLengthValidatorMessage(msg) {CODE
LOWlib/schema/documentArrayElement.js27function SchemaDocumentArrayElement(path, schema, options, parentSchema) {CODE
LOWlib/helpers/buildMiddlewareFilter.js30function middlewareFiltersFromLastArg(args) {CODE
LOWlib/helpers/getDefaultBulkwriteResult.js3function getDefaultBulkwriteResult() {CODE
LOWlib/helpers/update/castArrayFilters.js34function castArrayFiltersForUpdate(arrayFilters, update, schema, model, options, context) {CODE
LOWlib/helpers/update/applyTimestampsToChildren.js12function applyTimestampsToChildren(now, update, schema) {CODE
LOWlib/helpers/update/applyTimestampsToChildren.js82function applyTimestampsToDocumentArray(arr, schematype, now) {CODE
LOWlib/helpers/update/applyTimestampsToChildren.js108function applyTimestampsToSingleNested(subdoc, schematype, now) {CODE
25 more matches not shown…
Fake / Example Data37 hits · 38 pts
SeverityFileLineSnippetContext
LOWtest/document.populate.test.js939 const createdTeam = await Team.create({ captain: 'John Doe', players: [{ player: 'John Doe' }, { player: 'Foo Bar'CODE
LOWtest/model.discriminator.test.js396 employee.name.full = 'John Doe';CODE
LOWtest/model.discriminator.test.js397 assert.equal(employee.name.full, 'John Doe');CODE
LOWtest/model.test.js7661 userToUpdate.name = 'John Doe';CODE
LOWtest/model.test.js7683 userToUpdate.name = 'John Doe';CODE
LOWtest/model.test.js7705 userToUpdate.name = 'John Doe';CODE
LOWtest/model.test.js8581 userToUpdate.name = 'John Doe';CODE
LOWtest/model.test.js8608 userToUpdate.name = 'John Doe';CODE
LOWtest/model.test.js8630 userToUpdate.name = 'John Doe';CODE
LOWtest/model.populate.test.js6573 await User.create({ id: 111, name: 'John Doe' });CODE
LOWtest/model.populate.test.js6592 assert.equal(doc.outer.inner.flexible[0].users_$[0].name, 'John Doe');CODE
LOWtest/model.populate.test.js8445 const user = await User.create({ fullName: 'John Doe', companyId: company._id });CODE
LOWtest/model.populate.test.js8499 const user = await User.create({ fullName: 'John Doe', company: 'GitHub' });CODE
LOWtest/model.populate.test.js11346 email: 'admin@example.com',CODE
LOWtest/model.populate.test.js11574 await Author.create({ group: 'AUTH1', name: 'John Doe' });CODE
LOWtest/document.test.js814 const post = await Post.create({ owner: savedUser._id, content: 'lorem ipsum' });CODE
LOWtest/document.test.js1119 company: { companyName: 'Acme Inc' }CODE
LOWtest/document.test.js2836 username: 'John Doe',CODE
LOWtest/document.test.js2841 username: 'John Doe',CODE
LOWtest/document.test.js5301 title: 'Lorem Ipsum Dolor',CODE
LOWtest/document.test.js5409 title: 'Lorem Ipsum Dolor',CODE
LOWtest/document.test.js9777 email: 'foo@bar.com',CODE
LOWtest/document.test.js12486 addresses: [{ street: '123 Main St', city: 'Boston', image: { url: 'google.com' } }],CODE
LOWtest/document.test.js12693 phones: [{ number: '555-1234' }]CODE
LOWtest/document.test.js14269 email: 'test@test.com'CODE
LOWtest/types/queries.test.ts647 const update: UpdateQuery<IUser> = { $addToSet: { friendsNames: 'John Doe' } };CODE
LOWtest/types/queries.test.ts651 update.$addToSet.friendsNames = 'Jane Doe';CODE
LOWtest/types/schema.test.ts1361 const userIdTypeHint = 'placeholder' as UserId;CODE
LOWtest/types/schema.test.ts1487 schema.statics.createWithFullName('John Doe');CODE
LOWtest/types/schema.test.ts2227 console.log('placeholder', this.modelName);CODE
LOW⚡test/types/models.test.ts1249 const data = { name: 'John Doe', age: 30, address: '123 Main St' };CODE
LOW⚡test/types/models.test.ts1249 const data = { name: 'John Doe', age: 30, address: '123 Main St' };CODE
LOWtest/types/schema.create.test.ts1301 const userIdTypeHint = 'placeholder' as UserId;CODE
LOWtest/types/schema.create.test.ts1429 schema.statics.createWithFullName('John Doe');CODE
LOWdocs/documents.md350doc.name = 'Jane Doe';CODE
LOWdocs/documents.md355await doc.updateOne({ name: 'John Doe' });CODE
LOWlib/schema/string.js136 * new User({ name: ' John Doe ' }).name; // 'John Doe'COMMENT
Verbosity Indicators4 hits · 6 pts
SeverityFileLineSnippetContext
LOWlib/query.js127 // this is the case where we have a CustomQuery, we need to check if we gotCOMMENT
LOWlib/schema.js3062 // Now that we found the array, we need to check if thereCOMMENT
LOWlib/schema.js3164 // Now that we found the array, we need to check if thereCOMMENT
LOWlib/helpers/populate/getSchemaTypes.js83 // Now that we found the array, we need to check if thereCOMMENT
Over-Commented Block5 hits · 5 pts
SeverityFileLineSnippetContext
LOWindex.js61// The following properties are not exported using ESM because `setDriver()` can mutate theseCOMMENT
LOWtypes/index.d.ts1/// <reference path="./aggregate.d.ts" />COMMENT
LOWtest/docs/promises.test.js141 // acquit:ignore:endCOMMENT
LOWtest/docs/lean.test.js41 // To enable the `lean` option for a query, use the `lean()` function.COMMENT
LOWdocs/promises.md81 await Band.findOne({ _id: badId });COMMENT
Slop Phrases3 hits · 4 pts
SeverityFileLineSnippetContext
LOWtest/encryptedSchema.test.js250 // Don't forget to add `Int8` to the type registryCOMMENT
LOWtest/encryptedSchema.test.js280 // Don't forget to add `Int8` to the type registryCOMMENT
LOWtest/docs/schematypes.test.js54 // Don't forget to add `Int8` to the type registryCOMMENT
Modern AI Meta-Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMscripts/configure-cluster-with-encryption.sh19 # for configuration options for the exported variables, see here: https://github.com/mongodb-labs/drivers-evergreen-toCOMMENT