This report summarizes scanner evidence for clusterzx/paperless-ai. SynthScan examined 31,940 lines of code across 63 source files, recording 112 pattern matches distributed across 12 syntactic categories. The legacy adjusted pattern signal is 4.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.
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.
Can maintainers explain intent, assumptions, and trade-offs? 51 finding(s).
Are imports declared and package/API names verified? 20 finding(s).
Are wrappers, guards, and repeated structures necessary? 45 finding(s).
Which changes need focused human review? 112 finding(s).
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.
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.
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.
The scanner identified 112 distinct pattern matches across 12 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | main.py | 725 | # Check if collection is accessible | COMMENT |
| LOW⚡ | main.py | 741 | # Check if BM25 corpus matches document count | COMMENT |
| LOW⚡ | main.py | 780 | # Check if we have new documents | COMMENT |
| LOW⚡ | main.py | 790 | # Check if tokenized corpus size matches document count | COMMENT |
| LOW | main.py | 312 | # Check if newest document is already indexed | COMMENT |
| LOW | main.py | 348 | # Check if response is empty | COMMENT |
| LOW | main.py | 363 | # Check if there's a next page | COMMENT |
| LOW | main.py | 562 | # Check if collection exists | COMMENT |
| LOW | main.py | 575 | # Check if collection is valid by fetching count | COMMENT |
| LOW | main.py | 911 | # Check if tokenized corpus matches our document count | COMMENT |
| LOW | main.py | 1005 | # Check if scores is a valid array | COMMENT |
| LOW | main.py | 1056 | # Check if results are valid | COMMENT |
| LOW | main.py | 1290 | # Check if we got valid results | COMMENT |
| LOW | main.py | 1328 | # Check if we still have results after filtering | COMMENT |
| LOW | main.py | 1370 | # Check if models are initialized | COMMENT |
| LOW | main.py | 1383 | # Check if we need to check for new documents | COMMENT |
| LOW | main.py | 1549 | # Check if documents exist and ChromaDB is ready | COMMENT |
| LOW | main.py | 1601 | # Check if we have valid docs and indexes before trying to load | COMMENT |
| LOW | main.py | 1658 | # Check if we need to fix indexes | COMMENT |
| LOW | main.py | 1734 | # Check if we got any results | COMMENT |
| LOW | main.py | 1853 | # Check if indexing is already running | COMMENT |
| LOW | main.py | 2025 | # Check if we already have documents loaded | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | main.py | 732 | except Exception as e: | CODE |
| LOW⚡ | main.py | 800 | except Exception as e: | CODE |
| LOW⚡ | main.py | 1700 | except Exception as dm_error: | CODE |
| LOW⚡ | main.py | 1706 | except Exception as se_error: | CODE |
| LOW⚡ | main.py | 1715 | except Exception as e: | CODE |
| LOW | main.py | 154 | except Exception as e: | CODE |
| LOW | main.py | 199 | except Exception as e: | CODE |
| LOW | main.py | 273 | except Exception as e: | CODE |
| LOW | main.py | 317 | except Exception as e: | CODE |
| LOW | main.py | 456 | except Exception as e: | CODE |
| LOW | main.py | 505 | except Exception as e: | CODE |
| LOW | main.py | 609 | except Exception as inner_e: | CODE |
| LOW | main.py | 643 | except Exception as e: | CODE |
| LOW | main.py | 824 | except Exception as e: | CODE |
| LOW | main.py | 890 | except Exception as e: | CODE |
| LOW | main.py | 921 | except Exception as e: | CODE |
| LOW | main.py | 978 | except Exception as e: | CODE |
| LOW | main.py | 1030 | except Exception as e: | CODE |
| LOW | main.py | 1077 | except Exception as e: | CODE |
| LOW | main.py | 1083 | except Exception as e: | CODE |
| LOW | main.py | 1118 | except Exception as e: | CODE |
| LOW | main.py | 1124 | except Exception as e: | CODE |
| LOW | main.py | 1221 | except Exception as e: | CODE |
| LOW | main.py | 1267 | except Exception as e: | CODE |
| LOW | main.py | 1351 | except Exception as item_e: | CODE |
| LOW | main.py | 1357 | except Exception as e: | CODE |
| LOW | main.py | 1441 | except Exception as e: | CODE |
| LOW | main.py | 1478 | except Exception as e: | CODE |
| LOW | main.py | 1483 | except Exception as e2: | CODE |
| LOW | main.py | 1498 | except Exception as e: | CODE |
| LOW | main.py | 1593 | except Exception as e: | CODE |
| LOW | main.py | 1619 | except Exception as e: | CODE |
| LOW | main.py | 1637 | except Exception as e: | CODE |
| LOW | main.py | 1689 | except Exception as e: | CODE |
| LOW | main.py | 1770 | except Exception as e: | CODE |
| LOW | main.py | 1958 | except Exception as e: | CODE |
| LOW | main.py | 1988 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | main.py | 851 | except: | CODE |
| HIGH | main.py | 944 | except: | CODE |
| HIGH | main.py | 1307 | except: | CODE |
| HIGH | main.py | 1315 | except: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | test-restriction-service.js | 14 | const existingCorrespondents = ['John Doe', 'ACME Corp', 'Tax Office']; | CODE |
| LOW | test-updated-service.js | 14 | const existingCorrespondents = ['John Doe', 'ACME Corp', 'Tax Office']; | CODE |
| LOW | OPENAPI/openapi.json | 162 | "example": "Acme Corp" | CODE |
| LOW | OPENAPI/openapi.json | 888 | "example": "Acme Corp" | CODE |
| LOW | OPENAPI/openapi.json | 1582 | "example": "Acme Corp" | CODE |
| LOW | OPENAPI/openapi.json | 1674 | "example": "Acme Corp" | CODE |
| LOW | OPENAPI/openapi.json | 3451 | "Acme Corp" | CODE |
| LOW | OPENAPI/openapi.json | 3475 | "example": "Acme Corp" | CODE |
| LOW | OPENAPI/openapi.json | 3696 | "example": "Acme Corp" | CODE |
| LOW | routes/setup.js | 467 | * example: "Acme Corp" | COMMENT |
| LOW | routes/setup.js | 1116 | * example: "Acme Corp" | COMMENT |
| LOW | routes/setup.js | 1185 | * example: "Acme Corp" | COMMENT |
| LOW | routes/setup.js | 2969 | * example: ["Invoice", "Finance", "Acme Corp"] | COMMENT |
| LOW | routes/setup.js | 2985 | * example: "Acme Corp" | COMMENT |
| LOW | routes/setup.js | 3232 | * example: "Acme Corp" | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | start-services.sh | 7 | # Start the Python RAG service in the background | COMMENT |
| MEDIUM | README.md | 47 | ### 🧠 RAG-Based AI Chat | COMMENT |
| MEDIUM | RAG-DEV-GUIDE.md | 1 | # Using the RAG Service in Development Mode | COMMENT |
| MEDIUM | RAG-DEV-GUIDE.md | 53 | ### Step 1: Set Up the Python RAG Service | COMMENT |
| MEDIUM | RAG-DEV-GUIDE.md | 97 | ## Accessing the RAG Interface | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | main.py | 130 | # Create a serializable state object | COMMENT |
| MEDIUM | main.py | 947 | # Create a map for quick document lookup by ID | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | main.py | 1461 | CODE | |
| LOW | main.py | 1508 | CODE | |
| LOW | main.py | 1896 | CODE | |
| LOW | main.py | 321 | CODE | |
| LOW | main.py | 460 | CODE | |
| LOW | main.py | 551 | CODE | |
| LOW | main.py | 760 | CODE | |
| LOW | main.py | 1036 | CODE | |
| LOW | main.py | 1274 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | server.js | 581 | } catch (error) { | COMMENT |
| LOW | routes/setup.js | 2781 | * application/json: | COMMENT |
| LOW | services/customService.js | 161 | COMMENT | |
| LOW | services/paperlessService.js | 1321 | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | main.py | 206 | class DataManager: | CODE |
| LOW | main.py | 2060 | async def rebuild_indexes_on_startup(): | CODE |
| LOW | services/serviceUtils.js | 43 | function estimateTokensForNonOpenAI(text) { | CODE |
| LOW | services/serviceUtils.js | 75 | async function calculateTotalPromptTokens(systemPrompt, additionalPrompts = [], model = process.env.OPENAI_MODEL || "gpt | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | RAG-DEV-GUIDE.md | 53 | ### Step 1: Set Up the Python RAG Service | COMMENT |
| LOW | RAG-DEV-GUIDE.md | 69 | ### Step 2: Configure the Paperless-AI Application | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | main.py | 8 | CODE | |
| LOW | main.py | 8 | CODE | |
| LOW | main.py | 8 | CODE | |
| LOW | main.py | 16 | CODE | |
| LOW | main.py | 19 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | main.py | 1261 | # If snippet is empty (no term matches), just use the beginning of the content | COMMENT |
| LOW | main.py | 1407 | # to do a full rebuild or just add new documents | COMMENT |
| MEDIUM | main.py | 1897 | """Perform a comprehensive health check of the system""" | STRING |