refactor(cli): remove dead command surface (dup dependency decorator, models typo-stub, no-op nodes refresh)#515
Conversation
…, models typo-stub, no-op nodes refresh - dependency: collapse the two stacked @app.command decorators into one (hidden=True + help), so the name registers exactly one implementation. - models: drop the hidden 'did you mean comfy model' typo-stub in cmdline.py; it was shadowed by the real 'models' sub-app and never reachable. - nodes refresh: remove the honest no-op command. object_info is fetched live and the on-disk cache auto-refreshes on every successful 'comfy nodes' command via resilient_load_object_info, so a manual refresh does nothing.
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 18 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @mattmillerai.
Found 1 finding(s).
| Severity | Count |
|---|---|
| 🟠 High | 1 |
Panel: 6/8 reviewers contributed findings.
Reviewers that did not contribute: kimi-k2.5:adversarial (empty), kimi-k2.5:edge-case (empty)
Removing the no-op `nodes refresh` command left dangling guidance pointing users/agents at a now-nonexistent command. Since object_info is fetched live (no cache to populate), replace each reference with the accurate remediation: - run/__init__.py cql_no_graph hint: check cloud sign-in/connection + retry, or use a local server - discovery.py COMMAND_SCHEMAS: drop the `comfy nodes refresh` entry - comfy-debug + comfy SKILL.md: point to retry/live-fetch guidance Raised by cursor-review (gpt-5.3-codex-xhigh edge-case). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Note for whoever merges: the red Windows Specific Commands ( |
ELI-5
The CLI had three "dead" spots on its command surface. Removing them so every
command name means exactly one real thing, and nothing registered does nothing:
dependencywas registered twice (two stacked@app.commanddecorators).models"did you meancomfy model?" typo-stub sat incmdline.py,but it was shadowed by the real
modelssub-app, so it was unreachable dead code.comfy nodes refreshwas an honest no-op — it just printed"nothing to refresh" and exited. A registered command that does nothing erodes
trust in every other command.
What changed
dependency— deduplicated. Collapsed the two stacked@app.commanddecorators into a single
@app.command(hidden=True, help=...). The name nowregisters exactly one implementation. Behavior is unchanged (it was already
effectively hidden — the
hidden=Truedecorator was the one that won), and thefunction body is untouched.
modelstypo-stub — removed. The hiddendef models()incmdline.pywasshadowed by
app.add_typer(..., name="models")(the real model-discoverysub-app), so
comfy modelsalways resolved to the sub-app and the stub'smessage was never reachable. Pure dead-code removal.
nodes refresh— removed.object_infois fetched live on every command,and the on-disk cache is auto-written on each successful fetch via
resilient_load_object_info(cache + refresh-retry + stale fallback). A manualrefreshtherefore has nothing to do — everycomfy nodes <cmd>alreadyrefreshes the cache when the server is reachable. Removed rather than
reimplemented (see note below).
--helpbefore → afterTop-level
comfy --helpcommand list — the only change is thatmodelsrelocates in the list (its help text is unchanged). This is a side effect of
removing the dead stub: the stub registered the
modelskey early (right afterenv), and Python dicts keep a key's first-insertion position even when the valueis later overwritten by the real sub-app. With the stub gone, the
modelskey isfirst inserted where the real sub-app is registered — next to
model/node/nodes, which is where it belongs. No command is added or removed at the top level.comfy nodes --helpcommand list:categories Browse the category tree. - refresh object_info is fetched live from the server on each command — nothing to refresh.(
comfy dependencyremains hidden from the top-level list before and after; theonly difference is
comfy dependency --helpnow shows its description, since theretained decorator carries the
help=text.)Acceptance
dependency(one decorator),
models(sub-app only),nodes refresh(gone). ✓nodes refreshno-op isremoved. ✓
--helpbefore/after diffed — above. ✓Judgment calls
dependencykept hidden, not promoted. The two decorators disagreed(
hidden=Truevs. a visible one with help text); the effective behavior hasalways been hidden (the hidden decorator won). I deduplicated to preserve that
effective behavior — the top-level command list is byte-identical before/after.
Whether
dependencyshould be a visible, documented command is a separateproduct call I did not make here.
nodes refreshremoved, not reimplemented. The ticket allowed "make itactually refresh." I verified there is genuinely nothing for a manual refresh to
do: any
comfy nodescommand that reaches the server already live-fetches andoverwrites the cache (
resilient_load_object_info), and the cache is only everread as a fallback when the server is unreachable — a state a manual refresh
can't fix either. So a real refresh command would still be a no-op. Removal is
the honest fix. (The genuine "refresh object_info" capability is intact and runs
automatically on every nodes command — nothing is being denied.)
Testing
ruff check+ruff format --check— clean.comfy dependency --helpstill works,comfy modelsresolves to the sub-app,
comfy nodes refreshnow returns "No such command".