spec(control-plane): add workspace init and state persistence specs#1526
spec(control-plane): add workspace init and state persistence specs#1526
Conversation
Add two new spec files documenting the CP's gaps in workspace initialization (repo cloning, S3 state hydration) and ongoing state persistence (S3 sync sidecar). Both capabilities exist in the operator but are missing from the CP path, resulting in empty repo directories and ephemeral-only storage for CP-provisioned sessions. Supersedes draft PR #1477 which targeted the old file location (docs/internal/design/) before the spec reorg in #1488. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
✅ Deploy Preview for cheerful-kitten-f556a0 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (3)
Cache: Disabled due to data retention organization setting Knowledge base: Disabled due to data retention organization setting 📝 WalkthroughWalkthroughThis PR adds and updates control-plane specification documents defining workspace initialization and state persistence behavior. Three files are modified: the main control-plane spec is updated with references to these workflows, and two new detailed specs define init-container-based workspace provisioning and optional sidecar-based S3 state persistence. All features are marked as not yet implemented in the control plane. ChangesControl Plane Workspace and State Specification
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
workspace-init.spec.md— specifies the init container pattern for repo cloning, S3 state hydration, workflow cloning, and credential fetch before the runner startsstate-persistence.spec.md— specifies the state-sync sidecar for periodic S3 workspace backup, git bundle backups, and graceful shutdowncontrol-plane.spec.mdwith cross-references andREPOS_JSONin the env var tableContext
Supersedes draft PR #1477 which targeted the old file location (
docs/internal/design/) before the spec reorg in #1488. Both capabilities exist in the operator but are completely missing from the CP path — sessions created via the new API have empty repo directories and no state persistence.Key design decisions made during drafting:
AMBIENT_CP_TOKEN_URLwithBOT_TOKENfallback for operator compatsession.WorkflowID, not stored on session model directlyVerified against operator implementation (
sessions.go:944-1015,hydrate.sh,sync.sh) through two rounds of parallel critic passes (schema, RBAC, terminology, operator parity).Test plan
reconcileSpecReposWithPatchsessions.go:1376-1419🤖 Generated with Claude Code
Summary by CodeRabbit