Skip to content

chore(foundry): migrate to actions#262

Merged
NathanFlurry merged 10 commits into
mainfrom
queues-to-actions
Mar 16, 2026
Merged

chore(foundry): migrate to actions#262
NathanFlurry merged 10 commits into
mainfrom
queues-to-actions

Conversation

@NathanFlurry

Copy link
Copy Markdown
Member
  • feat(foundry): checkpoint actor and workspace refactor
  • docs(foundry): add agent handoff context
  • wip(foundry): continue actor refactor
  • wip(foundry): capture remaining local changes
  • Complete Foundry refactor checklist
  • Fix Foundry validation fallout
  • wip
  • wip: convert all actors from workflow to plain run handlers
  • Convert all actors from queues/workflows to direct actions, lazy task creation
  • Fix E2B sandbox timeout comment, frontend stability, and create-flow improvements

NathanFlurry and others added 10 commits March 16, 2026 14:22
Workaround for RivetKit bug where c.queue.iter() never yields messages
for actors created via getOrCreate from another actor's context. The
queue accepts messages (visible in inspector) but the iterator hangs.
Sleep/wake fixes it, but actors with active connections never sleep.

Converted organization, github-data, task, and user actors from
run: workflow(...) to plain run: async (c) => { for await ... }.

Also fixes:
- Missing auth tables in org migration (auth_verification etc)
- default_model NOT NULL constraint on org profile upsert
- Nested workflow step in github-data (HistoryDivergedError)
- Removed --force from frontend Dockerfile pnpm install

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
… creation

Major refactor replacing all queue-based workflow communication with direct
RivetKit action calls across all actors. This works around a RivetKit bug
where c.queue.iter() deadlocks for actors created from another actor's context.

Key changes:
- All actors (organization, task, user, audit-log, github-data) converted
  from run: workflow(...) to actions-only (no run handler, no queues)
- PR sync creates virtual task entries in org local DB instead of spawning
  task actors — prevents OOM from 200+ actors created simultaneously
- Task actors created lazily on first user interaction via getOrCreate,
  self-initialize from org's getTaskIndexEntry data
- Removed requireRepoExists cross-actor call (caused 500s), replaced with
  local resolveTaskRepoId from org's taskIndex table
- Fixed getOrganizationContext to thread overrides through all sync phases
- Fixed sandbox repo path (/home/user/repo for E2B compatibility)
- Fixed buildSessionDetail to skip transcript fetch for pending sessions
- Added process crash protection (uncaughtException/unhandledRejection)
- Fixed React infinite render loop in mock-layout useEffect dependencies
- Added sandbox listProcesses error handling for expired E2B sandboxes
- Set E2B sandbox timeout to 1 hour (was 5 min default)
- Updated CLAUDE.md with lazy task creation rules, no-silent-catch policy,
  React hook dependency safety rules

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…improvements

- Add TEMPORARY comment on E2B timeoutMs with pointer to rivetkit sandbox
  resilience proposal for when autoPause lands
- Fix React useEffect dependency stability in mock-layout and
  organization-dashboard to prevent infinite re-render loops
- Fix terminal-pane ref handling
- Improve create-flow service and tests

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@railway-app
railway-app Bot temporarily deployed to sandbox-agent / sandbox-agent-pr-262 March 16, 2026 22:23 Destroyed
@railway-app

railway-app Bot commented Mar 16, 2026

Copy link
Copy Markdown

🚅 Deployed to the sandbox-agent-pr-262 environment in sandbox-agent

Service Status Web Updated (UTC)
website 🕐 Initializing (View Logs) Web Mar 16, 2026 at 10:23 pm
foundry-mock 🕐 Initializing (View Logs) Mar 16, 2026 at 10:23 pm
foundry-api 🕐 Initializing (View Logs) Mar 16, 2026 at 10:23 pm

@NathanFlurry
NathanFlurry merged commit f45a467 into main Mar 16, 2026
2 of 3 checks passed
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