Repository navigation
fix(writes): tell a write never sent from one whose answer was lost - #30
Merged
Merged
Conversation
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 1c321d48-16d4-4b82-85ca-5acf824aeb32) |
ragnorc
force-pushed
the
fix/write-not-sent-20261030
branch
from
October 31, 2026 02:15
aa80fb0 to
46a7e29
Compare
ragnorc
changed the base branch from
fix/sign-in-source-door-20261030
to
main
October 31, 2026 02:15
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 66b2bae8-e38f-4407-8533-3b1a958eeb84) |
…verywhere A refused connection is described by its kind as well as judged by it, so Windows reads as other systems do; a fix dropped unsent and a merge whose head could not be read are not sent, not refused; a reason quoted into a sentence that goes on ends once (studio_ui::clause), the toast included; a never-sent write is logged with the gateway's words; a write and a Blob write share one send-and-judge step.
ragnorc
force-pushed
the
fix/write-not-sent-20261030
branch
from
October 31, 2026 02:50
46a7e29 to
cef06d0
Compare
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 61f23d51-97ba-4b8e-9531-5a9a57dd51ed) |
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.
Stacked on #29: it is based on that branch and will retarget to
mainonce #29 merges.A write Studio never sent wrote nothing. One whose answer was lost may have landed. Studio now tells the two apart everywhere a write's outcome is shown.
What counts as never sent
graph_client::NoAnswernames why a request has no answer:Retired: the connection was retired, because its CLI target is gone or names a transport Studio cannot use.Unsendable: Studio would not make the request as asked, for example a path that leaves the server's root.Unreached: the server refused the connection. This is judged by the error's kind, an ioConnectionRefusedin the error chain, and never by its text. A request is written only on a connection that was made. A review traced reqwest, hyper-util, hyper and h2 and found no case where this follows a request the server processed.Lost: any other transport failure, and any failure while reading the body after sending.WriteOutcome::NotSentcovers the first three.judge_writereturnsAnswered<T>.What each surface shows
forbiddenif the target is retired or Studio would not make the request. It is answered 503service_unavailableif the server could not be reached. Both carryeffects: none. A write already retired is refused before its card is shown.Said the same way everywhere
studio_ui::clause. That covers the toast, which could read "… sent.. Nothing was written." for any message ending in a period, as well as the banners, the tooltips and the gateway's refusals.graph_store::nothing_sent). The log still records it as a refusal in the constitution's sense: nothing was written.Testing
fmt,clippy -D warnings,cargo test --workspace(1,137 passed) and the repo checks, on this branch.graph_clienta_write_the_server_refused_to_connect_to_is_not_sent: a refused connection, one worded as Windows words it, a reset, and an error that says "connection refused" only in its text.studio_workspacea_refusal_toast_ends_its_message_once.graph_storea_write_to_a_server_refusing_connections_is_not_sent: Studio's own reqwest transport against a closed port.a_writes_success_answer_says_what_it_didcovers everyNoAnswer, and the session, Blob, type table and retired-client tests coverNotSent.Note
Medium Risk
Changes write-outcome semantics and agent-gateway HTTP responses across many surfaces; misclassification could wrongly tell users to check History or retry merges when nothing was sent, or vice versa.
Overview
Studio now classifies writes that never left the client separately from writes whose server answer was lost, and surfaces that consistently in the UI, session log, and agent gateway.
graph_clientintroducesNoAnswer(Retired,Unsendable,Unreached,Lost) on forward/send failures, maps the first three toWriteOutcome::NotSent, and splits server-response judgment intoAnswered(replacingWriteOutcomeinjudge_write). Connection refused is detected byConnectionRefusedI/O kind, not error text.Agent gateway refuses writes to an already-retired target before approval; approved writes that fail to send get structured 403/503 CLI responses with "Nothing was sent." messaging via
unsent_refusal/Reply::NotSent, instead of closing silently or treating everything as unknown.UI and session (query editor, review merges/fixes, type table/Blob saves, activity toasts) handle
NotSentas nothing written—no History settlement—distinct fromUnknown.studio_ui::clauseavoids doubled periods when reasons are embedded in longer sentences;graph_store::nothing_sentaligns log wording with the gateway.Reviewed by Cursor Bugbot for commit cef06d0. Bugbot is set up for automated code reviews on this repo. Configure here.