Skip to content

Overlap independent launch and configure lookups - #1796

Draft
JTSIV1 wants to merge 4 commits into
jtsiv1/ug-pooled-httpfrom
jtsiv1/ug-launch-overlap
Draft

JTSIV1 wants to merge 4 commits into
jtsiv1/ug-pooled-httpfrom
jtsiv1/ug-launch-overlap

Conversation

@JTSIV1

@JTSIV1 JTSIV1 commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

Stacked on #1795.

What

  • ug claude starts the Anthropic picker catalog request early, alongside the probe and discovery, when the launch already knows it needs it (unmanaged launches and UC model-location launches). If that early result has an error or the profile changed, it refetches the old way.
  • In configure_shared_state, the web-search lookup and the Copilot catalog run alongside the probe and discovery.
  • ug configure reads the coding-agent-config policy while discovery runs. If configure fails or is interrupted while that read is in flight, nothing gets installed or cached. Its warnings print on the main thread at the join, in the same order as before.
  • Provider launches keep the serial fetch, since relayed is only known after the service lookup.

Why

Today a warm ug claude makes its 3 workspace calls one after another (probe, discovery, catalog), about 12 round trips. With this change they run together, about 4. From ap-south-1 that's ~1.9 s of network time.

End to end with this PR and #1795, median of 12 runs:

region ug claude before → after ug configure before → after
Mumbai (ap-south-1) 6.06 → 5.01 s 4.67 → 3.86 s
us-east-1 2.52 → 2.12 s 2.14 → 1.91 s
Oregon (us-west-2) 1.38 → 1.34 s 1.12 → 1.13 s

Testing

  • Overlap tests (event ordering plus a wall-clock check), parity tests for the selection logic and error paths, abort tests for a configure that fails or gets Ctrl-C'd mid-read, relayed provider never fetches the catalog, profile-mismatch refetch, exactly one catalog request on the healthy path.
  • Full unit suite in a clean env: same failures as base, node for node.

This pull request and its description were written by Isaac.

@JTSIV1
JTSIV1 force-pushed the jtsiv1/ug-launch-overlap branch from 1167f2f to f6e9435 Compare November 20, 2026 14:17
@JTSIV1
JTSIV1 force-pushed the jtsiv1/ug-pooled-http branch from c4986a7 to c196246 Compare November 20, 2026 14:17
JTSIV1 and others added 4 commits November 20, 2026 14:25
ug claude started the Anthropic picker catalog only after configure's
discovery finished, and configure fetched the Copilot catalog and the
provider-mode web-search model strictly after the gateway probe. All of
these are independent round trips: start them alongside the probe and
discovery on daemon threads and read the results where they were read
before. A launch shape whose routing never reads the catalog abandons
the speculative request instead of waiting out its retries.

ug configure also read the workspace policy after discovery completed;
read it while discovery runs.

Co-authored-by: Isaac <no-reply@databricks.com>
The background policy refresh now checks an abort flag before every
write, and a configure that fails while the read is in flight sets it,
so a failed configure or a Ctrl-C can no longer install or write
machine state from a daemon thread. The refresh's warnings are captured
and printed at the join, keeping output order as the serial flow had
it.

The speculative picker catalog joins only when its result is healthy: a
catalog error from the pre-auth token is discarded and the launch
refetches with the live token instead of failing or dropping the
picker. The provider-mode web-search and Copilot listings fall back to
inline fetches instead of asserting on their futures.

Co-authored-by: Isaac <no-reply@databricks.com>
The job appends its captured warnings even when the refresh raises, and
the join prints the list, so a failing refresh surfaces its warnings
without the worker thread ever touching the console.

Co-authored-by: Isaac <no-reply@databricks.com>
Co-authored-by: Isaac <no-reply@databricks.com>
@JTSIV1
JTSIV1 force-pushed the jtsiv1/ug-launch-overlap branch from f6e9435 to 0a2230a Compare November 20, 2026 14:29
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