docs(rfc): propose async changed-targets API - #314
Closed
behinddwalls wants to merge 1 commit into
Closed
behinddwalls wants to merge 1 commit into
behinddwalls wants to merge 1 commit into
Conversation
GetChangedTargets holds a streaming RPC open through Bazel, so a timeout or disconnect aborts work with no handle to resume. This RFC adds ComputeChangeTargets, status, fetch, and cancel: persist the request, publish to a work queue, then return; a blocking consumer runs the existing two-graph compare path. RPC success requires queue publish; retries mint a new request_id. Native in-process Bazel is not a SubmitQueue build-signal poll loop. ## Summary ### Why? A client timeout or disconnect cancels request-bound Bazel with no durable handle, so retries repeat expensive work. The compared-target result is already a content-addressed blob, so computation can outlive the RPC. ### What? Adds an illustrative async contract: ComputeChangeTargets stores a request and returns only after publishing `request_id`; GetChangeTargetsStatus and GetComputedChangedTargets are fetch-only; Cancel CAS-marks CANCELLED without killing in-flight Bazel. The consumer blocks on today's GetChangedTargets pipeline (parallel GetTargetGraph plus compare) and extends queue visibility until Process returns. No idempotency key: a retry is a new store row and publish; orphan rows after a failed publish are junk. SubmitQueue platform packages are reused for queue, consumer, counter, and DLQ (extract commons vs import submitqueue left open). Co-authored-by: Cursor <cursoragent@cursor.com>
behinddwalls
marked this pull request as ready for review
September 17, 2026 18:52
xytan0056
requested changes
Sep 17, 2026
xytan0056
left a comment
Contributor
There was a problem hiding this comment.
Thanks for proposing! Stay tuned, we already have a feature planned. Callers should be fairly simple without having the client to orchestrate everything. Will circle back
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.
GetChangedTargets holds a streaming RPC open through Bazel, so a timeout or disconnect aborts work with no handle to resume. This RFC adds ComputeChangeTargets, status, fetch, and cancel: persist the request, publish to a work queue, then return; a blocking consumer runs the existing two-graph compare path. RPC success requires queue publish; retries mint a new request_id. Native in-process Bazel is not a SubmitQueue build-signal poll loop.
Summary
Why?
A client timeout or disconnect cancels request-bound Bazel with no durable handle, so retries repeat expensive work. The compared-target result is already a content-addressed blob, so computation can outlive the RPC.
What?
Adds an illustrative async contract: ComputeChangeTargets stores a request and returns only after publishing
request_id; GetChangeTargetsStatus and GetComputedChangedTargets are fetch-only; Cancel CAS-marks CANCELLED without killing in-flight Bazel. The consumer blocks on today's GetChangedTargets pipeline (parallel GetTargetGraph plus compare) and extends queue visibility until Process returns. No idempotency key: a retry is a new store row and publish; orphan rows after a failed publish are junk. SubmitQueue platform packages are reused for queue, consumer, counter, and DLQ (extract commons vs import submitqueue left open).Co-authored-by: Cursor cursoragent@cursor.com