Skip to content

analysis: httpie/cli static recon β€” 956-line god file, 17% doc coverage, 84 tier violations#1825

Open
atomadictech wants to merge 1 commit intohttpie:masterfrom
atomadictech:refactor/assade-cli-analysis
Open

analysis: httpie/cli static recon β€” 956-line god file, 17% doc coverage, 84 tier violations#1825
atomadictech wants to merge 1 commit intohttpie:masterfrom
atomadictech:refactor/assade-cli-analysis

Conversation

@atomadictech
Copy link
Copy Markdown

Summary

Automated static analysis of httpie/cli using ASS-ADE (no LLM, pure static analysis in < 2 seconds). Sharing the findings in case they're useful for a future refactor β€” not proposing to merge any structural changes here without maintainer discussion.

What was found

httpie/cli module

File Lines Issue
definition.py 956 Spans 3 responsibility layers: constants, arg group builders, and spec composition
argtypes.py 275 Clean β€” pure transformer functions
options.py 249 Clean β€” composite builder
constants.py 134 Clean β€” pure constants

definition.py at 956 lines is the primary concern. It mixes three layers that are independently testable and independently stable.

Full repo

Metric Value
Doc coverage 17% (189 / 1,107 public callables)
Untested modules 66
Circular imports 2 detected in output/
Test ratio 0.43

What the rebuild showed

Running a tier-partitioned rebuild on httpie/cli (reference only β€” not replacing source):

  • 153 symbols ingested β†’ 101 components classified into 3 tiers
  • 84 violating import edges resolved when symbols are tier-partitioned
  • Output is fully acyclic, 100% structural conformance
Tier Components
a0_qk_constants (pure constants) 11
a1_at_functions (pure functions) 68
a2_mo_composites (composites) 22

Proposed action (if maintainers agree)

  1. Split definition.py into three files: constants.py additions, groups.py (argument group builders), definition.py (spec composition only, < 200 lines). No public API change.

  2. Resolve circular imports in output/ β€” introduce lazy imports or a thin interface module.

  3. Docstring pass on argtypes.py and options.py β€” highest external call surface, lowest documentation.

Files added

Tool

ASS-ADE β€” pip install ass-ade-rebuild. Local, no LLM for recon. Happy to run rebuild --premium for LLM-assisted docstring generation if maintainers want a draft.


If this analysis is off-base or the repo has different conventions, feel free to close. Just sharing what the tooling found.

Automated static analysis of the httpie/cli module using ASS-ADE
(no LLM, pure static analysis < 2s).

Key findings:
- definition.py at 956 lines spans 3 responsibility tiers (constants,
  argument groups, spec composition) β€” split candidate
- 17% docstring coverage across 1,107 public callables
- 2 circular import cycles detected in output/ module
- 66 untested modules across the repo

Rebuild of httpie/cli (reference only, not replacing source):
- 101 components classified into 3 tiers
- 84 violating import edges resolved
- Fully acyclic output, 100% audit pass

See docs/assade_analysis.md for the proposed improvements.
Full reports: RECON_REPORT.md, REBUILD_REPORT.md

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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