Repository navigation
fix(cloud): refuse auth and placement denials on first Cloud send (W2-01) - #30776
teamleaderleo wants to merge 7 commits into
Conversation
|
Found 3 test failures on Blacksmith runners: Failures
|
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) web and size checks: green |
a549503 to
4465ee3
Compare
|
Owned by an agent session · session |
|
Closing this draft under the connector-draft cleanup. Its own body holds landing pending deployment and live provider readback for cmux-platform #397. That PR is merged, but its available receipts establish source review and CI, not a deployed provider returning offers or a successful first task in its seeded directory. Clearing that hold would claim evidence we do not have. The authorization/admission fix remains useful and is preserved on this branch, rebased onto Independent router review at the rebased head also found that the typed-404 protection is incomplete: Outstanding acceptance belongs with W2-01 / #5944 and Cloud owner #5846. |
W2-01 closure follow-up — exact CI failure and decoder gap (source + logs reviewed)I checked the closure comment, the rebased head The focused run's red was a test-invocation error, not a Rust assertion failure. The run's checks job (125040050286) set Zero Rust tests executed in that run. The correct directory is The reported typed-404 hole is real. Minimal reviewed follow-up: preserve the distinction unknown present server code vs absent/generic code, while keeping the existing safe allowlist for displayed error codes. For example, decode any non-empty unrecognized code to a fixed static sentinel like Landing gate: retain the closure's explicit requirements—owner links a deployed platform revision and real provider-offer readback, records one successful repository-seeded first-send outcome, and obtains exact-head focused Rust tests + review. Platform #397 has a merge/CI SHIP, but this source inspection found no complete provider-and-repository first-send readback. Recent Cloud item-14 run has successful no-folder Cloud replies while repo actions remain blocked by approvals; these are distinct outcomes. The original W2-01 finding also identified repo/environment affinity on reused machines; that product decision remains separate from this narrow authorization repair. Ownership: existing PR owner/session remains named in comment 6566587273. This comment does not reopen the held PR, push to the owned branch, or request new coordinator dispatch. |
|
W2-01 backend follow-through: cmux-platform PR #513 now implements the admission distinction on the platform while this cmux client PR stays closed. The platform's
This removes the quota/spend admission ambiguity at the source and preserves old-client no-offer recovery, independent of #30776's unshipped decoder patch. Tests cover all four cases; platform CI run 41429797088 and 41430264286 passed on their earlier exact heads. The final compatibility head The client-side unknown-typed-404 decoder issue and the live repository-seeded first-task readback remain separate. No merge/deploy here, and this closed branch is untouched. |
![Fix with [code]smith](https://pr-comments-assets.blacksmith.sh/codesmith/fix-with-codesmith-light-3x.png)
W2-01 — Preserve platform authorization and placement during first Cloud send
Part of zero-setup Cloud inquiry W2-01 and Cloud owner #5846.
Problem
A first personal-repository Cloud send calls
POST /v1/workspaces/{workspace}/machine. Previously the clientmade_no_machinetreated HTTP 401/403, arbitrary 404, andworkspace_machine.not_admittedas an invitation to try a different App-created Cloud machine. This turned explicit identity, resource, or capacity refusals into a second machine-creation attempt.The backend
WorkspaceMachines.tsemitsworkspace_machine.not_admittedwhen its durable placement reserves no machine due to budget, cap, or no matching offer. The successful fix for the specific development no-offers cause, platform #397 (merged22cc687df1f6ebd96bf3394357aebc4e2c10192d), now accepts the Freestyle provider'smemoryPause:falseoffers. Deploy/live verification is still required before declaring development hot start healthy.Change (two Rust files)
not_foundcode) still falls back for older platform endpoints.workspace_machine.not_admittednow stops the send; no alternate machine creation may evade the denied admission decision.workspace_machine.unconfiguredremains the intentional compatibility fallback for deployments without a configured workspace-machine base.Regression cases
Extended the existing fake-platform
plan_makes_a_personal_repository_sends_machine_through_the_platformtest:workspace_machine.not_admittedreturn a refused result with nonew_name;Status / ownership
Draft / HOLD pending exact-head review, CI, and confirmation of the platform #397 deployment/provider readback. No local Rust toolchain is installed in this execution environment, so no local cargo test is claimed. CI workflows were queued at the last check. No machine, credential, production deployment, or existing owner branch was changed.
This PR works on a separate branch from the Cloud seed integration #30655, which touches the same test/source files for a different behavior; rebase and inspect exact-head diffs before landing. The environment editor #30359 still needs to forward selected environment on first send; a focused W2-01 review note covers intentional environment-vs-fallback cases.
Remaining acceptance
Run
cargo test -p cmux-tui start_chat, lint and an authorized DEV probe: after platform #397 is deployed, request a personal GitHub workspace machine, verify the real provider returns offers and the first task runs in its seeded directory. Avoid interpreting merged source as proof of deployment. If compatibility for a temporary no-offers failure is needed, introduce an explicit serverprovider_unavailableerror rather than reusing an admission refusal.