Repository navigation
Close the loopback sign-in connection and let the OS pick test debug ports - #327
Merged
Merged
Conversation
Owner
Author
|
@codex review |
Codex Review Summary: ✅ CompletedThis 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. |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
8 tasks done
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.
Issue
Closes #326
Summary
Two CI jobs failed intermittently on pull requests that never touched the code involved, which made every red check ambiguous. Both root causes are fixed here. Users of the app get one real improvement: a browser sign-in no longer leaves the browser holding an idle connection to a server StepForge has already stopped.
Changes
app/cloud-account.jsanswers the loopback OAuth redirect withConnection: close. The redirect is answered exactly once and the server shuts down straight after, so connection reuse has nothing to reuse. Without it the client kept a pooled socket to a dead server, and the HTTP parser later threwCannot destructure property 'socket' of 'parser.deref(...)'after the owning test had ended, which marked the wholecloud-accountstest filenot okon Windows even though all its subtests passed.tests/e2e/lib/driver.jsstops reserving debug ports before launching. It now passes--remote-debugging-port=0and--inspect=0and reads the ports back after the app has bound them: the DevTools port from theDevToolsActivePortfile Chromium writes into the user-data folder, and the inspector port from theDebugger listening on ws://…line Node prints. The oldfreePort()helper bound port 0, closed the socket, and handed the bare number to Electron, leaving a window in which another process could take the port; that producedbind() failed: Address already in use (98)/Cannot start http server for devtools, and with no retry the driver spent its full 30s timeout before failing the test that happened to be launching.freePort()is removed rather than left unused, since pre-reserving a port is the bug.Area
Testing
bash tests/run_test.shpassesTested manually (describe below)
npm test: 1627 pass, 0 fail, 26 skipped.bash tests/run_test.sh:All tests passed.The UI suite and startup smoke check skip on this host becausexvfb-runis not installed, so the e2e tests were run separately against a real display.The new unit test is a real regression test: with the
Connection: closeline removed it fails, and it fails with the same "generated asynchronous activity after the test ended" error class seen in CI. With the fix, 20/20 pass in that file.e2e with the new driver:
editor,library,exports,toolbar,ai-settingsandclipboardare 18/18 pass, includingMove step up and Move step down reorder the steps on disk, the test that failed in CI.The
canvas(2) andsettings(1) e2e tests fail on this host both with and without this change, because they were run against my real desktop display where the pointer and compositor are shared. They are unaffected by this change and expected to pass on CI's private Xvfb display.Verified the port mechanism directly: launching Electron with
--remote-debugging-port=0writes the real bound port toDevToolsActivePort, and/json/liston that port returns the StepForge renderer target.--inspect=0prints the inspector port on stderr.Screenshots or recordings
N/A — no interface changes.
Rollout notes
None.
Checklist
t(), andnpm run translationslists nothing missing