Skip to content

chore(spikes): measure Flutter web hot-reload loop in a doop frame (CHE-7352) - #84

Draft
congvc-bot-x99[bot] wants to merge 7 commits into
mainfrom
agent/x99-claude-sonnet-200k/che-7352-f58966c7ca49
Draft

congvc-bot-x99[bot] wants to merge 7 commits into
mainfrom
agent/x99-claude-sonnet-200k/che-7352-f58966c7ca49

Conversation

@congvc-bot-x99

@congvc-bot-x99 congvc-bot-x99 Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Evidence-only spike for CHE-7352 (S1 of CHE-7351). Do not merge. This PR is closed after S3 reads it.

All numbers, commands and caveats: spikes/flutter-lane/S1-EVIDENCE.md. Scope is spikes/flutter-lane/ only.

Headline

  • Save to visible frame, Flutter 3.50.0 dev server, hot reload, state kept: p50 348 ms, max 492 ms (n=20, frame form 2). Target was p50 of 1 s or less.
  • Frame form 1 (nested iframe in an HTML frame) cannot run the dev loop: DWDS throws a sessionStorage SecurityError in the opaque origin. Release builds do run there with a no-service-worker bootstrap and CORS.
  • Hot reload reaches one instance only (the last connected). CanvasKit loses WebGL contexts from 5 instances, skwasm from 17.

Test-first evidence

Red (empty harness, no app):

$ node harness/ready-check.mjs http://127.0.0.1:18099/empty.html 5000
NOT READY within 5000 ms [ 'error: Failed to load resource: the server responded with a status of 404 (File not found)' ]
exit=1
$ node harness/timing.mjs http://127.0.0.1:18099/empty.html /tmp/nonexistent.dart 3
TIMING FAILED: page.waitForFunction: Timeout 60000ms exceeded.   (no doop:flutter-ready, 0 of 3 values)

Green (same scripts, Flutter dev server, frame form 2):

$ node harness/ready-check.mjs <form 2 url> 60000
READY after 6631 ms (renderer=canvaskit)
exit=0
$ node harness/state-check.mjs <form 2 url> app/lib/main.dart
before taps=2 stamp=run-0; after reload taps=2 stamp=state-check
exit=0

Green timing run (harness/timing.mjs, Flutter dev server, frame form 2, n=20; full file spikes/flutter-lane/evidence/timing-form2.txt on this branch, run 19 Nov 2026 02:17 ICT):

$ node harness/timing.mjs <form 2 url> app/lib/main.dart 20
run 1: 492 ms
run 2: 386 ms
run 3: 323 ms
run 4: 353 ms
run 5: 361 ms
run 6: 378 ms
run 7: 317 ms
run 8: 391 ms
run 9: 348 ms
run 10: 354 ms
run 11: 290 ms
run 12: 333 ms
run 13: 330 ms
run 14: 326 ms
run 15: 319 ms
run 16: 366 ms
run 17: 356 ms
run 18: 352 ms
run 19: 326 ms
run 20: 324 ms
n=20 p50=348 max=492

Result: n=20, p50 348 ms, max 492 ms (target p50 <= 1 s).

Checks

  • prettier --check on every spike file: pass.
  • oxlint with the repo's unused-var rules on spikes/flutter-lane/harness: clean (standalone oxlint, correctness category).
  • Repo typecheck, lint and build did not run: no root node_modules on this host (oxlint: command not found, exit 127). CI covers them.
  • No secrets, certificates, node_modules or SF Pro in the diff. TLS cert stays in X99 scratch.

Round 3: "didn't send any data" (head 494b528)

Cause: Bun.serve closes a request quiet for 10 s (default idleTimeout); devproxy.ts replies nothing until the dev server answers, which takes longer on a loaded X99. Chrome shows that as "didn't send any data".

Red, node harness/slow-upstream-check.mjs 12 before the fix: upstream delay 12s -> error ECONNRESET after 12.0s, exit 1.
Green, with idleTimeout: 255: upstream delay 12s -> status 200 after 12.1s, exit 0.
Real link after restarting the proxy (headless Chrome on X99, load 84): ready after 43.4 s, 10.5 MB wire, within budget, exit 0. Reach from the MacBook is not verified (no agent path to it). See S1-EVIDENCE.md section 12.

ci-policy

ci-policy fails on PR 84 itself: run https://github.com/cheese-work/doop/actions/runs/44456105519 (push-trigger rule for ci.yml, desktop.yml, ios.yml). This PR touches none of those files, and the same rule fails on other PR branches. Pre-existing policy debt, not caused by this PR. The PR is evidence-only, draft, closed not merged.

congvc-bot[bot] and others added 7 commits November 19, 2026 03:43
…HE-7352)

Evidence-only spike under spikes/flutter-lane/: Flutter 3.50.0 Home screen, test-first timing/ready harness, S1-EVIDENCE.md.
Closed after S3 reads it, not merged.
…s 10 s idle timeout (CHE-7352)

Chrome showed "didn't send any data" when the Flutter dev server needed more than 10 s for a cold request on a loaded X99. Test-first: slow-upstream-check.mjs red (ECONNRESET after 12 s), green with idleTimeout 255.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants