[Fix] Mixed-provider workspaces fail during task launch - #1084
Conversation
|
No code issues found. See task
Reviewed 24b3d69 |
|
Addressed both remaining findings in fa82104: mapped all-repositories workspaces now prepare every repository directly from the provider map (with GitLab token scope derived from that map), and PR/MR/issue routing no longer applies the primary provider's host to mapped secondary repositories. Focused worker, GitLab, and SDK suites pass (133 tests), along with lint, package type checks, and pre-push checks. |
|
Reconciled the supplied review and pushed the remaining fixes in eed726d. Fixed the valid findings: snapshot resumes no longer inherit a host from a different provider; mixed environment re-stamping clears unsafe scalar hosts; provider maps are authoritative for token and operation routing; retries are isolated per provider and GitLab scoped tokens mint last; and duplicate full-name setup selections are rejected instead of silently collapsed. The name-based resolver no longer adds the unrelated active-only restriction. Bitbucket deployment-token redaction remains intentionally in place because worker credentials are generated separately and the deployment secret should not enter the sandbox. The shared provider-map parser also removes the duplicated unchecked casts, and the docs now state credential and GitHub App installation requirements. |
|
Fixed the failing Test job in 315e0a0: repository IDs are now deduplicated in caller order before workspace construction, and the DB regression expectations reflect the order-preserving contract. The complete |
|
Addressed the second review pass in 04ffc57: active repository rows now win over stale inactive duplicates; suggestion selections compare as sets; scan primary-provider resolution follows explicit repository order; out-of-scope operations preserve the scope error; and duplicate repository identities return validation errors across setup and environment create/update paths. Also completed the requested cleanup: intentional Bitbucket deployment-token redaction is documented and tested, GitLab uses the shared provider-map parser, the API uses the shared payload-record helper, mapped all-repositories precedence is documented, and the obsolete nondeterministic primary resolver was removed. Repeated Direct regression tests cover all four write entry points plus legacy read/edit behavior. All affected full suites pass locally, along with lint, type checks, Knip, and pre-push checks. Browser proof is not applicable to these provider-routing and validation semantics. |
What changed
Why this change was made
Mixed-provider workspaces could be configured or selected, but task bootstrap assumed one provider across launch stamping, token provisioning, repository preparation, and source-control operations. The resulting fallback, launch restriction, or mismatched host could prevent these tasks from preparing all selected repositories correctly.
Impact
Environment-backed and explicitly selected tasks can now clone and operate on repositories from GitHub, GitLab, Gitea, Azure DevOps, and Bitbucket using provider-scoped credentials. The first selected repository remains the primary compatibility provider, reordering an unchanged setup selection no longer resets suggestions, and ambiguous or repeated repository identities fail on new writes instead of routing by database order or reaching mapping constraints. Existing stored configs remain parseable for read paths and metadata-only edits.
Fixes #1082
cc @jantekb