Skip to content

feat(foundry): revert actions to queue/workflow pattern#265

Merged
NathanFlurry merged 1 commit into
mainfrom
revert-actions-to-queues
Mar 17, 2026
Merged

feat(foundry): revert actions to queue/workflow pattern#265
NathanFlurry merged 1 commit into
mainfrom
revert-actions-to-queues

Conversation

@NathanFlurry

Copy link
Copy Markdown
Member

Summary

  • Revert actor communication from direct action calls back to queue/workflow-based patterns across all 6 actors (organization, task, user, github-data, sandbox, audit-log)
  • Mutations route through named queues processed by workflow command loops with ctx.step() wrapping for observability in the RivetKit inspector and replay/recovery semantics
  • Remove ~460 lines of command action wrapper middlemen — callers now use .send(queueName, body, { wait }) directly with expectQueueResponse() for wait:true results
  • Keep sendPrompt and runProcess as direct sandbox actions (long-running / large responses incompatible with the queue)
  • Fix workspace fire-and-forget calls to self-send to the task queue instead of calling directly outside workflow step context

Test plan

  • Build and typecheck pass (excluding pre-existing acp-http-client issue)
  • GitHub sync completes (160 repos, 195 tasks, 188 PRs)
  • Task selection and lazy actor creation works
  • Sandbox provisioning completes (Docker container created, session ready)
  • Session creation through queue workflow succeeds
  • Message send and agent response received e2e
  • Zero backend errors/warnings in logs
  • All subscription topics connected (App, Organization, Sandbox, Session, Task)

🤖 Generated with Claude Code

…ends

Revert actor communication from direct action calls to queue/workflow-based
patterns for better observability (workflow history in RivetKit inspector),
replay/recovery semantics, and idiomatic RivetKit usage.

- Add queue/workflow infrastructure to all actors: organization, task, user,
  github-data, sandbox, and audit-log
- Mutations route through named queues processed by workflow command loops
  with ctx.step() wrapping for c.state/c.db access and observability
- Remove command action wrappers (~460 lines) — callers use .send() directly
  to queue names with expectQueueResponse() for wait:true results
- Keep sendPrompt and runProcess as direct sandbox actions (long-running /
  large responses that would block the workflow loop or exceed 128KB limit)
- Fix workspace fire-and-forget calls (enqueueWorkspaceEnsureSession,
  enqueueWorkspaceRefresh) to self-send to task queue instead of calling
  directly outside workflow step context

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@NathanFlurry
NathanFlurry merged commit 84a80d5 into main Mar 17, 2026
2 of 3 checks passed
@railway-app
railway-app Bot temporarily deployed to sandbox-agent / sandbox-agent-pr-265 March 17, 2026 01:48 Destroyed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant