Skip to content

feat(ai): library api drift and deprecation usage auditor #79

Closed

Description

@dan-petty

Problem or Motivation

When upgrading dependencies, developers lack automated tooling to identify where workspace code uses deprecated, removed, or modified library parameters.

Proposed Solution & Architectural Design

  • Implement devops ai audit-library-usage [OPTIONS] <package_name>.
  • Parse workspace AST calls and compare against the ingested library contracts.
  • Flag deprecated parameters, renamed methods, and signature mismatches with line-level file locations and suggested remediations.

Acceptance Criteria

  • devops ai audit-library-usage reports API mismatches with file paths and line numbers.
  • Rich terminal table and JSON export supported.
  • Unit tests in tests/test_library_drift.py pass with >= 90% coverage.

Activity

  1. added this to the v0.2.14 milestone on Sep 9, 2026
  2. added
    type/feature
    scope/ai
    priority/p2-medium
    on Sep 9, 2026
  3. added a commit that references this issue on Sep 9, 2026
    72d3470
  4. dan-petty commented on Sep 9, 2026

    @dan-petty
    OwnerAuthor

    Completed in commit 72d3470:

    • Implemented LibraryDriftAuditor in src/devops_cli/ai/library/drift_auditor.py auditing workspace AST call sites against indexed library contracts in .data/libraries/.
    • Supports detection of REMOVED_METHOD, UNKNOWN_ATTRIBUTE, UNRECOGNIZED_KWARG, and DEPRECATED_CALL.
    • Exposed CLI command devops ai audit-library-usage [--package <pkg>] [--dir <dir>] [--contracts-dir <dir>] [--fail-on-breaking] [--json].
    • Enforced strict architectural invariants: cyclomatic complexity <= 10 and maximum nesting depth <= 2 via extracted helper functions _audit_file_calls and _audit_call_node.
    • Comprehensive unit tests in tests/test_library_drift_auditor.py (5/5 passed) and full CI quality gate (10/10 passed).
  5. added a commit that references this issue on Sep 10, 2026
    ee87b4a
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/p2-mediumscope/aitype/feature

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions