Skip to content

feat(service,features): a workspace's automations and an automation's runs are live reads - #3289

Merged
luke-agent[bot] merged 1 commit into
mainfrom
luke/neon-realtime-automations-service
Oct 21, 2026
Merged

luke-agent[bot] merged 1 commit into
mainfrom
luke/neon-realtime-automations-service

Conversation

@charleslpan

@charleslpan charleslpan commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Stack 2 · Task list and automations, piece 5. Stacked on #3284 (luke/neon-realtime-agent-notices).

New live reads on the central live layer:

  • live.automations (GET /api/live/automations?workspaceId=) returns every automation in the workspace the account can read. Each comes with its newest run (a lateral join), that run's agent, and the inputs to the agent's status.
  • live.automationRuns (GET /api/live/automation-runs?id=) returns the automation's newest 50 runs, after reading the automation as the account. An automation the account can't read answers not-found.

Both work like every other live read: each names the account it's read for (sameUser), and polls with Realtime off.

Shared fragments in packages/service/src/live/agent-standing.ts, also used by the task list:

  • the newest turn;
  • the newest awaiting line;
  • the failure word, which is named in SQL so a turn's detail never leaves the database.

Repositories: an automation with no repositories of its own falls back to its task's repository on the reader side, because jsonb_build_array isn't immutable.

Assembly: @luke/features/automation-live builds the held list and history at an instant. The host uses it in the next PR.

Tests:

  • Parity, run as raw SQL against the app's held list and runs routes.
  • mutableFunctionsOf on both statements.
  • The endpoints.

@vercel

vercel Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
luke-web Ready Ready Preview Oct 21, 2026 6:12am UTC

Request Review

@luke-agent
luke-agent Bot changed the base branch from main to luke/neon-realtime-agent-notices October 17, 2026 01:33
@luke-agent luke-agent Bot closed this Oct 17, 2026
@luke-agent luke-agent Bot reopened this Oct 17, 2026
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from 7e1c3de to 265ae03 Compare October 18, 2026 20:24
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-automations-service branch from 9227733 to 4fd53c6 Compare October 18, 2026 20:31
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from 265ae03 to 3ee823b Compare October 18, 2026 21:24
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-automations-service branch from 4fd53c6 to c241c39 Compare October 18, 2026 21:24
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from 3ee823b to c5b9c64 Compare October 19, 2026 18:52
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-automations-service branch from c241c39 to e20c218 Compare October 19, 2026 18:52
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from c5b9c64 to bbe5c74 Compare October 20, 2026 02:53
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-automations-service branch from e20c218 to 811d315 Compare October 20, 2026 02:53
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from bbe5c74 to 710d7fa Compare October 20, 2026 02:58
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-automations-service branch from 811d315 to fb5020c Compare October 20, 2026 02:58
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from 710d7fa to 5d0c06b Compare October 20, 2026 04:02
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-automations-service branch from fb5020c to c1104a8 Compare October 20, 2026 04:02
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch 2 times, most recently from 5a9a34c to 827b2c5 Compare October 21, 2026 00:25
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-automations-service branch from c1104a8 to c23709c Compare October 21, 2026 00:37
@luke-agent luke-agent Bot changed the title feat(service,features): a workspace's automations and an automation's runs are sealed for following over Neon Realtime feat(service,features): a workspace's automations and an automation's runs are live reads Oct 21, 2026
@luke-agent luke-agent Bot closed this Oct 21, 2026
@luke-agent luke-agent Bot reopened this Oct 21, 2026
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-automations-service branch from c23709c to 8134bab Compare October 21, 2026 00:44
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-automations-service branch from 9635f18 to 629734b Compare October 21, 2026 01:23
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from 3b02702 to 36b084a Compare October 21, 2026 01:23
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from 36b084a to 98f9329 Compare October 21, 2026 05:20
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-automations-service branch from 629734b to 64ea3eb Compare October 21, 2026 05:20
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from 98f9329 to f9bad5a Compare October 21, 2026 05:30
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-automations-service branch from 64ea3eb to 95addee Compare October 21, 2026 05:30
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-automations-service branch from 95addee to 0b8a78a Compare October 21, 2026 05:38
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from f9bad5a to 191addc Compare October 21, 2026 05:38
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from 191addc to b1bab0a Compare October 21, 2026 05:50
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-automations-service branch from 0b8a78a to 8eba1ac Compare October 21, 2026 05:50
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-agent-notices branch from b1bab0a to 7199d3c Compare October 21, 2026 05:58
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-automations-service branch from 8eba1ac to 94d1b67 Compare October 21, 2026 05:58
Base automatically changed from luke/neon-realtime-agent-notices to main October 21, 2026 06:01
… runs are live reads

GET /api/live/automations (live.automations) answers every automation of a
workspace the account reads, with its newest run, that run's agent, and what
the agent's status is read from, in one statement; GET
/api/live/automation-runs (live.automationRuns) answers an automation's newest
fifty runs on the same terms, once the automation is read as the account. As
every live read is, each names the account it is read for, answers its rows
inline at the poll address with Realtime off, held until they move, and is
sealed where Realtime is on. An agent's newest turn, its newest awaiting line,
and why its turn failed are one set of fragments the task list shares, the
failure named in SQL so a turn's detail never leaves the database, and an
automation with no repositories of its own falls back to its task's on the
reader, since jsonb_build_array is not immutable. The desktop builds the list
and the history with @luke/features/automation-live. Parity tests run the
statements as raw SQL against the held answers, and both pass the
immutability helper.

Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
@luke-agent
luke-agent Bot force-pushed the luke/neon-realtime-automations-service branch from 94d1b67 to 34fe396 Compare October 21, 2026 06:07
@luke-agent
luke-agent Bot marked this pull request as ready for review October 21, 2026 06:07
@luke-agent
luke-agent Bot enabled auto-merge October 21, 2026 06:07
@luke-agent
luke-agent Bot added this pull request to the merge queue Oct 21, 2026

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)

Devin Review

Merged via the queue into main with commit d6e841b Oct 21, 2026
12 of 13 checks passed
@luke-agent
luke-agent Bot deleted the luke/neon-realtime-automations-service branch October 21, 2026 06:10

This branch was successfully deployed

1 active deployment
Preview — 34fe3964 Deployed Oct 21, 2026 by vercel[bot]
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