Skip to content

cloud: surface whether after() has waitUntil for deferred create work - #11782

Merged
lawrencecchen merged 1 commit into
mainfrom
feat-after-response-mode
Sep 3, 2026
Merged

lawrencecchen merged 1 commit into
mainfrom
feat-after-response-mode

Conversation

@lawrencecchen

@lawrencecchen lawrencecchen commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor

Deferred create work from #11756 and #11771 (plan reconcile, coderouter edge probe) shows in production traces as fetch spans of 0.5 to 4 ms with no log lines, which is what a function frozen right after the response looks like. Next's after() throws E91 when the platform provides no waitUntil; runAfterResponse caught that silently and ran the work detached.

This PR keeps the behaviour and makes it visible: a console.warn before the response when after() is unavailable, and cmux.after_response.mode (after or detached) on the request span. The next production create tells us which path we are on; if it is detached, the follow-up is wiring waitUntil (or moving the probe to the reconcile cron), not more guessing.


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


Summary by cubic

Makes deferred create work's execution mode visible so production traces show whether after() had waitUntil support.

runAfterResponse previously swallowed Next's E91 error and ran the work detached without a trace. It now logs a warning before the response and sets cmux.after_response.mode (after or detached) on the request span, so Axiom and function logs show which path ran.

Written for commit 37d4204. Summary will update on new commits.

Review in cubic

Deferred create work (edge probe, plan reconcile) shows fetch spans of under
4 ms and no log lines in production, consistent with the function being frozen
right after the response. runAfterResponse swallowed Next's E91 error. It now
logs a warning before the response and stamps cmux.after_response.mode on the
request span, so Axiom and the function logs show which path ran.
@vercel

vercel Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cmux166 Ready Ready Preview Sep 3, 2026 4:57pm UTC
cmux41 Ready Ready Preview Sep 3, 2026 4:57pm UTC

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 874fe580-c319-4315-b323-5727f955ebe7

📥 Commits

Reviewing files that changed from the base of the PR and between 75eee0e and 37d4204.

📒 Files selected for processing (1)
  • web/services/vms/routeHelpers.ts

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.

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

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

@lawrencecchen
lawrencecchen merged commit 13006ef into main Sep 3, 2026
12 of 14 checks passed
rustybret pushed a commit to rustybret/bmux that referenced this pull request Sep 3, 2026
3cce67c Vault: recency-first All Sessions view, session search, and checkpoints with fork (manaflow-ai#10215)
94f51fb Fix aggregate child memory pressure before compressor exhaustion (manaflow-ai#10773)
13006ef cloud: surface whether after() has waitUntil for deferred create work (manaflow-ai#11782)
75eee0e Cloud VMs: bake the TigerVNC desktop (dock, wallpaper, cua-driver, noVNC) into the devbox recipe and open it at the machine's private address (manaflow-ai#11776)
36b5536 Fix terminal text bleed during live window resize (manaflow-ai#11530)
44b42c1 Cloud VMs: machines usage decoder and refresh fixes, edge smoke diagnostics (manaflow-ai#11759)
f11be3a ci(tui): scope Valgrind test compilation (manaflow-ai#11750)
9184f4c coderouter: many Claude upstream accounts per team, routed with affinity and cooldown failover (manaflow-ai#11775)
d3b9cdd cloud: attach waits for the baked supervisor; edge probe span joins the create trace (manaflow-ai#11777)
c69e317 test: make the cmuxTests target compile again (main-actor call, CLI-only type) (manaflow-ai#11770)
8185825 fix(history): stop idle History menu graph rebuild loop (manaflow-ai#10661)
723958e Test bounded stale-port retirement after listener exit (manaflow-ai#11356)
367682e Fix native terminal Copy honoring Ghostty clipboard flavor (manaflow-ai#11515)
d59055d docs(tui): refresh SDK inventory counts (manaflow-ai#11766)
89e4701 cmux-tui: use JoinSet shutdown for simple drains (manaflow-ai#11745)

# Conflicts:
#	.github/workflows/cmux-tui.yml

This branch was successfully deployed

2 active deployments
Preview – cmux166 — 37d42043 Deployed Sep 3, 2026 by vercel[bot]
Preview – cmux41 — 37d42043 Deployed Sep 3, 2026 by vercel[bot]
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