Skip to content

fix(cef): re-enable agent-control after disable + green CI (pin Flutter 3.38.8)#4

Merged
wenkaifan0720 merged 2 commits into
mainfrom
fix/cef-main-health
Jun 19, 2026
Merged

fix(cef): re-enable agent-control after disable + green CI (pin Flutter 3.38.8)#4
wenkaifan0720 merged 2 commits into
mainfrom
fix/cef-main-health

Conversation

@wenkaifan0720

Copy link
Copy Markdown
Collaborator

Two fixes to bring main to a healthy standalone state (follow-up to #3).

1. Re-enable agent-control on a tile after disabling it (cef_host)

Re-enabling agent-control on a previously-disabled tile hung: the 2nd
per-browser Target.getTargetInfo probe never returned a targetId, so
enableAgentControl timed out. DoResolveTargetId reused a fixed DevTools
message id (kTargetInfoMsgId 0x7e57) on the browser's embedder DevTools session,
and Chromium requires monotonically-increasing command ids per session — so the
2nd+ probe on the same browser was silently dropped (concurrent distinct
browsers were fine: separate sessions).

Fix: a fresh, increasing id per probe (Slot::target_info_msg), matched against
the slot's current id in the observer. Pairs with the already-landed
resolveTargetId epoch guard (#3) so the resolve's stale 5s timer can't clobber
the re-resolve.

Verified live — the two-view probe's re-enable lifecycle checks are now hard
assertions and pass (13/13): re-enable yields a fresh grant, drives its own target
again, the torn-down grant stays dead; the probe completes in ~4s (was hanging
~25s).

2. Pin CI to Flutter 3.38.8 (was floating stable)

main's CI was already red (pre-existing): floating stable (3.44.2) fails
flutter analyze because the plugin's DeltaTextInputClient doesn't implement
TextInputClient.onFocusReceived (added after 3.41). The consumer (work_canvas)
ships on a custom 3.38.8 engine, so stable tests a Flutter no consumer uses
and breaks on every new framework interface member. Pin CI to 3.38.8.

Still open (no code change here)

  • Test H — the signed/notarized GPU peer-validation gate. Not a code bug; the
    multi-tile multiplex works. Under a signed (CEF_HOST_ADHOC=OFF) cef_host,
    Chromium's enforced Mach-port peer-validation only passes when the whole tree is
    notarized (Developer-ID signing alone -67030s locally). Confirm on a
    notarized Codemagic macos-release build. Low risk: the shipped release already
    passes this for the single webview; P2's 2nd browser shares the same GPU process.

🤖 Generated with Claude Code

wenkaifan0720 and others added 2 commits June 19, 2026 11:21
Re-enabling agent-control on a previously-disabled tile hung: the 2nd per-browser
Target.getTargetInfo probe never returned a targetId, so enableAgentControl timed
out. cef_host's DoResolveTargetId reused a FIXED DevTools message id
(kTargetInfoMsgId 0x7e57) on the browser's embedder DevTools session, and
Chromium's session requires monotonically-increasing command ids — so the 2nd+
probe on the same browser was silently dropped. (Concurrent distinct browsers were
fine: separate sessions.)

Give each probe a fresh, increasing id (Slot::target_info_msg, seeded to
kTargetInfoMsgId) and match the result against the slot's current id in the
observer. Pairs with the already-landed resolveTargetId epoch guard so the
resolve's stale 5s timer can't clobber the re-resolve.

Restore the probe's re-enable lifecycle checks from a diagnostic to hard
assertions. Verified live: 13/13 — re-enable yields a fresh grant, drives its own
target again, the torn-down grant stays dead; probe completes in ~4s (was hanging
~25s).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…stable

CI floated to `stable` (now 3.44.2), failing `flutter analyze` because the
plugin's DeltaTextInputClient doesn't implement TextInputClient.onFocusReceived
(a framework interface member added after 3.41). The package's consumer,
work_canvas, ships on a custom 3.38.8 engine (its .fvmrc), so floating stable
exercises a Flutter no consumer uses and breaks on every new interface method.
Pin to 3.38.8 to test the real target. main's CI was already red on this before
this branch.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@wenkaifan0720 wenkaifan0720 merged commit 003f86d into main Jun 19, 2026
1 check passed
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