-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Description
When a job in an orchestrated plan completes successfully but produces no git-tracked changes (e.g., it only writes files to a gitignored directory), the squash merge step fails with "nothing to commit, working tree clean." This blocks the entire pipeline — downstream dependent jobs never launch, and the plan enters a paused/failed state that cannot be retried.
Steps to Reproduce
- Create a plan with
symlinkDirs: ["ai-docs"]whereai-docs/is listed in.gitignore - Have a review job whose only output is writing a findings file to
ai-docs/review-findings.md(via the symlink) - The review job completes successfully and calls
mc_report(status: "completed") - Plan attempts to squash-merge the job's branch into the integration branch
- Merge fails:
Failed to commit squashed merge: nothing to commit, working tree clean - Dependent job (e.g., fix job) never launches
- Retrying with
mc_plan_approve(retry: "review-projects")hits the same failure
Expected Behavior
If a job completes successfully but has no git-tracked changes to merge, the plan should treat this as a successful no-op merge and proceed to launch dependent jobs. The job's work product (files written to symlinked/gitignored directories) is already available on disk — git merge is not the delivery mechanism in this case.
Actual Behavior
The plan fails at the merge step with "nothing to commit" and enters a paused state. Dependent jobs are permanently blocked. The only workaround is to launch the dependent job manually outside the plan.
Environment
- OS: macOS (Apple Silicon)
- tmux version: 3.5a
- opencode version: 3.7.1
- bun version: 1.3.6
Additional Context
This is a common pattern when using symlinkDirs for shared state between jobs. Review jobs write findings docs to a shared gitignored directory, and fix jobs read them. The symlink approach works perfectly for data sharing — the issue is purely in the merge step assuming every completed job must have commits.
Workaround used: Launched the dependent fix job as a standalone MC job (mc_launch) outside the plan, since the findings file was already on disk via the symlink.
Suggested fix options:
- Skip merge for empty branches — If diff between job branch and integration branch is empty, mark as "merged (no changes)" and proceed
- Allow
allowEmptyMergejob option — Opt-in flag for jobs known to produce no git changes - Auto-detect symlink-only jobs — If a job has
symlinkDirsand no git changes, infer that its output was delivered via symlink