refactor(workflow): S11 branch group workflow subgraphs#1584
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
30ef86b to
f1badbe
Compare
c807552 to
d117765
Compare
Greptile SummaryThis PR delivers the S11 slice of the workflow-owned merge migration, adding
Confidence Score: 5/5Safe to merge — pure decision functions with no side effects, spec-aligned logic, and all three prior concerns addressed. The two new functions are pure and isolated; they touch no shared state, no persistence layer, and no lifecycle mutations. The core invariants from FN-5147 and FN-5819 are correctly implemented and directly tested. The only findings here are a duplicate return path (style) and a missing happy-path test case. No files require special attention; the implementation is self-contained in Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[decideBranchGroupMemberIntegration] --> B{assignmentMode\n=== 'shared'?}
B -- Yes --> C[allowed: true\noutcome: success\nFN-5819 exception]
B -- No --> D{settings.autoMerge\n=== false?}
D -- Yes --> E[allowed: false\noutcome: manual-required\nreason: global-auto-merge-disabled]
D -- No --> F[allowed: true\noutcome: success]
G[decideBranchGroupPromotion] --> H{settings.autoMerge\n=== false?}
H -- Yes --> I[allowed: false\noutcome: manual-required\nreason: global-auto-merge-disabled]
H -- No --> J{groupAutoMerge\n=== false?}
J -- Yes --> K[allowed: false\noutcome: manual-required\nreason: group-auto-merge-disabled]
J -- No / undefined --> L[allowed: true\noutcome: success]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[decideBranchGroupMemberIntegration] --> B{assignmentMode\n=== 'shared'?}
B -- Yes --> C[allowed: true\noutcome: success\nFN-5819 exception]
B -- No --> D{settings.autoMerge\n=== false?}
D -- Yes --> E[allowed: false\noutcome: manual-required\nreason: global-auto-merge-disabled]
D -- No --> F[allowed: true\noutcome: success]
G[decideBranchGroupPromotion] --> H{settings.autoMerge\n=== false?}
H -- Yes --> I[allowed: false\noutcome: manual-required\nreason: global-auto-merge-disabled]
H -- No --> J{groupAutoMerge\n=== false?}
J -- Yes --> K[allowed: false\noutcome: manual-required\nreason: group-auto-merge-disabled]
J -- No / undefined --> L[allowed: true\noutcome: success]
Reviews (10): Last reviewed commit: "fix(FN-000): address PR review feedback ..." | Re-trigger Greptile |
f1badbe to
cbdbe87
Compare
d117765 to
57dca58
Compare
cbdbe87 to
6451e39
Compare
57dca58 to
9f59559
Compare
6451e39 to
2e67ef0
Compare
9f59559 to
8df8f05
Compare
2e67ef0 to
eacaa0f
Compare
8df8f05 to
3fcc5af
Compare
eacaa0f to
11687a5
Compare
3fcc5af to
2734b50
Compare
11687a5 to
082995d
Compare
2734b50 to
18b620e
Compare
18b620e to
e42a519
Compare
082995d to
d0d7fb7
Compare
e42a519 to
d0ae3da
Compare
46ef418 to
3d1e5a9
Compare
d0ae3da to
2a66eff
Compare
Fusion-Task-Id: FN-000
Address PR #1584 feedback by keeping shared-member integration and group promotion gated by the scoped FN-5819 group/global policy, not individual task autoMerge flags.
Address PR #1584 feedback by keeping the FN-5819 auto-merge-off exception scoped to shared branch members only.
3d1e5a9 to
b16d22e
Compare
2a66eff to
dd36403
Compare
Addressed: shared member integration keeps the scoped auto-merge exception, while non-shared member integration now respects |
|
Ready to review this PR? Stage has broken it down into 4 individual chapters for you:
Chapters generated by Stage for commit e9d47a3 on Jun 17, 2026 2:48pm UTC. |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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.
Inline comments:
In `@docs/plans/workflow-owned-merge-stack/s11-branch-group-subgraphs.md`:
- Around line 16-18: Update the description in lines 16-18 to accurately reflect
the current state of the PR. Replace the text that characterizes this as
"intentionally a handoff artifact, not the completed implementation" with
wording that reflects the actual content - that this slice includes shipped
decision logic and tests along with the S11 review slot reservation. This
ensures the documentation accurately describes what is actually delivered in
this PR stack.
In `@packages/engine/src/__tests__/workflow-branch-group-merge.test.ts`:
- Line 10: Remove the `as any` type assertions from the branchContext object
across all test fixtures and replace any invalid assignmentMode values with the
correct contract. The TaskBranchAssignmentMode type only accepts "shared" or
"per-task-derived", so at file
packages/engine/src/__tests__/workflow-branch-group-merge.test.ts, line 10 can
keep "shared" but remove `as any`, line 21 must replace the invalid "exclusive"
value with either "shared" or "per-task-derived" and remove `as any`, and lines
33 and 49 should similarly use only valid assignmentMode values and remove `as
any`. This ensures the test fixtures are properly typed and the regression
surface is not weakened by type escaping.
In `@packages/engine/src/workflow-branch-group-merge.ts`:
- Around line 18-53: Add FNXC policy documentation comments to both workflow
gate functions to comply with coding guidelines. For both
decideBranchGroupMemberIntegration and decideBranchGroupPromotion functions, add
a concise FNXC:Branch-Groups JSDoc or inline comment that documents the
requirement date and rationale for the merge policy decisions being encoded in
each function. Follow the format "FNXC:Area-of-product" with the specific area
being "Branch-Groups" and ensure the comment explains the user-facing
branch-group merge policy requirement that each decision function implements.
🪄 Autofix (Beta)
✅ Autofix completed
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 9e7bb47b-df7d-4468-a326-c441355178aa
📒 Files selected for processing (4)
docs/plans/workflow-owned-merge-stack/s11-branch-group-subgraphs.mdpackages/engine/src/__tests__/workflow-branch-group-merge.test.tspackages/engine/src/index.tspackages/engine/src/workflow-branch-group-merge.ts
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Fixes Applied SuccessfullyFixed 3 file(s) based on 3 unresolved review comments. Files modified:
Commit: The changes have been pushed to the Time taken: |
Fixed 3 file(s) based on 3 unresolved review comments. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
- Refresh s11 plan doc Stack Role wording to reflect shipped branch-group decision logic - Normalize FNXC:Branch-Groups policy comments to canonical yyyy-MM-dd-hh:mm JSDoc format Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Stack Slice
feature/workflow-owned-merge-s10-self-healing-recovery-eventsdocs/plans/2026-06-09-003-refactor-workflow-owned-merge-full-migration-slices-plan.mdGoal
Move branch-group member integration and group promotion into workflow-owned merge subgraphs.
Dependency
S6 merge capabilities, S8 merge processing, and S10 recovery events.
Expected Scope
group merge coordinator, merge trait, integration worktree, built-in IR, shared branch-group workflow tests.
Expected Tests
Member integration with autoMerge exception, blocked group promotion, conflict routing, final promotion guards.
Exit Gate
Branch-group coordinator no longer owns task lifecycle independent of workflow runtime.
Status
Draft stack placeholder. This PR reserves ordering and review context; implementation should replace or extend the handoff artifact before this slice is marked ready.
Implementation Added
Summary by CodeRabbit
New Features
Documentation
Tests