Skip to content

simplification: reduce 8 Qlty smells in pool_ops.py #18882

@marcusquinn

Description

@marcusquinn

Qlty Maintainability — .agents/scripts/oauth-pool-lib/pool_ops.py

Smells detected: 8

Rule breakdown

  • qlty:file-complexity: 1
  • qlty:function-complexity: 4
  • qlty:nested-control-flow: 3

This file was flagged by the daily quality sweep for high smell density. The smells are primarily function complexity, nested control flow, and return statement count — all reducible via extract-function refactoring. Prioritise the rules with the highest counts first; they give the biggest grade improvement per edit.

Suggested approach

  1. Read the file and identify the highest-complexity functions
  2. Extract helper functions to reduce per-function complexity below the threshold (~17)
  3. Verify with qlty smells .agents/scripts/oauth-pool-lib/pool_ops.py after each change
  4. No behavior changes — pure structural refactoring

Verification

  • Syntax check: python3 -c "import ast; ast.parse(open('.agents/scripts/oauth-pool-lib/pool_ops.py').read())" (Python) or node --check .agents/scripts/oauth-pool-lib/pool_ops.py (JS/TS)
  • Smell check: qlty smells .agents/scripts/oauth-pool-lib/pool_ops.py --no-snippets --quiet
  • No public API changes

Tier

This issue carries tier:thinking by default (t2066, GH#18774). Simplification refactors on high-complexity functions routinely exceed what Sonnet handles reliably, and Haiku cannot handle them at all. Downgrade the tier label only if you have verified the target functions are under cyclomatic 15.


To approve or decline, comment on this issue:

  • approved — removes the review gate and queues for automated dispatch
  • declined: <reason> — closes this issue (include your reason after the colon)

aidevops.sh v3.8.24 plugin for OpenCode v1.4.3 with claude-opus-4-6 spent 9m and 37,721 tokens on this as a headless worker.

Metadata

Metadata

Assignees

Labels

auto-dispatchAuto-created from TODO.md tagduplicateThis issue or pull request already existsorigin:workerAuto-created by pulse labelless backfill (t2112)simplification-debtTarget file needs simplification before implementation work can proceedsource:quality-sweepAuto-created by stats-functions.sh quality sweepstatus:queuedWorker dispatched, not yet startedtier:thinkingRoute to opus-tier model for dispatch

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions