Repository navigation
Stop logToServer from recursing on failure - #6275
Merged
Merged
Conversation
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. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
With LOG_SERVER set, src/app.ts points console.log/info/warn/error at logToServer. Its failure handler reported through that same console, so each failed POST queued two more POSTs to the unreachable server, and the count doubled on every round (63 requests after six rounds in the new test). Report the failure through global.clog, which src/app.ts sets before the redirect. Capturing console in logger.ts does not work: Metro's inline requires load the logger on the first redirected call.
j0ntz
force-pushed
the
jon/log-server-no-recursion
branch
from
October 23, 2026 00:43
90275f5 to
40ffc7a
Compare
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
j0ntz
enabled auto-merge
October 23, 2026 00:44
Contributor
Author
|
Landing this without a review.
|
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.
Description
Asana task
With
LOG_SERVERset in config.json,src/app.tspointsconsole.log,info,warnanderroratlogToServer. The failure handler inlogToServerreported through that same console. Each failed POST queued two more POSTs to the unreachable server, and the count doubled every round.The fix reports the failure through
global.clog, whichsrc/app.tssets before the redirect. Capturingconsoleinside logger.ts does not work in the app: Metro's inline requires load the logger on the first redirected call, after the redirect is in place. The new test loads the logger the same way. It sees 63 requests after six rounds without the fix and 1 with it.Found while building per-slot app log capture for agent simulator runs, which points
LOG_SERVERat a local listener.LOG_SERVERstaysnullin release builds. Production behavior does not change.Tested on the iOS simulator with
LOG_SERVERpointed at a server that reads each request and then drops the connection. Every POST fails there:The quote list loaded normally with every POST failing.
CHANGELOG
Does this branch warrant an entry to the CHANGELOG?
Dependencies
none
Requirements
If you have made any visual changes to the GUI. Make sure you have:
Note
Low Risk
Dev-only logging path when LOG_SERVER is set; production behavior is unchanged.
Overview
Fixes runaway HTTP traffic in dev when
LOG_SERVERis configured but the listener is down or unreachable.logToServerusedconsole.error/console.logon POST failure; withsrc/app.tsredirecting those methods back tologToServer, each failed request spawned two more, doubling load every round. Failures now go throughglobal.clog, the pre-redirect console saved inapp.ts.Adds a Jest test that mirrors Metro’s lazy logger load and asserts only one
fetchper log line when the server errors. CHANGELOG notes the dev-build fix; release builds (LOG_SERVERnull) are unchanged.Reviewed by Cursor Bugbot for commit 90275f5. Bugbot is set up for automated code reviews on this repo. Configure here.
Test evidence
90275f5Stop logToServer from recursing on failure
2026-10-17
1. swap quote logged to slot file
2. quotes load while log server drops requests