Repository navigation
test(e2e): the app-ready report says where the boot time went (#305 diagnostics) - #346
Merged
Merged
Conversation
…iagnostics) - A compact boot trace in every document of a watched context (an init script, test code only): the first time `<html lang>` is set, `#root` gets a child, the toolbar is attached and visible and the canvas is visible; the frame count and longest gap; a running count, sum and top three of the long tasks; the CJK punctuation faces' states. One check per animation frame, no subtree observer, stopped 500 ms after the canvas is visible. - The failure report keeps Node's clock (navigation, DOMContentLoaded, load, the toolbar during the wait, the verdict, ms from the wait start) apart from the renderer's (ms from its navigation start, with the wait's start on that clock), and reads requests once from the browser's resource timing: the count, the catalog requests and the slowest one, its query values masked. - A renderer that misses the 1 s probe: the same read is collected when it answers, at most 5 s after the verdict, as a separate late trace. - Unchanged: the readiness condition (toolbar, then canvas, visible), the 8 s budget and the retry policy. `watchContext` is now awaited, so the trace is registered before a page navigates. - e2e/app-ready-diagnostics.spec.ts: the two timelines, a renderer busy at the deadline and its late trace, the slowest request masked, a document without a trace. Part of #305
Deploying cozy-loop-studio with
|
| Latest commit: |
17c7748
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://09dd577e.cozy-loop-studio.pages.dev |
| Branch Preview URL: | https://fix-app-ready-305.cozy-loop-studio.pages.dev |
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.
Summary
Part of #305: the app-ready failure report now says where the boot's time went, so the next real CI failure brings its own evidence. Test code only: the readiness condition (the toolbar, then the canvas, each visible), the 8 s budget and the retry policy are unchanged, and nothing reaches a product bundle.
The intermittent stall has not been reproduced: 51 local cold starts (up to 8x renderer CPU throttling) and 30 cold starts in one targeted run on the CI runner, all under 4.6 s. The measurements are recorded on #305; its cause is not established, and #305 stays open.
What changes
e2e/support/appReady.ts,bootTrace, an init script registered on every context the shared fixture sees). Compact so it cannot slow the boot it measures: one check per animation frame (no subtree observer); the first time<html lang>is set,#rootgets a child, the toolbar is attached and visible, the canvas is visible; the frame count and the longest frame gap; a running count, sum and top three of the long tasks; the CJK punctuation faces' states. It stops 500 ms after the canvas is visible. Requests are not recorded one by one; the resource-timing buffer is raised from 250 to 2,000 entries, since the dev build loads about 270 modules.watchContextis now awaited by the fixture, so the trace is registered before a page navigates.Unchanged
The readiness condition,
toBeVisiblewith the project's 8 s expect timeout, the retry policy, the Playwright configuration, product code, version, release notes and change declarations.Tests
e2e/app-ready-diagnostics.spec.ts+4: the Node and renderer timelines, each with its own marks; a renderer held busy for 2.5 s at the deadline and its late trace carrying that long task; the slowest request named with its query value masked and requests not listed one by one; a document without a trace.Checks run locally
npx tsc -b, unit tests 3,465 passed, every sourcecheck:*(25), oxlint at its 39-warning baseline;check:e2e-shards: every one of the 2,109 listed tests in exactly one of 6 shards, each within the budget.app-ready-diagnostics,i18n-zh-hansandwhats-new(the two specs of the PR feat(diagram): grid-aligned editing, automatic orthogonal routing, editable connection shapes, text inside node outlines and re-placed Templates (v0.25.0) #345 failures), chromium, 1 worker, retries 0: 118 passed.