Skip to content

refactor(uv): delete dead 'dists' packaging path (BE-4351) - #592

Open
mattmillerai wants to merge 1 commit into
mainfrom
matt/be-4351-delete-dead-dists-path
Open

refactor(uv): delete dead 'dists' packaging path (BE-4351)#592
mattmillerai wants to merge 1 commit into
mainfrom
matt/be-4351-delete-dead-dists-path

Conversation

@mattmillerai

Copy link
Copy Markdown
Collaborator

ELI-5

comfy-cli has a helper class (DependencyCompiler in uv.py) that knows how to fetch and install Python packages for a Comfy workspace. Over time it grew two parallel ways to do the same job:

  • a wheels path (fetch pre-built .whl files, then install them), and
  • a dists/sdists path (fetch source distributions via pip download, then install them).

Only the wheels path is actually wired up and used (by standalone.py). The dists path — five methods totaling ~80 lines — is never called from anywhere, has no tests, and had already drifted out of sync with the live path. This PR deletes that dead half. Nothing users can do changes; there's just less unused code to trip over.

What changed

Deleted from comfy_cli/uv.py (pure removal, no behavior change):

  • DependencyCompiler.Download (static method) — a near-duplicate of the kept Wheel method, differing only in the pip subcommand (download vs wheel) and output flag (-d vs -w). Its only caller was fetch_dep_dists.
  • fetch_dep_dists
  • install_dists
  • install_wheels (note: not install_wheels_directly, which is the live one and is kept)
  • sync_core_plus_ext

Kept untouched (the live wheels path): Wheel, fetch_dep_wheels, install_wheels_directly, install_deps, compile_deps. The live install flow is standalone.pyfetch_dep_wheels (→ Wheel) → install_wheels_directly.

Why it's safe

  • Zero call sites. Word-boundary grep for each deleted symbol across the entire repo (not just comfy_cli/ + tests/) — including string literals and any dynamic dispatch — returns nothing outside uv.py. No getattr-style dispatch on DependencyCompiler exists.
  • Live path preserved. standalone.py only references compile_deps, fetch_dep_wheels, install_wheels_directly, and install_deps, all unchanged.
  • Full test suite green: 2769 passed, 37 skipped. ruff check + ruff format --diff clean.
  • Git history preserves the sdist path if a future offline-install feature on wheel-less platforms ever wants it.

Judgment call / follow-up

  • DependencyCompiler.Sync (a low-level static pip-sync wrapper) is left in place. Its only caller was the now-deleted sync_core_plus_ext, so it becomes newly-orphaned by this change. It was not in the ticket's explicit deletion list (which enumerated exactly 5 symbols), so I kept the diff scoped and did not delete it as a drive-by — it sits alongside the other primitive pip wrappers (Install, Compile, Wheel). Flagging it as a candidate for a small follow-up cleanup if desired.

Testing

  • uv run --locked --extra dev pytest -q2769 passed, 37 skipped
  • ruff check comfy_cli/uv.py → All checks passed
  • ruff format --diff comfy_cli/uv.py → already formatted

Remove DependencyCompiler.Download, fetch_dep_dists, install_dists,
install_wheels, and sync_core_plus_ext. All five had zero call sites
anywhere in comfy_cli/ or tests/ (verified by word-boundary grep). The
live standalone-install path is wheels-only:
standalone.py -> fetch_dep_wheels (Wheel) -> install_wheels_directly,
all of which are kept untouched.

Download duplicated Wheel modulo the pip subcommand (download vs wheel)
and output flag (-d vs -w); its sole caller was fetch_dep_dists, so the
duplication disappears with the dead half. Git history preserves the
sdist path if a future offline-install feature ever needs it.
@mattmillerai mattmillerai added agent-coded PR authored by the agent-work loop cursor-review Request Cursor bot review labels Jul 24, 2026
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 12 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4744878b-e618-489f-9f29-de6c963630b1

📥 Commits

Reviewing files that changed from the base of the PR and between 85b62da and 95b2db3.

📒 Files selected for processing (1)
  • comfy_cli/uv.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch matt/be-4351-delete-dead-dists-path
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch matt/be-4351-delete-dead-dists-path

Comment @coderabbitai help to get the list of available commands.

@mattmillerai
mattmillerai marked this pull request as ready for review July 24, 2026 06:49
@dosubot dosubot Bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Jul 24, 2026

@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.

🔍 Cursor Review — Consolidated panel

Triggered by @mattmillerai.

✅ No high-signal findings.

Panel: 6/8 reviewers contributed findings.

Reviewers that did not contribute: kimi-k2.5:adversarial (empty), kimi-k2.5:edge-case (empty)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-coded PR authored by the agent-work loop cursor-review Request Cursor bot review size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant