Repository navigation
feat(database,service,features): a task's and an agent's write answers the transaction it committed in - #4259
Closed
charleslpan wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…s the transaction it committed in Starting, changing, pinning, archiving, moving, and deleting a task, and an agent's start, rename, archive, and pin, each return the id of the transaction they committed in, read in the RETURNING of the write that changed a row (the row itself or the reader's pin), as Neon's mutations guide says, and none where nothing changed, such as a pin asked again. The answers carry it as an optional txid, and the task client hands it beside the task, so the desktop following the task list can wait for it to arrive before it confirms the write. A Stop and a message change what the list shows only once eve moves the agent, in another transaction, so they answer none. The store's existing writes stay as they were, each one now the committed write mapped to its old answer. Co-authored-by: luke-agent[bot] <339870089+luke-agent[bot]@users.noreply.github.com>
luke-agent
Bot
force-pushed
the
luke/neon-realtime-plan-list-service
branch
from
October 20, 2026 22:25
cd74a39 to
edc9dbb
Compare
luke-agent
Bot
force-pushed
the
luke/neon-realtime-task-writes-txid
branch
from
October 20, 2026 22:25
6a1796e to
b5fc369
Compare
Contributor
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack 2 · Task list and automations, piece 3 of 10. Stacked on #3269 (
luke/neon-realtime-plan-list-service), which sits on #3265 →luke/live-tx-wait(P).Each write whose result the desktop shows through the live task list now returns the id of the transaction it committed in, as Neon's mutations guide says:
How it works:
RETURNING pg_current_xact_id()::textof the write that changed a row: the row itself, or the reader's pin.Interfaces:
taskAnswerSchema,taskStartAnswerSchema,taskDeleteAnswerSchemaandcodingAgentAnswerSchemagain an optionaltxid.TaskWritten).…Committedvariants return the txid. The existing functions map onto them, so no other caller changes.The host waits for the txid on the followed list in a later piece of this stack.
Tests: a PGlite store test checks that a rename and a pin return a txid, and that a pin asked again returns none. Web and service delete assertions now read the answer through
taskDeleteAnswerSchema.Made with Luke