Skip to content

Conversation

@christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented Nov 23, 2025

Adds scheduled workflow to bump ComfyUI frontend RC releases every Monday at noon PST.

Implementation

  • Resolver script (scripts/cicd/resolve-comfyui-release.ts): Checks ComfyUI requirements.txt and determines next minor version, compares branch commits to latest patch tag
  • Workflow (.github/workflows/weekly-comfyui-release.yaml):
    • Scheduled for Monday 20:00 UTC (noon PST)
    • Manual dispatch supported for testing/off-cycle runs
    • Three jobs: resolve version → trigger release if needed → create ComfyUI PR
  • Reuses existing release-version-bump.yaml workflow
  • Creates draft PR from fork to comfyanonymous/ComfyUI with updated requirements.txt
  • Includes error handling and validation for all steps
  • Force pushes to same branch weekly to maintain single open PR

Testing

  • Resolver script tested locally: correctly identified v1.28.8 → v1.29.4 with release needed
  • yamllint passes
  • knip passes with gh binary added to ignore list

Follow-up

Can test via workflow_dispatch once merged, or in this PR if we enable Actions on branch.

┆Issue is synchronized with this Notion page by Unito

Adds scheduled workflow to bump ComfyUI frontend RC releases every Monday at noon PST.

- Resolver script checks ComfyUI requirements.txt and determines next minor version
- Triggers release workflow if commits exist since last patch tag
- Creates draft PR to comfyanonymous/ComfyUI with updated requirements.txt
- Reuses existing release-version-bump workflow and comment actions
- Includes error handling and validation for all steps
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Nov 23, 2025
@coderabbitai
Copy link

coderabbitai bot commented Nov 23, 2025

📝 Walkthrough

Walkthrough

Introduces a scheduled/manual GitHub Actions workflow and a TypeScript resolver that compute ComfyUI frontend release metadata, optionally dispatch the frontend release workflow, and create/update a draft PR on a configurable fork to bump the comfyui-frontend package version.

Changes

Cohort / File(s) Summary
GitHub Actions workflow
.github/workflows/weekly-comfyui-release.yaml
New scheduled/manual workflow that runs the resolver, validates resolver JSON, conditionally dispatches the frontend release-version-bump workflow, and creates/updates a draft PR on a configured comfyui fork to bump comfyui-frontend in requirements.txt.
CICD resolver script
scripts/cicd/resolve-comfyui-release.ts
New TypeScript script exporting resolveRelease(...) and ReleaseInfo; reads requirements.txt, validates semver, inspects frontend repo tags/branches/commits, computes target_version, needs_release, diff_url, and emits JSON for CI.
Config update
knip.config.ts
Adds 'gh' to ignoreBinaries.

Sequence Diagram

sequenceDiagram
    autonumber
    participant Scheduler as Scheduler / Manual
    participant Workflow as weekly-comfyui-release
    participant Resolver as resolve-comfyui-release.ts
    participant Frontend as comfyui-frontend repo
    participant ReleaseWf as release-version-bump workflow
    participant Fork as comfyui fork repo
    participant Upstream as comfyui upstream

    Scheduler->>Workflow: trigger (schedule / manual)
    Workflow->>Resolver: run resolver (comfyui path, frontend path)
    Resolver->>Frontend: query tags, branches, commits
    Frontend-->>Resolver: tags/branch heads/SHAs
    Resolver-->>Workflow: emit ReleaseInfo JSON

    alt ReleaseInfo.needs_release == true
        Workflow->>ReleaseWf: dispatch release workflow (branch, version)
        ReleaseWf-->>Workflow: release run metadata / URL
    end

    Workflow->>Fork: checkout fork, update `requirements.txt` bump
    Workflow->>Fork: push branch `automation/comfyui-frontend-bump`
    Workflow->>Upstream: create/update draft PR (fork -> upstream)
    Upstream-->>Workflow: PR URL / status
Loading
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ci/update-core-cron

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0b0cb45 and 335ea3e.

📒 Files selected for processing (1)
  • .github/workflows/weekly-comfyui-release.yaml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/weekly-comfyui-release.yaml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: lint-and-format
  • GitHub Check: test
  • GitHub Check: setup
  • GitHub Check: collect

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

@github-actions
Copy link

github-actions bot commented Nov 23, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 11/26/2025, 01:08:00 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Nov 23, 2025

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 11/26/2025, 01:17:11 AM UTC

📈 Summary

  • Total Tests: 496
  • Passed: 484 ✅
  • Failed: 0
  • Flaky: 3 ⚠️
  • Skipped: 9 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 475 / ❌ 0 / ⚠️ 3 / ⏭️ 9
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 6 / ❌ 0 / ⚠️ 0 / ⏭️ 0

🎉 Click on the links above to view detailed test results for each browser configuration.

@github-actions
Copy link

github-actions bot commented Nov 23, 2025

Bundle Size Report

Summary

  • Raw size: 17 MB baseline 17 MB — ⚪ 0 B
  • Gzip: 3.36 MB baseline 3.36 MB — ⚪ 0 B
  • Brotli: 2.58 MB baseline 2.58 MB — ⚪ 0 B
  • Bundles: 93 current • 93 baseline

Category Glance
Vendor & Third-Party ⚪ 0 B (8.56 MB) · Other ⚪ 0 B (3.84 MB) · App Entry Points ⚪ 0 B (3.18 MB) · Graph Workspace ⚪ 0 B (944 kB) · Panels & Settings ⚪ 0 B (298 kB) · UI Components ⚪ 0 B (139 kB) · + 3 more

Per-category breakdown
App Entry Points — 3.18 MB (baseline 3.18 MB) • ⚪ 0 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-CdpN812c.js 345 B 345 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/index-D48FzoB6.js 2.95 MB 2.95 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/index-sX64gFEr.js 227 kB 227 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Graph Workspace — 944 kB (baseline 944 kB) • ⚪ 0 B

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-G_Ht0XUL.js 944 kB 944 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Views & Navigation — 6.54 kB (baseline 6.54 kB) • ⚪ 0 B

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/UserSelectView-B_3TUNaE.js 6.54 kB 6.54 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Panels & Settings — 298 kB (baseline 298 kB) • ⚪ 0 B

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/AboutPanel-9pDwLy7Z.js 9.16 kB 9.16 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/CreditsPanel-Ta8OaIni.js 21.4 kB 21.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/ExtensionPanel-DzKUFrXu.js 10.4 kB 10.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/KeybindingPanel-NgrgAmAp.js 13.6 kB 13.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/ServerConfigPanel-BpZEpbuc.js 6.56 kB 6.56 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BXTtSH4O.js 33.3 kB 33.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-C9Pzn-NG.js 25.2 kB 25.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CCy2fA_h.js 27.3 kB 27.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CQpqEFfl.js 26.6 kB 26.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DHcnxypw.js 21.7 kB 21.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DhFTK9fY.js 25.1 kB 25.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DlT4t_ui.js 25.9 kB 25.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DRgSrIdD.js 24.2 kB 24.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-tjkeqiZq.js 21.1 kB 21.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/UserPanel-DDbFAXfu.js 6.23 kB 6.23 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
UI Components — 139 kB (baseline 139 kB) • ⚪ 0 B

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/ComfyQueueButton-B-ce0tOv.js 7.73 kB 7.73 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/LazyImage.vue_vue_type_script_setup_true_lang-DNzEEbAp.js 10.8 kB 10.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/Load3D.vue_vue_type_script_setup_true_lang-CL6gZJ6S.js 53.9 kB 53.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-bnTYXX18.js 897 B 897 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-B4qnwhJi.js 1.34 kB 1.34 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetButton-0Kc6B4DO.js 2.04 kB 2.04 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-CBjDIEOk.js 12.8 kB 12.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-Bre8WloN.js 2.16 kB 2.16 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-Deplz3gP.js 46.9 kB 46.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 B

Stores, services, APIs, and repositories

File Before After Δ Raw Δ Gzip Δ Brotli
assets/audioService-DvB3-2c3.js 2.2 kB 2.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/keybindingService-B2EwpY0K.js 7.51 kB 7.51 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/serverConfigStore-NS6ibDz2.js 2.83 kB 2.83 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Utilities & Hooks — 2.94 kB (baseline 2.94 kB) • ⚪ 0 B

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/audioUtils-CmH0-__r.js 1.41 kB 1.41 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/mathUtil-CTARWQ-l.js 1.07 kB 1.07 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeFilterUtil-CXKCRJ-m.js 460 B 460 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
Vendor & Third-Party — 8.56 MB (baseline 8.56 MB) • ⚪ 0 B

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-chart-Bc7F9itp.js 452 kB 452 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-other-BUi7FCLE.js 3.98 MB 3.98 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-primevue-DTsA3ueY.js 1.96 MB 1.96 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-three-aR6ntw5X.js 1.37 MB 1.37 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-tiptap-CaFtSsrn.js 232 kB 232 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-vue-xOQVyCMJ.js 160 kB 160 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-BZLod3g9.js 407 kB 407 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
Other — 3.84 MB (baseline 3.84 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/AudioPreviewPlayer-DFhOqfm8.js 13.6 kB 13.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-_s-RvhJR.js 13.6 kB 13.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BuUILW6P.js 13 kB 13 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BV4R6fLx.js 14.9 kB 14.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CLwPdnT6.js 14.2 kB 14.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CWMchBmd.js 15.9 kB 15.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DazTQhtc.js 12.9 kB 12.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DmWrOe93.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DwiH7Kr6.js 13.8 kB 13.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-mS3LCNPn.js 14.5 kB 14.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/Load3D-CyDtunBD.js 424 B 424 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-5lOBdqcC.js 84.5 kB 84.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BOCuaVpE.js 73.4 kB 73.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-ClrEFGUz.js 72.4 kB 72.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CyNU0iQX.js 99.3 kB 99.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-D7gwLxft.js 114 kB 114 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DC8o4BCt.js 86.8 kB 86.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DKiesCV4.js 94.3 kB 94.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Hq2q-OtB.js 83.6 kB 83.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-USAlAlnj.js 82 kB 82 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/Media3DBottom-5EwJUO56.js 1.5 kB 1.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/Media3DTop-t2Pi2aET.js 1.49 kB 1.49 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioBottom-DJuRPZf6.js 1.52 kB 1.52 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaAudioTop-ClVHGsSJ.js 1.46 kB 1.46 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageBottom-BOKoE8Wh.js 1.57 kB 1.57 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaImageTop-BTxsJ9KT.js 1.68 kB 1.68 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoBottom-DKgJzO9w.js 1.52 kB 1.52 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/MediaVideoTop-P2MYHlgs.js 2.76 kB 2.76 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-_Px5dSNW.js 306 kB 306 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-7z21KPoS.js 285 kB 285 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BWKZzBPK.js 346 kB 346 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CGbgH4Yl.js 320 kB 320 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CjjjdWkV.js 313 kB 313 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CVrNtxvj.js 288 kB 288 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DLRSA0IK.js 309 kB 309 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DQV2gnwA.js 372 kB 372 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-ofqLG5vz.js 310 kB 310 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetAudioUI-CB8D07W5.js 2.82 kB 2.82 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetChart-DaKVD7Py.js 2.48 kB 2.48 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetColorPicker-WNKTB2tH.js 3.41 kB 3.41 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetGalleria-BwH5YfAu.js 4.1 kB 4.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetImageCompare-DE5-CeXh.js 2.21 kB 2.21 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetInputNumber-DYsT0stF.js 595 B 595 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetInputText-jVONytVY.js 1.99 kB 1.99 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetLegacy-Bg8RJXSn.js 364 B 364 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetMarkdown-CWineY58.js 3.16 kB 3.16 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-BIbGSUAt.js 1.28 kB 1.28 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetRecordAudio-DUM733ta.js 20.5 kB 20.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetSelect-BC8dqw-l.js 655 B 655 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetTextarea-J8IxDnwC.js 2.54 kB 2.54 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/WidgetToggleSwitch-C4CwjhXJ.js 1.76 kB 1.76 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (4)
.github/workflows/weekly-comfyui-release.yaml (2)

224-240: Force-push strategy overwrites branch history weekly.

The workflow uses git push -f to overwrite the branch each week. This is intentional per the PR description ("force-pushes the same branch weekly to maintain a single open PR"), but be aware this destroys the branch history.

If the PR has review comments or commits from maintainers, they will be lost. Consider documenting this behavior in a comment.

Add a comment to clarify the intent:

           # Force push to fork (overwrites previous week's branch)
+          # Note: This intentionally destroys branch history to maintain a single PR
+          # Any review comments or changes will need to be re-applied
           if ! git push -f origin "$BRANCH"; then

245-261: PR existence check has a logic issue.

The PR creation logic attempts to create a PR, and if it fails, checks if a PR already exists. However, line 255 checks for PR existence but doesn't capture the output, then the condition always evaluates to true based on the command's exit code.

The logic works but could be clearer. Consider simplifying:

           # Try to create PR, ignore error if it already exists
           if ! gh pr create \
             --repo comfyanonymous/ComfyUI \
             --head "${FORK_OWNER}:${BRANCH}" \
             --base master \
             --title "Bump comfyui-frontend-package to ${{ needs.resolve-version.outputs.target_version }}" \
             --body "$PR_BODY" \
             --draft 2>&1; then
 
             # Check if PR already exists
-            if gh pr list --repo comfyanonymous/ComfyUI --head "${FORK_OWNER}:${BRANCH}" --json number --jq '.[0].number' > /dev/null 2>&1; then
+            EXISTING_PR=$(gh pr list --repo comfyanonymous/ComfyUI --head "${FORK_OWNER}:${BRANCH}" --json number --jq '.[0].number' 2>/dev/null || echo "")
+            if [ -n "$EXISTING_PR" ]; then
               echo "PR already exists, updating branch will update the PR"
             else
               echo "Failed to create PR and no existing PR found"
               exit 1
             fi
           fi
scripts/cicd/resolve-comfyui-release.ts (2)

19-32: Silent error handling may mask critical failures.

The exec function catches all errors and returns an empty string, which silently suppresses failures. While this works for optional operations (like checking if a tag exists), it could hide critical errors for required operations (like fetching from git repos).

Consider logging errors to stderr before returning empty string, or accepting a parameter to control error behavior:

 function exec(command: string, cwd?: string): string {
   try {
     return execSync(command, {
       cwd,
       encoding: 'utf-8',
       stdio: ['pipe', 'pipe', 'pipe']
     }).trim()
   } catch (error) {
+    console.error(`Command failed: ${command}`)
+    if (error instanceof Error) {
+      console.error(error.message)
+    }
     return ''
   }
 }

59-89: Consider using git's native version sorting.

The manual semantic sort implementation is correct, but git has built-in version sorting that's more robust and handles edge cases like pre-release versions.

 function getLatestPatchTag(repoPath: string, minor: number): string | null {
   // Fetch all tags
   exec('git fetch --tags', repoPath)
 
-  // List all tags matching v1.{minor}.*
-  const tags = exec(`git tag -l 'v1.${minor}.*'`, repoPath)
-    .split('\n')
-    .filter((tag) => tag.trim() !== '')
-
-  if (tags.length === 0) {
+  // Get the latest tag matching v1.{minor}.* using git's version sort
+  const latestTag = exec(
+    `git tag -l 'v1.${minor}.*' --sort=-version:refname | head -n 1`,
+    repoPath
+  )
+  
+  if (!latestTag) {
     return null
   }
 
-  // Sort tags by version (semantic sort)
-  const sortedTags = tags.sort((a, b) => {
-    const aParts = a.replace('v', '').split('.').map(Number)
-    const bParts = b.replace('v', '').split('.').map(Number)
-
-    for (let i = 0; i < 3; i++) {
-      if (aParts[i] !== bParts[i]) {
-        return aParts[i] - bParts[i]
-      }
-    }
-    return 0
-  })
-
-  return sortedTags[sortedTags.length - 1]
+  return latestTag
 }
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 58b051a and dcac2c5.

📒 Files selected for processing (3)
  • .github/workflows/weekly-comfyui-release.yaml (1 hunks)
  • knip.config.ts (1 hunks)
  • scripts/cicd/resolve-comfyui-release.ts (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/weekly-comfyui-release.yaml

2-2: unexpected key "description" for "workflow" section. expected one of "concurrency", "defaults", "env", "jobs", "name", "on", "permissions", "run-name"

(syntax-check)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: setup
  • GitHub Check: test
  • GitHub Check: collect
  • GitHub Check: lint-and-format
🔇 Additional comments (4)
knip.config.ts (1)

30-30: LGTM! Necessary addition for the new workflow.

The 'gh' binary is used extensively in the new weekly-comfyui-release.yaml workflow, so adding it to ignoreBinaries prevents false positives from Knip.

scripts/cicd/resolve-comfyui-release.ts (3)

1-17: LGTM! Clean interface definition.

The ReleaseInfo interface is well-structured with clear field names and appropriate types for all release metadata.


34-57: LGTM! Robust version parsing.

The function correctly handles multiple version operators and provides clear error messages. The regex pattern appropriately captures semantic versions.


187-209: LGTM! Clean main execution flow.

The argument parsing, error handling, and JSON output are well-implemented. The export at the end allows the function to be used programmatically.

- Validate currentVersion and tagVersion format before destructuring
- Check for 3-part versions with numeric parts
- Guard parseInt with radix and NaN check
- Validate existingPatch is finite number before increment
- Return null early on invalid formats with descriptive errors
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Nov 24, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
scripts/cicd/resolve-comfyui-release.ts (1)

230-251: LGTM!

The main execution block appropriately validates required arguments and exits with proper error codes. JSON output format is well-suited for GitHub Actions consumption.

Optionally, you could add upfront validation that the paths exist and are git repositories before calling resolveRelease:

if (!fs.existsSync(comfyuiRepoPath) || !fs.existsSync(path.join(comfyuiRepoPath, '.git'))) {
  console.error(`Invalid ComfyUI repository path: ${comfyuiRepoPath}`)
  process.exit(1)
}

if (!fs.existsSync(frontendRepoPath) || !fs.existsSync(path.join(frontendRepoPath, '.git'))) {
  console.error(`Invalid frontend repository path: ${frontendRepoPath}`)
  process.exit(1)
}

This would provide clearer error messages, but it's not essential since the git commands will fail anyway with descriptive errors.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between dcac2c5 and 056f190.

📒 Files selected for processing (1)
  • scripts/cicd/resolve-comfyui-release.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: lint-and-format
  • GitHub Check: test
  • GitHub Check: collect
  • GitHub Check: setup
🔇 Additional comments (4)
scripts/cicd/resolve-comfyui-release.ts (4)

6-17: LGTM!

The ReleaseInfo interface is well-structured and includes all necessary metadata for tracking release state, version progression, and PR references.


38-57: LGTM!

The regex comprehensively handles Python requirements operators, and the error handling with null returns is appropriate for the calling context.


62-76: LGTM!

The validation is thorough, and the String(num) === part check at line 74 cleverly prevents edge cases like leading zeros ("01") or trailing characters ("3extra").


125-197: LGTM! Version validation concerns from prior reviews have been addressed.

The function now validates:

  • currentVersion format before destructuring (lines 125-131)
  • tagVersion format before destructuring (lines 183-189)
  • existingPatch is a valid non-negative number (lines 193-197)
  • commitCount NaN case is handled (line 178)

All destructuring operations are now protected by validation checks, preventing the runtime issues flagged in previous reviews.

- Replace -i with -i.bak for BSD/macOS compatibility
- Use [0-9.][0-9.]* instead of GNU-specific [0-9.]\+
- Store version in variable for cleaner shell expansion
- Remove .bak file after successful replace
@christian-byrne christian-byrne requested a review from a team as a code owner November 25, 2025 21:21
- Add regex filter for valid semver tags (vX.Y.Z format)
- Prevent NaN from malformed tags like v1.28.x or v1.28
- Return null if no valid tags found after filtering
- Log descriptive error showing malformed tags
- Log command, cwd, and error message when exec fails
- Preserve existing empty-string fallback behavior
- Improve debugging for command execution failures
- Remove sleep + polling for workflow run ID
- Use generic links to workflow runs page instead of specific run
- Eliminates race condition and timeout complexity
- Cleaner job summary with branch and version info
- Install dependencies in frontend directory
- Ensures tsx devDependency is available for resolver script
- Use --frozen-lockfile for reproducible builds
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
.github/workflows/weekly-comfyui-release.yaml (1)

1-2: Remove invalid "description" field (duplicate issue).

Line 2 contains a "description" field that is not valid at the workflow root level in GitHub Actions. This was flagged in a previous review and is still present.

Apply this diff to remove it:

 name: "Weekly ComfyUI Release"
-description: "Automated weekly workflow to bump ComfyUI frontend RC releases"
 
 on:

Alternatively, convert it to a YAML comment to preserve the documentation:

 name: "Weekly ComfyUI Release"
+# Automated weekly workflow to bump ComfyUI frontend RC releases
 
 on:
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 056f190 and 0b0cb45.

📒 Files selected for processing (2)
  • .github/workflows/weekly-comfyui-release.yaml (1 hunks)
  • scripts/cicd/resolve-comfyui-release.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/cicd/resolve-comfyui-release.ts
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/weekly-comfyui-release.yaml

2-2: unexpected key "description" for "workflow" section. expected one of "concurrency", "defaults", "env", "jobs", "name", "on", "permissions", "run-name"

(syntax-check)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: setup
  • GitHub Check: lint-and-format
  • GitHub Check: test
  • GitHub Check: collect
🔇 Additional comments (5)
.github/workflows/weekly-comfyui-release.yaml (5)

45-57: ✓ Dependency installation properly configured (past issue resolved).

The pnpm and Node.js setup, followed by pnpm install --frozen-lockfile, correctly addresses the previous concern that tsx devDependency would be unavailable. The correct order and working-directory specification ensure dependencies are installed before the resolver script executes.


154-156: ✓ sed command is POSIX-compatible (past issue resolved).

The sed invocation correctly uses -i.bak (portable across BSD and GNU sed) and the POSIX-compatible regex [0-9.][0-9.]* instead of the GNU-specific \+ metacharacter. The backup is properly cleaned up afterward. This resolves the previous cross-platform portability concern.


99-132: ✓ Simplified trigger logic avoids race condition (past concern resolved).

The trigger-release-if-needed job uses a straightforward gh workflow run invocation without attempting to fetch or track the resulting workflow run ID. This avoids the race condition and misleading output name flagged in the previous review. The summary provides a direct link to workflow runs for visibility.


59-97: ✓ Robust error handling and JSON validation in resolver step.

The resolver step includes proper defensive coding: set -euo pipefail for fail-fast behavior, JSON validation with jq empty, and explicit error messages. All required outputs are correctly parsed and populated. The step summary provides helpful debugging information with the diff URL and version details.


208-231: ✓ Git operations properly configured for weekly branch reuse.

The git configuration, branch creation with reuse (git checkout -B), and conditional commit logic are appropriate. The force push correctly maintains a single updated branch weekly, and the commit guard prevents empty commits on subsequent runs with no changes.

Comment on lines +233 to +249
# Try to create PR, ignore error if it already exists
if ! gh pr create \
--repo comfyanonymous/ComfyUI \
--head "${FORK_OWNER}:${BRANCH}" \
--base master \
--title "Bump comfyui-frontend-package to ${{ needs.resolve-version.outputs.target_version }}" \
--body "$PR_BODY" \
--draft 2>&1; then

# Check if PR already exists
if gh pr list --repo comfyanonymous/ComfyUI --head "${FORK_OWNER}:${BRANCH}" --json number --jq '.[0].number' > /dev/null 2>&1; then
echo "PR already exists, updating branch will update the PR"
else
echo "Failed to create PR and no existing PR found"
exit 1
fi
fi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Fix empty PR list check to avoid masking real errors.

Line 243 attempts to detect existing PRs by checking if gh pr list succeeds, but this logic is flawed:

  • When gh pr list returns no results, the exit code is still 0 (success)
  • The condition if gh pr list ... > /dev/null 2>&1; is true even when no PR exists
  • This causes the script to incorrectly report "PR already exists" when PR creation actually failed due to auth errors, API issues, or other transient problems
  • Real failures are silently masked, degrading observability and reliability

Check whether the jq output is non-empty instead of just checking the command exit code:

-            # Check if PR already exists
-            if gh pr list --repo comfyanonymous/ComfyUI --head "${FORK_OWNER}:${BRANCH}" --json number --jq '.[0].number' > /dev/null 2>&1; then
+            # Check if PR already exists (verify jq output is non-empty)
+            if [ -n "$(gh pr list --repo comfyanonymous/ComfyUI --head "${FORK_OWNER}:${BRANCH}" --json number --jq '.[0].number' 2>/dev/null)" ]; then
               echo "PR already exists, updating branch will update the PR"
             else
               echo "Failed to create PR and no existing PR found"

This ensures the branch-exists check only succeeds if a PR number is actually returned.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Try to create PR, ignore error if it already exists
if ! gh pr create \
--repo comfyanonymous/ComfyUI \
--head "${FORK_OWNER}:${BRANCH}" \
--base master \
--title "Bump comfyui-frontend-package to ${{ needs.resolve-version.outputs.target_version }}" \
--body "$PR_BODY" \
--draft 2>&1; then
# Check if PR already exists
if gh pr list --repo comfyanonymous/ComfyUI --head "${FORK_OWNER}:${BRANCH}" --json number --jq '.[0].number' > /dev/null 2>&1; then
echo "PR already exists, updating branch will update the PR"
else
echo "Failed to create PR and no existing PR found"
exit 1
fi
fi
# Try to create PR, ignore error if it already exists
if ! gh pr create \
--repo comfyanonymous/ComfyUI \
--head "${FORK_OWNER}:${BRANCH}" \
--base master \
--title "Bump comfyui-frontend-package to ${{ needs.resolve-version.outputs.target_version }}" \
--body "$PR_BODY" \
--draft 2>&1; then
# Check if PR already exists (verify jq output is non-empty)
if [ -n "$(gh pr list --repo comfyanonymous/ComfyUI --head "${FORK_OWNER}:${BRANCH}" --json number --jq '.[0].number' 2>/dev/null)" ]; then
echo "PR already exists, updating branch will update the PR"
else
echo "Failed to create PR and no existing PR found"
exit 1
fi
fi
🤖 Prompt for AI Agents
In .github/workflows/weekly-comfyui-release.yaml around lines 233 to 249, the
current check treats a successful gh pr list with no results as an existing PR
and masks real failures; change the logic to capture both the command exit
status and its jq output: run gh pr list --jq '.[0].number' into a variable,
check the gh command exit code first and if non-zero fail the workflow with an
error, otherwise check whether the captured output is non-empty to decide "PR
already exists" vs "no existing PR" and only then take the appropriate action.

- Move description to YAML comment
- GitHub Actions does not support top-level description field
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants