AI Slop Code Risk Monitor

vitest-dev/vitest

SlopCodeMonitor badge for vitest-dev/vitest Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

Next generation testing framework powered by Vite.

1.0 Low pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for vitest-dev/vitest, a TypeScript project with 17,313 GitHub stars. SynthScan examined 281,284 lines of code across 1942 source files, recording 178 pattern matches distributed across 10 syntactic categories. The legacy adjusted pattern signal is 1.0 (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.0
Adjusted Signal
1.0
Raw Pattern Score
100%
Time Factor
2026-10-30
Last Push
17.3K
Stars
TypeScript
Language
281.3K
Lines of Code
1.9K
Files
178
Pattern Hits
2026-10-31
Scan Date
0.01
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 3.1/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 1.7/100 · LOW

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

Agent Over-Engineering Ratio 2.1/100 · LOW

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

PR Review Velocity Impact 4.8/100 · LOW

Which changes need focused human review? 178 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 8HIGH 4MEDIUM 3LOW 163

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 178 distinct pattern matches across 10 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.

Hyper-Verbose Identifiers117 hits · 117 pts
SeverityFileLineSnippetContext
LOWtest/ui/test/trace.spec.ts424async function testMultipleMatchHighlight(page: Page) {CODE
LOWtest/ui/test/trace.spec.ts579async function testPersistsSelectionInURL(page: Page) {CODE
LOWtest/ui/test/trace.spec.ts757async function testPersistsResizedTracePanes(page: Page) {CODE
LOWtest/ui/test/ui.spec.ts802async function testFilterInitiallyInvisibleItem(page: Page) {CODE
LOW…t/test/uncovered-concurrent-transform.istanbul.test.ts50function transformAnotherFileDuringUncoveredTransform(): Plugin {CODE
LOWtest/coverage-test/test/clean-on-rerun.test.ts139async function getFunctionCoverageCounts(file: 'math.ts' | 'even.ts') {CODE
LOWtest/unit/test/snapshots-outside.ts3export function testOutsideInlineSnapshot() {CODE
LOWtest/browser/specs/optimized-chunks-cache.test.ts8function recordDependencyResponses() {CODE
LOWtest/browser/specs/heartbeat.test.ts6function findDescendantBrowserProcesses(): number[] {CODE
LOWtest/e2e/test/module-diagnostic.test.ts14async function getSourceModuleDiagnostic(CODE
LOWtest/e2e/test/module-diagnostic.test.ts65function normalizeUntrackedModules(CODE
LOWtest/e2e/test/no-module-runner.test.ts957function runNoViteModuleRunnerTests(CODE
LOWtest/e2e/test/config/browser-configs.test.ts76async function observePreTransformRequests(options: TestUserConfig = {}) {CODE
LOWtest/e2e/test/reporters/import-durations.test.ts10function normalizeImportDurationsOutput(stdout: string): string {CODE
LOWdocs/api/vi.md1022function advanceTimersToNextTimerAsync(): Promise<Vitest>CODE
LOWdocs/api/vi.md1162function runOnlyPendingTimersAsync(): Promise<Vitest>CODE
LOWdocs/api/advanced/vitest.md54function getTestSpecificationResult(CODE
LOWdocs/api/advanced/vitest.md198function getRelevantTestSpecifications(CODE
LOWdocs/api/advanced/vitest.md397function resetGlobalTestNamePattern(): voidCODE
LOWdocs/api/advanced/vitest.md523function onFilterWatchedSpecification(CODE
LOWdocs/api/browser/assertions.md383function toHaveAccessibleDescription(description?: string | RegExp): Promise<void>CODE
LOWdocs/api/browser/assertions.md436function toHaveAccessibleErrorMessage(message?: string | RegExp): Promise<void>CODE
LOWpackages/spy/src/index.ts737function copyOriginalStaticProperties(CODE
LOWpackages/ui/client/composables/module-graph.ts15function defineExternalModuleNodes(modules: string[]): ModuleNode[] {CODE
LOWpackages/ui/client/composables/trace-view.ts124export function getTraceEditorMarkersForFile(CODE
LOWpackages/ui/client/composables/client/static.ts25function deserializeReportMetadata(metadata: HTMLReportMetadata) {CODE
LOWpackages/ui/client/components/DetailsHeaderButtons.vue11function getDetailsPanelToggleRotation(action: 'show' | 'hide') {CODE
LOWpackages/coverage-v8/src/provider.ts532function findLongestFunctionLength(functions: Profiler.FunctionCoverage[]) {CODE
LOW…kages/vitest/src/runtime/benchmark/default-provider.ts14export function createDefaultBenchmarkProvider(config: SerializedConfig): BenchmarkProvider {CODE
LOWpackages/vitest/src/runtime/runner/hooks.ts35export function getBeforeHookCleanupCallback(CODE
LOWpackages/vitest/src/runtime/runner/run.ts263function makeAroundHookTimeoutError(CODE
LOWpackages/vitest/src/runtime/runner/run.ts848function markPendingTasksAsSkipped(suite: Suite, runner: VitestRunner, note?: string) {CODE
LOWpackages/vitest/src/runtime/vm/esm-executor.ts75async function staticImportModuleDynamically(CODE
LOWpackages/vitest/src/runtime/vm/esm-executor.ts82function staticInitializeImportMeta(meta: ImportMeta, mod: VMModule): void {CODE
LOWpackages/vitest/src/runtime/vm/utils.ts82export function createRequireAsyncModuleError(identifier: string, detail: string): Error {CODE
LOWpackages/vitest/src/runtime/vm/utils.ts90export function createConcurrentRequireError(identifier: string): Error {CODE
LOWpackages/vitest/src/runtime/vm/utils.ts114export async function activeImportModuleDynamically(CODE
LOW…ges/vitest/src/runtime/moduleRunner/moduleEvaluator.ts632function enhanceMissingCjsGlobalsError(error: unknown): unknown {CODE
LOWpackages/vitest/src/utils/coverage.ts4export function getCoverageFilesDirectory(CODE
LOWpackages/vitest/src/utils/coverage.ts53export async function resolveCoverageProviderModule(CODE
LOWpackages/vitest/src/utils/graph.ts29export function getSharedModuleGraphByProject(CODE
LOWpackages/vitest/src/utils/graph.ts46function getSharedModuleGraphByEnvironment(CODE
LOWpackages/vitest/src/utils/graph.ts72function findModuleGraphEnvironment(CODE
LOWpackages/vitest/src/utils/graph.ts90function createModuleGraphCollector(CODE
LOWpackages/vitest/src/integrations/coverage.ts5export async function startCoverageInsideWorker(CODE
LOWpackages/vitest/src/integrations/snapshot/chai.ts200function toMatchDomainSnapshotImpl(opts: {CODE
LOW…ns/snapshot/environments/resolveSnapshotEnvironment.ts5export async function resolveSnapshotEnvironment(CODE
LOWpackages/vitest/src/integrations/mock/when.ts389 function getOrCreateBehavior(args: ScopedParameters) {CODE
LOWpackages/vitest/src/typecheck/parse.ts53export async function getRawErrsMapFromTsCompile(tscErrorStdout: string): Promise<RawErrsMap> {CODE
LOWpackages/vitest/src/node/module-diagnostic.ts20export function collectModuleDurationsDiagnostic(CODE
LOWpackages/vitest/src/node/module-diagnostic.ts182export async function collectSourceModulesLocations(CODE
LOWpackages/vitest/src/node/module-diagnostic.ts310function parseSourceImportsAndExports(source: string): Map<string, SourceStaticImport> {CODE
LOWpackages/vitest/src/node/ast-collect.ts512export async function astCollectFileInformation(CODE
LOWpackages/vitest/src/node/coverage.ts888function assertConfigurationModule(config: unknown): asserts config is {CODE
LOWpackages/vitest/src/node/printError.ts323function handleImportOutsideModuleError(stack: string, logger: ErrorLogger) {CODE
LOWpackages/vitest/src/node/printError.ts343function printModuleWarningForPackage(logger: ErrorLogger, path: string, name: string) {CODE
LOWpackages/vitest/src/node/printError.ts369function printModuleWarningForSourceCode(logger: ErrorLogger, path: string) {CODE
LOWpackages/vitest/src/node/pools/browser.ts785async function maybeCollectChromiumGarbage(project: TestProject, sessionId: string): Promise<void> {CODE
LOW…kages/vitest/src/node/pools/workers/typecheckWorker.ts181 async function createWorkspaceTypechecker(project: TestProject, files: string[]) {CODE
LOWpackages/vitest/src/node/config/resolveConfig.ts1299export function isExcludedByProjectFilter(projects: string[], name: string): boolean {CODE
57 more matches not shown…
Hallucination Indicators8 hits · 80 pts
SeverityFileLineSnippetContext
CRITICALtest/unit/test/chainable.test.ts19 expect(chain.b.a.b.a.b()).toEqual({ a: true, b: true })CODE
CRITICALtest/unit/test/chainable.test.ts20 expect(chain.a.a.a.a.a.a()).toEqual({ a: true })CODE
CRITICALtest/e2e/test/vm-threads.test.ts894 return [...project.vite.environments.ssr.moduleGraph.idToModuleMap.values()]CODE
CRITICALtest/e2e/test/vm-threads.test.ts957 const prewarmed = [...project.vite.environments.ssr.moduleGraph.idToModuleMap.values()]CODE
CRITICALpackages/coverage-v8/src/provider.ts271 node.init.object.object.name.startsWith('__vite_ssr_import_')CODE
CRITICALpackages/vitest/src/node/test-specification.ts101 const task = this.project.vitest.state.idMap.get(this.taskId)CODE
CRITICALpackages/vitest/src/node/cache/fsModuleCache.ts430 this.vitest.vite.config.logger.info(`fs cache was cleared because lockfile has changed`, {CODE
CRITICALpackages/mocker/src/node/resolver.ts62 const resolved = await this.server.environments.client.pluginContainer.resolveId(id, importer)CODE
Over-Commented Block28 hits · 28 pts
SeverityFileLineSnippetContext
LOWtest/unit/test/pretty-format.test.ts1import { inspect as nodeInspect } from 'node:util'COMMENT
LOWtest/unit/test/task-names.test.ts21 // │ ├─ [0] saves recipeCOMMENT
LOWtest/unit/test/chai-style-assertions-sinon.test.ts161COMMENT
LOWtest/unit/deps/dep1/esm/index.js1// esm/index.js was detected as isValidNodeImport(id) = falseCOMMENT
LOWtest/test-utils/index.ts361// whichever state the poller's baseline captured, and any probe event (`add`,COMMENT
LOWtest/browser/test/userEvent.test.ts801 // TODO: support listboxCOMMENT
LOWtest/e2e/test/vm-threads.test.ts741COMMENT
LOWtest/e2e/test/annotations.test.ts361 1..2COMMENT
LOWtest/e2e/test/concurrent.test.ts1import { expect, test } from 'vitest'COMMENT
LOWdocs/guide/lifecycle.md221// aroundAll beforeCOMMENT
LOWdocs/guide/lifecycle.md301// outer aroundEach beforeCOMMENT
LOWdocs/.vitepress/config.ts721 // text: '@vitest/plugin-eslint',COMMENT
LOWdocs/.vitepress/config.ts1301 // // TODO: generateCOMMENT
LOWdocs/.vitepress/config.ts1321 // text: 'Assertion API',COMMENT
LOWdocs/.vitepress/config.ts1341 // },COMMENT
LOWdocs/.vitepress/config.ts1361 // },COMMENT
LOWexamples/opentelemetry/docker-compose.yaml1services:COMMENT
LOWpackages/ui/client/composables/client/index.ts221 }, 1000)COMMENT
LOWpackages/ui/client/composables/client/index.ts241// },COMMENT
LOWpackages/vitest/import-meta.d.ts1/// <reference path="./importMeta.d.ts" />COMMENT
LOWpackages/vitest/src/runtime/runner/suite.ts341 const testOwnMeta = options.metaCOMMENT
LOWpackages/vitest/src/runtime/vm/commonjs-executor.ts441 return moduleCOMMENT
LOWpackages/vitest/src/runtime/vm/commonjs-executor.ts461 // const namedExports = new Set(exports)COMMENT
LOWpackages/vitest/src/runtime/workers/vm.ts201 )COMMENT
LOWpackages/vitest/src/node/pools/rpc.ts21}COMMENT
LOWpackages/vitest/src/node/config/resolveConfig.ts1201 if (rootConfig.ui && rootConfig.open) {COMMENT
LOWpackages/vitest/src/node/reporters/base.ts1201 // Module Self TotalCOMMENT
LOWpackages/mocker/src/node/hoistMocks.ts321 // returnCOMMENT
Fake / Example Data14 hits · 15 pts
SeverityFileLineSnippetContext
LOW_typos.toml23# Latin lorem ipsumCOMMENT
LOW.claude/skills/typo-checker/SKILL.md62- Lorem ipsum textCODE
LOWdocs/guide/browser/component-testing.md192await page.getByLabelText(/email/i).fill('user@example.com')CODE
LOWdocs/guide/browser/component-testing.md195// component.setState({ email: 'user@example.com' })COMMENT
LOWdocs/guide/browser/component-testing.md276 return HttpResponse.json({ id: params.id, name: 'John Doe', email: 'john@example.com' })CODE
LOWdocs/guide/browser/component-testing.md289 await expect.element(getByText('John Doe')).toBeInTheDocument()CODE
LOWdocs/guide/browser/component-testing.md358 await nameInput.fill('John Doe')CODE
LOWdocs/guide/browser/component-testing.md376 name: 'John Doe',CODE
LOWdocs/guide/browser/component-testing.md558 await expect.element(page.getByText('John Doe')).toBeInTheDocument()CODE
LOWdocs/guide/browser/aria-snapshots.md310<input aria-label="Email" placeholder="user@example.com" />CODE
LOWdocs/guide/recipes/conditional-mocking.md127 .calledWith('admin@example.com')CODE
LOWdocs/guide/recipes/conditional-mocking.md131Because the second registration is merged into the existing behavior, the `'admin'` action is not scoped to `'admin@examCODE
LOWdocs/guide/recipes/conditional-mocking.md143expect(getRole('user@example.com')).toBe('admin')CODE
LOWdocs/guide/recipes/conditional-mocking.md144expect(getRole('user@example.com')).toBe('user')CODE
Synthetic Comment Markers3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHCONTRIBUTING.md122Issues and pull requests entirely generated by AI with no human involvement (e.g. by an automated agent) will be labeledCODE
HIGH.github/workflows/issue-labeled.yml68 Hello @${{ github.event.issue.user.login }}. Your issue has been labeled `maybe automated` because it appearCODE
HIGH.github/actions/send-ai-bot-comment/action.yml24 Hello @${{ inputs.login }}. Your PR has been labeled `maybe automated` because it appears to have been fully gCODE
Self-Referential Comments2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMtest/e2e/test/cachedir-tag.test.ts49 # This file is a cache directory tag created by Vitest.COMMENT
MEDIUMpackages/vitest/src/node/cache/cachedirTag.ts9# This file is a cache directory tag created by Vitest.COMMENT
AI Response Leakage1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHdocs/guide/mocking.md175Don't forget that this only [mocks _external_ access](/guide/mocking/modules#mocking-modules-pitfalls). In this example,CODE
TODO Padding2 hits · 3 pts
SeverityFileLineSnippetContext
LOWtest/unit/test/chai-style-assertions-sinon.test.ts162 // TODO: implement `thrown`COMMENT
LOWpackages/expect/src/chai-style-assertions.ts72 // TODO: implementCOMMENT
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMtest/browser/docker-compose.yaml11 # This setup employs simpler and robust `network_mode: host` instead of port mapping.COMMENT
Slop Phrases2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtest/browser/specs/bail-out.test.ts64 "Cannot connect to the iframe. Did you change the location or submitted a form? If so, don't forget to call `event.pCODE
LOWpackages/browser/src/client/orchestrator.ts362 "If so, don't forget to call `event.preventDefault()` to avoid reloading the page.\n\n" +CODE