AI Slop Code Risk Monitor

katspaugh/wavesurfer.js

SlopCodeMonitor badge for katspaugh/wavesurfer.js Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

Audio waveform player

1.8 Low pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for katspaugh/wavesurfer.js, a TypeScript project with 10,460 GitHub stars. SynthScan examined 39,060 lines of code across 168 source files, recording 67 pattern matches distributed across 4 syntactic categories. The legacy adjusted pattern signal is 1.8 (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.8
Adjusted Signal
1.8
Raw Pattern Score
100%
Time Factor
2026-10-30
Last Push
10.5K
Stars
TypeScript
Language
39.1K
Lines of Code
168
Files
67
Pattern Hits
2026-10-31
Scan Date
0.00
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 8.5/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 0.0/100 · LOW

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

Agent Over-Engineering Ratio 2.3/100 · LOW

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

PR Review Velocity Impact 8.4/100 · LOW

Which changes need focused human review? 67 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 0HIGH 0MEDIUM 1LOW 66

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 67 distinct pattern matches across 4 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.

Over-Commented Block47 hits · 47 pts
SeverityFileLineSnippetContext
LOWjest.config.js1import { createDefaultEsmPreset } from 'ts-jest'COMMENT
LOWjest.config.js21// belt-and-suspenders with the in-test `beforeAll` guard in gc-leaks.test.ts: that guard is whatCOMMENT
LOWeslint.config.js81 {COMMENT
LOWeslint.config.js121 // Primitive files: raw acquisition here IS the primitive thatCOMMENT
LOWeslint.config.js141 // callers (renderer.ts, envelope.ts) register that cleanup on theirCOMMENT
LOWcypress/support/commands.ts1/// <reference types="cypress" />COMMENT
LOWcypress/support/commands.ts21// -- This is a dual command --COMMENT
LOWcypress/support/e2e.ts1// ***********************************************************COMMENT
LOWexamples/spectrogram.js41COMMENT
LOWexamples/spectrogram.js61 //COMMENT
LOWsrc/wavesurfer.ts661 // Re-entrancy guard: a fresh child scope for this load call.COMMENT
LOWsrc/wavesurfer.ts681 // The pipeline below -- starting with the 'load' emit -- can throw orCOMMENT
LOWsrc/wavesurfer.ts761 // destroyed before 'loadedmetadata' ever fires (e.g. never emittedCOMMENT
LOWsrc/wavesurfer.ts821 }COMMENT
LOWsrc/wavesurfer.ts1121 // this.scope.dispose() cascades to loadScope (a child), which aborts anyCOMMENT
LOWsrc/define-plugin.ts21 ctx: PluginContext<Events>,COMMENT
LOWsrc/define-plugin.ts41 create(...args: PluginCtorArgs<Options>): BasePlugin<Events, Options> & ApiCOMMENT
LOWsrc/define-plugin.ts121 public static create(...args: PluginCtorArgs<Options>) {COMMENT
LOWsrc/define-plugin.ts161 // `subscriptions`, then unAll()s listeners registered on this plugin.COMMENT
LOWsrc/spectrogram-frequencies.ts181COMMENT
LOWsrc/spectrogram-setup.ts661COMMENT
LOWsrc/spectrogram-setup.ts941 // The worker still re-subarrays internally using options.startTime/endTime (same protocolCOMMENT
LOWsrc/spectrogram-setup.ts1201 // is not cached so the next render retries. Guard immediately post-await (mirroringCOMMENT
LOWsrc/spectrogram-setup.ts1461 // A redraw arriving mid-render (e.g. a new file decoded while theCOMMENT
LOWsrc/renderer.ts41 private lastContainerWidth = 0COMMENT
LOWsrc/plugins/record.ts81 // Early-removal handles for the per-track 'ended' listeners registered inCOMMENT
LOWsrc/plugins/record.ts261 if (err instanceof DOMException && err.name === 'AbortError') returnCOMMENT
LOWsrc/plugins/record.ts581 }COMMENT
LOWsrc/plugins/regions.ts21// does not fit definePlugin's PluginCtorArgs contract on its ownCOMMENT
LOWsrc/state/wavesurfer-state.ts181COMMENT
LOWsrc/__tests__/memory-leaks.test.ts381 // destroyed the instance -- see issue #3637 -- so this must be a rejection,COMMENT
LOWsrc/__tests__/spectrogram-worker-errors.test.ts161 // The worker still re-subarrays internally using options.startTime/endTime (same protocolCOMMENT
LOWsrc/__tests__/spectrogram-worker-errors.test.ts581 // so exercising it directly here covers both instead of fighting jsdom's lack of a real 2DCOMMENT
LOWsrc/__tests__/spectrogram-windowed-destroy.test.ts1import WindowedSpectrogramPlugin from '../plugins/spectrogram-windowed.js'COMMENT
LOWsrc/__tests__/gc-leaks.test.ts61import { definePlugin } from '../define-plugin.js'COMMENT
LOWsrc/__tests__/gc-leaks.test.ts281 expectCollected(COMMENT
LOWsrc/__tests__/gc-leaks.test.ts341 // become unreachable once `plugin` itself is collected regardless of whether destroy()'sCOMMENT
LOWsrc/__tests__/gc-leaks.test.ts361 await plugin.getFrequenciesData()COMMENT
LOWsrc/__tests__/gc-leaks.test.ts421 // A synthetic plugin, local to this test: its setup() closes over a sizable typed arrayCOMMENT
LOWsrc/__tests__/gc-leaks.test.ts461 'the GcPayloadTestPlugin instance / its closure-only payload (check definePlugin teardown and ' +COMMENT
LOWsrc/__tests__/envelope-leaks.test.ts141 // MERGED + ADAPTED (was two tests: "nulls the polyline on destroy..." andCOMMENT
LOWsrc/__tests__/envelope-leaks.test.ts161 // destroyed-but-not-nulled `polyline` reference is already functionallyCOMMENT
LOWsrc/__tests__/spectrogram-destroy.test.ts81COMMENT
LOWsrc/__tests__/timeline.test.ts101COMMENT
LOWsrc/__tests__/timeline.test.ts121 // `updateVisibleNotches` and asserted its exact call args, including aCOMMENT
LOWsrc/__tests__/timeline.test.ts161 wavesurfer.getRenderer().getVisibleRange().set({ startTime: 0.1, endTime: 0.9 })COMMENT
LOWsrc/__tests__/wavesurfer.test.ts681 await expect(loadPromise).rejects.toMatchObject({ name: 'AbortError' })COMMENT
Hyper-Verbose Identifiers18 hits · 18 pts
SeverityFileLineSnippetContext
LOWsrc/renderer-utils.ts203export function getRelativePointerPosition(rect: DOMRect, clientX: number, clientY: number): [number, number] {CODE
LOWsrc/renderer-utils.ts311export function calculateSingleCanvasWidth({CODE
LOWsrc/spectrogram-windowing.ts587export function computeWindowedPixelsPerSecond(CODE
LOWsrc/spectrogram-render-utils.ts166export function createSparseFilterBankForScale(CODE
LOWsrc/spectrogram-render-utils.ts326export function dbToCompressedColorIndices(CODE
LOWsrc/spectrogram-render-utils.ts755export function createWrapperClickHandler(wrapper: HTMLElement, emit: (event: string, ...args: any[]) => void) {CODE
LOWsrc/spectrogram-frequencies.ts75function getOrCreateFFT(CODE
LOWsrc/spectrogram-setup.ts807 async function calculateFrequenciesWithWorker(audioBuffer: AudioBuffer): Promise<Uint8Array[][]> {CODE
LOWsrc/spectrogram-setup.ts914 function getWindowedPixelsPerSecond(): number {CODE
LOWsrc/spectrogram-setup.ts918 async function calculateFrequenciesWithWorkerRange(startTime: number, endTime: number): Promise<Uint8Array[][]> {CODE
LOWsrc/spectrogram-setup.ts979 async function calculateFrequenciesMainThreadRange(startTime: number, endTime: number): Promise<Uint8Array[][]> {CODE
LOWsrc/spectrogram-setup.ts1015 async function calculateFrequenciesForRange(startTime: number, endTime: number): Promise<Uint8Array[][]> {CODE
LOWsrc/webaudio.ts19function setWebAudioSessionPlayback() {CODE
LOWsrc/plugins/timeline.ts172 function defaultPrimaryLabelInterval(pxPerSec: number): number {CODE
LOWsrc/plugins/timeline.ts184 function defaultSecondaryLabelInterval(pxPerSec: number): number {CODE
LOWsrc/reactive/scroll-stream.ts37export function calculateScrollPercentages(scrollData: ScrollData): ScrollPercentages {CODE
LOWsrc/__tests__/spectrogram-frequencies.test.ts44function oracleCalculateFrequencies(audioChannels: Float32Array[], options: OracleOptions): Uint8Array[][] {CODE
LOWsrc/__tests__/helpers/audio-buffer.ts26export function ensureGlobalAudioBufferStub(): void {CODE
AI Slop Vocabulary1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUM.github/workflows/unit-tests.yml12 # The GC-leak harness (gc-leaks.test.ts) asserts real garbage collectionCOMMENT
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOW.github/workflows/release.yml26 # Check if this exact version (stable or prerelease) is already on npm,COMMENT