Repository navigation
automations: keep cloud automation drafts off sandbox routing and show pending target status neutrally - #340652
Conversation
Keep scheduled Cloud automation drafts separate from ordinary sandbox routing. Show target capture and repository checks as pending status while preserving save guards and strict configuration validation.
There was a problem hiding this comment.
🟡 Changes recommended
The authoritative Automation and Copilot provider specifications currently contradict each other about sandbox routing.
1 open finding
What changed in this PR
Preserves scheduled Cloud routing for Automation drafts and presents pending target checks as neutral progress.
Changes:
- Adds explicit Automation-draft routing.
- Separates pending target status from validation errors.
- Adds comprehensive routing, validation, accessibility, and race tests.
| File | Description |
|---|---|
sessionsProvider.ts |
Adds the draft-purpose option. |
sessionsManagementService.ts |
Marks Automation drafts explicitly. |
sessionsManagementService.test.ts |
Tests option propagation and isolation. |
copilotChatSessionsProvider.ts |
Bypasses sandbox routing for Automation drafts. |
copilotChatSessionsProvider.test.ts |
Tests model routing and strict validation. |
cloudAutomationStore.test.ts |
Tests template validation and dispatch. |
automationDialog.ts |
Adds neutral pending-target state. |
automationDialogService.ts |
Blocks saves during pending work. |
automationDialog.css |
Styles pending status neutrally. |
automationDialog.test.ts |
Tests status, accessibility, retries, and races. |
AUTOMATIONS.md |
Documents draft-purpose routing. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Scope sandbox-setting routing to interactive Cloud drafts and link the automation draft contract.
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: Sandeep Somavarapu (@sandy081)Matched files:
Ladislau Szomoru (@lszomoru)Matched files:
|
|
signed in e2e validation passed, this should now allow testing the feature at all on insiders with this flag set |
Connor Peet (connor4312)
left a comment
There was a problem hiding this comment.
Reviewed for security and correctness, including automation-draft routing, configuration validation, pending-target save guards, and regression coverage. No substantiated P1 or P2 defects found.
Written by Connor's agent running GPT-6.1 Sol
05b0180
into
microsoft:main

Code stats
Measured against
origin/mainat52f6dc2c2918e2c92fb7106ed645358c35d4b5c7.Context
Creating a Cloud automation with Claude Opus 5.5 fails when the
chat.agentHost.cloudSandbox.enabledexperiment is on. Switching targets also shows "Saving the current session configuration..." in red, even though it is progress rather than an error.Changes made
Automation drafts reused ordinary Cloud routing. With the sandbox experiment on, the picker selected a sandbox-qualified model ID whose schema caused capture to return
{}. The scheduled-Cloud provider correctly rejected that defined model configuration, but the dialog showed a generic connection error.Pass explicit automation purpose so these drafts keep the scheduled-Cloud model catalogue. Ordinary Cloud sessions keep sandbox routing. The sandbox-only provider rejects automation drafts, and strict unsupported-setting validation and existing
{}reset behavior are unchanged.The two shared Sessions files have only a one-flag change:
sessionsProvider.tsdeclares optionalisAutomationDraft;sessionsManagementService.tssets it in the two automation creation methods.Target capture and repository eligibility now have separate pending status in normal foreground, without
aria-invalid. Save stays blocked until pending work finishes. Actual failures remain errors, and unchanged messages are not repeatedly written to live regions.Testing
{}capture rejection, and pending messages presented as validation errors. The same three passed after the fix.npm run typecheck-clientpassed andnpm run build-fast -- --client-onlypassed.Coverage includes sandbox on/off and setting changes, ordinary-session isolation, restored configuration, raw model payloads, strict rejection, pending-to-error transitions, cancellation, retry, Save races, and unchanged live-region text.
Live signed-in verification in Insiders is pending until sign-in is refreshed.
References