Skip to content

fix(generate): skip deprecated partner endpoints in the openapi registry (BE-4298)#583

Open
jojodecayz wants to merge 1 commit into
mainfrom
fix/generate-skip-deprecated-endpoints
Open

fix(generate): skip deprecated partner endpoints in the openapi registry (BE-4298)#583
jojodecayz wants to merge 1 commit into
mainfrom
fix/generate-skip-deprecated-endpoints

Conversation

@jojodecayz

Copy link
Copy Markdown

Problem

comfy_cli/command/generate/spec.py's _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 (Comfy-Org/comfy-cloud-mcp-server#805).

Change

  • _is_deprecated_op(op): 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.
  • A registry test proving a deprecated allowlisted endpoint is dropped while its live sibling on the same partner survives.

All 18 tests in test_spec.py pass; ruff check + ruff format clean.

Part of BE-4298. Companion Cloud MCP PR: Comfy-Org/comfy-cloud-mcp-server#805.

🤖 Generated with Claude Code

`_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>
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jul 24, 2026
@github-actions

Copy link
Copy Markdown

🎉 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:

  • Confirm that you own your contribution.
  • Keep the right to reuse your own code.
  • Grant us a copyright license to include and share it within our projects.

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.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d7a8883a-cd0a-454e-846d-ff20b011ce1b

📥 Commits

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

📒 Files selected for processing (2)
  • comfy_cli/command/generate/spec.py
  • tests/comfy_cli/command/generate/test_spec.py

📝 Walkthrough

Walkthrough

Changes

Deprecated endpoint filtering

Layer / File(s) Summary
Deprecation detection rules
comfy_cli/command/generate/spec.py, tests/comfy_cli/command/generate/test_spec.py
Adds case-insensitive detection from the OpenAPI flag or summary text, with tests covering deprecated and non-deprecated operations.
Registry exclusion behavior
comfy_cli/command/generate/spec.py, tests/comfy_cli/command/generate/test_spec.py
Skips deprecated allowlisted endpoints during registry construction while retaining live sibling endpoints, with cache-isolated test coverage.

Suggested reviewers: robinjhuang

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/generate-skip-deprecated-endpoints
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix/generate-skip-deprecated-endpoints

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.

❤️ Share

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

@coderabbitai
coderabbitai Bot requested a review from robinjhuang July 24, 2026 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant