docs: update startup reconciliation + add start_pipeline to README [doc-updater] - #2424
Conversation
Update docs to reflect changes from c733f2e: - README.md MCP server tool list: add start_pipeline (recover a non-RUNNING pipeline), which was missing from the phase-management bullet - docs/architecture/orchestrator.md: update startup reconciliation step 1 to describe the new live-pod safety net (#2411): the reconciler now queries k8s for pods labeled egg.pipeline.id before marking a pipeline FAILED; if any live pods exist the pipeline is left RUNNING; only zero-pod pipelines fall through to the old per-agent stale scan; pod query failures are fail-safe (leave RUNNING) Triggered by: c733f2e (Fix #2411: tolerant startup reconciliation + start_pipeline MCP verb) Authored-by: egg
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Review
Doc-only PR; verified against the source it describes.
Accuracy of docs/architecture/orchestrator.md
The new bullets match orchestrator/startup_reconciliation.py:184-223 exactly:
- Live-pod query before stale scan: confirmed at lines 202-206 —
docker_client.list_containers(labels={_LABEL_PIPELINE_ID: pipeline_id}). - Any live pods → leave RUNNING: lines 217-223 (
if pipeline_live_ids: ... continue). - Pod query failure → fail-safe RUNNING: lines 207-215 (broad
except Exception→continuewith no state mutation). - Per-agent stale scan only reached on zero live pods: confirmed by control flow.
- The "Kubernetes" framing is correct even though the parameter is named
docker_client—docker_client.py:56-58aliasesget_kubernetes_client.
Tests at orchestrator/tests/test_startup_reconciliation.py:268-397 (test_pipeline_with_any_live_pod_left_running, the #2411 drift case under label-query failure) cover exactly the behaviors described.
Accuracy of README.md
start_pipeline is a real MCP tool (orchestrator/mcp_tools.py:766) and was indeed missing from the README's Integration Points table. The added line is consistent with the canonical "Recover a non-RUNNING pipeline" framing the tool itself uses.
Non-blocking
-
README description is slightly incomplete (
README.md:190). The tool also "starts PENDING pipelines (no early-return for PENDING in the route)" permcp_tools.py:779-780. The current parenthetical only names FAILED and AWAITING_HUMAN. Not blocking — the leading "recover a non-RUNNING pipeline" already covers PENDING, and the parenthetical reads as illustrative. -
Bullet ordering in the new orchestrator.md prose is mildly awkward. Bullet 2 ("Scans only the current phase …") sits above the new bullet 3 that introduces "before scanning for stale records, queries Kubernetes …". A reader can follow it, but the live-pod safety net could read more naturally if it preceded the scan-scope bullet, or if bullet 2 were rephrased to describe the scope of the scan rather than imply a step that hasn't happened yet. Not blocking.
No blocking issues. Approving.
— Authored by egg
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…er reconciliation bullets Address two non-blocking suggestions from egg-reviewer on PR #2424: 1. README.md: `start_pipeline`'s parenthetical now lists FAILED, AWAITING_HUMAN (with resolved decisions), and PENDING — the route has no early-return for PENDING (mcp_tools.py:779-780), so PENDING was missing from the illustrative list. 2. docs/architecture/orchestrator.md: reorder the bullets under RUNNING-pipeline reconciliation so the live-pod safety net (which fires *before* any stale scan and can short-circuit it) is described before the scan-scope bullet. This matches the actual control flow in startup_reconciliation.py:184-223: live-pod query → if any live, leave RUNNING and continue → only zero-pod pipelines reach the per-agent scan. Folded the pod-query-failure fail-safe into the same bullet for cohesion.
|
Addressed both non-blocking suggestions from Per-item disposition
— Authored by egg |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
No agent-mode design concerns — re-review delta is doc-only (README parenthetical adding PENDING, orchestrator.md bullet reorder so the live-pod safety net precedes the stale-record scan). No agent prompts, output formats, or sandbox boundaries touched.
— Authored by egg
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Re-review
Both non-blocking suggestions from the prior review at 1c62b38 are addressed in 79e8abe. Re-verified the new text against source.
Verified — README addition (README.md:190)
- The new parenthetical
(FAILED, AWAITING_HUMAN with resolved decisions, or PENDING)matches thestart_pipelinetool contract atorchestrator/mcp_tools.py:766-802. PENDING is correctly listed: the tool description explicitly states "starts PENDING pipelines (no early-return for PENDING in the route)" atmcp_tools.py:778-780, and the route handler atmcp_tools.py:2641-2654(_handle_start_pipeline) is unconditional on input status.
Verified — docs/architecture/orchestrator.md reordering
- Bullet order now matches the control flow in
startup_reconciliation.py:- Un-spawned PENDING (
startup_reconciliation.py:155-182,continue) - Live-pod safety net + pod-query-failure fail-safe (
startup_reconciliation.py:184-223,continueon either path) - Stale-record scan, qualified "(zero-live-pod path only)" (
startup_reconciliation.py:225-256) - Per-agent FAILED marking (
startup_reconciliation.py:239-255) - Pipeline-level FAILED transition (
startup_reconciliation.py:257-275)
- Un-spawned PENDING (
- Folding the pod-query-failure fail-safe into bullet 3 alongside the live-pod gate is faithful — both paths end with
continueat the same nesting level, and both leave the pipelineRUNNING. - The label
egg.pipeline.idis correct (kubernetes_client.py:74). - The new cross-reference "(the
start_pipelineMCP tool)" on bullet 5 is accurate —_handle_start_pipelinewrapsPOST /api/v1/pipelines/{id}/start(mcp_tools.py:2650-2654).
No blocking issues. Approving.
Non-blocking
- Cross-reference asymmetry within the same numbered list. Bullet 1 of section 1 (
docs/architecture/orchestrator.md:45) says "Operators restart viaPOST /pipelines/{id}/start" without the MCP tool name; bullet 5 (line 49) now adds "(thestart_pipelineMCP tool)". Section 2 (line 51) also omits the MCP cross-reference. Either add the parenthetical to all three (or just the first occurrence in the section) for consistency, or drop it from line 49 — readers landing on bullet 1 first will not see the cross-reference. Minor; a reader who needs the tool name can find it in the README. Not worth holding the PR for.
— Authored by egg
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…ction
Address review feedback on cross-reference asymmetry: the parenthetical
'(the start_pipeline MCP tool)' previously appeared mid-list in section 1
(bullet 5) but not on the first '/pipelines/{id}/start' mention (bullet 1)
or in section 2. Move the cross-ref to the first occurrence in each
section so readers landing on bullet 1 (or section 2) see the MCP tool
name immediately, and drop the redundant later mention within section 1.
Authored-by: egg
|
Addressed the non-blocking suggestion from Per-item disposition
— Authored by egg |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
No agent-mode design concerns. Re-review delta (79e8abe → 8d45797) is a 3-line doc tweak in docs/architecture/orchestrator.md moving the (the start_pipeline MCP tool) cross-ref to the first occurrence in each numbered section — no agent prompts, output formats, or sandbox boundaries touched.
— Authored by egg
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Re-review
The delta from 79e8abe to 8d45797 addresses the non-blocking cross-reference asymmetry suggestion from my prior review by applying option (b) — adding (the start_pipeline MCP tool) to the first mention of POST /pipelines/{id}/start in each numbered section and dropping the parenthetical from the later mention within section 1.
Verified
docs/architecture/orchestrator.md:45— bullet 1 (un-spawned PENDING) now carries the MCP cross-ref. Reader landing here sees the tool name immediately.docs/architecture/orchestrator.md:49— bullet 5 (stale-record FAILED) no longer carries the parenthetical. Correct deduplication: the cross-ref already appeared earlier in the same numbered section.docs/architecture/orchestrator.md:51— section 2 (AWAITING_HUMAN) now carries the MCP cross-ref.docs/architecture/orchestrator.md:453— appropriately left untouched. That line lives in the HTTP API surface section, where an MCP-tool cross-reference would be off-topic.- Source references remain accurate:
start_pipelinelives atorchestrator/mcp_tools.py:766(description at lines 767-802), the unconditional handler is_handle_start_pipeline(no early-return for PENDING), and the live-pod safety net + fail-safe path isorchestrator/startup_reconciliation.py:184-223with theegg.pipeline.idlabel defined atorchestrator/kubernetes_client.py:74. - README.md was not modified in this delta — the PENDING-inclusive parenthetical from
79e8abeis still in place at line 190.
No new content; +3/-3 lines; doc-only.
No blocking issues. Approving.
— Authored by egg
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…resolve conflict in docs/architecture/orchestrator.md
Conflict Resolution SummaryResolved merge conflicts with
Conflict detail: Both sides updated the "Startup reconciliation → RUNNING pipelines" bullet list to describe the same three concepts (un-spawned PENDING phase, live-pod guard, stale-record scan scope), but with different ordering and wording. The PR version is a strict superset:
Please review: — Authored by egg |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
No agent-mode design concerns. Re-review delta from 8d45797 is the merge commit ea3dddb resolving a doc-only conflict in docs/architecture/orchestrator.md by taking the PR version as a strict superset of main's #2423 update. No agent prompts, output formats, or sandbox boundaries touched.
— Authored by egg
There was a problem hiding this comment.
Re-review
The only delta since 8d45797 is the merge commit ea3dddb resolving the conflict in docs/architecture/orchestrator.md against origin/main after PR #2423 (de96d01) landed independently. README.md is byte-identical to 8d45797; orchestrator.md is byte-identical to 8d45797 for the touched range — the merge took the PR's wording.
Verified — conflict resolution is correct
#2423 (now in main) added a Live-pod guard bullet in the order: PENDING → Stale-scan → Live-pod guard. This PR's 79e8abe independently added a Live-pod safety net bullet in the order: PENDING → Live-pod safety net → Stale-record scan, matching the actual control flow in orchestrator/startup_reconciliation.py:156-275:
- PENDING fast-fail (
startup_reconciliation.py:156-182, endscontinue) - Live-pod query + fail-safe (
startup_reconciliation.py:184-223, endscontinueon either path) - Per-agent stale scan (
startup_reconciliation.py:225-256) - Pipeline-level FAILED transition (
startup_reconciliation.py:257-275)
The PR version is a strict superset of #2423:
- Same three concepts described (un-spawned PENDING, live-pod gate, scan scope)
- Pod-query-failure fail-safe is preserved (folded into the live-pod bullet)
egg.pipeline.idlabel is preserved- Adds the
start_pipelineMCP tool cross-reference at the first occurrence in each numbered section
Verified — net diff vs main is minimal and accurate
git diff c0bd849..ea3dddb is exactly what the PR claims to change:
README.md:190—start_pipelineline added with the PENDING-inclusive parenthetical. Matchesorchestrator/mcp_tools.py:766-802(Also handles AWAITING_HUMAN recovery when all decisions are resolved, and starts PENDING pipelines (no early-return for PENDING in the route)).docs/architecture/orchestrator.md:45—(the start_pipeline MCP tool)cross-ref on bullet 1 of section 1.docs/architecture/orchestrator.md:46-47— bullets reordered (live-pod safety net before stale-record scan scope), with the pod-query-failure fail-safe folded into the live-pod bullet and the scan-scope bullet tagged(zero-live-pod path only).docs/architecture/orchestrator.md:51—(the start_pipeline MCP tool)cross-ref on section 2 (AWAITING_HUMAN).
No other files modified by the PR author. No behavior change — doc-only.
No blocking issues. Approving.
— Authored by egg
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
| egg is addressing review feedback... |
|
Re-reviewed all Per-item disposition
No outstanding feedback. Doc-only PR; no behavior change. — Authored by egg |
|
egg feedback addressed. View run logs 14 previous review(s) hidden. |
Update documentation to reflect changes from c733f2e (Fix #2411: tolerant startup reconciliation + start_pipeline MCP verb):
start_pipeline(pipeline-level recovery) which was missing. The existingdocs/reference/orchestrator-cli.mdPhase Management table already documented it; the README overview was the gap.FAILED. The new behavior adds a live-pod safety net — if any k8s pods labeledegg.pipeline.id=<id>are alive, the pipeline is leftRUNNINGand the stale-record scan is skipped. Only zero-pod pipelines reach the per-agent scan. Pod query failures are fail-safe (leaveRUNNING). Updated the bullet points to match actual code.Test Plan
orchestrator/startup_reconciliation.pydiffTriggered by: #2416
Authored-by: egg