Skip to content

[issue-3393][slice-6/7] Per-repo test-gate + reviewer-diff scoping... - #3437

Merged
jwbron merged 7 commits into
mainfrom
egg/issue-3393/slice-6
Jul 2, 2026
Merged

[issue-3393][slice-6/7] Per-repo test-gate + reviewer-diff scoping...#3437
jwbron merged 7 commits into
mainfrom
egg/issue-3393/slice-6

Conversation

@james-in-a-box

@james-in-a-box james-in-a-box Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Scope the implement-phase gates to the slice's repo (operator rulings #3, #5). The test gate runs in the slice's repo worktree only; the reviewer diff is git diff in that worktree against that repo's base; the slice's agent runs with cwd in the slice's repo worktree under that repo's CLAUDE.md, linters, and check commands — egg's make lint/make test apply only to slices whose repo is egg. Documentation is updated to describe the shipped multi-repo model.

Base PR: #3418

What's in this PR

Commits (5):

.egg-state/agent-outputs/coder/brc-memory-issue-3393.md |   84 ++
 .egg-state/brc-history/3393-implement-slice-6.json      | 1475 +++++++++++++++++++++++++++++++++++
 .egg-state/brc-history/3393-implement-slice-6.md        | 1423 +++++++++++++++++++++++++++++++++
 docs/architecture/slice-dag.md                          |  117 +++
 docs/guides/sdlc-pipeline.md                            |   58 ++
 orchestrator/routes/pipelines.py                        |  135 +++-
 orchestrator/tests/test_pipelines.py                    |  317 ++++++++
 7 files changed, 3603 insertions(+), 6 deletions(-)

This slice

Per-repo test-gate + reviewer-diff scoping + per-repo conventions

Files affected:

  • orchestrator/routes/pipelines.py
  • orchestrator/tests/test_pipelines.py
  • docs/guides/sdlc-pipeline.md
  • docs/architecture/slice-dag.md
Tasks (3) + acceptance criteria
  • task-6-1: Scope the test gate and reviewer diff to the slice's repo. In the implement-phase gate/review wiring (orchestrator/routes/pipelines.py and any test-gate/reviewer-diff helper it calls): resolve the slice's worktree from the owner/repo-keyed map (slice 3), run the test gate in THAT worktree, compute the reviewer diff as git diff in that worktree against that repo's base branch, and resolve check/lint commands from the slice's repo conventions (its own CLAUDE.md / linters) rather than hard-coding egg's make lint/make test. Set the slice agent's cwd to the slice's repo worktree. Keep the egg-repo path (the common case) behaviorally identical to today.
    • Acceptance criteria: - The test gate runs only in the slice's repo worktree; the reviewer diff is scoped to that repo against its base. - The slice agent's cwd is the slice's repo worktree; check/lint commands resolve from that repo's conventions, not egg's, for non-egg slices. - egg-repo slices behave exactly as today (N=1 baseline unchanged).
  • task-6-2: Add tests in orchestrator/tests: for a multi-repo pipeline, the test gate is invoked in the slice's repo worktree (not the primary's), the reviewer diff is computed against the slice's repo base, and check commands resolve from the slice's repo; for an egg-repo slice, behavior matches the current single-repo path. Mock worktree paths and per-repo command resolution.
    • Acceptance criteria: - Tests assert per-repo test-gate invocation, per-repo reviewer-diff base, and per-repo check-command resolution, plus the egg-repo baseline. - make test (narrowed) and make test-all green.
  • task-6-3: Update documentation to describe the shipped multi-repo model (snapshot, not changelog): docs/guides/sdlc-pipeline.md (list-shaped submission with per-repo base_branch; uniform visibility + uniform auth requirement; primary repo for naming/default) and the relevant architecture doc for slices/PRs (Slice.repo 1:1 rule; per-repo work branch + context PR; cross-repo ordering via slice dependencies; the cq-1 two-tier merge-sequencing hold; per-repo gate/diff/convention scoping). Describe current behavior; do not narrate slice numbers or this pipeline's process.
    • Acceptance criteria: - The pipeline guide documents list-shaped submission, the uniformity rules, and the primary-repo concept. - An architecture doc documents Slice.repo (1:1), per-repo work-branch/context-PR, cross-repo ordering + the two-tier hold, and per-repo gate scoping — as current-state snapshot, no slice/TASK references.

Stack

egg and others added 7 commits July 2, 2026 18:36
Snapshot the multi-repo model in the two current-state docs:

- docs/guides/sdlc-pipeline.md gains a Multi-Repo Pipelines section:
  list-shaped submission (per-repo base_branch), the primary-repo
  concept, and the uniform-visibility / uniform-auth submission rules.
- docs/architecture/slice-dag.md gains a Slice.repo row in the New
  Slice fields table and a Per-slice repo section covering the 1:1
  rule + runtime resolver, owner/repo-keyed worktree map, per-repo
  work branch + context PR, per-slice PR routing, cross-repo ordering
  via slice dependencies, the two-tier merge-sequencing hold, and
  per-repo gate/diff/convention scoping.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…k-6-1)

Thread the slice's repo, worktree, and base branch through the per-slice
team spawn (_run_concurrent_phase) so the tester's configured checks, the
reviewer diff, and the agent cwd all resolve from the slice's repo rather
than the pipeline primary. New _resolve_slice_worktree_path helper mirrors
the slice-3 owner/repo worktree layout. Gated on len(pipeline.repos) > 1 so
single-repo (egg) pipelines are byte-identical to today.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…k-6-2)

Add always-green model-level rule tests plus a real resolve_worktree_path
per-repo-subdir test and a skip-guarded coder-seam integration test, pinning
that the implement-phase test gate, reviewer diff, and check/lint commands
scope to the slice's own repo (rulings #3/#5) with the egg/N=1 baseline
unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ester task-6-2)

Single source of truth for slice→gate-repo resolution, matching the
tester's pinned TestSliceGateRepoAccessor interface. Used inside the
per-slice scoping block in _run_concurrent_phase.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jwbron
jwbron changed the base branch from egg/issue-3393/slice-5 to main July 2, 2026 20:59
@jwbron
jwbron merged commit ebf8302 into main Jul 2, 2026
29 of 34 checks passed
james-in-a-box Bot pushed a commit that referenced this pull request Jul 2, 2026
…conflict in docs/architecture/slice-dag.md

main's #3437 added a broader '## Per-slice repo (multi-repo pipelines)'
section whose '### Cross-repo merge-sequencing hold (two-tier)' subsection
overlaps this PR's standalone '## Cross-repo merge-sequencing gate' section.
Kept main's better-integrated section and folded in this PR's unique details
(gateway routes POST /api/v1/gh/pr/merge_state and /pr/ready, Gateway README
link, EGG_ORCH_CROSS_REPO_MERGE_GATE_MAX_ATTEMPTS attempt bound, the
[hold:beyond-merge-state] marker, and the two operator-selectable HITL options).
Repointed the Configuration-knobs table link to the surviving anchor.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant