Repository Analysis

PrismML-Eng/Bonsai-demo

Bonsai Demo

20.2 Moderate AI signal View on GitHub

Analysis Overview

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).

20.2
Adjusted Score
20.2
Raw Score
100%
Time Factor
2026-07-30
Last Push
2.1K
Stars
Shell
Language
9.2K
Lines of Code
67
Files
97
Pattern Hits
2026-08-02
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

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.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

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.

CRITICAL 0HIGH 0MEDIUM 37LOW 60

Directory Score Breakdown

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.

Pattern Findings

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.

Decorative Section Separators29 hits · 99 pts
SeverityFileLineSnippetContext
MEDIUMsetup.sh151# ────────────────────────────────────────────────────COMMENT
MEDIUMsetup.sh153# ────────────────────────────────────────────────────COMMENT
MEDIUMsetup.sh157# ────────────────────────────────────────────────────COMMENT
MEDIUMsetup.sh159# ────────────────────────────────────────────────────COMMENT
MEDIUMsetup.sh243# ────────────────────────────────────────────────────COMMENT
MEDIUMsetup.sh245# ────────────────────────────────────────────────────COMMENT
MEDIUMsetup.sh254# ────────────────────────────────────────────────────COMMENT
MEDIUMsetup.sh256# ────────────────────────────────────────────────────COMMENT
MEDIUMsetup.sh261# ────────────────────────────────────────────────────COMMENT
MEDIUMsetup.sh263# ────────────────────────────────────────────────────COMMENT
MEDIUMsetup.sh267# ────────────────────────────────────────────────────COMMENT
MEDIUMsetup.sh269# ────────────────────────────────────────────────────COMMENT
MEDIUMsetup.sh21# ────────────────────────────────────────────────────COMMENT
MEDIUMsetup.sh23# ────────────────────────────────────────────────────COMMENT
MEDIUMsetup.sh214# ────────────────────────────────────────────────────COMMENT
MEDIUMsetup.sh216# ────────────────────────────────────────────────────COMMENT
MEDIUMsetup.sh285# ────────────────────────────────────────────────────COMMENT
MEDIUMsetup.sh287# ────────────────────────────────────────────────────COMMENT
MEDIUMsetup.sh416# ────────────────────────────────────────────────────COMMENT
MEDIUMsetup.sh418# ────────────────────────────────────────────────────COMMENT
MEDIUMscripts/openwebui/make_demo_db.py62# ── customers ────────────────────────────────────────────────────────────────STRING
MEDIUMscripts/openwebui/make_demo_db.py83# ── orders ───────────────────────────────────────────────────────────────────STRING
MEDIUMscripts/openwebui/make_demo_db.py116# ── support tickets (spike for anchors in May-June 2025: v3 firmware) ────────STRING
MEDIUM.github/workflows/manual-platform-smoke.yml83 # ──────────────────────────────────────────COMMENT
MEDIUM.github/workflows/manual-platform-smoke.yml85 # ──────────────────────────────────────────COMMENT
MEDIUM.github/workflows/manual-platform-smoke.yml376 # ──────────────────────────────────────────COMMENT
MEDIUM.github/workflows/manual-platform-smoke.yml378 # ──────────────────────────────────────────COMMENT
MEDIUM.github/workflows/build-from-source-smoke.yml47 # ──────────────────────────────────────────COMMENT
MEDIUM.github/workflows/build-from-source-smoke.yml49 # ──────────────────────────────────────────COMMENT
Hyper-Verbose Identifiers23 hits · 25 pts
SeverityFileLineSnippetContext
LOWtests/test_seed_openwebui.py30 def test_model_disables_openwebui_citation_rewrite(self):CODE
LOWtests/test_seed_openwebui.py49 def test_prompt_is_generic_bounded_and_date_aware(self):CODE
LOWtests/test_seed_openwebui.py72 def test_repo_owned_code_tool_is_attached_when_jupyter_is_on(self):CODE
LOWtests/test_tool_web_fetch.py60 def test_prefers_article_and_returns_source_metadata(self):CODE
LOWtests/test_tool_web_fetch.py94 def test_navigation_only_page_is_rejected_and_does_not_consume_quota(self):STRING
LOWtests/test_tool_web_fetch.py106 def test_unreadable_page_releases_slot_for_a_retry(self):STRING
LOWtests/test_tool_web_fetch.py116 def test_quota_reservations_include_parallel_inflight_calls(self):STRING
LOWtests/test_tool_web_fetch.py125 def test_binary_content_is_rejected_without_consuming_quota(self):STRING
LOWtests/test_tool_code_interpreter.py15 def test_progress_only_stderr_is_clean_success(self):CODE
LOWtests/test_tool_code_interpreter.py24 def test_traceback_without_result_is_compact_error(self):CODE
LOWtests/test_tool_code_interpreter.py42 def test_traceback_with_image_is_partial_success(self):CODE
LOWtests/test_tool_code_interpreter.py53 def test_tool_description_is_generic_and_allows_api_discovery(self):CODE
LOWtests/test_tool_code_interpreter.py63 def test_generated_image_is_attached_with_native_compatible_file_event(self):CODE
LOWtests/test_tool_code_interpreter.py85 def test_generated_image_has_model_fallback_without_event_emitter(self):CODE
LOWtests/test_tool_code_interpreter.py99 def test_non_image_result_is_preserved(self):CODE
LOWtests/test_tool_code_interpreter.py105 def test_unrelated_error_does_not_receive_yfinance_advice(self):CODE
LOWtests/test_tool_code_interpreter.py115 def test_nonfatal_warning_is_preserved_without_marking_failure(self):CODE
LOWtests/test_tool_sql.py17 def test_description_names_dialect_and_common_date_trap(self):CODE
LOWtests/test_tool_sql.py43 def test_leading_line_and_block_comments_are_allowed(self):CODE
LOWtests/test_tool_sql.py52 def test_large_detailed_results_are_withheld(self):CODE
LOWtests/test_tool_sql.py61 def test_small_results_include_completeness_marker(self):CODE
LOWscripts/openwebui/tool_code_interpreter.py80def _extract_artifact_markdown(result: str) -> str:CODE
LOWscripts/openwebui/tool_sql.py15def _without_leading_comments(sql: str) -> str:CODE
Modern AI Meta-Vocabulary8 hits · 22 pts
SeverityFileLineSnippetContext
MEDIUMOPENWEBUI.md1# Open WebUI: the full agentic demoCOMMENT
MEDIUMREADME.md363## Open WebUI (Optional): the full agentic demoCOMMENT
MEDIUMREADME.md489├── OPENWEBUI.md # Open WebUI agentic demo guideCODE
MEDIUMTOOLS.md58The built-in UI (http://localhost:8080) has an MCP client with an agentic loop.CODE
MEDIUMscripts/start_openwebui.sh320# generous-but-finite 30: enough for the agentic DB-analyst scenarioCOMMENT
MEDIUMscripts/start_llama_server.sh96 # by default and lives on this standalone server, not the agentic Open WebUICOMMENT
MEDIUMscripts/openwebui/seed_openwebui.py221 # RAG citation template after fetch_url calls. That conflicts withCOMMENT
MEDIUMscripts/openwebui/seed_openwebui.py394 # Hide backend helper models (e.g. mlx-vlm's embedding model) from the picker.COMMENT
Excessive Try-Catch Wrapping21 hits · 21 pts
SeverityFileLineSnippetContext
LOWscripts/common.sh262except Exception:CODE
LOWscripts/openwebui/tool_code_interpreter.py113 except Exception:CODE
LOWscripts/openwebui/tool_code_interpreter.py212 except Exception as exc:CODE
LOWscripts/openwebui/tool_sql.py81 except Exception as e:CODE
LOWscripts/openwebui/tool_weather.py51 except Exception as e:CODE
LOWscripts/openwebui/tool_web_fetch.py333 except Exception as e:CODE
LOWscripts/openwebui/seed_openwebui.py129 except Exception:CODE
LOWscripts/openwebui/seed_openwebui.py138 except Exception:CODE
LOWscripts/openwebui/seed_openwebui.py154 except Exception as e:CODE
LOWscripts/openwebui/seed_openwebui.py185 except Exception as e2:CODE
LOWscripts/openwebui/seed_openwebui.py187 except Exception as e:CODE
LOWscripts/openwebui/seed_openwebui.py257 except Exception as e2:CODE
LOWscripts/openwebui/seed_openwebui.py259 except Exception as e:CODE
LOWscripts/openwebui/seed_openwebui.py284 except Exception:CODE
LOWscripts/openwebui/seed_openwebui.py298 except Exception as e:CODE
LOWscripts/openwebui/seed_openwebui.py306 except Exception:CODE
LOWscripts/openwebui/seed_openwebui.py319 except Exception as e:CODE
LOWscripts/openwebui/seed_openwebui.py329 except Exception as e:CODE
LOWscripts/openwebui/seed_openwebui.py341 except Exception as e:CODE
LOWscripts/openwebui/seed_openwebui.py367 except Exception as e:CODE
LOWscripts/openwebui/seed_openwebui.py408 except Exception as e: # never fail the launcherCODE
Over-Commented Block8 hits · 8 pts
SeverityFileLineSnippetContext
LOWscripts/common.sh1#!/bin/shCOMMENT
LOWscripts/common.sh101# Check the GGUF model is downloaded; error out with a download hint if not.COMMENT
LOWscripts/start_openwebui.sh321# (multi-step query_database investigations run ~15-25 calls) without leaving aCOMMENT
LOWscripts/make_kv_bias.sh1#!/bin/shCOMMENT
LOWscripts/download_models.sh1#!/bin/shCOMMENT
LOWscripts/build_cuda_linux.sh1#!/bin/bashCOMMENT
LOWscripts/start_llama_server.sh81# 27B: --jinja enables native OpenAI-style tool calling; --mmproj enablesCOMMENT
LOWscripts/openwebui/seed_openwebui.py221 # RAG citation template after fetch_url calls. That conflicts withCOMMENT
Example Usage Blocks4 hits · 5 pts
SeverityFileLineSnippetContext
LOWsetup.sh5# Usage:COMMENT
LOWscripts/make_kv_bias.sh7# Usage:COMMENT
LOWscripts/download_models.sh4# Usage:COMMENT
LOWscripts/build_cuda_linux.sh6# Usage:COMMENT
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippetContext
LOWscripts/common.sh6# Set BONSAI_MODEL to choose size: 27B (default), 8B, 4B, 1.7B, or allCOMMENT
LOWscripts/common.sh7# Set BONSAI_FAMILY to choose family: ternary (default), bonsai (1-bit), or allCOMMENT
Deep Nesting2 hits · 2 pts
SeverityFileLineSnippetContext
LOWscripts/openwebui/tool_web_fetch.py257CODE
LOWscripts/openwebui/tool_web_fetch.py279CODE