Skip to content

refactor: sweep dead-code cluster — unused Graph query API, vestigial installers, orphaned helpers (BE-4354)#593

Open
mattmillerai wants to merge 1 commit into
mainfrom
matt/be-4354-dead-code-sweep
Open

refactor: sweep dead-code cluster — unused Graph query API, vestigial installers, orphaned helpers (BE-4354)#593
mattmillerai wants to merge 1 commit into
mainfrom
matt/be-4354-dead-code-sweep

Conversation

@mattmillerai

Copy link
Copy Markdown
Collaborator

ELI-5

Some code in comfy-cli was written but never actually used anywhere — a handful of
query helpers on the CQL Graph, two installer methods, a couple of module-level
helper functions, and a commented-out TODO block. Nothing calls them. This PR
deletes that dead code (~100 lines removed) so the codebase carries less unused
surface. Git history keeps it if it's ever wanted again.

What & why

Dead-code cluster sweep (BE-4354). Every deleted symbol was re-verified as
zero-reference by a word-boundary grep across the whole repo (*.py, *.toml,
*.md) immediately before deletion, and cql/engine.py was confirmed to contain no
getattr/__getattr__ dynamic dispatch that could reach the Graph methods.

Deleted:

  • cql/engine.py Graph: pack_nodes, label_nodes, cloud_disabled_nodes,
    api_nodes, output_nodes, known_labels. The live siblings
    (cloud_enabled_nodes, packs, downstream, find_paths) are untouched.
  • standalone.py: install_comfy_cli, install_comfy (both orphaned; the
    StandalonePython class stays live via other paths).
  • cmdline.py: validate_comfyui (plain function, no decorator, no callers) and
    the commented-out scan_dir # TODO: Move this to proper place block.
  • update.py: get_version_from_pyproject.
  • ui.py: prompt_autocomplete.
  • utils.py: install_conda_package.
  • env_checker.py: EnvChecker.is_isolated_env (get_isolated_env stays).
  • cql/errors.py: CQLRuntimeError.as_details.

Judgment calls (consequential cleanups beyond the ticket's literal list)

To keep the tree lint-clean and free of code my own deletions orphaned:

  • standalone.py run_comfy_cli — its only caller was the deleted install_comfy,
    so it became zero-reference; removed it too.
  • Now-unused imports removed: update.py from importlib.metadata import metadata;
    utils.py subprocess, typer, and the rprint as print shim — each was used
    only by a function deleted here. ruff check on the changed files passes with these
    removed.

Testing

  • ruff check + ruff format --check on all changed files: clean. (The 16
    pre-existing UP038 errors in the untouched workflow_to_api.py are unrelated to
    this PR.)
  • Full suite: uv run --extra dev pytest -q2769 passed, 37 skipped (exit 0).

Note on the negative-claim/falsification check: this is a pure deletion of unused
code. No user-reachable capability is denied — the removed symbols had zero call sites,
so no product path invoked them.

… StandalonePython installers, orphaned helpers (BE-4354)

Delete zero-reference symbols verified by word-boundary grep over the repo:
- cql/engine.py Graph: pack_nodes, label_nodes, cloud_disabled_nodes,
  api_nodes, output_nodes, known_labels (kept cloud_enabled_nodes/packs/
  downstream/find_paths)
- standalone.py: install_comfy_cli, install_comfy (+ run_comfy_cli, orphaned
  once install_comfy went)
- cmdline.py: validate_comfyui + commented-out scan_dir TODO block
- update.py: get_version_from_pyproject (+ now-unused metadata import)
- ui.py: prompt_autocomplete
- utils.py: install_conda_package (+ now-unused subprocess/typer/rprint imports)
- env_checker.py: EnvChecker.is_isolated_env
- cql/errors.py: CQLRuntimeError.as_details
@mattmillerai mattmillerai added agent-coded PR authored by the agent-work loop cursor-review Request Cursor bot review labels Jul 24, 2026
@mattmillerai
mattmillerai marked this pull request as ready for review July 24, 2026 06:59
@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: 2 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: 744900d2-6c92-4d07-ae70-99b7f007aad4

📥 Commits

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

📒 Files selected for processing (8)
  • comfy_cli/cmdline.py
  • comfy_cli/cql/engine.py
  • comfy_cli/cql/errors.py
  • comfy_cli/env_checker.py
  • comfy_cli/standalone.py
  • comfy_cli/ui.py
  • comfy_cli/update.py
  • comfy_cli/utils.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch matt/be-4354-dead-code-sweep
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch matt/be-4354-dead-code-sweep

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

@dosubot dosubot Bot added the size:L This PR changes 100-499 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:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant