Skip to content

refactor(core): eliminate obsolete shims, aliases, proxy wrappers, and backwards compatibility remnants #94

Closed

Description

@dan-petty

Problem Statement

In accordance with AGENTS.md ("Clean Solutions Over Legacy Remnants (Zero Zombie Code)"):
When modifying, refactoring, or replacing features, schemas, configurations, or interfaces, implement clean, complete solutions and ruthlessly remove obsolete code, variables, aliases, fallback shims, and legacy workarounds. Never leave remnants or vestigial fallback paths.

A thorough AST analysis of src/devops_cli/ reveals several categories of dead shims, redundant aliases, trivial pass-through proxy functions, and vestigial backward compatibility shims that provide no additional functionality:

  1. Ad-hoc Inner Class Shims: _GhCliLabelShim and _GhCliMilestoneShim in src/devops_cli/commands/gh.py.
  2. Dynamic __getattr__ Backwards-Compatibility Proxies: src/devops_cli/commands/review.py lines 37–135 exporting moved internal symbols from ai.review.*, and src/devops_cli/dry_run/__init__.py.
  3. Redundant Module-Level & Class Aliases:
    • LabelAuditFinding = LabelAuditResult in src/devops_cli/github/labels.py & devops_cli/github/__init__.py.
    • _diff_pages = diff_pages, _diff_stream_chunks = diff_stream_chunks, _find_repo_files = find_repo_files in src/devops_cli/ai/review/chunker.py.
    • _sanitize_prompt_boundary_tags = sanitize_prompt_boundary_tags and _mask_secrets_in_content = mask_secrets in src/devops_cli/ai/review/sanitization.py.
    • ai_app = app in src/devops_cli/commands/ai.py.
    • process_token alias in src/devops_cli/ai/thinking_stream.py.
    • instructions and run_stream_sync aliases in src/devops_cli/ai/agents/agent.py.
  4. Trivial Zero-Functionality Wrapper/Proxy Functions:
    • _validate_dir in src/devops_cli/commands/tf.py (pure forward to validate_dir).
    • _validate_path in src/devops_cli/commands/kustomize.py (pure forward to validate_path).
    • _project_python_version in src/devops_cli/commands/devcontainer.py (pure forward to get_project_python_version).
    • _validate_version_str in src/devops_cli/commands/install_tools.py (pure forward to validate_version_str).
    • _is_git_ignored in src/devops_cli/ai/review/runner.py (pure forward to is_ignored_by_git).
    • _extract_segment_filenames in src/devops_cli/ai/review/chunker.py (pure forward to _extract_header_filenames).

Acceptance Criteria

  • Remove all identified ad-hoc shims, aliases, and pass-through proxy functions.
  • Update any internal references and tests to call canonical targets directly.
  • Ensure all modified code adheres to cyclomatic complexity <= 10 and nesting depth <= 5.
  • Pass all 10/10 devops ci quality gates.

Activity

  1. added this to the v0.2.15 milestone on Sep 10, 2026
  2. added
    type/refactor
    scope/cli
    priority/p1-high
    status/in-progress
    on Sep 10, 2026
  3. added a commit that references this issue on Sep 10, 2026
    8e2ab70
  4. dan-petty commented on Sep 10, 2026

    @dan-petty
    OwnerAuthor

    Resolved and delivered via PR #95 merged into release/v0.2.15.

  5. added and removed
    status/in-progress
    on Sep 10, 2026
  6. added a commit that references this issue on Sep 10, 2026
    d9c1e63
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p1-highscope/clitype/refactor

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions