Repository Analysis

amoffat/sh

Python process launching

8.5 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of amoffat/sh, a Python project with 7,242 GitHub stars. SynthScan v2.0 examined 8,489 lines of code across 18 source files, recording 99 pattern matches distributed across 8 syntactic categories. The overall adjusted score of 8.5 places this repository in the Low 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).

8.5
Adjusted Score
8.5
Raw Score
100%
Time Factor
2026-07-25
Last Push
7.2K
Stars
Python
Language
8.5K
Lines of Code
18
Files
99
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 3LOW 96

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

Hyper-Verbose Identifiers68 hits · 46 pts
SeverityFileLineSnippetContext
LOWtests/sh_test.py172def create_stdin_transform_test(transform="upper"):CODE
LOWtests/sh_test.py350 def test_exit_code_with_hasattr(self):CODE
LOWtests/sh_test.py369 def test_exit_code_from_exception(self):CODE
LOWtests/sh_test.py732 def test_incompatible_special_args(self):CODE
LOWtests/sh_test.py817 def test_command_wrapper_equivalence(self):CODE
LOWtests/sh_test.py823 def test_doesnt_execute_directories(self):CODE
LOWtests/sh_test.py859 def test_multiple_args_short_option(self):CODE
LOWtests/sh_test.py875 def test_multiple_args_long_option(self):CODE
LOWtests/sh_test.py955 def test_incremental_composition(self):CODE
LOWtests/sh_test.py1036 def test_custom_separator_space(self):CODE
LOWtests/sh_test.py1118 def test_background_exception(self):CODE
LOWtests/sh_test.py1221 def test_err_to_out_and_sys_stdout(self):CODE
LOWtests/sh_test.py1331 def test_out_and_err_redirection(self):CODE
LOWtests/sh_test.py1385 def test_err_redirection_actual_file(self):CODE
LOWtests/sh_test.py1449 def test_bake_boolean_override(self):CODE
LOWtests/sh_test.py1496 def test_bake_args_come_first(self):CODE
LOWtests/sh_test.py1930 def test_async_return_cmd_exc(self):CODE
LOWtests/sh_test.py1943 def test_handle_both_out_and_err(self):CODE
LOWtests/sh_test.py2033 def test_for_generator_to_err(self):CODE
LOWtests/sh_test.py2160 def test_generator_and_callback(self):CODE
LOWtests/sh_test.py2685 def test_decode_error_handling(self):CODE
LOWtests/sh_test.py2712 def test_signal_exception_sigusr(self):CODE
LOWtests/sh_test.py2837 def test_baked_command_can_be_printed(self):CODE
LOWtests/sh_test.py2842 def test_baked_command_can_be_printed_with_whitespace_args(self):CODE
LOWtests/sh_test.py2855 def test_baked_command_can_be_printed_with_whitespace_in_options(self):CODE
LOWtests/sh_test.py2904 def test_done_callback_no_deadlock(self):CODE
LOWtests/sh_test.py2938 def test_new_session_new_group(self):CODE
LOWtests/sh_test.py2985 def session_false_group_false(pid, pgid, sid, test_pid):CODE
LOWtests/sh_test.py3059 def test_stdin_unbuffered_bufsize(self):CODE
LOWtests/sh_test.py3102 def test_stdin_newline_bufsize(self):CODE
LOWtests/sh_test.py3148 def test_custom_timeout_signal(self):CODE
LOWtests/sh_test.py3166 def test_timeout_race_condition_process_exit(self):CODE
LOWtests/sh_test.py3215 def test_partially_applied_callback(self):CODE
LOWtests/sh_test.py3244 def test_grandchild_no_sighup(self):CODE
LOWtests/sh_test.py3289 def test_unchecked_producer_failure(self):CODE
LOWtests/sh_test.py3312 def test_unchecked_pipeline_failure(self):CODE
LOWtests/sh_test.py3351 def test_bad_sig_raise_exception(self):CODE
LOWtests/sh_test.py3377 def test_ok_code_ignores_bad_sig_exception(self):CODE
LOWtests/sh_test.py3410 def test_uid_drops_supplementary_groups(self):CODE
LOWtests/sh_test.py3545 def test_percent_doesnt_fail_logging(self):CODE
LOWtests/sh_test.py3678 def test_stop_iteration_doesnt_block(self):CODE
LOWtests/sh_test.py3694 def test_threaded_with_contexts(self):CODE
LOWtests/sh_test.py3856 def test_set_in_parent_function(self):CODE
LOWtests/sh_test.py3881 def test_command_with_baked_call_args(self):CODE
LOWtests/sh_test.py522 def test_manual_stdin_iterable(self):STRING
LOWtests/sh_test.py1555 def test_stdout_callback_no_wait(self):STRING
LOWtests/sh_test.py1583 def test_stdout_callback_line_buffered(self):STRING
LOWtests/sh_test.py1603 def test_stdout_callback_line_unbuffered(self):STRING
LOWtests/sh_test.py1624 def test_stdout_callback_buffered(self):STRING
LOWtests/sh_test.py1644 def test_stdout_callback_with_input(self):STRING
LOWtests/sh_test.py1665 def test_stdout_callback_exit(self):STRING
LOWtests/sh_test.py1689 def test_stdout_callback_terminate(self):STRING
LOWtests/sh_test.py1727 def test_stdout_callback_kill(self):STRING
LOWtests/sh_test.py2411 def test_change_stdout_buffering(self):STRING
LOWtests/sh_test.py2532 def test_timeout_wait_overstep(self):STRING
LOWtests/sh_test.py2542 def test_timeout_wait_negative(self):STRING
LOWtests/sh_test.py2580 def test_failure_with_large_output(self):STRING
LOWtests/sh_test.py3640 def test_signal_exception_aliases(self):STRING
LOWsrc/sh/__init__.py985def output_redirect_is_filename(out):CODE
LOWsrc/sh/__init__.py1056def output_iterator_validator(passed_kwargs, merged_kwargs):CODE
8 more matches not shown…
Deep Nesting12 hits · 6 pts
SeverityFileLineSnippetContext
LOWdev_scripts/changelog_extract.py10CODE
LOWsrc/sh/__init__.py377CODE
LOWsrc/sh/__init__.py1580CODE
LOWsrc/sh/__init__.py1629CODE
LOWsrc/sh/__init__.py2655CODE
LOWsrc/sh/__init__.py2723CODE
LOWsrc/sh/__init__.py2792CODE
LOWsrc/sh/__init__.py3049CODE
LOWsrc/sh/__init__.py172CODE
LOWsrc/sh/__init__.py733CODE
LOWsrc/sh/__init__.py1861CODE
LOWsrc/sh/__init__.py3285CODE
Excessive Try-Catch Wrapping6 hits · 6 pts
SeverityFileLineSnippetContext
LOWtests/sh_test.py3465 except Exception:CODE
LOWtests/sh_test.py3470 except Exception:CODE
MEDIUMsrc/sh/__init__.py911def queue_connector():CODE
LOWsrc/sh/__init__.py1710 except Exception as e:CODE
LOWsrc/sh/__init__.py2196 except Exception: # noqa: E722CODE
LOWsrc/sh/__init__.py2203 except Exception as e:CODE
Decorative Section Separators2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMsrc/sh/__init__.py6# ===============================================================================COMMENT
MEDIUMsrc/sh/__init__.py26# ===============================================================================COMMENT
Over-Commented Block8 hits · 5 pts
SeverityFileLineSnippetContext
LOWsrc/sh/__init__.py1"""COMMENT
LOWsrc/sh/__init__.py1181 "out": None, # redirect STDOUTCOMMENT
LOWsrc/sh/__init__.py1221 "decode_errors": "strict",COMMENT
LOWsrc/sh/__init__.py1241 # stdin ttys, if ttys are being usedCOMMENT
LOWsrc/sh/__init__.py1921COMMENT
LOWsrc/sh/__init__.py2061 os.close(close_pipe_write)COMMENT
LOWsrc/sh/__init__.py2541 """polls if our child process has completed, without blocking. thisCOMMENT
LOWsrc/sh/__init__.py3001 # this can be demonstrated with the following program:COMMENT
AI Slop Vocabulary1 hit · 2 pts
SeverityFileLineSnippetContext
LOWsrc/sh/__init__.py1687 # if it's true, it has no value, just pass the nameCOMMENT
Slop Phrases1 hit · 2 pts
SeverityFileLineSnippetContext
LOWsrc/sh/__init__.py2085 # python ignores SIGPIPE by default. we must make sure to putCOMMENT
Unused Imports1 hit · 0 pts
SeverityFileLineSnippetContext
LOWtests/sh_test.py799CODE