Repository navigation
Sunny: answer sendMessage and submitToolCallInput once Base44 accepts - #88
Closed
amitbardos wants to merge 1 commit into
Closed
amitbardos wants to merge 1 commit into
amitbardos wants to merge 1 commit into
Conversation
Base44 holds both requests open for the whole builder turn, so the proxy
waited up to 120s and could report a working long build as a timeout.
It now waits 3s for a refusal, which still reaches the browser as before,
then answers { ok: true }. The request to Base44 keeps running under
after(), since dropping it cancels the turn, and a later failure is
logged. Mirrors Tiny Sunny's waitForRefusal.
Also replaces the comments citing Vercel's 300s ceiling: this repo
deploys to Netlify, where a synchronous function ends at 60s, counting
after() work.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Stacked on #87.
Base44 holds
chat/messageandchat/submit-tool-call-inputopen for the whole builder turn. The platform proxy waited for it, up toBUILDER_TIMEOUT_MS(120s), so a long build that was working could still come back as a timeout.useChat'sChatBackendexpects both calls to resolve once the request is accepted. This applies Tiny Sunny'swaitForRefusaltosrc/app/api/base44/platform/route.ts.What changes
sendMessageandsubmitToolCallInputare flaggedanswersOnAccept. The proxy waits 3s (REFUSAL_WINDOW_MS):UpstreamFailure, keeping today's status and error shape: 403 with detail, 401 → 501bridge_misconfigured, 502 for a fetch that never completed. A fast success still returns its body.200 { ok: true }. The browser never read this body anyway; the chat follows the turn over the live session.after(). Dropping that connection cancels the turn ("Processing was interrupted"). A failure after the response is logged as[base44/platform] <action> failed after it was accepted: <status>.X-Request-IDforwarding are unchanged.BUILDER_TIMEOUT_MSnow says that Netlify ends a synchronous function at 60s, countingafter()work, and that the 120s ceiling is for hosts with no such limit. Thebase44Platform.tsand README troubleshooting rows match.Netlify caveat
Netlify's synchronous execution limit is 60s and can't be configured. Its
waitUntil, which is whatafter()uses, runs within that limit (config defaults, waitUntil). So in production a builder turn longer than 60s is still cut when the function ends, as it was before this change: the old 120s timeout never applied on Netlify either. Fixing that would take a background function or a change on Base44's side; this PR doesn't attempt either.createApp(whoseinitial_messagebuild runs inside the call) anddeployAppstill wait for the whole call, since the browser needs their response.Testing
npm run typecheck,eslinton the changed files,npm run base44:smoke: all pass.BASE44_PLATFORM_HOSTpointed at it), both actions:403 {"error":"Upstream 403","detail":…}, same as before{"ok":true}at ~3.0s; the upstream connection stayed open until Base44 answered (no client drop){"ok":true}at ~3.0s; the server logsfailed after it was accepted: 500X-Request-ID: submit-toolu_1still reached upstreamafter()→waitUntilunder the OpenNext adapter).🤖 Generated with Claude Code