Repository navigation
fix(orchestrate): reject tasks that share a planned branch - #833
Open
rudycelekli wants to merge 1 commit into
Open
rudycelekli wants to merge 1 commit into
rudycelekli wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A worker named slice-a and a merge worker named merge-slice-a are both instructed to push orch//slice-a. The plan validates, and the two cloud agents overwrite one branch.
PlanSchema now rejects a plan when two tasks compute the same planned branch, and the error names that branch.
Validation: On origin/main, the new schemas test failed because PlanSchema.safeParse returned success for slice-a plus merge-slice-a. After the fix validation fails and the issue mentions orch/ship-refactor/slice-a. The rest of bun test tests/schemas.test.ts still passes. Also ran bun test --timeout 20000 in orchestrate/skills/orchestrate/scripts (pass), bunx tsc --noEmit, bunx biome check on the changed files, git diff --check, and node scripts/validate-plugins.mjs after installing ajv and ajv-formats.
Note
Low Risk
Adds plan-time validation only; no runtime or auth changes, and it prevents a known branch-collision failure mode.
Overview
Plan validation now rejects orchestration plans where two tasks would push to the same Git branch, closing a gap where a slice worker and a
merge-*worker could both targetorch/<root>/<slice>and overwrite each other in the cloud.PlanSchema’ssuperRefinewalks tasks, computes each task’s planned branch viaplannedBranchForTask, and fails validation with a message naming the colliding branch and the other task. A new schema test covers theslice-a+merge-slice-acase and expects the error to mentionorch/ship-refactor/slice-a.Reviewed by Cursor Bugbot for commit 87a3df9. Bugbot is set up for automated code reviews on this repo. Configure here.