AI Slop Code RIsk Monitor

cactus-compute/needle

Automation foundation model for tiny devices: 2-bit, 8-29 MB, tool calls, ASR, structured extraction and embeddings on phones, wearables, smart homes, robots, cars and microcontrollers.

23.7 Elevated pattern signal View on GitHub

Maintenance and Governance Review

This report summarizes scanner evidence for cactus-compute/needle, a Python project with 13,846 GitHub stars. SynthScan examined 12,901 lines of code across 60 source files, recording 254 pattern matches distributed across 11 syntactic categories. The legacy adjusted pattern signal is 23.7 (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.

23.7
Adjusted Signal
23.7
Raw Pattern Score
100%
Time Factor
2026-10-11
Last Push
13.8K
Stars
Python
Language
12.9K
Lines of Code
60
Files
254
Pattern Hits
2026-10-12
Scan Date
0.17
HC Hit Rate

Risk Review · v3

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

Cognitive Ownership Risk 56.4/100 · HIGH

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

Hallucinated Dependency & Supply Chain Risk 6.4/100 · LOW

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

Agent Over-Engineering Ratio 64.9/100 · HIGH

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

PR Review Velocity Impact 70.6/100 · HIGH

Which changes need focused human review? 254 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 10MEDIUM 6LOW 238

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 254 distinct pattern matches across 11 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 Identifiers189 hits · 193 pts
SeverityFileLineSnippetContext
LOWneedle/agent/fetch.py163def unpublished_engine_wheels():CODE
LOWneedle/model/tokenizer.py94def _download_tokenizer_from_hf(prefix):CODE
LOWtests/test_release.py59def test_existing_release_tag_skips_unchanged_source(repo):CODE
LOWtests/test_release.py64def test_release_tag_contains_versioned_source_and_skips_unchanged_main(repo):CODE
LOWtests/test_release.py83def test_manual_bump_on_main_follows_the_published_version(repo):CODE
LOWtests/test_release.py100def test_tag_step_tolerates_already_versioned_files(repo):CODE
LOWtests/test_release.py111def test_declared_version_above_everything_published_is_released_as_is(repo):CODE
LOWtests/test_inference.py21def test_structured_extraction():CODE
LOWtests/test_inference.py72def test_extract_keeps_agent_tools():CODE
LOWtests/conftest.py65def tiny_checkpoint_safetensors(tiny_checkpoint):CODE
LOWtests/test_packaging.py10def test_training_dependencies_are_not_required_for_runtime() -> None:CODE
LOWtests/test_run.py34def test_read_checkpoint_rejects_pkl_without_executing(tmp_path):CODE
LOWtests/test_run.py50def test_read_adapter_rejects_pkl_without_executing(tmp_path):CODE
LOWtests/test_run.py66def test_read_checkpoint_rejects_pickle_disguised_as_safetensors(tmp_path):CODE
LOWtests/test_run.py95def test_read_adapter_rejects_pickle_disguised_as_safetensors(tmp_path):CODE
LOWtests/test_run.py110def test_build_prompt_passthrough_without_tools():CODE
LOWtests/test_run.py118def test_build_prompt_matches_training_template():CODE
LOWtests/test_run.py145def test_main_loads_tools_file_and_runs(tiny_checkpoint, tmp_path, capsys):CODE
LOWtests/test_run.py161def test_missing_checkpoint_is_looked_up_under_checkpoints_then_at_the_repo_root(monkeypatch, tmp_path):CODE
LOW⚡tests/test_grounding.py95def test_complete_flags_call_dates_that_contradict_the_input(stub):CODE
LOW⚡tests/test_grounding.py105def test_complete_leaves_grounded_dates_alone(stub):CODE
LOW⚡tests/test_grounding.py115def test_input_without_a_year_is_not_checked(stub):CODE
LOW⚡tests/test_grounding.py125def test_a_slash_date_does_not_mint_a_year_from_its_day_or_month(stub):CODE
LOW⚡tests/test_grounding.py224def test_extract_clears_a_thousands_separated_number(stub):CODE
LOW⚡tests/test_grounding.py234def test_extract_clears_a_thousands_separated_integer(stub):CODE
LOW⚡tests/test_grounding.py243def test_extract_leaves_an_unseparated_number_working(stub):CODE
LOW⚡tests/test_grounding.py252def test_extract_still_rejects_a_fabricated_number(stub):CODE
LOW⚡tests/test_grounding.py262def test_extract_still_rejects_a_non_numeric_engine_flag(stub):CODE
LOW⚡tests/test_grounding.py295def test_extract_does_not_clear_a_number_absent_from_the_source(stub):CODE
LOW⚡tests/test_grounding.py303def test_extract_does_not_read_a_date_hyphen_as_a_minus_sign(stub):CODE
LOW⚡tests/test_grounding.py313def test_extract_does_not_read_a_range_hyphen_as_a_minus_sign(stub):CODE
LOW⚡tests/test_grounding.py322def test_extract_clears_a_written_negative(stub):CODE
LOW⚡tests/test_grounding.py332def test_extract_clears_a_zero_against_its_source(stub):CODE
LOW⚡tests/test_grounding.py341def test_run_executes_a_grounded_number_and_refuses_an_ungrounded_sibling(stub):CODE
LOWtests/test_grounding.py137def test_extract_accepts_a_date_written_with_slashes(stub):CODE
LOWtests/test_grounding.py146def test_extract_licenses_a_relative_date_against_its_date_fact(stub):CODE
LOWtests/test_grounding.py159def test_run_refuses_ungrounded_calls_unless_strict_is_off(stub):CODE
LOWtests/test_grounding.py173def test_system_facts_license_relative_dates(stub):CODE
LOWtests/test_grounding.py183def test_a_key_ending_in_date_does_not_suppress_the_date_fact(stub):CODE
LOWtests/test_grounding.py198def test_years_carry_across_turns_until_reset(stub):CODE
LOWtests/test_grounding.py211def test_engine_reported_fabrications_are_kept_and_block_execution(stub):CODE
LOWtests/test_grounding.py273def test_extract_clears_a_nested_separated_number(stub):CODE
LOWtests/test_grounding.py284def test_extract_does_not_clear_a_digit_run_inside_a_longer_number(stub):CODE
LOWtests/test_grounding.py358def test_run_executes_a_separated_number_grounded_in_the_query(stub):CODE
LOWtests/test_grounding.py369def test_run_refuses_a_number_absent_from_the_query(stub):CODE
LOWtests/test_grounding.py380def test_run_still_refuses_a_non_numeric_engine_flag(stub):CODE
LOWtests/test_grounding.py392def test_a_time_after_a_day_and_month_is_not_read_as_a_year(stub):CODE
LOWtests/test_grounding.py406def test_extract_accepts_a_date_followed_by_a_time(stub):CODE
LOWtests/test_generate.py7def test_parse_array_variants():CODE
LOWtests/test_generate.py19def test_collect_tools_dedups_by_name():CODE
LOWtests/test_generate.py27def test_generate_examples_attaches_tools(monkeypatch):CODE
LOWtests/test_generate.py39def test_generate_examples_requires_api_key(monkeypatch):CODE
LOWtests/test_generate.py47def test_openrouter_url_can_be_overridden_from_environment(monkeypatch):CODE
LOW⚡tests/test_generate.py71def test_generate_dataset_hits_target_concurrently(monkeypatch):CODE
LOW⚡tests/test_generate.py81def test_generate_dataset_dedups_and_terminates(monkeypatch):CODE
LOW⚡tests/test_generate.py91def test_augment_jsonl_appends_generated(monkeypatch, tmp_path):CODE
LOWtests/test_environments.py23def test_registry_matches_modules():CODE
LOWtests/test_environments.py38def test_cases_cover_all_categories(env):CODE
LOWtests/test_environments.py42def test_cases_match_declared_tools(env):CODE
LOW⚡tests/test_environments.py159def test_one_critical_failure_fails_a_suite_that_clears_the_rate(stub):CODE
129 more matches not shown…
Empty Error Handlers9 hits · 45 pts
SeverityFileLineSnippetContext
HIGHneedle/_telemetry.py79except Exception:CODE
HIGHneedle/__init__.py398except Exception:CODE
HIGHneedle/cli.py87except Exception:CODE
HIGHneedle/cli.py128except Exception:CODE
HIGHneedle/_worker.py157except BaseException:CODE
HIGHneedle/_worker.py267except BaseException:CODE
HIGHneedle/_worker.py272except OSError:CODE
HIGHneedle/agent/fetch.py91except OSError:CODE
HIGHneedle/agent/fetch.py210except Exception:CODE
Excessive Try-Catch Wrapping17 hits · 20 pts
SeverityFileLineSnippetContext
LOWneedle/_telemetry.py79 except Exception:CODE
LOWneedle/__init__.py158 except Exception:CODE
LOWneedle/__init__.py358 except Exception as exc:CODE
LOWneedle/__init__.py398 except Exception:CODE
MEDIUMneedle/__init__.py395def __del__(self):CODE
LOWneedle/cli.py87 except Exception:CODE
LOWneedle/cli.py128 except Exception:CODE
LOWneedle/playground/server.py93 except Exception as exc:CODE
LOWneedle/playground/server.py168 except Exception as exc:CODE
MEDIUMneedle/playground/server.py132def do_POST(self):CODE
LOWneedle/agent/fetch.py181 except Exception:CODE
LOWneedle/agent/fetch.py210 except Exception:CODE
MEDIUMneedle/agent/fetch.py190def engine_repo(generation=2):CODE
LOWneedle/agent/tools.py142 except Exception:CODE
LOWneedle/model/tokenizer.py120 except Exception as e:CODE
LOWneedle/model/finetune.py138 except Exception as exc:CODE
LOWtests/conftest.py32 except Exception:CODE
Deep Nesting19 hits · 19 pts
SeverityFileLineSnippetContext
LOWneedle/__init__.py529CODE
LOWneedle/__init__.py248CODE
LOWneedle/platform.py207CODE
LOWneedle/cli.py62CODE
LOWneedle/cli.py141CODE
LOWneedle/cli.py98CODE
LOWneedle/_worker.py70CODE
LOWneedle/playground/server.py113CODE
LOWneedle/playground/server.py132CODE
LOWneedle/agent/whistle.py355CODE
LOWneedle/agent/whistle.py446CODE
LOWneedle/model/export.py341CODE
LOWneedle/model/export.py457CODE
LOWneedle/model/architecture.py199CODE
LOWneedle/model/architecture.py266CODE
LOWneedle/model/finetune.py106CODE
LOWtests/test_environments.py42CODE
LOWtests/test_platform.py31CODE
LOWtests/test_platform.py75CODE
Unused Imports10 hits · 10 pts
SeverityFileLineSnippetContext
LOWneedle/_telemetry.py1CODE
LOWneedle/__init__.py1CODE
LOWneedle/__init__.py11CODE
LOWneedle/__init__.py14CODE
LOWneedle/__init__.py14CODE
LOWneedle/__init__.py14CODE
LOWneedle/platform.py1CODE
LOWneedle/_worker.py1CODE
LOWneedle/agent/whistle.py1CODE
LOWtests/test_packaging.py1CODE
Decorative Section Separators2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_run.py7# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_run.py10# ---------------------------------------------------------------------------COMMENT
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHtests/test_worker.py36 if (!data || size < 6 || data[4] == 0) return -1;CODE
Modern Structural Boilerplate2 hits · 2 pts
SeverityFileLineSnippetContext
LOWneedle/__init__.py17__all__ = ["Needle", "Whistle", "ExtractionValidationError", "tool", "Field", "extract",CODE
LOWneedle/environments/__init__.py21__all__ = ["ENVIRONMENTS", "run_tests", *_NAMES]CODE
AI Structural Patterns2 hits · 2 pts
SeverityFileLineSnippetContext
LOWneedle/__init__.py189CODE
LOWneedle/agent/tools.py19CODE
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippetContext
LOWneedle/environments/data_capture.py87 {'query': 'save Leo Park to contacts, phone 555-0134', 'calls': [{'name': 'create_contact', 'arguments': {'name': 'LCODE
LOWtests/test_grounding.py72 return {"vendor": "Acme Corp", "total": total, "due_date": due_date}CODE
Dead Code1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_whistle.py416CODE