[DEV-86] Enable automatic conflict sync/resolution across all open PRs in the repo via configuration - #67
Open
danii1 wants to merge 4 commits into
Open
[DEV-86] Enable automatic conflict sync/resolution across all open PRs in the repo via configuration#67danii1 wants to merge 4 commits into
danii1 wants to merge 4 commits into
Conversation
…ross all open PRs in the repo via configuration
This was referenced Aug 26, 2026
…AGENT_SANDBOX - Only sync foreign PRs authored by the repo's own team (author_association OWNER/MEMBER/COLLABORATOR/MAINTAIN), checked at discovery and re-checked against the fresh per-PR payload before every run - Rename WORKER_BASE_SYNC_ALL_PRS to WORKER_BASE_SYNC_TEAM_PRS to reflect scope - Fleet mode: per-repo sync_team_prs opt-in in workspace.toml instead of one global env var; single-repo mode keeps the env var for its own checkout - Refuse to start when AGENT_SANDBOX is unset/none: team-PR conflict resolution hands teammate-authored code to the coding agent, which must be sandboxed - Tests: author-gate discovery/per-PR cases, sandbox guard, TOML validation; docs, CHANGELOG, worker --help, and workspace init scaffold updated
# Conflicts: # packages/code/CHANGELOG.md # packages/code/src/index.ts # packages/code/src/lib/workspace/config.ts
Contributor
Author
|
🔀 This branch had merge conflicts with |
# Conflicts: # packages/code/CHANGELOG.md
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.
Task: DEV-86
Summary: Enable automatic conflict sync/resolution across all open PRs in the repo via configuration
Implementation Details
I'll start by exploring the repository structure and checking the existing state of the work mentioned in the comments.
The current branch is
feature/dev-86-attempt-5. Let me check the state of this branch and previous attempts.Previous attempt-4 has partial work. Let me examine it.
I have a good understanding of the codebase now. Let me examine the rest of the attempt-4 diff to decide what to reuse.
The attempt-4 branch mixes DEV-86 work with unrelated license-check changes. Notably, DEV-87 (already merged to main) removed a
requireTeamAutomationgate. Let me verify main's current state.Main has already removed the
requireTeamAutomationgate via DEV-87, so attempt-4's license-check changes are stale and must be excluded. Let me see the remainder of the attempt-4 acquirer diff and the test changes.Attempt-4 contains solid DEV-86 work mixed with stale team-tier licensing changes that conflict with merged DEV-87 (which removed that gate). My plan: apply only the DEV-86-relevant parts onto this fresh branch.
ConditionalResultlives in the acquirer file itself. Now let me check if files drifted between attempt-4's base and current main.DEV-87 didn't touch the acquirer files. Now applying the clean DEV-86 pieces:
All hunks are DEV-86-specific. Checking out the acquirer, its tests, and docs from attempt-4:
Now wiring
index.ts. Let me read the relevant sections on the current branch:Now the
worker --helpenv var docs:Now wiring
workspace-worker.ts(fleet mode):Now verifying my branch matches attempt-4 on all DEV-86 files, differing only where DEV-87 landed:
Only the intentionally-excluded stale license changes differ. Now running verification — typecheck first, then tests:
894 pass, 1 fail. Let me identify the failure:
This failure is in
automation-acquirer.test.ts— unrelated to my change. Let me check if it's pre-existing on main:Confirmed pre-existing on main — unrelated to this change. Now running the acquirer test suite specifically:
All 33 acquirer tests pass (including the new sync-all-PRs suite). Running lint + format:
All checks green. Let me check whether feature branches typically update the CHANGELOG:
DEV-87 added a CHANGELOG entry, so I'll add one for DEV-86 under
[Unreleased]:Final review of the complete acquirer implementation:
Docs frontmatter is current. Final full test run:
DEV-86 is implemented on
feature/dev-86-attempt-5(uncommitted, per repo convention).What was done
Recovered the partial work from the interrupted attempt (
feature/dev-86-attempt-4), discarding its stale team-tier licensing changes (superseded by merged DEV-87) and rebuilding cleanly on current main.Feature:
WORKER_BASE_SYNC_ALL_PRSenv var (default: off — existing behavior unchanged)packages/code/src/lib/review-polling-acquirer.ts: newsweepRepoOpenPrs()discovery +pollForeignPr()base-sync-only polling; foreign PRs reuse the existing durable-event pipeline (maybeSyncBase) with an(external PR)audit marker. Closed/merged PRs drop from the open list, drafts excluded at both discovery and per-PR polling, fork PRs terminally skipped, rate limits handled via ETag conditional requests with a page-size-cap warning.src/index.ts:843(single-repo) andworkspace-worker.ts:503(fleet mode):listOpenPullRequestsGitHub adapter +syncAllOpenPrs: process.env.WORKER_BASE_SYNC_ALL_PRS === "true".👀 watching …,👋 left the open-PR list),(external PR)sync markers, resolver outcome comments on the PR, andconflict_resolutionruns in the dashboard RunStore.docs/code/worker.md(env var, default, trust boundaries),worker --helpenv listing, CHANGELOG entry.Verification
automation-acquirer.test.ts) reproduces on clean main, pre-existing and unrelatedThis PR was automatically created by @devintern/code