Skip to content

fix(cloud): compose Run through authenticated VM endpoints - #21473

Merged
teamleaderleo merged 1 commit into
manaflow-ai:mainfrom
teamleaderleo:codex/run-internal-fetch
Oct 18, 2026
Merged

teamleaderleo merged 1 commit into
manaflow-ai:mainfrom
teamleaderleo:codex/run-internal-fetch

Conversation

@teamleaderleo

@teamleaderleo teamleaderleo commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Use internal fetches to the existing authenticated VM, exec, and delete endpoints instead of invoking route handlers inside another Next request context. This keeps the existing auth, entitlement, Freestyle, and cleanup lifecycle while avoiding nested request-context failures in staging.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

Composes Cloud Run through the existing authenticated VM, exec, and delete endpoints instead of invoking route handlers directly in a nested Next request context.

  • Uses fetch against the internal VM API for provisioning, execution, and cleanup.
  • Preserves the existing auth, entitlement, Freestyle, and cleanup lifecycle.
  • Avoids nested request-context failures seen in staging.

Written for commit 2846a1b. Summary will update on new commits.

View guided diff

Summary by CodeRabbit

  • Maintenance
    • Updated internal handling of run provisioning, command execution, and cleanup. Existing user-facing workflows remain unchanged.
  • User Impact
    • No new features or visible behavior changes are included in this release.

@github-actions

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@coderabbitai

coderabbitai Bot commented Oct 18, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository: manaflow-ai/cmux/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: bfadfc38-2c74-4510-8338-34bc6b646817
📥 Commits

Reviewing files that changed from the base of the PR and between bb35486 and 2846a1b.

📒 Files selected for processing: 1
  • web/app/api/runs/route.ts
+------------------------------------------------------------------------+
| I'm CodeRabbit. I review the code you never knew you needed reviewing. |
+------------------------------------------------------------------------+
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@teamleaderleo
teamleaderleo merged commit 4892e1f into manaflow-ai:main Oct 18, 2026
77 of 79 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Merge receipt for 2846a1b95f: every check was green at merge (20 verified; 18 skipped by policy). Full suite runs on main after merge.

teamleaderleo pushed a commit to teamleaderleo/cmux that referenced this pull request Oct 19, 2026
…cx-q1lnl)

134 main commits since the last sync (3e7ed5a). Full rename detection
(merge.renameLimit=100000). manaflow-ai#21310 (0d5316d, export npm_config_prefix)
is now on main; it is a superset of feat's manaflow-ai#21311 copy, so the resume
workflows keep one version (main's). No Swift, Rust, Go or package manifest
change survives the merge (daemon/remote/go.mod unchanged).

Conflict choices:
- 209 modify/delete and 1 rename/delete in the legacy app, legacy CLI,
  cmuxTests, legacy Swift packages and Resources/Localizable.xcstrings: kept
  deleted.
- cmux.xcodeproj/project.pbxproj, cmux.xcworkspace/contents.xcworkspacedata,
  docs/cli-contract.md, tests/test-execution.toml: feat-cmux-next's side.
- ci-macos.yml, seed-derived-data.yml, restore-app-host-test-product.sh,
  package-test-lane.sh (CmuxTextActions), tests/test_ci_change_areas.py
  (app-host admission block): feat's side; main's rsync --no-times edits
  are for CmuxAgentJournal framework staging that feat deleted. Main's new
  merge-gate change-area test merged in.
- scripts/ci/compile-app-host-test-product.sh: main's logic (the legacy
  cmux target builds without the compilation cache on every Xcode); the
  test (test_ci_test_compilation_cache_seed.sh) keeps feat's one-scheme
  checks with main's every-Xcode loop.
- nightly.yml and tests/test_nightly_universal_build.sh: feat's side (feat
  already had manaflow-ai#21761's empty DerivedData start via manaflow-ai#21762, plus the
  nightly-next build-state prepare and its no-replay check; manaflow-ai#21544's
  promotion change was already on feat via manaflow-ai#21533). Feat's WRITER gate,
  live HOLD read, recovery guard, legacy-identity split, Mach-O floor,
  macOS 15 launch job and bash 3.2 parse hardening kept.
- scripts/gh-merge-green: main's version (multiple freeze tokens manaflow-ai#21584,
  merge-tree merged head manaflow-ai#21576, missing Swift path refusal manaflow-ai#21560, risk
  evidence manaflow-ai#21692) plus feat's "cmux-next Swift canary" required check,
  freeze expiry and owner/pr/head metadata, and the canonical merged path.
- scripts/install-cmux-tui-client.sh: union of the header comments (main's
  total download budget manaflow-ai#16305 and feat's attestation retry text).
- web/data/cmux-shortcuts.ts: feat's generated table.
- web/services/vms/workflows.ts: feat's doc comment on requireUserVm.
- Run API: feat's version (manaflow-ai#21337, open lanes manaflow-ai#21634/manaflow-ai#21305 build on it).
  web/services/runs/*, web/app/api/runs/*, web/db/schema.ts run tables:
  feat's side. Main's parallel Run API (manaflow-ai#21444, manaflow-ai#21468, manaflow-ai#21473, manaflow-ai#21477,
  manaflow-ai#21484, manaflow-ai#21488, manaflow-ai#21492, manaflow-ai#21495, manaflow-ai#21467, manaflow-ai#21517, manaflow-ai#21573, manaflow-ai#21596) is NOT
  ported: its runs services, cron route and vercel.json cron, admission
  probe, run migrations 20261017150000/20261018000000/20261018110000/
  20261018120000 and their tests are removed here, and
  cloud-vm-dogfood.yml / dogfood-journey.mjs stay feat's (main's staging
  dogfood deploy changes manaflow-ai#21556-manaflow-ai#21617 and manaflow-ai#21424-manaflow-ai#21428 not ported).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant