Skip to content

[Improve] Stage automation-owned Fast Sessions - #1774

Open
roomote-roomote[bot] wants to merge 7 commits into
developfrom
feature/fast-custom-automations-122adqa54236o
Open

[Improve] Stage automation-owned Fast Sessions#1774
roomote-roomote[bot] wants to merge 7 commits into
developfrom
feature/fast-custom-automations-122adqa54236o

Conversation

@roomote-roomote

@roomote-roomote roomote-roomote Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

​Created by Roomote. Follow up by mentioning @roomote-roomote, in the web UI, or in Slack.

What changed

  • Inventory all production automation paths that can create a fresh sandbox task and classify 16 launcher policies in one shared registry.
  • Route every eligible owned custom automation through the existing Fast Session path for scheduled and run-now execution, regardless of its delegated task scope.
  • Preserve configured model, named-environment/all-repositories scope, report destination, and creator-scoped credentials on sandbox tasks delegated by Fast.
  • Keep legacy ownerless custom automation records on their previous direct sandbox path.
  • Disable owner-deleted Fast records until an admin configures and saves them to claim ownership.
  • Add release-N schema and read support for automation-owned Fast sessions while keeping ownerless Session writes disabled until N+1.
  • Keep staged automation-owned session detail and reply APIs strictly read-only, including model and reasoning settings.
  • Align the custom automation editor, list behavior, management-tool contract, tests, and public documentation with Fast-first execution.

Why this change was made

Automation launch mode should depend on ownership and execution contracts, not on which environment option was selected. The shared policy inventory makes every direct task launcher and its migration blocker explicit instead of implying that only custom automations were considered.

Impact

Owned custom automations are the only current launcher family with a persisted human run-as identity and optional sandbox execution, so they now start Fast-first. The following concrete paths remain sandbox tasks:

  • hidden Sentry, Dependabot, CodeQL, suggester, security, and code-quality scans because they produce machine-consumed work items or suggestions
  • PR review, conflict resolution, CI triage, and issue fixing because they require specialized linkage, claims, provider feedback, or guaranteed workspace execution
  • accepted automation work items and the user-owned onboarding suggestion scan because repository execution and linked-result finalization are their purpose
  • bot-authored chat auto-start and ownerless Slack workflow fallback because they have no mapped Roomote run-as user
  • snapshot refresh, MCP setup recommendations, and deployment CI probes because they require sandbox lifecycle or setup state by definition
  • announcer because the built-in record has no persisted user whose integrations can authorize a Fast Session

Migration 0064_round_surge.sql makes user_id nullable, adds the automation-owner FK/index and an exactly-one-owner check constraint. This release continues writing only user-owned rows, so an N-1 binary never encounters a newly written ownerless Session. Principal-aware repository and admin read paths accept the future shape, while execution fails closed until N+1 ships deployment-principal capability routing. Deterministic manager stats, provider usage alerts, platform issue alerts, and emoji summons do not create automation sandbox tasks and are outside the migration set.

Screenshots

Automation-owned Fast session is read-only

The staged automation-owned Fast session is admin-visible but strictly read-only, with no reply or model-setting controls.

@roomote-community

roomote-community Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

No new code issues found. See task

  • Ownerless sandbox automations retain their legacy direct sandbox execution path.
  • Owner-deleted Fast automations are unavailable and cannot be run until claimed.
  • Claiming an owner-deleted direct-message automation through a partial API update now rebinds its report destination to the claimant.
  • Admin-visible staged automation sessions present a reply UI that cannot deliver and still persists model-setting changes.

Reviewed 67a4445

Comment thread packages/sdk/src/server/automations/custom-automations.ts
@roomote-roomote roomote-roomote Bot changed the title [Improve] Start custom automations as Fast Sessions [Improve] Start eligible automations as Fast Sessions Aug 28, 2026
@roomote-roomote

roomote-roomote Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor Author

Implemented and hardened the two-release automation-principal rollout through 67a4445. Release N has principal-aware schema/reads but no automation-owned writes; staged automation-owned sessions are admin-visible and strictly read-only in both UI and API, with fail-closed execution. Migration, repository/access/runtime tests, web reply/transcript tests, docs, typechecks, lint, visual proof, and pre-push gates pass.

Comment thread apps/api/src/handlers/custom-automations/index.ts
@roomote-roomote

Copy link
Copy Markdown
Contributor Author

@roomote-roomote please run a fresh review on the current head (9c72eac).

@roomote-roomote roomote-roomote Bot changed the title [Improve] Start eligible automations as Fast Sessions [Improve] Stage automation-owned Fast Sessions Aug 28, 2026
@roomote-roomote

Copy link
Copy Markdown
Contributor Author

@roomote-roomote please run a fresh review on the current head (b1535ca) with particular attention to N-1 rollback safety and principal-aware Fast Session access control.

Comment thread apps/web/src/lib/server/fast-sessions.ts
@roomote-roomote

Copy link
Copy Markdown
Contributor Author

@roomote-roomote please run a fresh review on the current head (67a4445), focusing on staged automation-session mutability and N-1 safety.

@brunobergher
brunobergher marked this pull request as ready for review August 28, 2026 13:48
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.

2 participants