sandbox-agent/foundry/AGENT-HANDOFF.md
2026-03-16 14:22:36 -07:00

13 KiB

Foundry Agent Handoff

Baseline

  • Repo: rivet-dev/sandbox-agent
  • Branch: columbus-v2
  • Last pushed commit: 3174fe73 (feat(foundry): checkpoint actor and workspace refactor)
  • Progress/spec tracker: FOUNDRY-CHANGES.md

What is already landed

These spec slices are already implemented and pushed:

  • Item 1: backend actor rename auth-user -> user
  • Item 2: Better Auth mapping comments
  • Item 5: task raw SQL cleanup into migrations
  • Item 6: history -> audit-log
  • Item 7: default model moved to user-scoped app state
  • Item 20: admin action prefixing
  • Item 23: dead getTaskEnriched / enrichTaskRecord removal
  • Item 25: Workbench -> Workspace rename across backend/shared/client/frontend
  • Item 26: branch rename deleted
  • Organization realtime was already collapsed to full-snapshot organizationUpdated
  • Task realtime was already aligned to taskUpdated

Known blocker

Spec item 3 is only partially done. The singleton constraint for the Better Auth user table is still blocked.

Important current state

There are uncommitted edits on top of the pushed checkpoint. Another agent should start from the current worktree, not just origin/columbus-v2.

Current dirty files:

These files are the current hot path for the unfinished structural work.

What is partially in place but not finished

User-owned task UI state

The user actor already has the schema and CRUD surface for per-user task/session UI state:

But the task actor and UI are still reading/writing the old task-global fields:

So items 21, 22, 24, and part of 19 are only half-done.

Coordinator ownership

The current architecture still violates the intended coordinator pattern:

So items 9, 13, and 15 are still open.

Queue-only mutations

Task actor workspace commands already go through queue sends. Other actors still do not fully follow the queue-only mutation rule:

So items 4, 10, and 11 are still open.

Dynamic model/agent data

The frontend/client still hardcode model groups:

The repo already has the API source of truth available through the TypeScript SDK:

So item 8 is still open.

GitHub sync chunking/progress

GitHub data sync is still a delete-and-replace flow:

So item 16 is still open.

If another agent picks this up, this is the safest order:

  1. Finish items 21, 22, 24, 19 together. Reason: user-owned task UI state is already half-wired, and task schema cleanup depends on the same files.

  2. Finish items 9, 13, 15 together. Reason: coordinator ownership, repo-owned task projections, and PR/task unification are the same refactor seam.

  3. Finish item 16. Reason: GitHub sync chunking is mostly isolated to github-data plus app-shell/shared snapshot wiring.

  4. Finish item 8. Reason: dynamic model/agent data is largely independent once user default model is already user-scoped.

  5. Finish items 4, 10, 11, 12, 18, final event audit.

  6. Do item 17 last.

Concrete file hotspots for the next agent

Backend:

Shared/client/frontend:

Notes that matter

  • The pushed checkpoint is useful, but it is not the full current state. There are uncommitted edits in the hot-path backend files listed above.
  • The current tree already contains a partially added user_task_state path. Do not duplicate that work; finish the migration by removing the old task-owned fields and rewiring readers/writers.
  • The current task actor still reads mutable fields from c.state such as repoRemote, branchName, title, task, sandboxProviderId, and agentType. That is part of item 19.
  • The current frontend still synthesizes PR-only rows into fake tasks. That should go away as part of repo-owned task projection / PR unification.