Repository navigation
[APPS-2947] Fix: let a framed backend call wait out the server's 5-minute run limit - #624
Conversation
…end call A framed app gave up on a backend function call after 2 minutes, while the server lets one run go for up to 5 minutes. A call that used more than 2 minutes of its budget failed in the frame with a timeout while the run was still in flight. Raise POSTMESSAGE_TIMEOUT_MS to 300_000 so the frame is never the binding limit. The dev client hook's give-up backstop shares the constant and rises with it; the hook's own ping and bundle-fetch timers still bound it at about a minute. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
Matching the server execution limit leaves no allowance for forwarding and response delays, so valid near-limit runs can still time out prematurely.
1 open issue
What changed in this PR
Extends the framed backend transport’s response wait to five minutes to support longer App Builder Live Preview calls.
Changes:
- Raises the shared timeout from 120,000 to 300,000 ms, also extending the dev-client hook’s fallback deadline.
- Adds a regression test for a response arriving just before five minutes.
| File | Description |
|---|---|
packages/plugins/apps/src/backend/client/transports/post-message-transport/post-message-transport.ts |
Increases the timeout and documents its intended relationship to the server limit. |
packages/plugins/apps/src/backend/client/transports/post-message-transport/post-message-transport.test.ts |
Tests successful resolution for a late response. |
Review effort: Balanced
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dec69b7578
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
The frame starts its timer before the parent forwards the call, and the response takes time to come back, so a run ending at the 5-minute server limit used to arrive after the frame gave up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|

Motivation
Architecture
sequenceDiagram participant F as Framed app (postMessageTransport) participant P as Parent page participant S as Backend function run F->>P: app-builder:run-query Note over F: waits up to POSTMESSAGE_TIMEOUT_MS (now 5 min) P->>S: run the function Note over S: server stops any run after 5 min S-->>P: result or error P-->>F: app-builder:run-query:responsePOSTMESSAGE_TIMEOUT_MSand rises with it; the hook's own ping (2s) and bundle-fetch (60s) timers still bound it.Changes
2 changes across post-message-transport.ts, post-message-transport.test.ts
POSTMESSAGE_TIMEOUT_MSfrom120_000to330_000.QA Instructions
dec69b75782e83e7fdae62bddf3e2bc02f042400.mastersource"late-ok"at 150,011 msmaster's 120s valuelate-reply.mjs: frames the bundled transport in headless Chromium and answers late
dec69b75782e83e7fdae62bddf3e2bc02f042400:Blast Radius
Documentation
🤖 Generated with Claude Code