Skip to content

[refactor] /idd-all-chain cluster branch squash merge 對 multi-root 不友善 — 失去 Refs #N 軌跡與 bisect 精準度 (sister concern from #119) #121

Description

@kiki830621

Problem

從 #119 sister sweep 浮出: /idd-all-chain 設計把 N 個 root issue 共用 1 個 cluster branch + 1 個 review PR,期望最終 squash merge 進 main。當 N>1 且 roots 之間語意上是 parallel siblings(不是 ripple chain),squash merge 出問題:

  1. Squash 摺成 1 commit message:14 個 unrelated changes 只有一條 commit message,git log 失去「哪個 commit 改了哪個 issue」的軌跡 — 違反 Refs #N 紀律
  2. Revert 粒度 = 全部:某個 issue 後來發現要回退,squash 後只能整批 revert,炸到其他 13 個 issue
  3. Bisect 失準:git bisect 找回歸 commit 時 N issue 都疊在一個 squash commit,bisect 結果只說「這 14 issue 中某個破事」沒辦法精準
  4. Review cognitive load:reviewer 看 1 個 PR 含 14 個 unrelated 主題的 diff,容易漏 bug

替代方案考量:

  • 改 merge strategy 為 --no-ff merge commit 保留 N 個原 commit → 但 PR 已 squash 默認,需專案 policy
  • 切成 N 個 PR(回到 batch /idd-all 模式)→ 失去 cluster 的省 PR 開銷
  • 中間方案:cluster branch 但 push N 個 commit 後 cherry-pick 拆 N 個 sub-PR? overhead 大

Type

refactor(merge strategy + cluster branch 設計問題)

Expected

/idd-all-chain 文件 / behavior 對「N roots merge 進 main 後續 git operations」有明確處理:

Actual

無明確 merge strategy 指引,user 跑 gh pr merge --squash 後遇到上述 4 個 git workflow 痛點。

Source

surfaced during /idd-issue #119 sister concern surfacing (Step 4.7)


Current Status

Phase: closed
Last updated: 2026-05-21 by idd-close
Closed at: 2026-05-21T03:55:16Z
Closing summary: comment-4504642552

Key Decisions

  • Closed as absorbed-into-docs(per user decision 2026-05-21)
  • Resolution path = doc reframing(commit 92e82c2 docs: introduce workflow path catalog + skill dimensions)not code fix
  • 4 痛點已被 docs/workflows.md P-cluster-pr Risks 段落 + Anti-pattern A4 顯式 cover
  • Distribution sync = not applicable(docs-only at repo root,不影響 plugin behavior)

Scope Changes

  • (none — 原 issue scope 不變,但 disposition 從「code refactor 待做」改為「doc absorption 完成」)

Blocking

  • (none)

Commits

  • 92e82c2 docs: introduce workflow path catalog + skill dimensions
  • e827bc7 docs: update cross-refs after migrating 6 IDD issues from marketplace

Closing Follow-ups Filed

  • Skipped per user(closing summary 含 conditional hypothetical「若未來真要做 cluster default merge strategy refactor,將另開 follow-up issue」,not committed TODO)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions