AI Slop Code Risk Monitor

gorakhargosh/watchdog

SlopCodeMonitor badge for gorakhargosh/watchdog Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

Python library and shell utilities to monitor filesystem events.

18.0 Elevated pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for gorakhargosh/watchdog, a Python project with 7,432 GitHub stars. SynthScan examined 18,704 lines of code across 82 source files, recording 308 pattern matches distributed across 12 syntactic categories. The legacy adjusted pattern signal is 18.0 (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.0
Adjusted Signal
18.0
Raw Pattern Score
100%
Time Factor
2026-10-31
Last Push
7.4K
Stars
Python
Language
18.7K
Lines of Code
82
Files
308
Pattern Hits
2026-10-31
Scan Date
0.06
HC Hit Rate

Risk Review · Payload v1

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

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.

Cognitive Ownership Risk 44.9/100 · MEDIUM

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

Hallucinated Dependency & Supply Chain Risk 12.6/100 · LOW

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

Agent Over-Engineering Ratio 46.5/100 · MEDIUM

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

PR Review Velocity Impact 60.7/100 · HIGH

Which changes need focused human review? 308 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 5MEDIUM 8LOW 295

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 308 distinct pattern matches across 12 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 Identifiers172 hits · 170 pts
SeverityFileLineSnippetContext
LOWtests/test_inotify_c.py46def test_late_double_deletion(helper: Helper, p: P, event_queue: TestEventQueue, start_watching: StartWatching) -> None:CODE
LOWtests/test_pattern_matching_event_handler.py182def test_rename_to_ignored_pattern():CODE
LOWtests/test_pattern_matching_event_handler.py201def test_moved_to_ignored_hidden_path():CODE
LOWtests/test_pattern_matching_event_handler.py237def test_rename_from_ignored_pattern() -> None:CODE
LOWtests/test_pattern_matching_event_handler.py258def test_conflicting_patterns(CODE
LOWtests/test_pattern_matching_event_handler.py269def test_rename_cross_boundary_permissive() -> None:CODE
LOWtests/test_kqueue.py19def test_register_kevent_ignores_permission_errors(tmpdir, err):CODE
LOWtests/test_logging_event_handler.py63def test_logging_event_handler_dispatch():CODE
LOWtests/test_inotify_emitter.py22def test_missing_root_raises_and_can_be_retried(tmp_path, recursive, running):CODE
LOWtests/test_inotify_emitter.py68def test_recursive_watch_ignores_subdirectory_errors(tmp_path, monkeypatch, error, create_after_start):CODE
LOWtests/test_inotify_emitter.py122def test_filtered_events_in_subdirectory(tmp_path, recursive, create_after_start):CODE
LOWtests/test_snapshot_diff.py47def test_move_to_with_context_manager(p):CODE
LOWtests/test_snapshot_diff.py97def test_create_symlink_to_existing_file(p):CODE
LOWtests/test_snapshot_diff.py111def test_delete_symlink_to_existing_file(p):CODE
LOWtests/test_snapshot_diff.py125def test_dir_modify_on_create(p):CODE
LOWtests/test_snapshot_diff.py144def test_detect_modify_for_moved_files(p):CODE
LOWtests/test_snapshot_diff.py155def test_replace_dir_with_file(p):CODE
LOWtests/test_snapshot_diff.py248def test_move_with_changed_device(p, is_directory, modified, ignore_device):CODE
LOWtests/test_snapshot_diff.py274def test_ignore_device_preserves_hard_link_moves(p):CODE
LOWtests/test_delayed_queue.py35def test_delay_ignores_wall_clock_adjustments(monkeypatch, clock_adjustment):CODE
LOWtests/test_delayed_queue.py63def test_deprecated_delay_sec_attribute():CODE
LOW⚡tests/test_observer.py35def test_schedule_should_start_emitter_if_running(observer):CODE
LOW⚡tests/test_observer.py42def test_schedule_should_not_start_emitter_if_not_running(observer):CODE
LOW⚡tests/test_observer.py48def test_start_should_start_emitter(observer):CODE
LOW⚡tests/test_observer.py55def test_stop_should_stop_emitter(observer):CODE
LOWtests/test_observer.py88def test_schedule_after_unschedule_all(observer):CODE
LOWtests/test_observer.py110def test_start_failure_should_not_prevent_further_try(observer):CODE
LOWtests/test_observer.py135def test_schedule_failure_should_not_prevent_future_schedules(observer):CODE
LOWtests/test_observer.py153def test_schedule_failure_does_not_keep_handler(observer, running, emitter_method):CODE
LOWtests/test_observer.py183def test_context_manager_starts_observer():CODE
LOWtests/test_observer.py199def test_context_manager_with_already_started_observer():CODE
LOWtests/test_observer.py217def test_context_manager_stops_on_exit():CODE
LOWtests/test_observer.py233def test_context_manager_handles_exceptions():CODE
LOWtests/test_observer.py253def test_context_manager_with_scheduled_watches():CODE
LOWtests/test_fsevents.py78def test_coalesced_event_check(event, expectation):CODE
LOWtests/test_fsevents.py82def test_native_event_owns_path() -> None:CODE
LOWtests/test_fsevents.py99def test_native_event_cycles_are_collected() -> None:CODE
LOWtests/test_fsevents.py111def test_native_event_allocations_are_released() -> None:CODE
LOWtests/test_fsevents.py292def test_stopping_unstarted_observer_releases_emitter(p: P) -> None:CODE
LOWtests/test_fsevents.py302def test_stream_stop_racing_run(p: P) -> None:CODE
LOWtests/test_fsevents.py313def test_two_streams_same_path(p: P) -> None:CODE
LOWtests/test_fsevents.py326def test_two_observers_on_same_path(p: P) -> None: # for issue 919CODE
LOWtests/test_fsevents.py364def test_stream_concurrent_run_race(p: P) -> None:CODE
LOWtests/test_fsevents.py405def test_stream_concurrent_stop_calls(p: P) -> None:CODE
LOWtests/test_fsevents.py425def test_stream_stop_from_inside_callback(p: P) -> None:CODE
LOWtests/test_fsevents.py449def test_stream_callback_failure_terminates_stream(p: P) -> None:CODE
LOWtests/test_fsevents.py486def test_observer_stop_racing_start(p: P, start_watching: StartWatching, expect_event: ExpectEvent) -> None:CODE
LOWtests/test_fsevents.py506def test_rapid_observer_start_stop(p: P) -> None:CODE
LOWtests/test_fsevents.py516def test_module_keeps_gil_disabled() -> None:CODE
LOWtests/test_fsevents.py637def test_unschedule_removed_folder(observer: BaseObserver, p: P) -> None:CODE
LOWtests/test_fsevents.py659def test_converting_cfstring_to_pyunicode(p: P, start_watching: StartWatching, events_checker: EventsChecker) -> None:CODE
LOWtests/test_fsevents.py675def test_recursive_check_accepts_relative_paths(p: P) -> None:CODE
LOWtests/test_fsevents.py763def test_fsevents_latency_configuration(p: P) -> None:CODE
LOWtests/test_fsevents.py780def test_fsevents_negative_latency_is_rejected(p: P, latency: float) -> None:CODE
LOW⚡tests/test_fsevents.py131def test_native_event_requires_arguments() -> None:STRING
LOW⚡tests/test_fsevents.py136def test_native_event_unsigned_id() -> None:STRING
LOW⚡tests/test_fsevents.py141def test_stream_does_not_retain_paths_list(p: P) -> None:STRING
LOWtests/test_fsevents.py184def test_observer_propagates_stream_startup_failure(p: P, *, already_running: bool) -> None:STRING
LOWtests/test_fsevents.py207def test_stream_stop_before_run(p: P) -> None:STRING
LOWtests/test_fsevents.py228def test_stream_stop_after_start(p: P) -> None:STRING
112 more matches not shown…
Unused Imports52 hits · 50 pts
SeverityFileLineSnippetContext
LOWtests/test_inotify_c.py1CODE
LOWtests/conftest.py1CODE
LOWtests/test_pattern_matching_event_handler.py1CODE
LOWtests/test_kqueue.py1CODE
LOWtests/test_logging_event_handler.py1CODE
LOWtests/test_inotify_emitter.py1CODE
LOWtests/test_snapshot_diff.py1CODE
LOWtests/test_delayed_queue.py1CODE
LOWtests/test_observer.py1CODE
LOWtests/test_fsevents.py1CODE
LOWtests/shell.py8CODE
LOWtests/test_patterns.py1CODE
LOWtests/test_observers_winapi.py1CODE
LOWtests/utils.py1CODE
LOWtests/test_0_watchmedo.py1CODE
LOWtests/test_skip_repeats_queue.py1CODE
LOWtests/test_observers_polling.py1CODE
LOWtests/test_observers_api.py1CODE
LOWtests/test_events.py1CODE
LOWtests/test_event_debouncer.py1CODE
LOWtests/test_regex_matching_event_handler.py1CODE
LOWtests/test_examples.py1CODE
LOWtests/test_inotify_watch_group.py1CODE
LOWtests/test_emitter.py1CODE
LOWdocs/source/examples/debounced.py1CODE
LOWdocs/source/examples/simple.py1CODE
LOWdocs/source/examples/file_organizer.py14CODE
LOWsrc/watchdog/watchmedo.py7CODE
LOWsrc/watchdog/version.py1CODE
LOWsrc/watchdog/events.py99CODE
LOWsrc/watchdog/utils/patterns.py8CODE
LOWsrc/watchdog/utils/__init__.py19CODE
LOWsrc/watchdog/utils/event_debouncer.py1CODE
LOWsrc/watchdog/utils/dirsnapshot.py32CODE
LOWsrc/watchdog/utils/delayed_queue.py6CODE
LOWsrc/watchdog/utils/platform.py1CODE
LOWsrc/watchdog/utils/process_watcher.py1CODE
LOWsrc/watchdog/utils/bricks.py20CODE
LOWsrc/watchdog/utils/echo.py26CODE
LOWsrc/watchdog/observers/fsevents.py8CODE
LOWsrc/watchdog/observers/inotify_move_event_grouper.py9CODE
LOWsrc/watchdog/observers/inotify.py69CODE
LOWsrc/watchdog/observers/__init__.py37CODE
LOWsrc/watchdog/observers/api.py1CODE
LOWsrc/watchdog/observers/winapi.py12CODE
LOWsrc/watchdog/observers/read_directory_changes.py1CODE
LOWsrc/watchdog/observers/kqueue.py58CODE
LOWsrc/watchdog/observers/inotify_c.py1CODE
LOWsrc/watchdog/observers/inotify_c.py20CODE
LOWsrc/watchdog/observers/polling.py22CODE
LOWsrc/watchdog/observers/fsevents2.py8CODE
LOWsrc/watchdog/tricks/__init__.py26CODE
Deep Nesting26 hits · 26 pts
SeverityFileLineSnippetContext
LOWtests/test_inotify_c.py46CODE
LOWtests/test_fsevents.py184CODE
LOWtests/utils.py189CODE
LOWtests/test_emitter.py411CODE
LOWtests/test_emitter.py454CODE
LOWsrc/watchdog/watchmedo.py269CODE
LOWsrc/watchdog/watchmedo.py463CODE
LOWsrc/watchdog/utils/backwards_compat.py24CODE
LOWsrc/watchdog/utils/backwards_compat.py96CODE
LOWsrc/watchdog/utils/event_debouncer.py99CODE
LOWsrc/watchdog/utils/dirsnapshot.py378CODE
LOWsrc/watchdog/utils/bricks.py80CODE
LOWsrc/watchdog/observers/fsevents.py189CODE
LOWsrc/watchdog/observers/inotify.py212CODE
LOWsrc/watchdog/observers/inotify.py321CODE
LOWsrc/watchdog/observers/inotify.py460CODE
LOWsrc/watchdog/observers/inotify.py523CODE
LOWsrc/watchdog/observers/__init__.py54CODE
LOWsrc/watchdog/observers/winapi.py532CODE
LOWsrc/watchdog/observers/read_directory_changes.py74CODE
LOWsrc/watchdog/observers/kqueue.py426CODE
LOWsrc/watchdog/observers/kqueue.py496CODE
LOWsrc/watchdog/observers/kqueue.py612CODE
LOWsrc/watchdog/observers/inotify_c.py376CODE
LOWsrc/watchdog/observers/fsevents2.py205CODE
LOWsrc/watchdog/tricks/__init__.py304CODE
Excessive Try-Catch Wrapping16 hits · 22 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_skip_repeats_queue.py144def produce():CODE
MEDIUMtests/test_skip_repeats_queue.py223def produce():CODE
MEDIUMtests/test_skip_repeats_queue.py269def produce():CODE
MEDIUMtests/test_skip_repeats_queue.py362def produce():CODE
LOWtests/test_skip_repeats_queue.py147 except Exception as exc:CODE
LOWtests/test_skip_repeats_queue.py226 except Exception as exc:CODE
LOWtests/test_skip_repeats_queue.py272 except Exception as exc:CODE
LOWtests/test_skip_repeats_queue.py279 except Exception as exc:CODE
LOWtests/test_skip_repeats_queue.py365 except Exception as exc:CODE
MEDIUMsrc/watchdog/watchmedo.py818 print(f"Error: {exc.args[0]}", file=sys.stderr) # noqa:T201CODE
LOWsrc/watchdog/utils/process_watcher.py29 except Exception:CODE
LOWsrc/watchdog/observers/fsevents.py336 except Exception:CODE
LOW⚡src/watchdog/observers/__init__.py63 except Exception:CODE
LOW⚡src/watchdog/observers/__init__.py66 except Exception:CODE
LOW⚡src/watchdog/observers/__init__.py76 except Exception:CODE
LOWsrc/watchdog/observers/api.py320 except Exception:CODE
Modern Structural Boilerplate16 hits · 16 pts
SeverityFileLineSnippetContext
LOWtests/test_inotify_c.py30logger = logging.getLogger(__name__)CODE
LOWtests/test_fsevents.py42logger = logging.getLogger(__name__)CODE
LOWtests/test_emitter.py35logger = logging.getLogger(__name__)CODE
LOWdocs/source/examples/patterns.py9logger = logging.getLogger(__name__)CODE
LOWdocs/source/examples/debounced.py12logger = logging.getLogger(__name__)CODE
LOWdocs/source/examples/simple.py10logger = logging.getLogger(__name__)CODE
LOWdocs/source/examples/file_organizer.py26logger = logging.getLogger(__name__)CODE
LOWsrc/watchdog/utils/event_debouncer.py16logger = logging.getLogger(__name__)CODE
LOWsrc/watchdog/utils/process_watcher.py12logger = logging.getLogger(__name__)CODE
LOWsrc/watchdog/observers/inotify_move_event_grouper.py22logger = logging.getLogger(__name__)CODE
LOWsrc/watchdog/observers/inotify.py116logger = logging.getLogger(__name__)CODE
LOWsrc/watchdog/observers/__init__.py92__all__ = ["Observer"]CODE
LOWsrc/watchdog/observers/inotify_c.py22logger = logging.getLogger(__name__)CODE
LOWsrc/watchdog/observers/polling.py52logger = logging.getLogger(__name__)CODE
LOWsrc/watchdog/observers/fsevents2.py68logger = logging.getLogger(__name__)CODE
LOWsrc/watchdog/tricks/__init__.py46logger = logging.getLogger(__name__)CODE
Cross-File Repetition3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHsrc/watchdog/observers/inotify.py0observer thread that schedules watching directories and dispatches calls to event handlers.STRING
HIGHsrc/watchdog/observers/read_directory_changes.py0observer thread that schedules watching directories and dispatches calls to event handlers.STRING
HIGHsrc/watchdog/observers/kqueue.py0observer thread that schedules watching directories and dispatches calls to event handlers.STRING
Over-Commented Block14 hits · 14 pts
SeverityFileLineSnippetContext
LOWdocs/source/conf.py1# watchdog documentation build configuration file, created byCOMMENT
LOWdocs/source/conf.py41 "sphinx_copybutton",COMMENT
LOW.github/workflows/build-and-publish.yml1# Because this library provides extension modules for macOS, but not for otherCOMMENT
LOWsrc/pythoncapi_compat.h1// Header file providing new C API functions to old Python versions.COMMENT
LOWsrc/pythoncapi_compat.h21#include <Python.h>COMMENT
LOWsrc/pythoncapi_compat.h41# if (defined (__STDC_VERSION__) && __STDC_VERSION__ > 201710L) \COMMENT
LOWsrc/pythoncapi_compat.h121# define Py_IsNone(x) Py_Is(x, Py_None)COMMENT
LOWsrc/pythoncapi_compat.h481COMMENT
LOWsrc/pythoncapi_compat.h541#if PY_VERSION_HEX < 0x030B00C1 && !defined(PYPY_VERSION)COMMENT
LOWsrc/pythoncapi_compat.h1221# define PyHASH_IMAG _PyHASH_IMAGCOMMENT
LOWsrc/pythoncapi_compat.h1921#if PY_VERSION_HEX < 0x030C00A3COMMENT
LOWsrc/pythoncapi_compat.h1941COMMENT
LOWsrc/watchdog/observers/inotify.py221 # todo look into desired behavior for IN_MOVE_SELF eventsCOMMENT
LOWsrc/watchdog/observers/kqueue.py441 # and then quickly deleted before we could openCOMMENT
Empty Error Handlers2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHsrc/watchdog/watchmedo.py785except WatchdogShutdownError:CODE
HIGHsrc/watchdog/tricks/__init__.py319except OSError:CODE
Self-Referential Comments3 hits · 9 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_snapshot_diff.py201 # Create a file and take a snapshot.COMMENT
MEDIUMtests/test_snapshot_diff.py299 # Create a file and declare a DirectorySnapshot and a EmptyDirectorySnapshot.COMMENT
MEDIUMdocs/source/conf.py4# This file is execfile()d with the current directory set to its containing dir.COMMENT
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippetContext
LOWsrc/watchdog/observers/fsevents.py260 # Check if we have a corresponding destination event in the watched path.COMMENT
LOWsrc/watchdog/observers/inotify_move_event_grouper.py74 # Check if move_from is in delayqueue alreadyCOMMENT
AI Structural Patterns1 hit · 1 pts
SeverityFileLineSnippetContext
LOWsrc/watchdog/tricks/__init__.py210CODE
Overly Generic Function Names1 hit · 0 pts
SeverityFileLineSnippetContext
LOWsrc/watchdog/utils/echo.py21 def my_function(args):STRING