Repository navigation
Master Axiom cmux Cloud PR #13151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Master Axiom cmux Cloud PR #13151
Changes from 84 commits
Commits
Show all changes
112 commits
Select commit
Hold shift + click to select a range
25f1b52
test: reproduce dropped Cloud placement diagnostics
austinywang 720dbe0
test: reproduce structured provider failure misclassification
austinywang abf81ca
fix: prioritize HTTP status over provider missing-message heuristics
austinywang 8b5a209
test: align VM stats fixture with ownership lookup
austinywang 05ce6e3
fix: ignore invalid provider status sentinels
austinywang 937d936
test: reproduce ambiguous guest install exits and lost rollback failures
austinywang 6441a49
test: reproduce unsafe guest shim publication in real filesystem
austinywang e1d7d35
test: gate guest bootstrap rollback and idempotency on PostgreSQL
austinywang 74e3dec
fix: verify guest CLI publication and retain unconfirmed allocations
austinywang 00702e6
test: preserve full environment in guest CLI runtime fixture
austinywang dc6ce9a
fix: accept native Cloud placement diagnostics
austinywang 3f318ca
test: verify guest installer integration with current browser and tim…
austinywang 124e6ec
integrate: consolidate Cloud authentication deadline fixes
austinywang 5e40f87
integrate: bound Cloud reads while retaining current resource and tea…
austinywang 2725d74
fix: align guest regression fixtures and hosted runner selection
austinywang 3839b65
ci: validate auth on the configured Swift package runner
austinywang 72716d2
test: expose hidden Cloud refresh and mutation fanout regressions
austinywang 26a3ef4
fix: bound Cloud read invalidation and cooldown ownership
austinywang 67a8fb1
Merge current main and preserve landed Cloud fixes
austinywang b41abae
fix: preserve the absolute Cloud token deadline across phases
austinywang 67e8928
chore: normalize Cloud read project entries
austinywang 40413b6
test: evaluate mutable cooldown reads before assertion macros
austinywang 870a5bb
test: reproduce rejected RC Cloud diagnostics
austinywang b1a6c3c
test: cover Cloud read gate revocation
austinywang c414a04
fix: enforce Cloud gates around shared reads
austinywang cc4e7ae
fix: accept release-candidate Cloud diagnostics
austinywang a94d5ef
test: reproduce stale Cloud stats batch replacement
austinywang 6859a90
fix: replace stale Cloud stats batches
austinywang 9bbce05
test: cover independent Cloud caller deadlines
austinywang 593964f
fix: separate Cloud transport and caller deadlines
austinywang 6fbafa6
Merge current main verification fixes
austinywang 90652ba
test: cover team usage rate-limit cooldowns
austinywang 4e525e1
fix: record usage cooldowns before HTTP rejection
austinywang 2a2d12c
ci: require focused Cloud regression verdicts
austinywang ae60921
Merge landed auth fixes and preserve Cloud follow-ups
austinywang f0a3304
Merge latest main and reconcile concurrent guest setup
austinywang fecc288
Merge main preview updates and preserve Cloud project entries
austinywang 68883b3
test: isolate ambient Git config in reftable fixture
austinywang e7f8e69
Merge latest main CI and reftable fixes
austinywang 97d949b
ci: preserve focused Cloud guard step contract
austinywang e3c1aed
Merge latest main into Axiom Cloud coverage
austinywang 5c777dd
fix Cloud review findings in Swift client and fixtures
austinywang 20c95a5
fix Cloud cleanup and guest installation rollback
austinywang 1f96860
fix guest prompt asset bundling and cleanup claim races
austinywang 1226163
fence concurrent Cloud cleanup claims by lease time
austinywang 91e7817
avoid duplicate in-process Cloud cleanup work
austinywang c0e9bda
stabilize Cloud cleanup test isolation and guest assets
austinywang 0315a73
isolate guest cleanup fixture provider ids
austinywang bc36d65
close final Cloud review findings
austinywang 28cb83e
harden final Cloud lifecycle review paths
austinywang 0f7dc6e
Merge branch 'main' of https://github.com/manaflow-ai/cmux into feat-…
austinywang ed62571
fix offline first-load recovery state
austinywang eb5cb90
address Cloud review findings
austinywang c2a5e70
keep guest failure complexity within gate
austinywang c9f4fab
Merge branch 'main' of https://github.com/manaflow-ai/cmux into feat-…
austinywang df94720
keep Cloud acceptance suites out of batch shards
austinywang 4485438
isolate Cloud network monitor ownership
austinywang bf16a4b
test Cloud identity and guest failure boundaries
austinywang 37fad75
close Cloud identity and guest error boundaries
austinywang fe18715
normalize Cloud identity test wiring
austinywang 79e7067
annotate Cloud identity tests on main actor
austinywang 332b3f1
stabilize Cloud stats transport assertion
austinywang db91e34
gate Cloud stats overlap before release
austinywang cff081f
test strict provider deletion confirmation
austinywang 5b2de01
preserve unconfirmed provider cleanup ownership
austinywang df1ac86
test strict Freestyle deletion confirmation
austinywang 3a01475
preserve unknown provider deletion failures
austinywang dbfd7c8
complete Freestyle destroy fixture dependency
austinywang 5ee8aa9
Merge branch 'main' of https://github.com/manaflow-ai/cmux into feat-…
austinywang 726df3c
test explicit Cloud team usage
austinywang a64e449
preserve explicit Cloud team usage fence
austinywang f211bc1
Merge branch 'main' of https://github.com/manaflow-ai/cmux into feat-…
austinywang 95b7f27
fence Cloud route results after await
austinywang b0f955a
fence private Cloud routes on policy revocation
austinywang 8488a2c
Merge latest main and preserve Cloud installer fixes
austinywang 524576f
reconcile guest distribution with transactional install
austinywang 16af391
Merge origin/main and preserve Cloud read hardening
austinywang 8d31156
Keep guest CLI distribution transactional
austinywang 4992854
Use the Cloud operation context wrapper
austinywang c35d55f
Make guest distribution fixture paths explicit
austinywang 2069f2a
Make guest distribution tests deterministic
austinywang ab9768d
Merge origin/main and preserve Cloud read coordination
austinywang 6eca228
Close Cloud reachability and guest rollback review gaps
austinywang 3725f6f
Broadcast Cloud reachability changes
austinywang 93590a2
Restore structured guest rollback
austinywang a563611
Allow unreferenced guest release cache after rollback
austinywang e79e6ac
Align retry policy usage with main
austinywang f9183e4
Allow identity fixture team selection
austinywang 3239933
Make explicit team usage test independent of selection
austinywang c3ec4d7
Replay current Cloud reachability to new subscribers
austinywang 6c95ef3
Merge branch 'main' of https://github.com/manaflow-ai/cmux into feat-…
austinywang 0178dc3
Merge branch 'main' of https://github.com/manaflow-ai/cmux into feat-…
austinywang b0c399a
chore: refresh generated config schema
austinywang 8be0c85
Merge branch 'main' of https://github.com/manaflow-ai/cmux into feat-…
austinywang a118484
fix: align Cloud CI gates with current workflows
austinywang 61472b2
fix: close current Cloud review findings
austinywang 9c2ca27
ci: gate dual Xcode runner fallback
austinywang 5fbf36a
fix: import Cloud read test fixture module
austinywang e8bfb10
test: cover Canvas zoom while a Markdown source editor is focused
austinywang 4d38f45
fix: scope file-editor focus to file-editor shortcuts only
austinywang 0987025
test: stop racing the hook queue's drain task for tool admission
teamleaderleo 2346292
test: wait for child processes without pinning a global-pool thread
teamleaderleo 21cabfb
test: wait for the key-window change instead of a fixed 50 ms
teamleaderleo baa7f27
test: scale the SSH retry-budget harness deadline with its attempts
teamleaderleo 0fa1f55
Wait for config reload fanout by suspending, not spinning the run loop
teamleaderleo 6846508
test: prove the font barrier holds the reload, not that it has not ru…
teamleaderleo fe8c900
test: settle earlier config reloads before the font-size reset checks
austinywang 8e18225
Merge remote-tracking branch 'origin/main' into axiom/13151-green
austinywang ad02f4e
test: report the geometry behind a too-small Cloud failure card
teamleaderleo 054bd4b
fix: import workspace liveness type
austinywang 497209c
Merge remote-tracking branch 'origin/main' into axiom/13151-green
austinywang ae95394
Merge remote-tracking branch 'origin/main' into axiom/13151-green
austinywang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| name: Cloud VM guest installation | ||
|
|
||
| on: | ||
| pull_request: | ||
| paths: | ||
| - web/services/vms/drivers/** | ||
| - web/services/vms/guestCli*.ts | ||
| - web/services/vms/guestPrompt.ts | ||
| - web/services/vms/workflows.ts | ||
| - web/services/vms/repository.ts | ||
| - web/services/vms/routeHelpers.ts | ||
| - web/services/vms/vmErrorMessages.ts | ||
| - web/messages/** | ||
| - web/tests/vm-guest-*.test.ts | ||
| - web/tests/fixtures/freestyleGuest.ts | ||
| - web/tests/vm-workflows.test.ts | ||
| - web/package.json | ||
| - web/bun.lock | ||
| - .github/workflows/cloud-vm-guest-install.yml | ||
| workflow_dispatch: {} | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: cloud-vm-guest-install-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| guest-install: | ||
| runs-on: ${{ vars.LINUX_RUNNER || 'blacksmith-4vcpu-ubuntu-2404' }} | ||
| timeout-minutes: 15 | ||
| defaults: | ||
| run: | ||
| working-directory: web | ||
| services: | ||
| postgres: | ||
| image: postgres:16-alpine@sha256:3c5c8892d184f738f4fe282d14ddaa613a38f00f4189d2d94725ebe6f2909ddb | ||
| env: | ||
| POSTGRES_DB: cmux_test | ||
| POSTGRES_PASSWORD: cmux | ||
| POSTGRES_USER: cmux | ||
| ports: | ||
| - 5432:5432 | ||
| options: >- | ||
| --health-cmd "pg_isready -U cmux -d cmux_test" | ||
| --health-interval 1s --health-timeout 5s --health-retries 30 | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | ||
| with: | ||
| persist-credentials: false | ||
| - uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 | ||
| with: | ||
| bun-version: "1.3.14" | ||
| - run: bun install --frozen-lockfile | ||
| - name: SDK and guest filesystem regressions | ||
| run: bun test tests/vm-guest-install.test.ts tests/vm-guest-install-runtime.test.ts tests/vm-guest-install-deadline.test.ts tests/vm-guest-create-response.test.ts | ||
| - name: Migrate isolated database | ||
| env: | ||
| DATABASE_URL: postgres://cmux:cmux@localhost:5432/cmux_test | ||
| run: bunx drizzle-kit migrate --config drizzle.config.ts | ||
| - name: Guest provisioning and idempotency in PostgreSQL | ||
| env: | ||
| CMUX_DB_TEST: "1" | ||
| DATABASE_URL: postgres://cmux:cmux@localhost:5432/cmux_test | ||
| run: bun test --timeout=30000 --test-name-pattern 'guest bootstrap|unconfirmed guest' tests/vm-workflows.test.ts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| import Foundation | ||
|
|
||
| extension CloudReadCooldownStore { | ||
| struct Cooldown: Sendable { | ||
| let until: TimeInterval | ||
| let response: CloudReadRequestCoordinator.Response | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| import Foundation | ||
|
|
||
| extension CloudReadCooldownStore { | ||
| struct Session: Equatable, Sendable { | ||
| let accountID: String? | ||
| let generation: UInt64? | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| import Foundation | ||
|
|
||
| /// Bounds retained throttling state without turning eviction into an early retry. | ||
| struct CloudReadCooldownStore: Sendable { | ||
| private let capacity: Int | ||
| private var session: Session? | ||
| private var cooldowns: [CloudReadRequestCoordinator.Key: Cooldown] = [:] | ||
|
|
||
| init(capacity: Int = 256) { | ||
| self.capacity = max(1, capacity) | ||
| } | ||
|
|
||
| var retainedCount: Int { cooldowns.count } | ||
|
|
||
| mutating func activateSession(for key: CloudReadRequestCoordinator.Key) { | ||
| let incoming = Session(accountID: key.accountID, generation: key.generation) | ||
| guard incoming != session else { return } | ||
| if let session { | ||
| // AuthCoordinator generations increase across account replacement. | ||
| // An old read admitted late cannot reactivate a retired session. | ||
| guard let generation = incoming.generation else { return } | ||
| if let previousGeneration = session.generation, generation <= previousGeneration { return } | ||
| } | ||
| session = incoming | ||
| cooldowns.removeAll(keepingCapacity: true) | ||
| } | ||
|
|
||
| mutating func response(for key: CloudReadRequestCoordinator.Key, now: TimeInterval) -> CloudReadRequestCoordinator.Response? { | ||
| guard matchesSession(key) else { return nil } | ||
| prune(now: now) | ||
| return cooldowns[key]?.response | ||
| } | ||
|
|
||
| mutating func record( | ||
| _ key: CloudReadRequestCoordinator.Key, until: TimeInterval, now: TimeInterval, | ||
| response: CloudReadRequestCoordinator.Response | ||
| ) { | ||
| guard matchesSession(key), until > now else { return } | ||
| prune(now: now) | ||
| let compactResponse = CloudReadRequestCoordinator.Response( | ||
| data: Data(#"{"error":"rate_limited"}"#.utf8), | ||
| http: HTTPURLResponse( | ||
| url: response.http.url ?? URL(fileURLWithPath: "/"), statusCode: 429, | ||
| httpVersion: nil, headerFields: nil | ||
| )! | ||
| ) | ||
| let cooldown = Cooldown(until: until, response: compactResponse) | ||
| if let existing = cooldowns[key] { | ||
| if until > existing.until { cooldowns[key] = cooldown } | ||
| } else if cooldowns.count < capacity { | ||
| cooldowns[key] = cooldown | ||
| } else if let evicted = cooldowns.min(by: { $0.value.until < $1.value.until }) { | ||
| // Evict only an exact-key minimum when the bounded store is full. | ||
| // A session-wide barrier would fabricate 429s for unrelated paths; | ||
| // an evicted key may ask the server again, where its real minimum | ||
| // is enforced without blocking another machine's read. | ||
| cooldowns.removeValue(forKey: evicted.key) | ||
| cooldowns[key] = cooldown | ||
| } | ||
| } | ||
|
|
||
| private func matchesSession(_ key: CloudReadRequestCoordinator.Key) -> Bool { | ||
| session == Session(accountID: key.accountID, generation: key.generation) | ||
| } | ||
|
|
||
| private mutating func prune(now: TimeInterval) { | ||
| cooldowns = cooldowns.filter { $0.value.until > now } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| import Foundation | ||
|
|
||
| /// Identifies the read snapshots changed by one successful control-plane mutation. | ||
| struct CloudReadMutation: Sendable { | ||
| let scope: CloudReadRequestCoordinator.Key | ||
| let affectedPaths: Set<String> | ||
|
|
||
| init(method: String, scope: CloudReadRequestCoordinator.Key, responseData: Data) { | ||
| self.scope = scope | ||
| var paths: Set<String> = [] | ||
| let parts = scope.path.split(separator: "/").map(String.init) | ||
| let createsMachine = method == "POST" && [ | ||
| "/api/vm", "/api/vm/restore", "/api/vm/base/open", "/api/vm/base/reset" | ||
| ].contains(scope.path) | ||
| var forksMachine = false | ||
| if createsMachine { | ||
| paths.insert("/api/vm") | ||
| paths.insert("/api/coderouter/vm-usage/team") | ||
| } else if parts.count >= 3, parts[0] == "api", parts[1] == "vm", | ||
| !["base", "restore", "tunnel", "publications", "domains"].contains(parts[2]) { | ||
| let machinePath = "/api/vm/\(parts[2])" | ||
| if parts.count == 3, method == "PATCH" || method == "DELETE" { | ||
| paths.insert("/api/vm") | ||
| paths.insert("/api/coderouter/vm-usage/team") | ||
| if method == "DELETE" { paths.insert("\(machinePath)/stats") } | ||
| } else if parts.count == 4, method == "POST", [ | ||
| "pause", "resume", "resize", "fork", "attach-endpoint", "ssh-endpoint", | ||
| "scp-endpoint", "sessions", "exec", "open-port" | ||
| ].contains(parts[3]) { | ||
| // Open/exec/file-transfer routes can wake a suspended machine. | ||
| // Other machines' samples remain valid while this one changes. | ||
| paths.insert("/api/vm") | ||
| paths.insert("\(machinePath)/stats") | ||
| if parts[3] == "fork" { | ||
| forksMachine = true | ||
| paths.insert("/api/coderouter/vm-usage/team") | ||
| } | ||
| } | ||
| } | ||
| if createsMachine || forksMachine { | ||
| if let object = try? JSONSerialization.jsonObject(with: responseData) as? [String: Any], | ||
| let id = object["id"] as? String, !id.isEmpty { | ||
| var allowed = CharacterSet.urlPathAllowed | ||
| allowed.remove(charactersIn: "/?#") | ||
| if let encodedID = id.addingPercentEncoding(withAllowedCharacters: allowed) { | ||
| paths.insert("/api/vm/\(encodedID)/stats") | ||
| } | ||
| } | ||
| } | ||
| affectedPaths = paths | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| import Foundation | ||
| @preconcurrency import Network | ||
|
|
||
| /// One path observer for the VM client. The actor owns the mutable | ||
| /// Network.framework monitor; only its sendable stream crosses the actor | ||
| /// boundary, and it never protects domain state or runs UI work. | ||
| actor CloudReadNetworkMonitor { | ||
| private let monitor: NWPathMonitor | ||
| nonisolated let updates: AsyncStream<Bool> | ||
|
|
||
| init() { | ||
| let monitor = NWPathMonitor() | ||
| self.monitor = monitor | ||
| let (updates, continuation) = AsyncStream<Bool>.makeStream(bufferingPolicy: .bufferingNewest(1)) | ||
| self.updates = updates | ||
| monitor.pathUpdateHandler = { continuation.yield($0.status != .unsatisfied) } | ||
| continuation.onTermination = { _ in monitor.cancel() } | ||
| monitor.start(queue: DispatchQueue(label: "cmux.cloud.read-network")) | ||
| } | ||
|
|
||
| deinit { monitor.cancel() } | ||
| } | ||
|
|
||
| extension Notification.Name { | ||
| static let cmuxCloudReadNetworkChanged = Notification.Name("cmux.cloud.readNetworkChanged") | ||
| static let cmuxCloudReadNetworkRecovered = Notification.Name("cmux.cloud.readNetworkRecovered") | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.