AI Slop Code RIsk Monitor

lfnovo/open-notebook

An Open Source implementation of Notebook LM with more flexibility and features

18.3 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for lfnovo/open-notebook, a TypeScript project with 40,035 GitHub stars. SynthScan examined 111,393 lines of code across 560 source files, recording 1430 pattern matches distributed across 21 syntactic categories. The legacy adjusted pattern signal is 18.3 (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.

18.3
Adjusted Signal
18.3
Raw Pattern Score
100%
Time Factor
2026-10-05
Last Push
40.0K
Stars
TypeScript
Language
111.4K
Lines of Code
560
Files
1.4K
Pattern Hits
2026-10-12
Scan Date
0.06
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 41.2/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 2.8/100 · LOW

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

Agent Over-Engineering Ratio 51.0/100 · HIGH

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

PR Review Velocity Impact 57.1/100 · HIGH

Which changes need focused human review? 1430 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 34MEDIUM 142LOW 1254

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 1430 distinct pattern matches across 21 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 Identifiers756 hits · 790 pts
SeverityFileLineSnippetContext
LOW…nsformations/components/TransformationEditorDialog.tsx51export function TransformationEditorDialog({ open, onOpenChange, transformation }: TransformationEditorDialogProps) {CODE
LOW…src/components/settings/EmbeddingModelChangeDialog.tsx27export function EmbeddingModelChangeDialog({CODE
LOW…/src/components/podcasts/generate-podcast-selection.ts53export function selectionsToContextConfigs(CODE
LOWfrontend/src/lib/credential-update-payload.ts23export function buildCredentialUpdatePayload(CODE
LOW⚡frontend/src/lib/utils/source-references.tsx179export function convertReferencesToMarkdownLinks(text: string): string {CODE
LOW⚡frontend/src/lib/utils/source-references.tsx348export function convertReferencesToCompactMarkdown(text: string, referencesLabel: string = 'References'): string {CODE
LOWfrontend/src/lib/utils/source-references.tsx275export function createReferenceLinkComponent(CODE
LOWfrontend/src/lib/utils/source-references.tsx440export function createCompactReferenceLinkComponent(CODE
LOWfrontend/src/lib/utils/source-references.tsx491export function convertSourceReferencesLegacy(text: string): React.ReactNode {CODE
LOWfrontend/src/lib/hooks/use-podcasts.ts234export function useDuplicateEpisodeProfile() {CODE
LOWfrontend/src/lib/hooks/use-podcasts.ts366export function useDuplicateSpeakerProfile() {CODE
LOWfrontend/src/lib/hooks/use-sources.ts352export function useRemoveSourceFromNotebook() {CODE
LOWfrontend/src/lib/hooks/use-credentials.ts338export function useMigrateFromProviderConfig() {CODE
LOWopen_notebook/config.py41def ensure_llm_timeout_default(environ: MutableMapping[str, str] = os.environ) -> None:CODE
LOW⚡open_notebook/utils/runtime_capabilities.py57def _default_playwright_cache() -> str | None:CODE
LOW⚡open_notebook/utils/runtime_capabilities.py67def _chromium_browser_present() -> bool:CODE
LOWopen_notebook/utils/version_utils.py14async def get_version_from_github_async(repo_url: str, branch: str = "main") -> str:CODE
LOWopen_notebook/utils/chunking.py173def detect_content_type_from_extension(CODE
LOWopen_notebook/utils/chunking.py195def detect_content_type_from_heuristics(text: str) -> Tuple[ContentType, float]:CODE
LOWopen_notebook/utils/chunking.py266def _calculate_markdown_score(text: str) -> float:CODE
LOWopen_notebook/utils/chunking.py398def _apply_secondary_chunking(chunks: List[str]) -> List[str]:CODE
LOWopen_notebook/utils/encryption.py64def _get_or_create_encryption_key() -> str:CODE
LOWopen_notebook/utils/encryption.py140def _derive_legacy_fernet_key(passphrase: str) -> str:CODE
LOWopen_notebook/utils/embedding.py24def _get_embedding_batch_size() -> int:CODE
LOWopen_notebook/utils/context_builder.py77def _rendered_source_context_tokens(CODE
LOWopen_notebook/utils/context_builder.py102def _truncate_source_to_token_budget(CODE
LOWopen_notebook/utils/url_validation.py115async def prepare_pinned_http_target(url: str, provider: str) -> PinnedHttpTarget:CODE
LOW⚡open_notebook/utils/graph_utils.py9async def get_session_message_count(graph, session_id: str) -> int:CODE
LOW⚡open_notebook/utils/graph_utils.py24def discard_unanswered_message(graph, thread_id: str, message: BaseMessage) -> None:CODE
LOWopen_notebook/podcasts/audio_paths.py63def resolve_contained_audio_path(audio_file: Optional[str]) -> Optional[Path]:CODE
LOWopen_notebook/podcasts/models.py110 async def resolve_transcript_config(self) -> Tuple[str, str, dict]:CODE
LOWopen_notebook/podcasts/models.py284 async def get_job_details_for_commands(CODE
LOWopen_notebook/ai/models.py55async def resolve_anthropic_compatible_config(CODE
LOWopen_notebook/ai/connection_tester.py31def _is_vertex_credentials_file_error(exc: Exception) -> bool:CODE
LOWopen_notebook/ai/connection_tester.py77def normalize_anthropic_compatible_base_url(base_url: str) -> str:CODE
LOWopen_notebook/ai/connection_tester.py208async def _test_openai_compatible_connection(CODE
LOWopen_notebook/ai/connection_tester.py264async def _test_anthropic_compatible_connection(CODE
LOWopen_notebook/ai/connection_tester.py399def _connection_failure_reason(error_msg: str) -> Optional[str]:CODE
LOWopen_notebook/ai/connection_tester.py482def classify_provider_test_error(error_msg: str) -> Tuple[bool, str]:CODE
LOWopen_notebook/ai/key_provider.py135async def _provision_simple_provider(provider: str) -> bool:CODE
LOWopen_notebook/ai/key_provider.py249async def _provision_url_key_compatible(provider: str, env_prefix: str) -> bool:CODE
LOWopen_notebook/ai/key_provider.py274async def _provision_openai_compatible() -> bool:CODE
LOWopen_notebook/ai/key_provider.py279async def _provision_anthropic_compatible() -> bool:CODE
LOWopen_notebook/ai/provision.py10async def provision_langchain_model(CODE
LOW⚡open_notebook/ai/model_discovery.py392async def fetch_anthropic_model_ids(api_key: str) -> List[str]:CODE
LOWopen_notebook/ai/model_discovery.py305async def discover_openai_compatible_provider(provider: str) -> List[DiscoveredModel]:CODE
LOWopen_notebook/ai/model_discovery.py363def _make_openai_compat_discoverer(CODE
LOWopen_notebook/ai/model_discovery.py426async def discover_anthropic_models() -> List[DiscoveredModel]:CODE
LOWopen_notebook/ai/model_discovery.py567async def discover_openrouter_models() -> List[DiscoveredModel]:CODE
LOWopen_notebook/ai/model_discovery.py608async def discover_elevenlabs_models() -> List[DiscoveredModel]:CODE
LOWopen_notebook/ai/model_discovery.py723async def discover_openai_compatible_models() -> List[DiscoveredModel]:CODE
LOWopen_notebook/ai/model_discovery.py793async def discover_anthropic_compatible_models() -> List[DiscoveredModel]:CODE
LOWopen_notebook/graphs/source_chat.py36def _source_content_is_available(CODE
LOWopen_notebook/graphs/source_chat.py48def call_model_with_source_context(CODE
LOWopen_notebook/graphs/source_chat.py69def _call_model_with_source_context_inner(CODE
LOWopen_notebook/domain/notebook.py699 def content_must_not_be_empty(cls, v):CODE
LOW⚡tests/test_model_discovery.py277 def test_speech_models_classify_as_tts(self):CODE
LOW⚡tests/test_model_discovery.py286 async def test_missing_key_returns_empty(self, monkeypatch):CODE
LOW⚡tests/test_model_discovery.py291 async def test_discovery_paginates_and_sends_anthropic_headers(self, monkeypatch):CODE
LOWtests/test_model_discovery.py53 def test_table_covers_all_openai_compatible_providers(self):CODE
696 more matches not shown…
Decorative Section Separators112 hits · 424 pts
SeverityFileLineSnippetContext
MEDIUM.pre-commit-config.yaml9 # ── Basic hygiene ──────────────────────────────────────────────────COMMENT
MEDIUM.pre-commit-config.yaml21 # ── Ruff: Python lint & format (mirrors CI backend-lint job) ──────COMMENT
MEDIUMopen_notebook/ai/key_provider.py23# =============================================================================COMMENT
MEDIUMopen_notebook/ai/key_provider.py25# =============================================================================COMMENT
MEDIUM⚡open_notebook/ai/model_discovery.py387# =============================================================================COMMENT
MEDIUM⚡open_notebook/ai/model_discovery.py389# =============================================================================COMMENT
MEDIUM⚡open_notebook/ai/model_discovery.py921# =============================================================================COMMENT
MEDIUM⚡open_notebook/ai/model_discovery.py923# =============================================================================COMMENT
MEDIUMopen_notebook/ai/model_discovery.py41# =============================================================================COMMENT
MEDIUMopen_notebook/ai/model_discovery.py43# =============================================================================COMMENT
MEDIUMopen_notebook/ai/model_discovery.py248# =============================================================================COMMENT
MEDIUMopen_notebook/ai/model_discovery.py250# =============================================================================COMMENT
MEDIUM⚡tests/test_utils.py151# ============================================================================COMMENT
MEDIUM⚡tests/test_utils.py153# ============================================================================COMMENT
MEDIUM⚡tests/test_utils.py198# ============================================================================COMMENT
MEDIUM⚡tests/test_utils.py200# ============================================================================COMMENT
MEDIUMtests/test_utils.py33# ============================================================================COMMENT
MEDIUMtests/test_utils.py35# ============================================================================COMMENT
MEDIUMtests/test_utils.py268# ============================================================================COMMENT
MEDIUMtests/test_utils.py270# ============================================================================COMMENT
MEDIUM⚡tests/test_graphs.py26# ============================================================================COMMENT
MEDIUM⚡tests/test_graphs.py28# ============================================================================COMMENT
MEDIUM⚡tests/test_graphs.py73# ============================================================================COMMENT
MEDIUM⚡tests/test_graphs.py75# ============================================================================COMMENT
MEDIUM⚡tests/test_graphs.py101# ============================================================================COMMENT
MEDIUM⚡tests/test_graphs.py103# ============================================================================COMMENT
MEDIUM⚡tests/test_graphs.py187# ============================================================================COMMENT
MEDIUM⚡tests/test_graphs.py189# ============================================================================COMMENT
MEDIUM⚡tests/test_graphs.py306# ============================================================================COMMENT
MEDIUM⚡tests/test_graphs.py308# ============================================================================COMMENT
MEDIUMtests/test_graphs.py606# ============================================================================COMMENT
MEDIUMtests/test_graphs.py608# ============================================================================COMMENT
MEDIUM⚡tests/test_chunking.py46# ============================================================================COMMENT
MEDIUM⚡tests/test_chunking.py48# ============================================================================COMMENT
MEDIUM⚡tests/test_chunking.py107# ============================================================================COMMENT
MEDIUM⚡tests/test_chunking.py109# ============================================================================COMMENT
MEDIUM⚡tests/test_chunking.py197# ============================================================================COMMENT
MEDIUM⚡tests/test_chunking.py199# ============================================================================COMMENT
MEDIUM⚡tests/test_chunking.py239# ============================================================================COMMENT
MEDIUM⚡tests/test_chunking.py241# ============================================================================COMMENT
MEDIUM⚡tests/test_embedding.py26# ============================================================================COMMENT
MEDIUM⚡tests/test_embedding.py28# ============================================================================COMMENT
MEDIUMtests/test_embedding.py114# ============================================================================COMMENT
MEDIUMtests/test_embedding.py116# ============================================================================COMMENT
MEDIUMtests/test_embedding.py161# ============================================================================COMMENT
MEDIUMtests/test_embedding.py163# ============================================================================COMMENT
MEDIUMtests/test_embedding.py334# ============================================================================COMMENT
MEDIUMtests/test_embedding.py336# ============================================================================COMMENT
MEDIUM⚡tests/test_domain.py32# ============================================================================COMMENT
MEDIUM⚡tests/test_domain.py34# ============================================================================COMMENT
MEDIUM⚡tests/test_domain.py63# ============================================================================COMMENT
MEDIUM⚡tests/test_domain.py65# ============================================================================COMMENT
MEDIUM⚡tests/test_domain.py81# ============================================================================COMMENT
MEDIUM⚡tests/test_domain.py83# ============================================================================COMMENT
MEDIUM⚡tests/test_domain.py264# ============================================================================COMMENT
MEDIUM⚡tests/test_domain.py266# ============================================================================COMMENT
MEDIUM⚡tests/test_domain.py402# ============================================================================COMMENT
MEDIUM⚡tests/test_domain.py404# ============================================================================COMMENT
MEDIUM⚡tests/test_domain.py442# ============================================================================COMMENT
MEDIUM⚡tests/test_domain.py444# ============================================================================COMMENT
52 more matches not shown…
Excessive Try-Catch Wrapping287 hits · 278 pts
SeverityFileLineSnippetContext
LOWopen_notebook/AGENTS.md34 except Exception as e:CODE
LOWopen_notebook/database/async_migrate.py47 except Exception as e:CODE
LOWopen_notebook/database/async_migrate.py235 except Exception as e:CODE
LOWopen_notebook/database/async_migrate.py250 except Exception:CODE
LOWopen_notebook/database/async_migrate.py260 except Exception:CODE
LOWopen_notebook/database/repository.py118 except Exception as e:CODE
LOWopen_notebook/database/repository.py139 except Exception as e:CODE
LOWopen_notebook/database/repository.py206 except Exception as e:CODE
LOWopen_notebook/database/repository.py216 except Exception as e:CODE
LOWopen_notebook/database/repository.py258 except Exception as e:CODE
LOWopen_notebook/utils/runtime_capabilities.py34 except Exception:CODE
LOW⚡open_notebook/utils/runtime_capabilities.py50 except Exception:CODE
LOWopen_notebook/utils/chunking.py191 except Exception:CODE
LOWopen_notebook/utils/encryption.py57 except Exception as e:CODE
LOWopen_notebook/utils/encryption.py247 except Exception:CODE
LOWopen_notebook/utils/encryption.py278 except Exception as e:CODE
LOWopen_notebook/utils/encryption.py293 except Exception as e:CODE
LOWopen_notebook/utils/embedding.py179 except Exception as e:CODE
LOWopen_notebook/utils/context_builder.py293 except Exception:CODE
LOWopen_notebook/utils/context_builder.py304 except Exception as e:CODE
LOWopen_notebook/utils/context_builder.py322 except Exception as e:CODE
LOWopen_notebook/utils/context_builder.py332 except Exception as e:CODE
LOWopen_notebook/utils/context_builder.py345 except Exception as e:CODE
LOWopen_notebook/utils/context_builder.py355 except Exception as e:CODE
LOWopen_notebook/utils/context_builder.py510 except Exception as e:CODE
LOWopen_notebook/utils/url_validation.py111 except Exception:CODE
LOW⚡open_notebook/utils/graph_utils.py19 except Exception as e:CODE
LOWopen_notebook/utils/graph_utils.py40 except Exception:CODE
LOWopen_notebook/utils/graph_utils.py57 except Exception:CODE
LOWopen_notebook/podcasts/models.py262 except Exception:CODE
LOWopen_notebook/podcasts/models.py280 except Exception:CODE
LOWopen_notebook/podcasts/models.py313 except Exception as e:CODE
LOWopen_notebook/ai/models.py125 except Exception as e:CODE
LOWopen_notebook/ai/models.py158 except Exception:CODE
LOWopen_notebook/ai/models.py212 except Exception:CODE
LOWopen_notebook/ai/connection_tester.py154 except Exception as e:CODE
LOWopen_notebook/ai/connection_tester.py204 except Exception as e:CODE
LOWopen_notebook/ai/connection_tester.py260 except Exception as e:CODE
LOWopen_notebook/ai/connection_tester.py318 except Exception as e:CODE
LOWopen_notebook/ai/connection_tester.py567 except Exception:CODE
LOWopen_notebook/ai/connection_tester.py605 except Exception as e:CODE
LOWopen_notebook/ai/key_provider.py104 except Exception as e:CODE
LOW⚡open_notebook/ai/model_discovery.py915 except Exception as e:CODE
LOW⚡open_notebook/ai/model_discovery.py1013 except Exception as e:CODE
LOWopen_notebook/ai/model_discovery.py357 except Exception as e:CODE
LOWopen_notebook/ai/model_discovery.py434 except Exception as e:CODE
LOWopen_notebook/ai/model_discovery.py486 except Exception as e:CODE
LOWopen_notebook/ai/model_discovery.py526 except Exception as e:CODE
LOWopen_notebook/ai/model_discovery.py703 except Exception as e:CODE
LOWopen_notebook/ai/model_discovery.py739 except Exception as e:CODE
LOWopen_notebook/ai/model_discovery.py787 except Exception as e:CODE
LOWopen_notebook/ai/model_discovery.py804 except Exception as e:CODE
LOWopen_notebook/ai/model_discovery.py850 except Exception as e:CODE
LOWopen_notebook/ai/model_discovery.py877 except Exception as e:CODE
LOWopen_notebook/ai/model_discovery.py1037 except Exception as e:CODE
LOWopen_notebook/graphs/transformation.py102 except Exception as e:CODE
LOWopen_notebook/graphs/ask.py107 except Exception as e:CODE
LOWopen_notebook/graphs/ask.py164 except Exception as e:CODE
LOWopen_notebook/graphs/ask.py189 except Exception as e:CODE
LOWopen_notebook/graphs/source_chat.py64 except Exception as e:CODE
227 more matches not shown…
Structural Annotation Overuse54 hits · 101 pts
SeverityFileLineSnippetContext
LOW⚡README.md105### Step 1: Download docker-compose.ymlCOMMENT
LOW⚡README.md113### Step 2: Set your encryption keyCOMMENT
LOW⚡README.md122### Step 3: Start servicesCOMMENT
LOW⚡README.md129### Step 4: Connect an AI providerCOMMENT
LOW⚡frontend/src/lib/utils/source-references.tsx180 // Step 1: Find ALL references using simple greedy pattern.COMMENT
LOW⚡frontend/src/lib/utils/source-references.tsx210 // Step 2: Process references from end to start (to preserve indices)COMMENT
LOW⚡frontend/src/lib/utils/source-references.tsx218 // Step 3: Analyze context around the referenceCOMMENT
LOW⚡frontend/src/lib/utils/source-references.tsx258 // Step 4: Build the markdown linkCOMMENT
LOW⚡frontend/src/lib/utils/source-references.tsx262 // Step 5: Replace in the result stringCOMMENT
LOW⚡frontend/src/lib/utils/source-references.tsx349 // Step 1: Parse all references using existing functionCOMMENT
LOW⚡frontend/src/lib/utils/source-references.tsx352 // Step 2: If no references found, return original textCOMMENT
LOW⚡frontend/src/lib/utils/source-references.tsx357 // Step 3: Build reference map (deduplicate and assign numbers)COMMENT
LOW⚡frontend/src/lib/utils/source-references.tsx408 // Step 5: Build reference listCOMMENT
LOW⚡frontend/src/lib/utils/source-references.tsx417 // Step 6: Append reference list to resultCOMMENT
LOWfrontend/src/lib/utils/source-references.tsx372 // Step 4: Replace references with numbered citations (process from end to start)COMMENT
LOW.claude/agents/harness-qa.md31## Step 0: Static Checks Gate (MANDATORY)COMMENT
LOW.claude/agents/harness-qa.md43## Step 1: Understand What to TestCOMMENT
LOW.claude/agents/harness-qa.md53## Step 2: Choose the Right Testing ApproachCOMMENT
LOW.claude/agents/harness-qa.md119## Step 3: Write Your VerdictCOMMENT
LOW.claude/agents/harness-qa.md136## Step 4: Update .harness/feature_list.jsonCOMMENT
LOW.claude/agents/harness-qa.md142## Step 5: SummaryCOMMENT
LOW⚡.claude/agents/smoke-e2e.md212# Step 1: Create sessionCOMMENT
LOW⚡.claude/agents/smoke-e2e.md221# Step 2: Build context for the notebookCOMMENT
LOW⚡.claude/agents/smoke-e2e.md230# Step 3: Send message with contextCOMMENT
LOWdocs/0-START-HERE/quick-start-local.md13## Step 1: Download and configure (1 min)COMMENT
LOWdocs/0-START-HERE/quick-start-local.md27## Step 2: Add the Ollama service (1 min)COMMENT
LOWdocs/0-START-HERE/quick-start-local.md42## Step 3: Start (1 min)COMMENT
LOWdocs/0-START-HERE/quick-start-local.md48## Step 4: Download models (2-5 min)COMMENT
LOWdocs/0-START-HERE/quick-start-local.md61## Step 5: Connect Ollama and chat (3 min)COMMENT
LOWdocs/0-START-HERE/quick-start-cloud.md20## Step 1: Download and configure (1 min)COMMENT
LOWdocs/0-START-HERE/quick-start-cloud.md34## Step 2: Start (1 min)COMMENT
LOWdocs/0-START-HERE/quick-start-cloud.md42## Step 3: Connect your provider and chat (3 min)COMMENT
LOWdocs/0-START-HERE/quick-start-external-ollama.md12## Step 1: Download models (2-5 min)COMMENT
LOWdocs/0-START-HERE/quick-start-external-ollama.md23## Step 2: Let containers reach OllamaCOMMENT
LOWdocs/0-START-HERE/quick-start-external-ollama.md50## Step 3: Download and configure Open Notebook (1 min)COMMENT
LOWdocs/0-START-HERE/quick-start-external-ollama.md73## Step 4: Start (1 min)COMMENT
LOWdocs/0-START-HERE/quick-start-external-ollama.md79## Step 5: Connect Ollama and chat (3 min)COMMENT
LOWdocs/1-INSTALLATION/docker-compose.md22## Step 1: Download the compose fileCOMMENT
LOWdocs/1-INSTALLATION/docker-compose.md34## Step 2: Set your encryption keyCOMMENT
LOWdocs/1-INSTALLATION/docker-compose.md56## Step 3: Decide who can reach itCOMMENT
LOWdocs/1-INSTALLATION/docker-compose.md65## Step 4: Start Open NotebookCOMMENT
LOWdocs/1-INSTALLATION/docker-compose.md84## Step 5: Open the UI and connect a providerCOMMENT
LOW⚡docs/3-USER-GUIDE/adding-sources.md11### Step 1: Add SourceCOMMENT
LOW⚡docs/3-USER-GUIDE/adding-sources.md21### Step 2: NotebooksCOMMENT
LOW⚡docs/3-USER-GUIDE/adding-sources.md25### Step 3: ProcessCOMMENT
LOW.codex/agents/harness-qa.toml24## Step 0: Static Checks Gate (MANDATORY)COMMENT
LOW⚡.codex/agents/harness-qa.toml36## Step 1: Understand What to TestCOMMENT
LOW⚡.codex/agents/harness-qa.toml46## Step 2: Choose the Right Testing ApproachCOMMENT
LOW⚡.codex/agents/harness-qa.toml112## Step 3: Write Your VerdictCOMMENT
LOW⚡.codex/agents/harness-qa.toml129## Step 4: Update .harness/feature_list.jsonCOMMENT
LOW⚡.codex/agents/harness-qa.toml135## Step 5: SummaryCOMMENT
LOW⚡.codex/agents/smoke-e2e.toml205# Step 1: Create sessionCOMMENT
LOW⚡.codex/agents/smoke-e2e.toml214# Step 2: Build context for the notebookCOMMENT
LOW⚡.codex/agents/smoke-e2e.toml223# Step 3: Send message with contextCOMMENT
Empty Error Handlers11 hits · 55 pts
SeverityFileLineSnippetContext
HIGHopen_notebook/utils/encryption.py220except ValueError:CODE
HIGHopen_notebook/utils/url_validation.py103except socket.gaierror:CODE
HIGHopen_notebook/ai/connection_tester.py567except Exception:CODE
HIGHapi/middleware.py74except ValueError:CODE
HIGHapi/routers/models.py124except Exception:CODE
HIGHapi/routers/sources.py423except Exception:CODE
HIGHapi/routers/sources.py552except Exception:CODE
HIGHapi/routers/sources.py560except Exception:CODE
HIGHapi/routers/sources.py615except Exception:CODE
HIGHapi/routers/languages.py79except Exception:CODE
HIGHapi/routers/languages.py62except Exception:CODE
Modern AI Meta-Vocabulary15 hits · 44 pts
SeverityFileLineSnippetContext
MEDIUM⚡open_notebook/domain/notebook.py872 # Both search paths failed (e.g. no embedding model configured).COMMENT
MEDIUMopen_notebook/domain/credential.py79 # Ollama-only: overrides the context window (num_ctx). Esperanto defaults toCOMMENT
MEDIUMopen_notebook/domain/credential.py80 # 8192; raise this if your hardware can handle a larger context window.COMMENT
MEDIUMtests/test_crud_404.py138 mock_embed_model.return_value = MagicMock() # an embedding model is configuredCODE
MEDIUMdocs/2-CORE-CONCEPTS/index.md14### 2. [AI Context & RAG](ai-context-rag.md)COMMENT
MEDIUMdocs/2-CORE-CONCEPTS/ai-context-rag.md1# AI Context & RAG - How Open Notebook Uses Your ResearchCOMMENT
MEDIUMdocs/5-CONFIGURATION/ollama.md19# An embedding model (needed for search, Ask and embeddings)COMMENT
MEDIUMdocs/5-CONFIGURATION/ollama.md44Follow [Connect a provider](../4-AI-PROVIDERS/index.md#connect-a-provider) and pick **Ollama**. No API key is needed; seCODE
MEDIUMdocs/6-TROUBLESHOOTING/faq.md49### What happens if I change the embedding model?COMMENT
MEDIUMdocs/6-TROUBLESHOOTING/processing-issues.md91### "This feature requires an embedding model. Please configure one in the Models section."COMMENT
MEDIUMapi/routers/embedding.py20 # Check if embedding model is availableCOMMENT
MEDIUMapi/routers/search.py32 # Check if embedding model is available for vector searchCOMMENT
MEDIUMapi/routers/search.py169 # Check if embedding model is availableCOMMENT
MEDIUMapi/routers/search.py231 # Check if embedding model is availableCOMMENT
MEDIUMcommands/embedding_commands.py664 # Check embedding model availability (fail fast)COMMENT
Verbosity Indicators20 hits · 43 pts
SeverityFileLineSnippetContext
LOW⚡frontend/src/lib/utils/source-references.tsx180 // Step 1: Find ALL references using simple greedy pattern.COMMENT
LOW⚡frontend/src/lib/utils/source-references.tsx210 // Step 2: Process references from end to start (to preserve indices)COMMENT
LOW⚡frontend/src/lib/utils/source-references.tsx218 // Step 3: Analyze context around the referenceCOMMENT
LOW⚡frontend/src/lib/utils/source-references.tsx258 // Step 4: Build the markdown linkCOMMENT
LOW⚡frontend/src/lib/utils/source-references.tsx262 // Step 5: Replace in the result stringCOMMENT
LOW⚡frontend/src/lib/utils/source-references.tsx349 // Step 1: Parse all references using existing functionCOMMENT
LOW⚡frontend/src/lib/utils/source-references.tsx352 // Step 2: If no references found, return original textCOMMENT
LOW⚡frontend/src/lib/utils/source-references.tsx357 // Step 3: Build reference map (deduplicate and assign numbers)COMMENT
LOW⚡frontend/src/lib/utils/source-references.tsx408 // Step 5: Build reference listCOMMENT
LOW⚡frontend/src/lib/utils/source-references.tsx417 // Step 6: Append reference list to resultCOMMENT
LOWfrontend/src/lib/utils/source-references.tsx372 // Step 4: Replace references with numbered citations (process from end to start)COMMENT
LOW.codex/agents/harness-qa.toml24## Step 0: Static Checks Gate (MANDATORY)COMMENT
LOW⚡.codex/agents/harness-qa.toml36## Step 1: Understand What to TestCOMMENT
LOW⚡.codex/agents/harness-qa.toml46## Step 2: Choose the Right Testing ApproachCOMMENT
LOW⚡.codex/agents/harness-qa.toml112## Step 3: Write Your VerdictCOMMENT
LOW⚡.codex/agents/harness-qa.toml129## Step 4: Update .harness/feature_list.jsonCOMMENT
LOW⚡.codex/agents/harness-qa.toml135## Step 5: SummaryCOMMENT
LOW⚡.codex/agents/smoke-e2e.toml205# Step 1: Create sessionCOMMENT
LOW⚡.codex/agents/smoke-e2e.toml214# Step 2: Build context for the notebookCOMMENT
LOW⚡.codex/agents/smoke-e2e.toml223# Step 3: Send message with contextCOMMENT
Unused Imports43 hits · 40 pts
SeverityFileLineSnippetContext
LOWopen_notebook/utils/ssl_config.py9CODE
LOWopen_notebook/utils/context_builder.py17CODE
LOWopen_notebook/utils/__init__.py12CODE
LOWopen_notebook/utils/__init__.py12CODE
LOWopen_notebook/utils/__init__.py12CODE
LOWopen_notebook/utils/__init__.py12CODE
LOWopen_notebook/utils/__init__.py12CODE
LOWopen_notebook/utils/__init__.py12CODE
LOWopen_notebook/utils/__init__.py20CODE
LOWopen_notebook/utils/__init__.py20CODE
LOWopen_notebook/utils/__init__.py20CODE
LOWopen_notebook/utils/__init__.py25CODE
LOWopen_notebook/utils/__init__.py25CODE
LOWopen_notebook/utils/__init__.py29CODE
LOWopen_notebook/utils/__init__.py30CODE
LOWopen_notebook/utils/__init__.py30CODE
LOWopen_notebook/utils/__init__.py30CODE
LOWopen_notebook/utils/__init__.py30CODE
LOWopen_notebook/utils/__init__.py36CODE
LOWopen_notebook/utils/__init__.py36CODE
LOWopen_notebook/utils/__init__.py37CODE
LOWopen_notebook/utils/__init__.py37CODE
LOWopen_notebook/utils/__init__.py37CODE
LOWtests/test_source_deleted_before_processing.py15CODE
LOWtests/test_content_core_errors.py146CODE
LOWtests/test_content_core_integration.py18CODE
LOWtests/test_transformation_output.py11CODE
LOWtests/test_podcast_legacy_field_removal.py111CODE
LOWtests/test_context_length_no_retry.py22CODE
LOWtests/test_background_retry_visibility.py8CODE
LOWapi/command_service.py22CODE
LOWapi/podcast_service.py91CODE
LOWapi/routers/embedding.py43CODE
LOWapi/routers/sources.py511CODE
LOWapi/routers/sources.py576CODE
LOWapi/routers/sources.py1000CODE
LOWapi/routers/embedding_rebuild.py35CODE
LOWcommands/__init__.py11CODE
LOWcommands/__init__.py11CODE
LOWcommands/__init__.py11CODE
LOWcommands/__init__.py11CODE
LOWcommands/__init__.py17CODE
LOWcommands/__init__.py18CODE
Docstring Block Structure8 hits · 40 pts
SeverityFileLineSnippetContext
HIGHopen_notebook/utils/version_utils.py63 Fetch and parse the version from pyproject.toml in a public GitHub repository. Args: repo_url (str): USTRING
HIGHopen_notebook/utils/version_utils.py117 Get the version of an installed package. Args: package_name (str): Name of the installed package STRING
HIGHopen_notebook/utils/encryption.py199 Encrypt a string value using Fernet symmetric encryption (PBKDF2 scheme). The stored form carries the version STRING
HIGHopen_notebook/utils/encryption.py252 Decrypt a Fernet-encrypted string value. Version-marked values decrypt under PBKDF2 only; any failure raises aSTRING
HIGHopen_notebook/utils/embedding.py51 Combine multiple embeddings into a single embedding using mean pooling. Algorithm: 1. Normalize each embedSTRING
HIGHopen_notebook/utils/embedding.py109 Generate embeddings for multiple texts with automatic batching and retry. Texts are split into batches of EMBESTRING
HIGHopen_notebook/utils/embedding.py212 Generate a single embedding for text, handling large content via chunking and mean pooling. For short text (<=STRING
HIGHopen_notebook/domain/notebook.py585 Submit insight creation as an async command (fire-and-forget). Submits a create_insight command that hSTRING
Deep Nesting46 hits · 38 pts
SeverityFileLineSnippetContext
LOWopen_notebook/database/repository.py221CODE
LOWopen_notebook/utils/encryption.py31CODE
LOWopen_notebook/utils/text_utils.py128CODE
LOWopen_notebook/utils/embedding.py106CODE
LOWopen_notebook/utils/context_builder.py42CODE
LOWopen_notebook/utils/context_builder.py262CODE
LOWopen_notebook/utils/context_builder.py362CODE
LOWopen_notebook/ai/models.py205CODE
LOWopen_notebook/ai/models.py329CODE
LOWopen_notebook/ai/connection_tester.py89CODE
LOWopen_notebook/ai/connection_tester.py158CODE
LOWopen_notebook/ai/connection_tester.py208CODE
LOWopen_notebook/ai/connection_tester.py264CODE
LOWopen_notebook/ai/connection_tester.py508CODE
LOWopen_notebook/ai/key_provider.py286CODE
LOWopen_notebook/ai/model_discovery.py450CODE
LOWopen_notebook/domain/provider_config.py198CODE
LOWopen_notebook/domain/notebook.py74CODE
LOWopen_notebook/domain/notebook.py215CODE
LOWopen_notebook/domain/credential.py176CODE
LOWopen_notebook/domain/base.py40CODE
LOWopen_notebook/domain/base.py154CODE
LOWopen_notebook/domain/base.py290CODE
LOWtests/test_max_body_size_middleware.py84CODE
LOWapi/credentials_service.py127CODE
LOWapi/credentials_service.py256CODE
LOWapi/credentials_service.py406CODE
LOWapi/credentials_service.py797CODE
LOWapi/credentials_service.py905CODE
LOWapi/credentials_service.py1119CODE
LOWapi/routers/models.py388CODE
LOWapi/routers/models.py708CODE
LOWapi/routers/transformations.py210CODE
LOWapi/routers/embedding.py17CODE
LOWapi/routers/credentials.py321CODE
LOWapi/routers/podcasts.py174CODE
LOWapi/routers/source_chat.py140CODE
LOWapi/routers/sources.py258CODE
LOWapi/routers/sources.py427CODE
LOWapi/routers/sources.py844CODE
LOWapi/routers/sources.py935CODE
LOWapi/routers/embedding_rebuild.py20CODE
LOWapi/routers/search.py77CODE
LOWapi/routers/languages.py38CODE
LOWapi/routers/commands.py134CODE
LOWcommands/podcast_commands.py121CODE
Cross-File Repetition7 hits · 35 pts
SeverityFileLineSnippetContext
HIGHtests/test_search_api.py0create test client after environment variables have been cleared by conftest.STRING
HIGHtests/test_recently_viewed_api.py0create test client after environment variables have been cleared by conftest.STRING
HIGHtests/test_sources_api.py0create test client after environment variables have been cleared by conftest.STRING
HIGHtests/test_models_api.py0create test client after environment variables have been cleared by conftest.STRING
HIGHtests/test_credentials_api.py0create test client after environment variables have been cleared by conftest.STRING
HIGHtests/test_notes_api.py0create test client after environment variables have been cleared by conftest.STRING
HIGHtests/test_insight_timestamps.py0create test client after environment variables have been cleared by conftest.STRING
Synthetic Comment Markers4 hits · 30 pts
SeverityFileLineSnippetContext
HIGHfrontend/src/components/ui/markdown-editor.tsx24// (e.g. pasted content, or an AI-generated note echoing an indirect promptCOMMENT
HIGHfrontend/src/components/ui/markdown-editor.test.tsx19// default). Notes can hold AI-generated content that echoes an indirectCOMMENT
HIGHfrontend/src/components/ui/markdown-editor.test.tsx173 // its symbol table. AI-generated content routinely has one inside aCOMMENT
HIGHfrontend/src/lib/utils/katex-options.ts3// AI-generated content often contains Unicode punctuation (en/em dashes,COMMENT
Over-Commented Block28 hits · 28 pts
SeverityFileLineSnippetContext
LOWcubic.yaml1# yaml-language-server: $schema=https://cubic.dev/schema/cubic-repository-config.schema.jsonCOMMENT
LOW.pre-commit-config.yaml21 # ── Ruff: Python lint & format (mirrors CI backend-lint job) ──────COMMENT
LOWdocker-compose.yml1services:COMMENT
LOWdocker-compose.yml41 - SURREAL_PASSWORD=${SURREAL_PASSWORD:-root}COMMENT
LOWfrontend/src/components/ui/markdown-editor.tsx21// app/layout.tsx.COMMENT
LOWfrontend/src/components/sources/SourceCard.tsx121 onContextModeChangeCOMMENT
LOWfrontend/src/lib/utils/katex-options.ts1import type { KatexOptions } from 'katex'COMMENT
LOWopen_notebook/config.py21COMMENT
LOWopen_notebook/podcasts/__init__.py1# Podcasts moduleCOMMENT
LOWopen_notebook/ai/__init__.py1# AI infrastructure moduleCOMMENT
LOWopen_notebook/ai/connection_tester.py61# Test models for each provider - uses minimal/cheapest models for testing.COMMENT
LOWexamples/docker-compose-speaches.yml1# Docker Compose with Speaches (Local TTS/STT)COMMENT
LOWexamples/docker-compose-speaches.yml81# For TTS (Text-to-Speech):COMMENT
LOWexamples/docker-compose-speaches.yml101# 6. Add TTS Model:COMMENT
LOWexamples/docker-compose-speaches.yml121# Test STT:COMMENT
LOWexamples/docker-compose-ollama.yml1# Docker Compose with Ollama (Free Local AI)COMMENT
LOWexamples/docker-compose-full-local.yml1# Docker Compose - 100% Local AI SetupCOMMENT
LOWexamples/docker-compose-full-local.yml101 hf-hub-cache:COMMENT
LOWexamples/docker-compose-full-local.yml121#COMMENT
LOWexamples/docker-compose-full-local.yml141# 3. Discover Speech Models:COMMENT
LOWexamples/docker-compose-full-local.yml161# For TTS:COMMENT
LOWexamples/docker-compose-full-local.yml181# - 50 GB disk spaceCOMMENT
LOWexamples/docker-compose-single.yml21 # Access:COMMENT
LOWscripts/docker-entrypoint.sh1#!/bin/shCOMMENT
LOWscripts/release-test/rc-stack.sh1#!/bin/bashCOMMENT
LOWscripts/release-test/release-image-test.sh1#!/bin/bashCOMMENT
LOWapi/main.py261#COMMENT
LOWcommands/podcast_commands.py341 transcript=None,COMMENT
Redundant / Tautological Comments15 hits · 25 pts
SeverityFileLineSnippetContext
LOWopen_notebook/utils/embedding.py242 # Check if chunking is neededCOMMENT
LOW⚡open_notebook/ai/model_discovery.py1020 # Check if model already exists using pre-fetched dataCOMMENT
LOW.github/workflows/build-dev.yml66 # Check if this is a push to main (not a PR)COMMENT
LOWapi/credentials_service.py823 # Check if a credential already exists for this provider with same nameCOMMENT
LOW⚡api/podcast_service.py167 # Check if profiles already existCOMMENT
LOW⚡api/podcast_service.py188 # Check if profiles already existCOMMENT
LOWapi/routers/config.py53 # Check if cache is still valid (within TTL)COMMENT
LOWapi/routers/embedding.py20 # Check if embedding model is availableCOMMENT
LOWapi/routers/sources.py852 # Check if this is a legacy source (no command)COMMENT
LOWapi/routers/sources.py943 # Check if source already has a running commandCOMMENT
LOWapi/routers/sources.py990 # Check if it's a text source by trying to get full_textCOMMENT
LOWapi/routers/search.py32 # Check if embedding model is available for vector searchCOMMENT
LOWapi/routers/search.py169 # Check if embedding model is availableCOMMENT
LOWapi/routers/search.py231 # Check if embedding model is availableCOMMENT
LOWapi/routers/notebooks.py352 # Check if reference already exists (idempotency)COMMENT
Self-Referential Comments6 hits · 20 pts
SeverityFileLineSnippetContext
MEDIUM⚡open_notebook/ai/model_discovery.py1009 # Create a set of (name, type) tuples for O(1) lookupCOMMENT
MEDIUMopen_notebook/graphs/source_chat.py228# Create the StateGraphCOMMENT
MEDIUMopen_notebook/graphs/source.py360# Define the graph edgesCOMMENT
MEDIUMopen_notebook/domain/credential.py193 # Create a minimal credential with error info from raw DB fieldsCOMMENT
MEDIUMtests/test_domain.py290 # Create a temporary fileCOMMENT
MEDIUMcommands/podcast_commands.py330 # Create the record for the episode and associate with the ongoing commandCOMMENT
Cross-Language Confusion3 hits · 19 pts
SeverityFileLineSnippetContext
HIGH⚡tests/test_podcast_prompt_templates.py252 under Jinja's default undefined, putting an invalid example in theSTRING
HIGHapi/routers/transformations.py224 # An explicit "" (or null) clears the description; only an absentCOMMENT
HIGHapi/routers/notebooks.py287 # An explicit "" (or null) clears the description; only an absentCOMMENT
AI Slop Vocabulary4 hits · 15 pts
SeverityFileLineSnippetContext
MEDIUMfrontend/src/lib/api/source-chat.ts54 // Use relative URL to leverage Next.js rewritesCOMMENT
MEDIUMfrontend/src/lib/api/search.ts17 // Use relative URL to leverage Next.js rewritesCOMMENT
MEDIUM⚡.codex/agents/harness-qa.toml119## Feature: "[description from .harness/feature_list.json]"COMMENT
MEDIUM⚡.codex/agents/harness-qa.toml129## Step 4: Update .harness/feature_list.jsonCOMMENT
Example Usage Blocks4 hits · 6 pts
SeverityFileLineSnippetContext
LOWexamples/docker-compose-speaches.yml13# Usage:COMMENT
LOWexamples/docker-compose-ollama.yml6# Usage:COMMENT
LOWexamples/docker-compose-full-local.yml16# Usage:COMMENT
LOWscripts/release-test/rc-stack.sh6# Usage:COMMENT
Magic Placeholder Names1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHdocs/6-TROUBLESHOOTING/index.md24| "Authentication failed. Please check your API key…" | [AI & Chat Issues](ai-chat-issues.md#authentication-failed-pleasCODE
Modern Structural Boilerplate3 hits · 3 pts
SeverityFileLineSnippetContext
LOWopen_notebook/utils/__init__.py43__all__ = [CODE
LOWscripts/export_docs.py18logger = logging.getLogger(__name__)CODE
LOWcommands/__init__.py20__all__ = [CODE
AI Structural Patterns3 hits · 2 pts
SeverityFileLineSnippetContext
LOWopen_notebook/domain/provider_config.py51CODE
LOWapi/auth.py82CODE
LOWapi/routers/sources.py186CODE