Skip to content

refactor: remove AI slop - #2

Merged
sulthonzh merged 1 commit into
mainfrom
chore/deslop
Jun 14, 2026
Merged

refactor: remove AI slop#2
sulthonzh merged 1 commit into
mainfrom
chore/deslop

Conversation

@sulthonzh

Copy link
Copy Markdown
Owner

refactor: remove AI slop

Removes unused imports (dead code) across the pipeline-service. Pure deletions of imports that have no references anywhere in the codebase — no logic, behavior, or public API changes.

Scope

Behavior-preserving cleanup only. No dependency, workflow, lockfile, or test changes.

Changes

Removed unused imports detected via AST scan and verified by grep:

File Removed
pipeline-service/config/settings.py from typing import Optional, import os
pipeline-service/database.py from models.customer import Customer inside init_db() (unused local import)
pipeline-service/main.py Optional from typing import, from models.customer import Customer
pipeline-service/services/ingestion.py List, Optional from typing import
pipeline-service/services/pipeline.py List, Optional from typing import
pipeline-service/sinks/postgres_sink.py from database import get_db, from datetime import datetime, timezone
pipeline-service/sources/base.py Optional from typing import

What was preserved

  • __init__.py re-exports — intentional public API surface (consumers import from package roots).
  • Public methods on repository/source/service classes (e.g. bulk_create, get_or_create, fetch_paginated, get_pipeline_status) — these are part of the framework's public API surface, not dead code.
  • except Exception blocks in validate() methods on HTTPSource / PostgresSink and the orchestrator's execute() — these are I/O / top-level boundaries that intentionally convert any failure to a boolean / IngestResponse.
  • Inline import statements inside endpoint handlers — lazy-loading pattern, not slop.

Verification

  • Baseline (before): pytest tests/test_unit/ tests/test_integration/28 passed, 0 failed
  • After: pytest tests/test_unit/ tests/test_integration/28 passed, 0 failed
  • No new failures introduced. E2E suite requires Docker stack and is unchanged.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Code Review ✅

No issues found. LGTM!

@sulthonzh
sulthonzh merged commit c852d31 into main Jun 14, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant