SANDBOX-1811: add openspec for warm pod pool - #13
Conversation
Design proposal, spec, and task breakdown for the warm pod pool feature that pre-creates unassigned sandbox pods to eliminate cold-start latency. Co-authored-by: Cursor <cursoragent@cursor.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📜 Recent review details🧰 Additional context used🔀 Multi-repo contextLinked repositories findingscodeready-toolchain/mcp-server-devsandbox
codeready-toolchain/mcp-common
codeready-toolchain/api
WalkthroughThis PR adds OpenSpec documents for a warm pod pool feature in the CLI MCP Server session manager. It includes a proposal, design rationale, behavioral spec, metadata, and an implementation checklist. No code changes are included. ChangesWarm Pod Pool OpenSpec
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@openspec/changes/2026-07-01-warm-pod-pool/design.md`:
- Around line 11-15: The warm pool reconciliation currently appears to be run by
every replica via ReconcilePool(), which can cause the pool target to be
enforced per replica instead of cluster-wide. Update the design around
ReconcilePool(), WarmPoolSize, and the claim/replenishment flow to make
reconciliation owned by a single leader/reconciler, or explicitly define that
WarmPoolSize is scoped per replica and state that clearly. Ensure the ownership
model is described consistently alongside the existing atomic claim flow and
fallback behavior.
In `@openspec/changes/2026-07-01-warm-pod-pool/specs/warm-pool/spec.md`:
- Around line 77-82: The StartReconciler/ReconcileInterval behavior needs
validation so the background ticker never receives a zero or negative duration.
Update the StartReconciler flow to enforce a positive ReconcileInterval, falling
back to the 30s default or rejecting invalid input before calling
time.NewTicker, and keep the check close to the reconciler startup logic so the
behavior is enforced consistently.
- Around line 32-60: The warm-pool ClaimPod flow is missing recovery rules for
failures after the pod is claimed but before assignment completes. Update the
ClaimPod scenario in the warm-pool spec to explicitly handle auth Secret
creation errors by rolling back the pod label claim, and clarify that ambiguous
POST /assign failures such as timeouts or connection loss must also trigger
rollback of the session-id label and deletion of the auth Secret. Use the
ClaimPod, /assign, and cli-mcp-sandbox-auth-<sessionID> symbols to keep the
behavior consistent across retries and avoid pod/Secret/agent divergence.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: ca498b33-d90a-4a1e-8ae7-da20abfa9e5e
📒 Files selected for processing (5)
openspec/changes/2026-07-01-warm-pod-pool/.openspec.yamlopenspec/changes/2026-07-01-warm-pod-pool/design.mdopenspec/changes/2026-07-01-warm-pod-pool/proposal.mdopenspec/changes/2026-07-01-warm-pod-pool/specs/warm-pool/spec.mdopenspec/changes/2026-07-01-warm-pod-pool/tasks.md
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
codeready-toolchain/mcp-common(manual)codeready-toolchain/mcp-server-devsandbox(manual)codeready-toolchain/api(manual)codeready-toolchain/toolchain-common(manual)codeready-toolchain/host-operator(manual)codeready-toolchain/toolchain-e2e(manual)
📜 Review details
🧰 Additional context used
📓 Path-based instructions (1)
**
⚙️ CodeRabbit configuration file
-Focus on major issues impacting performance, readability, maintainability and security. Avoid nitpicks and avoid verbosity.
Files:
openspec/changes/2026-07-01-warm-pod-pool/specs/warm-pool/spec.mdopenspec/changes/2026-07-01-warm-pod-pool/tasks.mdopenspec/changes/2026-07-01-warm-pod-pool/proposal.mdopenspec/changes/2026-07-01-warm-pod-pool/design.md
🔀 Multi-repo context
Linked repositories findings
codeready-toolchain/mcp-server-devsandbox
deploy/README.md:184-206— documents the MCP session lifecycle and theMcp-Session-Idheader. This is directly relevant to the warm-pool claim flow, since the new feature depends on session creation/assignment behavior and per-session identity propagation.
codeready-toolchain/mcp-common
- No direct warm-pool /
/assign/AssignRequest/ReconcileIntervalreferences were found in the repo surface I checked.
codeready-toolchain/host-operator
- No direct warm-pool /
/assign/AssignRequest/ReconcileIntervalconsumers were found; the search hits were unrelatedcluster-assignedstate-label usages in tests/docs.
codeready-toolchain/toolchain-e2e
- No direct warm-pool /
/assign/AssignRequest/ReconcileIntervalconsumers were found; the search hits were unrelated “assigned” references in tests/docs.
🔇 Additional comments (3)
openspec/changes/2026-07-01-warm-pod-pool/.openspec.yaml (1)
1-2: LGTM!openspec/changes/2026-07-01-warm-pod-pool/proposal.md (1)
1-45: LGTM!openspec/changes/2026-07-01-warm-pod-pool/tasks.md (1)
1-65: LGTM!
- Clarify WarmPoolSize is a cluster-wide target, not per-replica; add Decision 7 explaining why every replica runs reconciliation (idempotent convergence, no leader election needed) - Add rollback scenario for auth Secret creation failure in ClaimPod - Clarify that ambiguous /assign failures (timeouts, connection loss) also trigger full rollback of pod label and Secret - Add ReconcileInterval validation: fall back to 30s default on zero/negative values to prevent time.NewTicker panic - Update task checklist with new rollback steps and test cases Co-authored-by: Cursor <cursoragent@cursor.com>
ReconcilePoolgoroutine, atomic claim flow viaresourceVersionoptimistic locking,POST /assigntoken delivery, async replenishment, and fallback to on-demand creationresourceVersionfor claim atomicityAssisted By: Cursor
Summary by CodeRabbit