[issue-3393][slice-4/6] Slice-PR routing to slice.repo + lazy... - #3429
Merged
Conversation
…k-4-3) Add tester coverage for slice-4's slice-PR routing to slice.repo and the lazy-per-repo work-branch/context-PR rule. - Always-green rule tests on the slice-1 model API (resolve_slice_repo / primary_repo): each slice PR routes to its own repo (absent => primary); a repo participates (work branch + context PR) iff it owns >=1 slice, slice-less submitted repos excluded; N=1 => exactly one participating repo. - Skip-guarded integration tests on the coder-owned seams (the _repos_with_slices opener helper and repo-qualified cross-repo sibling references in the context-PR body), activating at convergence. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…xt PR task-4-1: create_slice_pr gains sibling_pr_refs/upstream_pr_ref (cross-repo only); slice caller routes repo=resolve_slice_repo(slice) and passes cross-repo coordination refs. N=1 byte-equivalent (refs empty -> section omitted; slice_repo == primary). task-4-2: _open_context_pr_at_implement_start now lazy-per-repo — new _maybe_open_secondary_context_prs (guard len(repos)>1, never raises) opens a per-repo egg/<id>/work context PR for every repo owning >=1 slice, cross- referencing sibling context PRs; slice-less repos skipped. Primary path and N=1 unchanged. Secondary create soft-fails / adopts via lookup_open_pr until secondary-repo worktree/branch creation is wired (deferred by slice-3). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Satisfy make lint-python (ruff format) on the slice-4 coverage added in 52ed962; test-only reformatting, no behavioral change. 21 passed / 2 skipped unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
jwbron
approved these changes
Jul 2, 2026
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.
Route each slice's PR to
slice.repoand give every participating repo its own work branch + context PR (lazy-per-repo, operator ruling #1). Repos with ≥1 slice get anegg/<id>/workbranch and a context PR; submitted repos with no slices get neither. Slice-PR and context-PR descriptions cross-reference sibling PRs in the pipeline.Base PR: #3418
What's in this PR
Commits (4):
This slice
Slice-PR routing to slice.repo + lazy per-repo work branch & context PR
Files affected:
orchestrator/gateway_client/_pr.pyorchestrator/routes/pipelines.pyorchestrator/tests/test_pipelines.pyTasks (3) + acceptance criteria
create_slice_pr(orchestrator/gateway_client/_pr.py:139-164) is already repo-parameterized; change the caller(s) in orchestrator/routes/pipelines.py to passslice.repo(falling back to the pipeline primary when a slice's repo is absent, per the slice-1 migration default) instead of the pipeline singleton. Render sibling cross-references into the slice-PR body: list the other pipeline PRs (repo + number) and, for a dependent slice, note the upstream slice's PR it is ordered behind.slice.repo; absent ⇒ primary. - The slice-PR body cross-references sibling pipeline PRs (repo + number) and names the upstream PR for dependent slices. - No behavioral change for N=1 (single repo) pipelines._open_context_pr_at_implement_start(~11001-11250), which today opens one context PR onegg/<id>/work → mainin the single repo: iterate the set of repos that own ≥1 slice, and for each open its ownegg/<id>/workbranch (same naming, per repo) and its own context PR; skip submitted repos with no slices. A single-slice repo still gets the standard context PR (uniformity beats special-casing). Cross-reference sibling context PRs in each body. Keep the N=1 path byte-equivalent to today.egg/<id>/workbranch and context PR; a slice-less submitted repo gets neither. - A single-slice repo gets the standard context PR. - Context-PR bodies cross-reference sibling context PRs. - N=1 behavior is unchanged.slice.repo(and falls back to primary when absent); the slice-PR and context-PR bodies render sibling cross-references; the lazy-per-repo rule holds (repo with ≥1 slice ⇒ work branch + context PR; slice-less repo ⇒ neither; single-slice repo ⇒ standard context PR); N=1 opens exactly one work branch + context PR as today.make test(narrowed) andmake test-allgreen.Stack
issue-3393egg/issue-3393/slice-3