Repository navigation
desktop start: the Cloud account is restored while this computer's server starts, so the first screen no longer waits for both in turn - #482
Merged
Conversation
…rver starts, not after it The first screen waits on the account's restore (the account gate asks for it), and the restore started only once the local server was up, so the account service's round trip (about 600 ms in a 0.2.38 log) came after the server's boot instead of beside it. The restore now starts before the server is awaited. What an account state changes here (enrollment, included services, the home window, the page) asks that server, so the states are held and applied in order once it is up, as before.
2 of 3 tasks
… and the guest skill card test stages four kinds of work bacb532 left two tests red on dev. Its new skill_manage description dropped the word reusable, so find_tool ranked skills_list first for "save this procedure as a reusable skill"; the description says reusable SKILL.md again (a skill is recurring work, which that change keeps). Its duplicate check turns away a create that covers an existing skill, and the guest skill card test staged four skills with one description, the same as an earlier test's: each now has its own kind of work. (cherry picked from commit 78889fc)
…list's two retries Fifteen tests failed in CI on Dec 1 in runs of main, a release and PRs DuskBotAI#477-DuskBotAI#483 whose changes do not reach them, a different set each run, and pass locally. Each entry names the runs it failed in. vps-routing's 'reuses the existing VPS with $settings' failed too (PR DuskBotAI#477, run 46623618361) but is left out: its name is made per case, and the list matches names written in the file. (cherry picked from commit 54f5c51)
…s 60 servers link from their own addresses Every link chaos run since the per-address limit on new links (adc99d7, Nov 14) was cancelled at CI's 60-minute limit, on main pushes, the weekly run and every PR that touches the link service: the scenarios finished in about five minutes and printed their table, but a socket or timer a scenario left open held the process. The run now exits once its results are written. The storm's 60 servers set up their links over one connection, so the node's front gave them one address, which the limit refused after 30 (Too many new links from here); each now uses its own connection, as 60 machines would. Locally, --quick passes all 12 scenarios and exits in 5.6 minutes. (cherry picked from commit 83ab615)
…y list's retries chat-mcp-tools' shutdown verdict, memory-order and the encrypted workspace restore failed in PR DuskBotAI#479's run 46740020170, whose change does not reach them, and pass locally. (cherry picked from commit c47197f)
…os job installs no packages The job runs `node apps/link-service/chaos/run.mjs` straight after checkout, so the undici import failed with ERR_MODULE_NOT_FOUND before any scenario ran.
…ds nothing for 8 s, as the app does src/lib/live-events.ts gives up on a dial that sends nothing in LIVE_EVENTS_OPEN_MS (8 s) and dials again. The probe dropped a quiet stream only after it had sent something, so one silent dial after node-5xx's 502s held it down until the relay closed it, about 90 s, and failed the scenario in CI on five of seven runs.
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.
What and why
On a desktop signed in to a dusk Cloud, the window showed about 1.8 s after its page had loaded. A packaged 0.2.38 app on a Mac logged, over four launches:
startup: … server 1161–1471ms, window 1217–1518ms, loaded 1731–2108ms, shown 3595–3864msThe first screen waits on the Cloud account's restore:
accountGate.state()awaitsrestored()while the client still says "restoring". The restore (ensureCloudAccount().start(), which reads the saved grant and callsGET /api/cloud/desktop/session, 586 ms in that log) started only after the local server was ready. So the account service's round trip came after the server's boot, not beside it.The restore now starts before the server is awaited. What an account state changes on this computer asks the local server: enrollment, included services, the home window, the page. So
onStatenow hands states to a holder (electron/held-until-released.mjs). The holder keeps them until the server is up, then applies them in order, and later states apply at once, as before. The post-restore steps (oneHome.kick,homeWindow.refresh, …) still run after the server.How it was checked
electron/held-until-released.node-test.mjs:saved-vps-startup.node-test.mjs: the restore starts once, beforestartPackagedAlongsideVpsis awaited, and states are released after the server mark. It fails ondev'smain.mjs.pnpm check:electron,pnpm typecheck,pnpm lintand the CI source guards pass.electron/main.mjsstays at its 3,800-line ratchet.pnpm typecheck,pnpm lintandpnpm testpass (typecheck, lint and the Electron tests pass; the wholepnpm testwas not run locally)Not covered: a packaged launch with a real Cloud account. The time saved is expected to be up to the restore's round trip; I estimated it from the log, I did not measure it.
scripts/verify-cloud-account.mjsuses its own harness, not this launch path.This branch also carries the commits of #483: the fix for two tests red on
dev(thefind_toolranking and the guest skill card), the flaky-test retry list for tests that failed at random in CI on Dec 1, and the link chaos fix, so this PR's CI can pass. They drop out of the diff once #483 merges.