Skip to content

fix(ci): enable Flutter DDS frontend compiler on CI smoke (#501)#581

Merged
shaun0927 merged 1 commit intodevelopfrom
fix/501-flutter-vm-ci
Apr 16, 2026
Merged

fix(ci): enable Flutter DDS frontend compiler on CI smoke (#501)#581
shaun0927 merged 1 commit intodevelopfrom
fix/501-flutter-vm-ci

Conversation

@shaun0927
Copy link
Copy Markdown
Owner

Summary

The Flutter smoke job has been failing all 4 jest tests on every CI run since #526 landed, hidden by `continue-on-error: true`. This PR fixes the root cause and surfaces real failures.

Root cause

From the most recent CI failure log (run `24506966387`):

```
[input-backend] Flutter VM on rejects evaluate (code 113).
Likely a release build or `simctl launch` without `flutter run` —
falling back past Tier 0.
```

`flutter run --no-hot --machine` was the workflow's compromise to keep the launcher non-blocking without stdin, but `--no-hot` disables the DDS frontend compiler service that `FlutterVMInputBackend.probeEvaluateCompile` calls. Without it the backend rejects the device, `getInputBackend()` falls through to `HeadlessInputUnavailableError`, and every Tier-0 input test errors out.

The previous comment on the workflow noted "hot-reload mode hangs the DDS connection on CI" — but the actual symptom of plain `flutter run` was that the launcher blocked on stdin, not that DDS itself hung. Fixing that with `</dev/null` lets us keep the frontend compiler enabled.

Changes

Aspect Before After
flutter run flags `--no-hot --machine` `--machine --vmservice-out-file ` (stdin → /dev/null)
VM service URL discovery regex scrape on `flutter --machine` JSON stream (4 fallback patterns) read `--vmservice-out-file` (written only after engine binds the port)
DDS warmup warning on failure (`grep -q "Dart"`) hard error on failure (`HTTP 200` check + 8s frontend-compiler settle)
Failure visibility `continue-on-error: true` removed — failures surface in the workflow result

Why this should now actually pass

`probeEvaluateCompile` invokes `compileExpression` over JSON-RPC, which the DDS frontend compiler service answers. With hot-reload mode enabled the service is up by the time the warmup probe sees HTTP 200, and the 8-second settle covers the initial compile pass. The other three input tests (`tap` / `typeText` / `swipe`) only need `getInputBackend()` to return Tier-0 — once `probeEvaluateCompile` succeeds, that path is unblocked.

Test plan

  • Headless Smoke Tests workflow on this PR shows `flutter-smoke` job genuinely green (not `continue-on-error`-masked).
  • Job log shows `VM service file written after Ns` and `DDS HTTP endpoint responsive` from the new probe.
  • Jest output shows 4 passed, 0 failed for `flutter-vm-input.live.test.ts`.

Towards: #501

🤖 Generated with Claude Code

The Flutter smoke job's four jest tests have been failing on every CI
run, hidden by `continue-on-error: true`. Root cause from the failure
log:

    [input-backend] Flutter VM on <UDID> rejects evaluate (code 113).
    Likely a release build or `simctl launch` without `flutter run` —
    falling back past Tier 0.

`flutter run --no-hot --machine` was the workflow's compromise to keep
the launcher non-blocking without stdin, but `--no-hot` disables the
DDS frontend compiler service that `FlutterVMInputBackend.probeEvaluateCompile`
requires. Without it the backend rejects the device and getInputBackend()
falls through to `HeadlessInputUnavailableError`.

Changes:
- Drop `--no-hot` so the DDS frontend compiler initializes; redirect
  stdin to /dev/null instead so `flutter run` doesn't block on tty.
- Use `--vmservice-out-file` to capture the resolved VM service URI
  directly, replacing the brittle log-scraping regex chain. The file
  appears only after the engine has bound the port, eliminating the
  race where we read the URL before DDS is actually accepting clients.
- Promote the DDS warmup probe from a warning-on-failure to a hard
  error and check for HTTP 200 specifically.
- Promote the VM service URL discovery to a hard error.
- Remove `continue-on-error: true` so genuine Flutter failures surface
  in the workflow result instead of hiding behind a green checkmark.

This addresses the "Flutter 자동화 — 샘플 앱 멀티스텝 시나리오 통과"
checkbox on #501 by making the test actually run end-to-end.

Towards: #501
@shaun0927 shaun0927 force-pushed the fix/501-flutter-vm-ci branch from 29196b1 to 1bf4626 Compare April 16, 2026 13:51
Copy link
Copy Markdown
Owner Author

@shaun0927 shaun0927 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review: P0=0, P1=0, P2=1 (timing). Root-cause fix for Flutter DDS compiler. --vmservice-out-file replaces fragile log scraping. Removes continue-on-error. LGTM.

@shaun0927 shaun0927 merged commit f81c16b into develop Apr 16, 2026
6 of 7 checks passed
@shaun0927 shaun0927 deleted the fix/501-flutter-vm-ci branch April 16, 2026 14:40
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.

1 participant