AI Slop Code RIsk Monitor

langchain-ai/chat-langchain

17.4 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for langchain-ai/chat-langchain, a TypeScript project with 6,462 GitHub stars. SynthScan examined 22,917 lines of code across 116 source files, recording 190 pattern matches distributed across 13 syntactic categories. The legacy adjusted pattern signal is 17.4 (Elevated 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.

17.4
Adjusted Signal
17.4
Raw Pattern Score
100%
Time Factor
2026-10-11
Last Push
6.5K
Stars
TypeScript
Language
22.9K
Lines of Code
116
Files
190
Pattern Hits
2026-10-12
Scan Date
0.02
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 17.2/100 · LOW

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

Hallucinated Dependency & Supply Chain Risk 4.5/100 · LOW

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

Agent Over-Engineering Ratio 52.4/100 · HIGH

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

PR Review Velocity Impact 50.7/100 · HIGH

Which changes need focused human review? 190 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 2MEDIUM 62LOW 126

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 190 distinct pattern matches across 13 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.

Decorative Section Separators60 hits · 249 pts
SeverityFileLineSnippetContext
MEDIUM⚡tests/unit/test_pylon_pagination.py58 # ------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/test_pylon_pagination.py60 # ------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/test_pylon_pagination.py74 # ------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/test_pylon_pagination.py76 # ------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/test_pylon_pagination.py97 # ------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/test_pylon_pagination.py99 # ------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/test_pylon_pagination.py117 # ------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/test_pylon_pagination.py119 # ------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/test_pylon_pagination.py136 # ------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/test_pylon_pagination.py138 # ------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/test_pylon_pagination.py157 # ------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/test_pylon_pagination.py159 # ------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/test_pylon_pagination.py174 # ------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/test_pylon_pagination.py176 # ------------------------------------------------------------------COMMENT
MEDIUMtests/unit/test_pylon_pagination.py13# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/test_pylon_pagination.py15# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/test_pylon_pagination.py44# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/test_pylon_pagination.py46# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/test_check_links_async.py59# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/test_check_links_async.py61# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/unit/test_check_links_async.py71# ===========================================================================COMMENT
MEDIUM⚡tests/unit/test_check_links_async.py75# ===========================================================================COMMENT
MEDIUM⚡tests/unit/test_check_links_async.py128# ===========================================================================COMMENT
MEDIUM⚡tests/unit/test_check_links_async.py132# ===========================================================================COMMENT
MEDIUM⚡tests/unit/test_check_links_async.py178# ===========================================================================COMMENT
MEDIUM⚡tests/unit/test_check_links_async.py180# ===========================================================================COMMENT
MEDIUMtests/unit/test_check_links_async.py16# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/unit/test_check_links_async.py19# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/evals/test_guardrails_scope.py38# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/evals/test_guardrails_scope.py40# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/evals/test_guardrails_scope.py64# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/evals/test_guardrails_scope.py66# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/evals/test_guardrails_scope.py96# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/evals/test_guardrails_scope.py98# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/evals/test_guardrails_scope.py128# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/evals/test_guardrails_scope.py130# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/evals/test_guardrails_scope.py144# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/evals/test_guardrails_scope.py146# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/evals/test_guardrails_scope.py166# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/evals/test_guardrails_scope.py168# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/evals/test_guardrails_scope.py186# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/evals/test_guardrails_scope.py188# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/evals/test_guardrails_scope.py212# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/evals/test_guardrails_scope.py214# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/evals/test_guardrails_scope.py18# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/evals/test_guardrails_scope.py20# ---------------------------------------------------------------------------COMMENT
MEDIUMsrc/tools/pylon_tools.py38# =============================================================================COMMENT
MEDIUMsrc/tools/pylon_tools.py40# =============================================================================COMMENT
MEDIUMsrc/tools/pylon_tools.py125# =============================================================================COMMENT
MEDIUMsrc/tools/pylon_tools.py127# =============================================================================COMMENT
MEDIUM⚡src/agent/config.py23# =============================================================================COMMENT
MEDIUM⚡src/agent/config.py25# =============================================================================COMMENT
MEDIUMsrc/agent/config.py77# =============================================================================COMMENT
MEDIUMsrc/agent/config.py79# =============================================================================COMMENT
MEDIUM⚡src/agent/config.py93# =============================================================================COMMENT
MEDIUM⚡src/agent/config.py95# =============================================================================COMMENT
MEDIUM⚡src/agent/config.py131# =============================================================================COMMENT
MEDIUM⚡src/agent/config.py133# =============================================================================COMMENT
MEDIUM⚡src/agent/config.py141# =============================================================================COMMENT
MEDIUM⚡src/agent/config.py143# =============================================================================COMMENT
Hyper-Verbose Identifiers49 hits · 50 pts
SeverityFileLineSnippetContext
LOWfrontend/app/auth/callback/route.ts47function getSupabaseAuthStorageKey(region: AuthRegion): string {CODE
LOWfrontend/lib/auth/supabase.ts142export async function signOutAllSupabaseClients(): Promise<void> {CODE
LOWfrontend/lib/hooks/auth/use-user-id.ts38export function getOrCreateGuestUserId(): string | null {CODE
LOWfrontend/lib/hooks/threads/guest-thread-storage.ts118export function removeStoredGuestThreadId(CODE
LOWfrontend/lib/hooks/threads/guest-thread-storage.ts130export function pruneStoredGuestThreadIds(CODE
LOW⚡tests/unit/test_pylon_pagination.py104 def test_three_pages_collected(self, mock_get, mock_kb_id, mock_api_key):CODE
LOW⚡tests/unit/test_pylon_pagination.py124 def test_meta_next_pagination(self, mock_get, mock_kb_id, mock_api_key):CODE
LOW⚡tests/unit/test_pylon_pagination.py143 def test_safety_limit_stops_at_max_pages(self, mock_get, mock_kb_id, mock_api_key):CODE
LOW⚡tests/unit/test_pylon_pagination.py164 def test_cache_prevents_duplicate_requests(self, mock_get, mock_kb_id, mock_api_key):CODE
LOW⚡tests/unit/test_pylon_pagination.py181 def test_empty_data_returns_empty_list(self, mock_get, mock_kb_id, mock_api_key):CODE
LOWtests/unit/test_ingress_guards_middleware.py19def test_before_agent_truncates_oversized_human_message():CODE
LOWtests/unit/test_ingress_guards_middleware.py32def test_before_agent_noop_when_under_cap():CODE
LOWtests/unit/test_ingress_guards_middleware.py39def test_build_docs_agent_trace_metadata_includes_provenance_and_version(monkeypatch):CODE
LOWtests/unit/test_ingress_guards_middleware.py58def test_build_docs_agent_trace_metadata_falls_back_to_host_revision(monkeypatch):CODE
LOWtests/unit/test_summarization_middleware_wiring.py8def test_summarization_middleware_uses_retrying_fallback_model():CODE
LOWtests/unit/test_guardrails_fallback.py44def test_guardrails_falls_back_after_primary_retries(monkeypatch):CODE
LOWtests/unit/test_guardrails_fallback.py63def test_guardrails_raises_after_all_models_exhaust_retries(monkeypatch):CODE
LOWtests/unit/test_guardrails_fallback.py82def test_guardrails_all_failed_classification_allows_main_agent(monkeypatch):CODE
LOWtests/unit/test_guardrails_fallback.py86 async def _raise_classification_error(messages): # noqa: ARG001CODE
LOW⚡tests/unit/test_check_links_async.py78async def test_check_links_works_in_async_context():CODE
LOW⚡tests/unit/test_check_links_async.py134def test_check_links_works_in_sync_context():CODE
LOW⚡tests/unit/test_check_links_async.py182def test_check_links_empty_list():CODE
LOW⚡tests/unit/test_check_links_async.py190async def test_check_links_async_empty_list():CODE
LOW⚡tests/unit/test_check_links_async.py196def test_check_links_invalid_url_format():CODE
LOWtests/unit/test_check_links_async.py105async def test_check_links_async_context_does_not_raise_runtime_error():CODE
LOWtests/unit/test_check_links_async.py156def test_check_links_sync_deduplicates_urls():CODE
LOWtests/unit/test_check_links_async.py217async def test_check_links_async_invalid_url_format():CODE
LOWtests/unit/test_check_links_async.py248async def test_support_article_normal_content_is_valid():CODE
LOWtests/unit/test_prompt_provenance.py13def test_get_prompt_provenance_local_mode(monkeypatch):CODE
LOWtests/unit/test_prompt_provenance.py24def test_resolve_hub_provenance_uses_prompt_workspace_and_api_key(monkeypatch):CODE
LOWtests/unit/test_prompt_provenance.py61def test_resolve_hub_provenance_without_overrides_uses_default_client(monkeypatch):CODE
LOWtests/evals/test_repeated_searches.py7def test_prompt_instructs_agent_to_avoid_repeat_searches():CODE
LOWtests/evals/test_repeated_searches.py36def test_prompt_has_check_history_before_search_guidance():CODE
LOWtests/evals/test_retry_middleware_wiring.py11def test_retry_middleware_is_in_agent_middleware_list():CODE
LOWtests/evals/test_retry_middleware_wiring.py27def test_retry_middleware_config_is_exported():CODE
LOW⚡tests/evals/test_guardrails_scope.py43def test_guardrails_prompt_mentions_data_science_restriction():CODE
LOW⚡tests/evals/test_guardrails_scope.py69def test_guardrails_prompt_has_data_science_block_criterion():CODE
LOW⚡tests/evals/test_guardrails_scope.py101def test_guardrails_prompt_clarifies_ds_libs_need_langchain_context():CODE
LOW⚡tests/evals/test_guardrails_scope.py133def test_guardrails_prompt_still_allows_langchain_core_topics():CODE
LOW⚡tests/evals/test_guardrails_scope.py149def test_guardrails_prompt_default_is_still_allow():CODE
LOW⚡tests/evals/test_guardrails_scope.py171def test_guardrails_prompt_has_nsfw_block_rule():CODE
LOW⚡tests/evals/test_guardrails_scope.py191def test_guardrails_nsfw_rule_is_zero_tolerance():CODE
LOW⚡tests/evals/test_guardrails_scope.py219def test_agent_prompt_has_nsfw_refusal():CODE
LOWsrc/middleware/guardrails_middleware.py168 async def _generate_rejection_message(self, content) -> AIMessage:CODE
LOWsrc/middleware/guardrails_middleware.py326 def _build_guardrails_content(self, content, context_section: str) -> str | list:CODE
LOWsrc/tools/pylon_tools.py290def get_support_article_content(article_id: str) -> str:CODE
LOWsrc/utils/trace_root_metadata.py17def build_docs_agent_trace_metadata(CODE
LOW⚡src/agent/config.py105def _raise_for_retryable_finish_reason(response: object) -> object:CODE
LOWsrc/agent/config.py120def init_retry_fallback_model(model: str) -> Runnable:CODE
Excessive Try-Catch Wrapping19 hits · 19 pts
SeverityFileLineSnippetContext
LOWsrc/middleware/guardrails_middleware.py91 except Exception:CODE
LOWsrc/middleware/guardrails_middleware.py149 except Exception:CODE
LOWsrc/middleware/guardrails_middleware.py165 except Exception as e:CODE
LOWsrc/middleware/guardrails_middleware.py183 except Exception as e:CODE
LOWsrc/middleware/guardrails_middleware.py438 except Exception as e:CODE
LOWsrc/middleware/guardrails_middleware.py478 except Exception:CODE
LOWsrc/middleware/retry_middleware.py71 except Exception as e:CODE
LOWsrc/middleware/summarization_middleware.py36 except Exception as e:CODE
LOWsrc/middleware/summarization_middleware.py56 except Exception as e:CODE
LOWsrc/middleware/tool_retry_middleware.py132 except Exception as error:CODE
LOWsrc/tools/link_check_tools.py46 except Exception:CODE
LOWsrc/tools/link_check_tools.py55 except Exception:CODE
LOWsrc/tools/link_check_tools.py140 except Exception as e:CODE
LOWsrc/tools/pricing_tools.py100 except Exception as e:CODE
LOWsrc/tools/pylon_tools.py207 except Exception as e:CODE
LOWsrc/tools/pylon_tools.py284 except Exception as e:CODE
LOWsrc/tools/pylon_tools.py315 except Exception:CODE
LOWsrc/tools/pylon_tools.py355 except Exception as e:CODE
LOWsrc/utils/prompt_provenance.py90 except Exception as exc:CODE
Modern Structural Boilerplate16 hits · 17 pts
SeverityFileLineSnippetContext
LOWsrc/middleware/guardrails_middleware.py27logger = logging.getLogger(__name__)CODE
LOWsrc/middleware/guardrails_middleware.py482__all__ = ["GuardrailsMiddleware", "GuardrailsClassificationError"]CODE
LOWsrc/middleware/__init__.py8__all__ = [CODE
LOWsrc/middleware/retry_middleware.py13logger = logging.getLogger(__name__)CODE
LOWsrc/middleware/retry_middleware.py97__all__ = ["ModelRetryMiddleware", "MalformedResponseError"]CODE
LOWsrc/middleware/summarization_middleware.py60__all__ = ["CustomSummarizationMiddleware"]CODE
LOWsrc/middleware/tool_retry_middleware.py13logger = logging.getLogger(__name__)CODE
LOWsrc/middleware/tool_retry_middleware.py175__all__ = ["ToolRetryMiddleware"]CODE
LOWsrc/middleware/ingress_guards_middleware.py75__all__ = ["IngressGuardsMiddleware", "MAX_MESSAGE_CHARS"]CODE
LOWsrc/tools/link_check_tools.py12logger = logging.getLogger(__name__)CODE
LOWsrc/tools/pricing_tools.py11logger = logging.getLogger(__name__)CODE
LOWsrc/tools/pylon_tools.py16logger = logging.getLogger(__name__)CODE
LOWsrc/utils/prompt_provenance.py7logger = logging.getLogger(__name__)CODE
LOWsrc/utils/trace_root_metadata.py34__all__ = ["build_docs_agent_trace_metadata"]CODE
LOW⚡src/agent/config.py21logger = logging.getLogger(__name__)CODE
LOW⚡src/agent/config.py145__all__ = [CODE
Unused Imports16 hits · 13 pts
SeverityFileLineSnippetContext
LOWidentity.py17CODE
LOWtests/unit/test_pylon_pagination.py7CODE
LOWtests/unit/test_pylon_pagination.py8CODE
LOWtests/unit/test_pylon_pagination.py10CODE
LOWtests/unit/test_ingress_guards_middleware.py3CODE
LOWtests/unit/test_check_links_async.py12CODE
LOWtests/unit/test_check_links_async.py12CODE
LOWtests/unit/test_check_links_async.py21CODE
LOWtests/unit/test_check_links_async.py21CODE
LOWtests/unit/test_prompt_provenance.py3CODE
LOWsrc/middleware/__init__.py3CODE
LOWsrc/middleware/__init__.py4CODE
LOWsrc/middleware/__init__.py5CODE
LOWsrc/middleware/__init__.py6CODE
LOWsrc/middleware/ingress_guards_middleware.py15CODE
LOWsrc/utils/trace_root_metadata.py8CODE
Structural Annotation Overuse6 hits · 10 pts
SeverityFileLineSnippetContext
LOWinstructions.md251### Step 0: Route Pricing QuestionsCOMMENT
LOWinstructions.md255### Step 1: Research Documentation and Support KBCOMMENT
LOWinstructions.md293### Step 2: Synthesize and RespondCOMMENT
LOW⚡src/prompts/docs_agent_prompt.py252### Step 0: Route Pricing QuestionsCOMMENT
LOW⚡src/prompts/docs_agent_prompt.py256### Step 1: Research Documentation and Support KBCOMMENT
LOWsrc/prompts/docs_agent_prompt.py294### Step 2: Synthesize and RespondCOMMENT
Fake / Example Data8 hits · 8 pts
SeverityFileLineSnippetContext
LOWfrontend/lib/hooks/auth/use-client-profile.ts62 * updateClientProfile({ name: "John Doe" })COMMENT
LOW⚡tests/unit/test_pylon_pagination.py62 @patch("src.tools.pylon_tools._get_api_key", return_value="fake-key")CODE
LOW⚡tests/unit/test_pylon_pagination.py78 @patch("src.tools.pylon_tools._get_api_key", return_value="fake-key")CODE
LOW⚡tests/unit/test_pylon_pagination.py101 @patch("src.tools.pylon_tools._get_api_key", return_value="fake-key")CODE
LOW⚡tests/unit/test_pylon_pagination.py121 @patch("src.tools.pylon_tools._get_api_key", return_value="fake-key")CODE
LOW⚡tests/unit/test_pylon_pagination.py140 @patch("src.tools.pylon_tools._get_api_key", return_value="fake-key")CODE
LOW⚡tests/unit/test_pylon_pagination.py161 @patch("src.tools.pylon_tools._get_api_key", return_value="fake-key")CODE
LOW⚡tests/unit/test_pylon_pagination.py178 @patch("src.tools.pylon_tools._get_api_key", return_value="fake-key")CODE
Modern AI Meta-Vocabulary2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMsrc/middleware/guardrails_middleware.py29# Dataset configuration for guardrails evaluationCOMMENT
MEDIUMsrc/prompts/guardrails_prompts.py1# Prompt templates for guardrails classification and rejection responses.COMMENT
Deep Nesting6 hits · 6 pts
SeverityFileLineSnippetContext
LOWsrc/middleware/guardrails_middleware.py260CODE
LOWsrc/middleware/guardrails_middleware.py370CODE
LOWsrc/middleware/retry_middleware.py44CODE
LOWsrc/tools/link_check_tools.py72CODE
LOWsrc/tools/pylon_tools.py131CODE
LOWsrc/tools/pylon_tools.py290CODE
Verbosity Indicators3 hits · 6 pts
SeverityFileLineSnippetContext
LOW⚡src/prompts/docs_agent_prompt.py252### Step 0: Route Pricing QuestionsCOMMENT
LOW⚡src/prompts/docs_agent_prompt.py256### Step 1: Research Documentation and Support KBCOMMENT
LOWsrc/prompts/docs_agent_prompt.py294### Step 2: Synthesize and RespondCOMMENT
Empty Error Handlers1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHsrc/middleware/guardrails_middleware.py478except Exception:CODE
Docstring Block Structure1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHsrc/prompts/docs_agent_prompt.py2You are an expert LangChain customer service agent. ## Your Mission Answer customer questions about LangChain, LangGraSTRING
Over-Commented Block3 hits · 3 pts
SeverityFileLineSnippetContext
LOWfrontend/components/providers/segment-provider.tsx61 // Reset identity on logout so the next sign-in starts clean.COMMENT
LOW.github/workflows/deploy-production.yml1# Manually deploy the Managed Deep Agent to a LangSmith production deployment.COMMENT
LOWsrc/agent/__init__.py1# Agent module exports (empty to avoid circular imports)COMMENT