AI Slop Code Risk Monitor

mostlygeek/llama-swap

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

Reliable model swapping for any local OpenAI/Anthropic compatible server - llama.cpp, vllm, etc

2.3 Low pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for mostlygeek/llama-swap, a Go project with 6,146 GitHub stars. SynthScan examined 122,392 lines of code across 750 source files, recording 175 pattern matches distributed across 14 syntactic categories. The legacy adjusted pattern signal is 2.3 (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.

2.3
Adjusted Signal
2.3
Raw Pattern Score
100%
Time Factor
2026-10-31
Last Push
6.1K
Stars
Go
Language
122.4K
Lines of Code
750
Files
175
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 6.3/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 1.4/100 · LOW

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

Agent Over-Engineering Ratio 3.7/100 · LOW

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

PR Review Velocity Impact 10.9/100 · LOW

Which changes need focused human review? 175 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 3HIGH 2MEDIUM 35LOW 135

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 175 distinct pattern matches across 14 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 Block111 hits · 100 pts
SeverityFileLineSnippetContext
LOWui/src/lib/tailcatPeerConfig.ts1// yamlQuote renders a value as a double-quoted YAML scalar. JSON's escapingCOMMENT
LOWui/src/lib/ime.ts1// Helpers for telling an IME conversion-confirming Enter apart from an EnterCOMMENT
LOWcmd/kubeswap/serve.go41COMMENT
LOWcmd/kubeswap/main.go1// kubeswap is a cmd/cmdStop wrapper that lets llama-swap manage inferenceCOMMENT
LOWcmd/kubeswap/chart/values.yaml1# Default values for llama-swap.COMMENT
LOWcmd/kubeswap/chart/values.yaml41# ---------------------------------------------------------------------------COMMENT
LOWcmd/kubeswap/chart/values.yaml101 # write the model ID, the backend args, and any llama-swap model fields.COMMENT
LOWcmd/kubeswap/chart/values.yaml121 # field (name, ttl, capabilities, macros, filters, aliases,COMMENT
LOWcmd/kubeswap/chart/values.yaml141 # so the matrix DSL is never written by hand. Requires models (notCOMMENT
LOWcmd/kubeswap/chart/values.yaml161 #COMMENT
LOWcmd/kubeswap/chart/values.yaml181 # krea2-turbo: 10COMMENT
LOWcmd/kubeswap/chart/values.yaml261 port: 80COMMENT
LOWcmd/kubeswap/chart/values.yaml321 httpGet:COMMENT
LOWcmd/kubeswap/chart/values.yaml341# resources:COMMENT
LOWevals/docs-agent/run.sh1#!/usr/bin/env bashCOMMENT
LOWevals/docs-agent/fixture/models.yaml1# A long, deterministic configuration for the Docs Agent eval.COMMENT
LOWdocker/build-image.sh1#!/bin/bashCOMMENT
LOWdocker/unified/lib-release.sh1#!/bin/bashCOMMENT
LOWdocker/unified/run.sh1#!/bin/bashCOMMENT
LOWdocker/unified/run.sh21# and exit instead of serving, so as a standing environment variable on aCOMMENT
LOWdocker/unified/config.example.yaml1# Starter configuration for the llama-swap container.COMMENT
LOWdocker/unified/build-image.sh1#!/bin/bashCOMMENT
LOWdocker/unified/build-image.sh21# base-<backend>.Dockerfile the builder base, published as its own imageCOMMENT
LOWdocker/unified/build-image.sh41# ./build-image.sh --cuda --stage=whisper # build + push one project's artifactsCOMMENT
LOWdocker/unified/build-image.sh181 ARCH_TAG=""COMMENT
LOWdocker/unified/build-image.sh201# parts that exist are Grace pairings, so Pascal through Ada are pointless andCOMMENT
LOWdocker/unified/install-audio.sh21git checkout FETCH_HEADCOMMENT
LOWinternal/mcptools/provider.go41 // Tags are internal metadata for a future find_tools; never serialized.COMMENT
LOWinternal/mcptools/provider.go61 Content stringCOMMENT
LOWinternal/mcptools/registry.go21var ErrInvalidCursor = errors.New("invalid cursor")COMMENT
LOWinternal/docagent/reference.go1// Package docagent indexes llama-swap's own documentation so it can beCOMMENT
LOWinternal/hw/intel.go1package hwCOMMENT
LOWinternal/capcompat/service.go41//COMMENT
LOWinternal/capcompat/capcompat_test.go21// The fixtures under testdata/ are built from the documented response shapes:COMMENT
LOWinternal/capcompat/capcompat_test.go41//COMMENT
LOWinternal/capcompat/capcompat_test.go61// a single llama-server (b11429) serving the Clef-Flash decision model. TheCOMMENT
LOWinternal/capcompat/llamaserver.go141 }COMMENT
LOWinternal/capcompat/default.go1package capcompatCOMMENT
LOWinternal/capcompat/capcompat.go1// Package capcompat discovers what an upstream inference server can do andCOMMENT
LOWinternal/capcompat/capcompat.go221 logger *logmon.MonitorCOMMENT
LOWinternal/config/model_config.go61}COMMENT
LOWinternal/config/mcpprovider.go21COMMENT
LOWinternal/config/mcpprovider.go41// at 32KB, so nothing a caller has any business asking for comes near this.COMMENT
LOWinternal/config/mcpprovider.go61// however much one such step adds; sampling often keeps that bounded.COMMENT
LOWinternal/config/security.go41}COMMENT
LOWinternal/config/security.go61 // "allow everything". A "*" entry allows any origin and cannot beCOMMENT
LOWinternal/config/macros.go61// configuration is decoded. Decoding into untyped values first materializesCOMMENT
LOWinternal/config/redact.go41COMMENT
LOWinternal/server/cors.go161 if p.allowPrivateNetwork && r.Header.Get("Access-Control-Request-Private-Network") == "true" {COMMENT
LOWinternal/server/server.go41 metrics *metricsMonitorCOMMENT
LOWinternal/server/captures.go61// Each in-flight EncodeAll holds one sub-encoder, so this is also the numberCOMMENT
LOWinternal/server/api.go481 // responses resolve. The Location stays relative so the redirect keeps aCOMMENT
LOWinternal/chain/chain.go1// Package chain composes http.Handler middleware into a single handler.COMMENT
LOWinternal/perf/d3dkmt_windows.go141 // sizeof(D3DKMT_QUERYSTATISTICS) == 0x328 (808 bytes) on x64.COMMENT
LOWinternal/matrix/doc.go1// Package matrix compiles and solves the matrix routing DSL withoutCOMMENT
LOWinternal/matrix/doc.go21//COMMENT
LOWinternal/matrix/doc.go41// produce a worse decision.COMMENT
LOWinternal/swaputil/http.go81COMMENT
LOWinternal/process/runtime_windows.go21// rooted at cmd.Process. Windows has no SIGTERM or process-group signalling, soCOMMENT
LOWinternal/process/process_command.go21)COMMENT
51 more matches not shown…
Decorative Section Separators27 hits · 86 pts
SeverityFileLineSnippetContext
MEDIUM…/src/components/playground/ConcurrencyInterface.svelte142 // Detect and split the llama-swap loading block (wrapped in ━━━━━ markers,COMMENT
MEDIUMcmd/kubeswap/chart/values.yaml13# ---------------------------------------------------------------------------COMMENT
MEDIUMcmd/kubeswap/chart/values.yaml15# ---------------------------------------------------------------------------COMMENT
MEDIUMcmd/kubeswap/chart/values.yaml41# ---------------------------------------------------------------------------COMMENT
MEDIUMcmd/kubeswap/chart/values.yaml43# ---------------------------------------------------------------------------COMMENT
MEDIUMcmd/kubeswap/chart/values.yaml94 # ---------------------------------------------------------------------------COMMENT
MEDIUMcmd/kubeswap/chart/values.yaml96 # ---------------------------------------------------------------------------COMMENT
MEDIUMcmd/kubeswap/chart/values.yaml137 # ---------------------------------------------------------------------------COMMENT
MEDIUMcmd/kubeswap/chart/values.yaml139 # ---------------------------------------------------------------------------COMMENT
MEDIUMcmd/kubeswap/chart/values.yaml195# ---------------------------------------------------------------------------COMMENT
MEDIUMcmd/kubeswap/chart/values.yaml197# ---------------------------------------------------------------------------COMMENT
MEDIUMcmd/kubeswap/chart/values.yaml223# ---------------------------------------------------------------------------COMMENT
MEDIUMcmd/kubeswap/chart/values.yaml225# ---------------------------------------------------------------------------COMMENT
MEDIUMcmd/kubeswap/chart/values.yaml270# ---------------------------------------------------------------------------COMMENT
MEDIUMcmd/kubeswap/chart/values.yaml272# ---------------------------------------------------------------------------COMMENT
MEDIUMcmd/kubeswap/chart/values.yaml290# ---------------------------------------------------------------------------COMMENT
MEDIUMcmd/kubeswap/chart/values.yaml292# ---------------------------------------------------------------------------COMMENT
MEDIUMcmd/kubeswap/chart/values.yaml327# ---------------------------------------------------------------------------COMMENT
MEDIUMcmd/kubeswap/chart/values.yaml329# ---------------------------------------------------------------------------COMMENT
MEDIUMdocker/unified/build-image.sh403# ── --manifest: join the per-platform images into one tag ─────────────COMMENT
MEDIUMdocker/unified/build-image.sh468# ── Resolve refs ──────────────────────────────────────────────────────COMMENT
MEDIUMdocker/unified/build-image.sh563# ── Builders ──────────────────────────────────────────────────────────COMMENT
MEDIUMdocker/unified/build-image.sh664# ── --stage: build and publish one image ──────────────────────────────COMMENT
MEDIUMdocker/unified/build-image.sh698# ── --assemble: runtime image from published artifacts ────────────────COMMENT
MEDIUM⚡docs/config.example.yaml5# -------------------------------------COMMENT
MEDIUM⚡docs/config.example.yaml8# ====================================COMMENT
MEDIUM⚡docs/config.example.yaml12# ====================================COMMENT
Hallucination Indicators3 hits · 30 pts
SeverityFileLineSnippetContext
CRITICALinternal/config/matrix_test.go350 assert.Same(t, cfg.Matrix.Program(), cfg.Routing.Router.Settings.Matrix.Program())CODE
CRITICALinternal/config/config_test.go1827 assert.NotNil(t, cfg.Routing.Router.Settings.Matrix.Program())CODE
CRITICALinternal/config/config_test.go1847 assert.NotNil(t, cfg.Routing.Router.Settings.Matrix.Program())CODE
Synthetic Comment Markers2 hits · 12 pts
SeverityFileLineSnippetContext
HIGHconfig-schema.json728 "description": "Controls which log streams are written to stdout. A comma separated list of 'proxy' (logs geCODE
HIGHdocs/config.example.yaml43# - "proxy": logs generated by llama-swap when swapping models,COMMENT
Modern AI Meta-Vocabulary4 hits · 11 pts
SeverityFileLineSnippetContext
MEDIUMui/src/components/playground/ChatInterface.svelte50 // A history left over from when this tab was agentic still holds toolCOMMENT
MEDIUMinternal/server/server.go47 // Playground's agentic chat and to external MCP clients through /api/mcp.COMMENT
MEDIUMinternal/server/server.go482 // consumed by the Playground's agentic chat and by any external MCP client.COMMENT
MEDIUMinternal/event/README.md3The original code uses a `time.Ticker` to process the event queue which caused a large increase in CPU usage ([#189](httCODE
Redundant / Tautological Comments5 hits · 8 pts
SeverityFileLineSnippetContext
LOWdocker/build-container.sh32# Check if ARCH is in the allowed listCOMMENT
LOWdocker/build-container.sh38# Check if GITHUB_TOKEN is set and not emptyCOMMENT
LOWdocker/build-container.sh97 # Check if response is empty array (no more pages)COMMENT
LOWdocker/build-image.sh227# Check if our custom builder exists with the right config, create/update if neededCOMMENT
LOW.github/workflows/config-schema.yml28 # Check if the file is valid JSONCOMMENT
Hyper-Verbose Identifiers7 hits · 7 pts
SeverityFileLineSnippetContext
LOWui/src/stores/playground.ts24export function resetUnknownPlaygroundTab(): void {CODE
LOWui/src/components/ActivityTable.svelte669 function handleInflightColDragStart(e: DragEvent, id: string) {CODE
LOWui/src/components/ActivityTable.svelte677 function handleInflightColDragOver(e: DragEvent, id: string) {CODE
LOWui/src/components/playground/DocsInterface.svelte466 function looksLikeUnparsedToolCall(text: string): boolean {CODE
LOWui/src/lib/chatApi.ts303export function normalizeAnthropicStopReason(reason: unknown): string | undefined {CODE
LOWui/src/lib/playgroundInterface.ts22export function createPlaygroundInterface(CODE
LOWui/src/lib/playgroundSession.ts4function createPlaygroundSessionID(): string {CODE
AI Slop Vocabulary2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMscripts/add-changelog.sh2# Add a CHANGELOG.md entry by asking an AI coding harness to follow theCOMMENT
MEDIUMscripts/add-changelog.sh103 # The harness is optional: a leading v<number> is taken as the version.COMMENT
Fake / Example Data5 hits · 5 pts
SeverityFileLineSnippetContext
LOWcmd/fake-model/README.md20lorem ipsum and it ignores the prompt.CODE
LOWcmd/fake-model/main.go21 "Lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor " +CODE
LOWcmd/fake-model/main.go21 "Lorem ipsum dolor sit amet consectetur adipiscing elit sed do eiusmod tempor " +CODE
LOWdocs/kb/guides/tools/fake-model.md13`/v1/chat/completions` with lorem ipsum at a fixed speed. It loads no model, soCODE
LOWdocs/testing/synthetic-data.md87- **Determinism is the point.** The text is lorem ipsum and the prompt isCODE
Example Usage Blocks3 hits · 4 pts
SeverityFileLineSnippetContext
LOWevals/docs-agent/run.sh15# Usage:COMMENT
LOWdocker/build-image.sh5# Usage:COMMENT
LOWdocker/unified/build-image.sh5# Usage:COMMENT
Verbosity Indicators2 hits · 3 pts
SeverityFileLineSnippetContext
LOWcmd/vllm-wrapper/main.go89 // Step 1: Ensure the daemon is running and awake.COMMENT
LOWcmd/vllm-wrapper/main.go121 // Step 2: Set up reverse proxy from listenAddr to vllmURL.COMMENT
Structural Annotation Overuse2 hits · 3 pts
SeverityFileLineSnippetContext
LOWcmd/vllm-wrapper/main.go89 // Step 1: Ensure the daemon is running and awake.COMMENT
LOWcmd/vllm-wrapper/main.go121 // Step 2: Set up reverse proxy from listenAddr to vllmURL.COMMENT
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippetContext
MEDIUMdocker/build-image.sh237 # Create the builder with the configCOMMENT
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMinternal/router/loading_remarks.go85 "The model saw \"As an AI language model\" and won't stop saying it now",CODE