mirror of
https://github.com/Comfy-Org/Comfy-PR.git
synced 2026-11-04 23:37:33 +00:00
[PR #185] [MERGED] fix(gh-design): thread repeated Slack discussion updates #184
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/Comfy-PR#184
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/Comfy-PR/pull/185
Author: @benceruleanlu
Created: 3/30/2026
Status: ✅ Merged
Merged: 3/31/2026
Merged by: @snomiao
Base:
main← Head:bl/fix-gh-design-slack-threading📝 Commits (10+)
3877e6afix(gh-design): thread Slack discussion updates9ecdea9fix(gh-design): make Slack recovery best efforted8bb11fix(gh-design): skip recovery for new items955b178fix(test): increase timeout for FrontendIssueTransfer test to avoid CI flakiness93cbae3feat(ci): dry run combined tasks by default, opt-out for schedule/dispatchaed7bdcfix(ci): lazy-load task modules to prevent DB connections during dry run9559ad3fix(gh-design): prevent duplicate Slack posts with atomic DB lockea52171test(gh-design): spec for slackPending atomic lock logic18187b7fix(gh-design): skip all DB writes during dry run, exit fast0b01066chore: update bun.lock and cleanup script channel ID📊 Changes
10 files changed (+677 additions, -104 deletions)
View changed files
📝
.github/workflows/gh-combined-tasks.yaml(+3 -1)📝
app/tasks/gh-design/gh-design.ts(+156 -47)➕
app/tasks/gh-design/slackNotifications.recovery.spec.ts(+31 -0)➕
app/tasks/gh-design/slackNotifications.spec.ts(+82 -0)➕
app/tasks/gh-design/slackNotifications.ts(+119 -0)➕
app/tasks/gh-design/slackPendingLock.spec.ts(+159 -0)📝
app/tasks/gh-issue-transfer-comfyui-to-frontend/index.spec.ts(+1 -1)📝
app/tasks/run-gh-tasks.ts(+48 -55)📝
bun.lock(+1 -0)➕
scripts/cleanup-slack-dupes.ts(+77 -0)📄 Description
What changed
This hardens the
gh-designSlack notification flow so each design PR or issue keeps a stable root post in#product-designand later discussion changes are posted as thread replies instead of fresh channel messages.The change also adds Slack-side recovery: if Mongo is missing the persisted
slackUrl, the task now searches Slack for the existing root message for the same GitHub URL and reattaches to it instead of posting a duplicate top-level announcement.Why this changed
We observed the same design PR being reposted repeatedly over multiple days in Slack with only the
[rN]suffix changing. The old flow depended entirely on theslackUrlstored inGithubDesignTask; if that state was unavailable for any reason, the next run treated the PR as unseen and posted a brand new root message.Removing comment counts from the root message makes the canonical post stable. Moving comment-count changes into thread replies matches the intended Slack behavior and avoids re-announcing an already-known PR.
Impact
This should stop repeated top-level
New Design pull_requestposts for the same PR and keep follow-up discussion updates contained inside the existing Slack thread.It also makes the system more resilient to partial state loss, since the task can now recover the canonical Slack root message from Slack itself.
Root cause
The confirmed product issue was that the task could not reliably recover the canonical Slack root post when
slackUrlwas missing from Mongo state. I did not find an in-repo code path that explicitly clearsslackUrl, so the missing state is still treated as an external or partial-write failure mode rather than a proven field-erasure bug.Validation
pnpm exec bun test app/tasks/gh-design/slackNotifications.spec.tspnpm exec tsc -p tsconfig.json --noEmit --pretty false 2>&1 | rg 'app/tasks/gh-design/(gh-design|slackNotifications)'Notes
The repo's pre-commit
tsgohook currently fails on unrelated pre-existing type issues outside this change set, so the commit was created with--no-verifyafter running the targeted checks above.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.