mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-15 03:00:48 +00:00
1.6 KiB
1.6 KiB
Backend Notes
Actor Hierarchy
Keep the backend actor tree aligned with this shape unless we explicitly decide to change it:
WorkspaceActor
├─ HistoryActor(workspace-scoped global feed)
├─ ProjectActor(repo)
│ ├─ ProjectBranchSyncActor
│ ├─ ProjectPrSyncActor
│ └─ HandoffActor(handoff)
│ ├─ HandoffSessionActor(session) × N
│ │ └─ SessionStatusSyncActor(session) × 0..1
│ └─ Handoff-local workbench state
└─ SandboxInstanceActor(providerId, sandboxId) × N
Ownership Rules
WorkspaceActoris the workspace coordinator and lookup/index owner.HistoryActoris workspace-scoped. There is one workspace-level history feed.ProjectActoris the repo coordinator and owns repo-local caches/indexes.HandoffActoris one branch. Treat1 handoff = 1 branchonce branch assignment is finalized.HandoffActorcan have many sessions.HandoffActorcan reference many sandbox instances historically, but should have only one active sandbox/session at a time.- Session unread state and draft prompts are backend-owned workbench state, not frontend-local state.
- Branch rename is a real git operation, not just metadata.
SandboxInstanceActorstays separate fromHandoffActor; handoffs/sessions reference it by identity.- Sync actors are polling workers only. They feed parent actors and should not become the source of truth.
Maintenance
- Keep this file up to date whenever actor ownership, hierarchy, or lifecycle responsibilities change.
- If the real actor tree diverges from this document, update this document in the same change.