Bonsai Demo
This report presents the forensic synthetic code analysis of PrismML-Eng/Bonsai-demo, a Shell project with 2,136 GitHub stars. SynthScan v2.0 examined 9,157 lines of code across 67 source files, recording 97 pattern matches distributed across 8 syntactic categories. The overall adjusted score of 20.2 places this repository in the Moderate AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 97 distinct pattern matches across 8 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | setup.sh | 151 | # ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | setup.sh | 153 | # ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | setup.sh | 157 | # ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | setup.sh | 159 | # ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | setup.sh | 243 | # ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | setup.sh | 245 | # ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | setup.sh | 254 | # ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | setup.sh | 256 | # ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | setup.sh | 261 | # ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | setup.sh | 263 | # ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | setup.sh | 267 | # ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | setup.sh | 269 | # ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM | setup.sh | 21 | # ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM | setup.sh | 23 | # ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM | setup.sh | 214 | # ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM | setup.sh | 216 | # ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM | setup.sh | 285 | # ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM | setup.sh | 287 | # ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM | setup.sh | 416 | # ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM | setup.sh | 418 | # ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM | scripts/openwebui/make_demo_db.py | 62 | # ── customers ──────────────────────────────────────────────────────────────── | STRING |
| MEDIUM | scripts/openwebui/make_demo_db.py | 83 | # ── orders ─────────────────────────────────────────────────────────────────── | STRING |
| MEDIUM | scripts/openwebui/make_demo_db.py | 116 | # ── support tickets (spike for anchors in May-June 2025: v3 firmware) ──────── | STRING |
| MEDIUM | .github/workflows/manual-platform-smoke.yml | 83 | # ────────────────────────────────────────── | COMMENT |
| MEDIUM | .github/workflows/manual-platform-smoke.yml | 85 | # ────────────────────────────────────────── | COMMENT |
| MEDIUM | .github/workflows/manual-platform-smoke.yml | 376 | # ────────────────────────────────────────── | COMMENT |
| MEDIUM | .github/workflows/manual-platform-smoke.yml | 378 | # ────────────────────────────────────────── | COMMENT |
| MEDIUM | .github/workflows/build-from-source-smoke.yml | 47 | # ────────────────────────────────────────── | COMMENT |
| MEDIUM | .github/workflows/build-from-source-smoke.yml | 49 | # ────────────────────────────────────────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_seed_openwebui.py | 30 | def test_model_disables_openwebui_citation_rewrite(self): | CODE |
| LOW | tests/test_seed_openwebui.py | 49 | def test_prompt_is_generic_bounded_and_date_aware(self): | CODE |
| LOW | tests/test_seed_openwebui.py | 72 | def test_repo_owned_code_tool_is_attached_when_jupyter_is_on(self): | CODE |
| LOW | tests/test_tool_web_fetch.py | 60 | def test_prefers_article_and_returns_source_metadata(self): | CODE |
| LOW | tests/test_tool_web_fetch.py | 94 | def test_navigation_only_page_is_rejected_and_does_not_consume_quota(self): | STRING |
| LOW⚡ | tests/test_tool_web_fetch.py | 106 | def test_unreadable_page_releases_slot_for_a_retry(self): | STRING |
| LOW⚡ | tests/test_tool_web_fetch.py | 116 | def test_quota_reservations_include_parallel_inflight_calls(self): | STRING |
| LOW⚡ | tests/test_tool_web_fetch.py | 125 | def test_binary_content_is_rejected_without_consuming_quota(self): | STRING |
| LOW | tests/test_tool_code_interpreter.py | 15 | def test_progress_only_stderr_is_clean_success(self): | CODE |
| LOW | tests/test_tool_code_interpreter.py | 24 | def test_traceback_without_result_is_compact_error(self): | CODE |
| LOW | tests/test_tool_code_interpreter.py | 42 | def test_traceback_with_image_is_partial_success(self): | CODE |
| LOW | tests/test_tool_code_interpreter.py | 53 | def test_tool_description_is_generic_and_allows_api_discovery(self): | CODE |
| LOW | tests/test_tool_code_interpreter.py | 63 | def test_generated_image_is_attached_with_native_compatible_file_event(self): | CODE |
| LOW | tests/test_tool_code_interpreter.py | 85 | def test_generated_image_has_model_fallback_without_event_emitter(self): | CODE |
| LOW⚡ | tests/test_tool_code_interpreter.py | 99 | def test_non_image_result_is_preserved(self): | CODE |
| LOW⚡ | tests/test_tool_code_interpreter.py | 105 | def test_unrelated_error_does_not_receive_yfinance_advice(self): | CODE |
| LOW⚡ | tests/test_tool_code_interpreter.py | 115 | def test_nonfatal_warning_is_preserved_without_marking_failure(self): | CODE |
| LOW | tests/test_tool_sql.py | 17 | def test_description_names_dialect_and_common_date_trap(self): | CODE |
| LOW⚡ | tests/test_tool_sql.py | 43 | def test_leading_line_and_block_comments_are_allowed(self): | CODE |
| LOW⚡ | tests/test_tool_sql.py | 52 | def test_large_detailed_results_are_withheld(self): | CODE |
| LOW⚡ | tests/test_tool_sql.py | 61 | def test_small_results_include_completeness_marker(self): | CODE |
| LOW | scripts/openwebui/tool_code_interpreter.py | 80 | def _extract_artifact_markdown(result: str) -> str: | CODE |
| LOW | scripts/openwebui/tool_sql.py | 15 | def _without_leading_comments(sql: str) -> str: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | OPENWEBUI.md | 1 | # Open WebUI: the full agentic demo | COMMENT |
| MEDIUM | README.md | 363 | ## Open WebUI (Optional): the full agentic demo | COMMENT |
| MEDIUM | README.md | 489 | ├── OPENWEBUI.md # Open WebUI agentic demo guide | CODE |
| MEDIUM | TOOLS.md | 58 | The built-in UI (http://localhost:8080) has an MCP client with an agentic loop. | CODE |
| MEDIUM | scripts/start_openwebui.sh | 320 | # generous-but-finite 30: enough for the agentic DB-analyst scenario | COMMENT |
| MEDIUM | scripts/start_llama_server.sh | 96 | # by default and lives on this standalone server, not the agentic Open WebUI | COMMENT |
| MEDIUM | scripts/openwebui/seed_openwebui.py | 221 | # RAG citation template after fetch_url calls. That conflicts with | COMMENT |
| MEDIUM | scripts/openwebui/seed_openwebui.py | 394 | # Hide backend helper models (e.g. mlx-vlm's embedding model) from the picker. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/common.sh | 262 | except Exception: | CODE |
| LOW | scripts/openwebui/tool_code_interpreter.py | 113 | except Exception: | CODE |
| LOW | scripts/openwebui/tool_code_interpreter.py | 212 | except Exception as exc: | CODE |
| LOW | scripts/openwebui/tool_sql.py | 81 | except Exception as e: | CODE |
| LOW | scripts/openwebui/tool_weather.py | 51 | except Exception as e: | CODE |
| LOW | scripts/openwebui/tool_web_fetch.py | 333 | except Exception as e: | CODE |
| LOW | scripts/openwebui/seed_openwebui.py | 129 | except Exception: | CODE |
| LOW | scripts/openwebui/seed_openwebui.py | 138 | except Exception: | CODE |
| LOW | scripts/openwebui/seed_openwebui.py | 154 | except Exception as e: | CODE |
| LOW | scripts/openwebui/seed_openwebui.py | 185 | except Exception as e2: | CODE |
| LOW | scripts/openwebui/seed_openwebui.py | 187 | except Exception as e: | CODE |
| LOW | scripts/openwebui/seed_openwebui.py | 257 | except Exception as e2: | CODE |
| LOW | scripts/openwebui/seed_openwebui.py | 259 | except Exception as e: | CODE |
| LOW | scripts/openwebui/seed_openwebui.py | 284 | except Exception: | CODE |
| LOW | scripts/openwebui/seed_openwebui.py | 298 | except Exception as e: | CODE |
| LOW | scripts/openwebui/seed_openwebui.py | 306 | except Exception: | CODE |
| LOW | scripts/openwebui/seed_openwebui.py | 319 | except Exception as e: | CODE |
| LOW | scripts/openwebui/seed_openwebui.py | 329 | except Exception as e: | CODE |
| LOW | scripts/openwebui/seed_openwebui.py | 341 | except Exception as e: | CODE |
| LOW | scripts/openwebui/seed_openwebui.py | 367 | except Exception as e: | CODE |
| LOW | scripts/openwebui/seed_openwebui.py | 408 | except Exception as e: # never fail the launcher | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/common.sh | 1 | #!/bin/sh | COMMENT |
| LOW | scripts/common.sh | 101 | # Check the GGUF model is downloaded; error out with a download hint if not. | COMMENT |
| LOW | scripts/start_openwebui.sh | 321 | # (multi-step query_database investigations run ~15-25 calls) without leaving a | COMMENT |
| LOW | scripts/make_kv_bias.sh | 1 | #!/bin/sh | COMMENT |
| LOW | scripts/download_models.sh | 1 | #!/bin/sh | COMMENT |
| LOW | scripts/build_cuda_linux.sh | 1 | #!/bin/bash | COMMENT |
| LOW | scripts/start_llama_server.sh | 81 | # 27B: --jinja enables native OpenAI-style tool calling; --mmproj enables | COMMENT |
| LOW | scripts/openwebui/seed_openwebui.py | 221 | # RAG citation template after fetch_url calls. That conflicts with | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | setup.sh | 5 | # Usage: | COMMENT |
| LOW | scripts/make_kv_bias.sh | 7 | # Usage: | COMMENT |
| LOW | scripts/download_models.sh | 4 | # Usage: | COMMENT |
| LOW | scripts/build_cuda_linux.sh | 6 | # Usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/common.sh | 6 | # Set BONSAI_MODEL to choose size: 27B (default), 8B, 4B, 1.7B, or all | COMMENT |
| LOW | scripts/common.sh | 7 | # Set BONSAI_FAMILY to choose family: ternary (default), bonsai (1-bit), or all | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/openwebui/tool_web_fetch.py | 257 | CODE | |
| LOW | scripts/openwebui/tool_web_fetch.py | 279 | CODE |