Skip background workspace routing reads without ChatGPT auth (#52635)

## Why

Background workspace routing reads reload configuration even when signed out or using an API key, although routing requires ChatGPT authentication.

## What changed

Check cached authentication before reading accounts for workspace routing at app-server startup and connection initialization. Skip these background reads without ChatGPT authentication, while preserving configuration reloads for explicit `account/read` requests.

## Testing

Add regression tests covering signed-out and API-key startup and connection initialization, explicit `account/read` configuration reloads, and routing after ChatGPT sign-in, including propagation of configuration errors.

GitOrigin-RevId: 8b90ee609ed24f8618cd21f160eb7001703b8bd1
This commit is contained in:
Joe Savona
2026-10-09 16:40:52 +00:00
committed by copyberry
parent 7f2f4fd46e
commit 751e7edd0b
5 changed files with 304 additions and 3 deletions
@@ -150,7 +150,9 @@ impl AccountRequestProcessor {
.set_workspace_routing_resolver(Arc::downgrade(&resolver));
let startup = processor.clone();
tokio::spawn(async move {
let _ = startup.read_account(/*request*/ None).await;
let _ = startup
.read_account_for_background_workspace_routing()
.await;
});
processor
}