Skip to content

docs: Update branch/slice env docs for pipeline work-ref (#2399/#2403/#2410) [doc-updater] - #2426

Merged
jwbron merged 3 commits into
mainfrom
egg/doc-update-pipeline-work-branch
May 6, 2026
Merged

docs: Update branch/slice env docs for pipeline work-ref (#2399/#2403/#2410) [doc-updater]#2426
jwbron merged 3 commits into
mainfrom
egg/doc-update-pipeline-work-branch

Conversation

@james-in-a-box

@james-in-a-box james-in-a-box Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

docs: Update branch naming and slice env vars for pipeline namespace changes

Update documentation to reflect changes from a505cfa (Fix #2399: push pipeline tip to /work so slice refs coexist):

  • Branch naming (egg/issue-Negg/issue-N/work): The orchestrator now pushes the pipeline tip one level deeper so slice integration branches (egg/issue-N/slice-M) can coexist as siblings without a git "directory file conflict". Updated examples in concurrent-execution.md (branch model intro + per-agent worktree section), orchestrator.md (shared branch bullet), and slice-dag.md (mode table).
  • EGG_SLICE_ID env var: Per-slice agents receive this new env var so BRC handlers route CONSENSUS_* signals to the correct per-slice tracker. Added to the environment injection table in concurrent-execution.md.
  • Slice-scoped agent restart (Plumb slice_id through restart_agent_job and detect_uncommitted_changes (#2403 follow-up) #2410): The restart REST API now accepts an optional slice_id query parameter. Added an example to orchestrator-cli.md.

Triggered by: #2402

Authored-by: egg

Update docs to reflect three changes from a505cfa:

- Pipeline tip is now at <branch>/work (e.g. egg/issue-N/work) so
  slice integration branches can coexist as siblings under egg/issue-N/;
  update branch examples in concurrent-execution.md, orchestrator.md,
  and slice-dag.md.

- Add EGG_SLICE_ID to the concurrent-execution env injection table;
  per-slice agents receive this to route CONSENSUS_* signals to the
  correct per-slice tracker.

- Add slice_id parameter example to the agent restart REST API snippet
  in orchestrator-cli.md.

@egg-reviewer egg-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No agent-mode design concerns. This is a documentation-only PR reflecting branch namespace changes (#2399) and the new EGG_SLICE_ID env var (#2403/#2410) — no agent prompts, tool surfaces, or behavior changes to evaluate.

— Authored by egg

@james-in-a-box

This comment has been minimized.

@egg-reviewer egg-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All three documentation claims are faithful to the implementation that landed in #2402 / #2403 / #2410.

Verified

  • egg/issue-Negg/issue-N/work mirrors _ensure_pipeline_work_ref() in orchestrator/routes/pipelines.py:682-726 and the BABYSIT skip at line 1454. The slice integration branches built off _slice_namespace_root (line 729) confirm the sibling layout the new prose describes.
  • The new EGG_SLICE_ID row in concurrent-execution.md matches kubernetes_spawner.py:760-761 (if slice_id is not None: environment["EGG_SLICE_ID"] = slice_id) and the _PROTECTED_ENV_KEYS entry at line 104. "Absent for pipeline-level agents" is correct — there is no fallback assignment. The "BRC handlers forward this" claim lines up with _maybe_attach_slice_id in sandbox/egg_agent_tools/handlers/brc.py:26-41, which uses both the request slice_id and EGG_SLICE_ID from env, and the validation against slice-<N> matches the doc's value example.
  • The slice-scoped restart curl example matches orchestrator/routes/pipelines.py:2262-2338: query param wins over body, both go through extract_slice_id, and the docstring already documents both forms.

Non-blocking observation

docs/architecture/slice-dag.md:313 keeps the parenthetical "per-role suffix /{role}/work for babysit-pr staging" intact while updating the surrounding line. Per concurrent_executor.py:209-262 and the test_concurrent_executor_staging_branch.py assertions, the actual babysit-pr staging shape is egg/babysit-pr/{pr}/{short-sha}/{role} — there is no /work suffix on per-role staging branches. The /{role}/work shape was the pre-v6 slice-mode layout collapsed in coder v6 (commit 97de106, per the test docstring), and it was never the babysit shape. Pre-existing inaccuracy that this PR didn't introduce, but since the PR is editing this exact line and the rule applies, worth a follow-up: drop or correct that parenthetical so readers don't search the codebase for a non-existent shape.

— Authored by egg

@james-in-a-box

This comment has been minimized.

@james-in-a-box

This comment has been minimized.

Reviewer noted the parenthetical on the pipeline-mode row referenced a
non-existent `/{role}/work` suffix for babysit-pr staging. The actual
shape produced by `ConcurrentPhaseExecutor.get_worktree_branch`
(orchestrator/concurrent_executor.py:257) is
`egg/babysit-pr/{pr}/{short-sha}/{role}` — no `/work` suffix. Per the
test docstring in `test_concurrent_executor_staging_branch.py`, the
`/{role}/work` shape was the pre-v6 slice-mode layout (collapsed in
97de106) and was never the babysit shape.

Authored-by: egg
@james-in-a-box

james-in-a-box Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

Review Response

Both bot reviews approved. One non-blocking observation from the review bot was actionable and is addressed in this PR.

Disposition

  • fixed-in-PR (commit bb47b84)docs/architecture/slice-dag.md:313 parenthetical referenced a non-existent /{role}/work suffix for babysit-pr staging. Per orchestrator/concurrent_executor.py:257 (and test_concurrent_executor_staging_branch.py assertions like egg/babysit-pr/42/abc1234/coder), the actual shape is egg/babysit-pr/{pr}/{short-sha}/{role} — no /work suffix. The reviewer flagged this as a pre-existing inaccuracy, but since this PR was already editing that exact line the fix is in scope. Rewrote the parenthetical to point readers at the correct shape so they don't search the codebase for something that doesn't exist.

  • disagree (no action needed — verification, not request)egg-reviewer[bot] (agent-mode-design) approved with no concerns; the review bot's other prose ("Verified" section) is verification of the existing claims, not a change request.

— Authored by egg

@james-in-a-box

This comment has been minimized.

@egg-reviewer egg-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No agent-mode design concerns. The delta since my prior review (commit bb47b84) is a one-line correction to the babysit-pr staging branch format in docs/architecture/slice-dag.md — pure documentation accuracy fix with no agent prompt, tool surface, or behavior changes.

— Authored by egg

@james-in-a-box

This comment has been minimized.

@egg-reviewer egg-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review at bb47b84 — the prior non-blocking observation has been addressed.

Verified fix

docs/architecture/slice-dag.md:313 now reads babysit-pr staging uses egg/babysit-pr/{pr}/{short-sha}/{role} — this matches the source of truth:

  • orchestrator/concurrent_executor.py:257 returns f"egg/babysit-pr/{pr_number}/{short_sha}/{role.value}".
  • The docstring on get_worktree_branch (concurrent_executor.py:225) names the same shape.
  • orchestrator/tests/test_slice_branch_naming.py:94 corroborates the commit message: the /{role}/work suffix the old text referenced was the pre-v6 slice-mode layout collapsed by coder v6 (97de106), not a babysit shape.

No new issues in the delta. The other claims in the original PR (<branch>/work tip, EGG_SLICE_ID env injection, slice-scoped restart curl example) were already verified against routes/pipelines.py, kubernetes_spawner.py, and sandbox/egg_agent_tools/handlers/brc.py in the prior review and are unchanged in this commit.

— Authored by egg

@james-in-a-box

This comment has been minimized.

@james-in-a-box

This comment has been minimized.

…i.md

Kept HEAD's babysit-pr branch shape correction (egg/babysit-pr/{pr}/{short-sha}/{role})
in slice-dag.md per bb47b84 — verified against orchestrator/concurrent_executor.py:257.
Took main's wording for the slice_id query-param comment in orchestrator-cli.md
(equivalent meaning, established by #2425).
@james-in-a-box

james-in-a-box Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

Conflict Resolution Summary

Resolved merge conflicts with main (which had picked up #2425, a parallel doc-updater PR covering the same changes).

File Category Resolution
docs/architecture/orchestrator.md Auto-merged Disjoint additions — no manual resolution needed.
docs/architecture/slice-dag.md Semantic (verified) Kept HEAD's babysit-pr branch shape — egg/babysit-pr/{pr}/{short-sha}/{role} — per the bb47b84 correction on this PR. Verified against orchestrator/concurrent_executor.py:257, where f"egg/babysit-pr/{pr_number}/{short_sha}/{role.value}" is the actual format. Main's wording (/{role}/work suffix) from #2425 was incorrect.
docs/reference/orchestrator-cli.md Formatting (wording-only) Took main's phrasing (Slice-scoped agent restart (pass slice_id via query param or body)) since #2425 already established it. Both versions had identical meaning.

Please review: The slice-dag.md resolution intentionally overwrites the wording introduced by #2425. The earlier wording referenced a per-role /{role}/work suffix for babysit-pr that does not match the actual code path; bb47b84 on this branch corrected that. If you'd prefer the table prose follow #2425's structure stylistically while keeping the corrected branch shape, happy to massage further.

— Authored by egg

@james-in-a-box

This comment has been minimized.

@egg-reviewer egg-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No agent-mode design concerns. The delta since my prior review at bb47b84 is the merge from main resolving conflicts with #2425 — the surviving changes are confined to docs/architecture/orchestrator.md (new live-pod-guard bullet), docs/architecture/slice-dag.md (slice integration prose + out-of-scope section), and docs/reference/orchestrator-cli.md (one wording tweak on the slice-scoped restart example). All documentation; no agent prompt, tool-surface, or behavior changes to evaluate.

— Authored by egg

@james-in-a-box

This comment has been minimized.

@egg-reviewer egg-reviewer Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review at 1f18a95 — the delta since my prior review at bb47b84 is entirely a merge-from-main resolving conflicts with parallel doc PRs #2423 (live-pod-guard) and #2425 (slice-dag / orchestrator-cli rewording). The conflict resolution is the only PR-authored work in the delta, and it's the right call.

Verified resolutions

  • docs/architecture/orchestrator.md:47 — auto-merged; the new live-pod-guard bullet matches orchestrator/startup_reconciliation.py:34-216 (label key egg.pipeline.id via LABEL_PIPELINE_ID, fail-safe-on-error skip leaving the pipeline RUNNING, zero-live-pods fallback to stale-record detection). Accurate.

  • docs/architecture/slice-dag.md:313 — the merge correctly kept HEAD's egg/babysit-pr/{pr}/{short-sha}/{role} shape rather than main's /{role}/work suffix. orchestrator/concurrent_executor.py:257 returns f"egg/babysit-pr/{pr_number}/{short_sha}/{role.value}" — main's #2425 wording was wrong, this PR's correction is right. Taking the upstream wording here would have re-introduced the inaccuracy I flagged in my previous review.

  • docs/architecture/slice-dag.md:333-374 — the new prose about EGG_SLICE_ID being read by BRC handlers and attached to every CONSENSUS_* payload matches sandbox/egg_agent_tools/handlers/brc.py: _maybe_attach_slice_id (line 26) reads req["slice_id"] or get_slice_id() and is invoked from every BRC verb (lines 444, 529, 586, 634, 754). The composite-key claim — peer_consensus._tracker_key returning {pipeline_id}/{slice_id} — matches orchestrator/peer_consensus.py:1834-1856. Accurate.

  • docs/architecture/slice-dag.md:685-695 — out-of-scope section correctly removes restart_agent with slice_id (landed in #2399/#2410) while keeping restart_slice, get_slice_status, list_slices deferred to #2199. The new "Note:" line accurately describes the current REST endpoint shape.

  • docs/reference/orchestrator-cli.md:211 — wording-only change to align with #2425's phrasing; semantically equivalent to the prior text. No accuracy concern.

No new issues in the delta. Documentation-only, all claims still backed by source.

— Authored by egg

@james-in-a-box

This comment has been minimized.

@james-in-a-box

james-in-a-box Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor Author
egg is addressing review feedback...

@james-in-a-box

james-in-a-box Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

Review Response

Two bot reviews at the current head (1f18a95) — both confirm the merge-from-main conflict resolution is correct and surface no new actionable feedback.

Disposition

  • disagree (no action needed — verification, not request)egg-reviewer[bot] agent-mode-design verdict at 1f18a95: APPROVED with "No agent-mode design concerns" on the merge-resolution delta. No change requested.

  • disagree (no action needed — verification, not request)egg-reviewer[bot] review verdict at 1f18a95: COMMENTED with "No new issues in the delta. Documentation-only, all claims still backed by source." Each conflict-resolution choice (orchestrator.md live-pod-guard bullet, slice-dag.md keeping HEAD's egg/babysit-pr/{pr}/{short-sha}/{role} shape over main's incorrect /{role}/work wording, orchestrator-cli.md wording alignment) was independently verified against source — orchestrator/concurrent_executor.py:257, orchestrator/startup_reconciliation.py:34-216, sandbox/egg_agent_tools/handlers/brc.py, orchestrator/peer_consensus.py:1834-1856. No change requested.

The earlier non-blocking observation about the /{role}/work parenthetical was already fixed in bb47b84 and re-verified by both bots at 1f18a95. Nothing to push.

— Authored by egg

@james-in-a-box

james-in-a-box Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

egg feedback addressed. View run logs

10 previous review(s) hidden.

@jwbron
jwbron merged commit 68c3950 into main May 6, 2026
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slice integration branches collide with pipeline branch in git ref namespace ('directory file conflict')

1 participant