deslop 0.2.0

A static analyzer that spots low-context and AI-assisted code patterns across naming, concurrency, security, performance, and test quality.
Documentation
deslop scan root: /home/chinmay/ChinmayPersonalProjects/SnapBack
Source files discovered: 13
Source files analyzed: 13
Functions fingerprinted: 69
Findings: 44
Index summary: packages=13 symbols=81 imports=81
Parse failures: 0
Timings: discover=5ms parse=130ms index=0ms heuristics=71ms total=208ms

Findings:
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/apps/api/main.py:1 module depends on a large number of repository-local modules [tight_module_coupling]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/apps/api/main.py:1 file imports heavy ecosystems that show little local evidence of need [unrelated_heavy_import]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/apps/api/main.py:174 file repeats the same validation pipeline across functions [duplicate_validation_pipeline]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/apps/api/main.py:196 function ingest_audio_chunk catches a broad exception without narrowing the failure type [broad_exception_handler]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/apps/api/main.py:220 function generate_recap concentrates too much control flow and behavior [god_function]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/analysis/detector.py:47 public function detect_missed_alerts exposes a very wide type contract [public_any_type_leak]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/analysis/detector.py:47 public function detect_missed_alerts omits complete type hints [public_api_missing_type_hints]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/analysis/detector.py:47 public API detect_missed_alerts uses Any in its type contract [python_public_api_any_contract]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/analysis/detector.py:47 function detect_missed_alerts relies on weakly typed inputs or outputs [weak_typing]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/analysis/detector.py:51 function detect_missed_alerts uses nested loops for lookup; consider a dict/set for O(1) access [nested_list_search_map_candidate]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/analysis/summarizer.py:27 file repeats highly similar exception-handling blocks [duplicate_error_handler_block]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/analysis/summarizer.py:146 public function generate_study_pack exposes a very wide type contract [public_any_type_leak]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/analysis/summarizer.py:146 public API generate_study_pack uses Any in its type contract [python_public_api_any_contract]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/analysis/summarizer.py:146 function generate_study_pack relies on weakly typed inputs or outputs [weak_typing]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/analysis/summarizer.py:185 function generate_study_pack calls .get() with the same key multiple times; assign to a local variable [repeated_dict_get_same_key_no_cache]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/analysis/summarizer.py:186 function generate_study_pack calls .get() with the same key multiple times; assign to a local variable [repeated_dict_get_same_key_no_cache]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/analysis/summarizer.py:190 function generate_study_pack calls .get() with the same key multiple times; assign to a local variable [repeated_dict_get_same_key_no_cache]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/analysis/summarizer.py:191 function generate_study_pack calls .get() with the same key multiple times; assign to a local variable [repeated_dict_get_same_key_no_cache]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/analysis/summarizer.py:196 function generate_study_pack calls .get() with the same key multiple times; assign to a local variable [repeated_dict_get_same_key_no_cache]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/analysis/summarizer.py:197 function generate_study_pack calls .get() with the same key multiple times; assign to a local variable [repeated_dict_get_same_key_no_cache]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/analysis/summarizer.py:202 function generate_study_pack calls .get() with the same key multiple times; assign to a local variable [repeated_dict_get_same_key_no_cache]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/analysis/summarizer.py:203 function generate_study_pack calls .get() with the same key multiple times; assign to a local variable [repeated_dict_get_same_key_no_cache]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/exporters/export.py:15 public function build_markdown_export omits complete type hints [public_api_missing_type_hints]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/exporters/export.py:39 function build_markdown_export formats a string inside a loop; consider building the template once [repeated_string_format_invariant_template]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/exporters/export.py:62 public function build_pdf_export omits complete type hints [public_api_missing_type_hints]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/exporters/export.py:93 function build_pdf_export formats a string inside a loop; consider building the template once [repeated_string_format_invariant_template]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/exporters/export.py:122 public function export_to_notion omits complete type hints [public_api_missing_type_hints]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/storage/database.py:36 function get_connection opens or acquires a resource without an obvious context manager [missing_context_manager]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/storage/database.py:243 public function save_recap omits complete type hints [public_api_missing_type_hints]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/storage/database.py:298 public function hydrate_recap omits complete type hints [public_api_missing_type_hints]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/storage/database.py:345 function delete_sessions_older_than mixes multiple infrastructure concerns in one body [mixed_concerns_function]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/storage/database.py:404 function get_session_bundle returns None explicitly where falling through would be clearer [redundant_return_none]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/transcription/transcription_client.py:1 module transcription_client uses a utility-style name but coordinates multiple infrastructure concerns [name_responsibility_mismatch]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/transcription/transcription_client.py:66 function from_env reads required environment configuration without an obvious fallback or validation path [environment_boundary_without_fallback]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/transcription/transcription_client.py:94 class SnapBackTranscriptionClient builds several collaborators eagerly in __init__ [eager_constructor_collaborators]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/transcription/transcription_client.py:94 class SnapBackTranscriptionClient assigns an unusually large number of instance attributes [too_many_instance_attributes]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/transcription/transcription_client.py:97 function __init__ calls an external HTTP boundary without an obvious timeout or retry policy [network_boundary_without_timeout]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/transcription/transcription_client.py:182 function _capture_microphone_stream opens or acquires a resource without an obvious context manager [missing_context_manager]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/transcription/transcription_client.py:199 function _capture_microphone_stream catches a broad exception without narrowing the failure type [broad_exception_handler]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/transcription/transcription_client.py:256 function _post_transcript formats a string inside a loop; consider building the template once [repeated_string_format_invariant_template]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/transcription/transcription_client.py:274 function _run_local_whisper_loop opens or acquires a resource without an obvious context manager [missing_context_manager]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/transcription/transcription_client.py:284 function _run_local_whisper_loop allocates a temporary collection inside a loop [temporary_collection_in_loop]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/transcription/transcription_client.py:332 function _ensure_whisper_model mixes multiple infrastructure concerns in one body [mixed_concerns_function]
  - /home/chinmay/ChinmayPersonalProjects/SnapBack/services/transcription/transcription_client.py:347 function _ensure_whisper_model calls .write() inside a loop without visible buffering [write_without_buffering_in_loop]