fix(generate): skip deprecated partner endpoints in the openapi registry (BE-4298) - #583
fix(generate): skip deprecated partner endpoints in the openapi registry (BE-4298)#583jojodecayz wants to merge 2 commits into
Conversation
`_registry()` built an Endpoint for every allowlisted `/proxy` op with no
deprecation check, so a retired endpoint would surface through `comfy generate`
(list + run) if it lingered in the allowlist or was deprecated upstream after a
`generate refresh`. comfy-api flags deprecation in the operation SUMMARY, not
the machine `deprecated` flag.
Mirrors the Cloud MCP partner-catalog generator's deprecation filter for
cross-surface parity.
- Add `_is_deprecated_op(op)`: true when `op.deprecated is True` OR the SUMMARY
matches /deprecated/i. Summary-only (not description) is deliberate — the live
`stability/.../generate/sd3` endpoint is current ("Stable Diffusion 3.5") yet
its description mentions the older SD 3.0 API being deprecated; a
description-wide scan would wrongly drop it.
- Skip deprecated ops in `_registry()`, same silent-skip contract as the
existing missing-node case.
- Tests: `_is_deprecated_op` cases incl. the sd3 false-positive guard, and a
registry test proving a deprecated allowlisted endpoint is dropped while its
live sibling survives.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
🎉 Thank you for your contribution, we really appreciate it! 🎉 Like many open source projects, we require contributors to sign our Contributor License Agreement (CLA). A CLA makes the ownership of contributions explicit, so contributors and the project share a clear understanding of how the code can be used. By signing, you:
CLAs are standard practice across major open source projects including those under the Apache Software Foundation and the Linux Foundation. Ours is based on the Apache Software Foundation's CLA. Most importantly, it would enable us to relicense the project under a more permissive license in the future, giving the project and its community greater flexibility. ✍ To sign, please post a new comment on this PR with exactly the following text: ✍ I have read and agree to the Contributor License Agreement You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
📝 WalkthroughWalkthroughChangesDeprecated endpoint filtering
Suggested reviewers: 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Logic and tests look right — faithful port of the MCP-side rule, same One inconsistency worth closing: this drops silently. if _is_deprecated_op(op):
# Never surface a deprecated endpoint through `comfy generate`.
# Same silent-skip contract as the missing-node case above...
continueBE-4298 specifies "Skip deprecated ops from the catalog/registry, recorded visibly (never silent)", and the MCP half honours that by pushing each drop into Suggest matching #805: emit a diagnostic naming the skipped endpoint and the reason. |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
comfy_cli/command/generate/spec.py (1)
357-357: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick winRecord skipped endpoints with their reasons.
These branches remove endpoints without a visible record.
comfy generate listcannot distinguish spec drift from deprecation. BE-4298 requires skipped endpoints to be reported visibly.Record or emit a diagnostic that includes
endpoint_idand the reason, such asspec_driftordeprecated. This makes false-positive filtering detectable.Also applies to: 361-366
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@comfy_cli/command/generate/spec.py` at line 357, Update the endpoint-filtering branches around the spec-drift and deprecation continues to record or emit a visible diagnostic for every skipped endpoint. Include endpoint_id and a reason identifying whether it was skipped for spec_drift or deprecated, so comfy generate list can distinguish and report both cases.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@comfy_cli/command/generate/spec.py`:
- Line 357: Update the endpoint-filtering branches around the spec-drift and
deprecation continues to record or emit a visible diagnostic for every skipped
endpoint. Include endpoint_id and a reason identifying whether it was skipped
for spec_drift or deprecated, so comfy generate list can distinguish and report
both cases.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 6cd5e54e-23a4-4553-b697-0a82625d6cd8
📒 Files selected for processing (1)
comfy_cli/command/generate/spec.py
mattmillerai
left a comment
There was a problem hiding this comment.
@jojodecayz If you can accept the CLA (see link in comment above), I can approve this. Thanks!
Problem
comfy_cli/command/generate/spec.py's_registry()built anEndpointfor every allowlisted/proxyop with no deprecation check, so a retired endpoint would surface throughcomfy generate(list + run) if it lingered in the allowlist or was deprecated upstream after agenerate refresh. comfy-api flags deprecation in the operationsummary, not the machinedeprecatedflag.Mirrors the Cloud MCP partner-catalog generator's deprecation filter for cross-surface parity (Comfy-Org/comfy-cloud-mcp-server#805).
Change
_is_deprecated_op(op):op.deprecated is TrueOR the summary matches/deprecated/i. Summary-only (not description) is deliberate — the livestability/.../generate/sd3endpoint is current ("Stable Diffusion 3.5") yet its description mentions the older SD 3.0 API being deprecated; a description-wide scan would wrongly drop it._registry(), same silent-skip contract as the existing missing-node case.Tests
_is_deprecated_opcases incl. the sd3 false-positive guard.All 18 tests in
test_spec.pypass;ruff check+ruff formatclean.Part of BE-4298. Companion Cloud MCP PR: Comfy-Org/comfy-cloud-mcp-server#805.
🤖 Generated with Claude Code