Skip to content

cmux NEXT: wait for agent page paint before scene capture - #27160

Merged
cmux-bot[bot] merged 14 commits into
feat-cmux-nextfrom
feat-cmux-next-26468-scene-render-wait
Oct 31, 2026
Merged

cmux-bot[bot] merged 14 commits into
feat-cmux-nextfrom
feat-cmux-next-26468-scene-render-wait

Conversation

@austinywang

@austinywang austinywang commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

The first debug.scene.render after a cold launch could time out or capture before the agent chat appeared. Scene capture now waits for the final engine to attach, the document and agent content to paint, and the Chromium page to become drawable by the window snapshot. A loading-cover timeout no longer counts as document paint. Both scene consumers use the same readiness state, with a 20-second settle budget inside the route's 30-second deadline.

Fixes #26468. Base 85992aac4598f51dd20c415d4a0ab975c5a43faf, including the signing-hook catalog fix #29332, was merged normally and pushed without rewriting history. The six-file task diff remains unchanged; the app target shrinks by seven lines.

Changelog

Fixed: Debug scene captures wait for the agent page after a cold launch.

Validation

Focused current-head command, run remotely:

cmux-ci run --class light --display --script scripts/ci/package-test-lane.sh \
  --ref 93391456dea0de54314f8d9fc74e36fd28eb32ce \
  --arg=suite --arg=Packages/macOS/CmuxNext \
  --arg=AgentPaneCapturePaintTests,AgentPaneCaptureReadinessTests,CaptureScenePageCompositedTests,MaskedScreenshotTests \
  --env CMUX_CI_XCODE_APP=/Applications/Xcode_26.6.app
Revision Observed result Fleet job
Before repair: 1345c73637a29baafdf178246d53320434be760b Expected failure in aLoadingCoverGivingUpDoesNotCountAsDocumentPaint; other nine tests passed. fb40246dad2f15a7d96e142c
Repair: 450663d12529027574c01ea03d05e23aeed56e5a All 10 tests passed with the same command as the failing revision. e46aba36816d4ab83fa4d8bb
Reviewed head: 93391456dea0de54314f8d9fc74e36fd28eb32ce All 22 tests passed across the four focused suites on a display-enabled Mac. 4ec72a05e0ecaa44254940a4

For the original red/green proof, the suite argument was --arg=AgentPaneCapturePaintTests,CaptureScenePageCompositedTests, without --display. The readiness tests were subsequently extracted from the composition suite; the current command also selects them and the adjacent snapshot fixture.

Observed / Not run

At 93391456dea0de54314f8d9fc74e36fd28eb32ce:

  • Release recipe 2 passed in fleet job 57fb78a86c91e3d21a5bab03: app 105 seconds and bundled CLI 24 seconds; workspace reset confirmed.
  • Tagged macOS-app build e2bdae04b12e78f372587138 passed on the supported Linux pool; workspace reset confirmed. Tag: issue-26468-scene-render-ready; artifact SHA-256: 8b05a184b567b8ca83cdd76a8c0a4a2213f138d8da15848a48a9f3f213258bab. Open the tagged build. Publication verified the actual bundle tag and read back the artifact digest; Tag Opener health checked without launching it.
  • A fresh isolated Mac launch with --showcase succeeded on its single first debug.scene.render call: settled_ms=1371.6, one Chromium page composited, three transcript rows, and a visible composer. No retry, errors, gaps, or privacy findings. The remote capture slot was released.
  • The reported cmux-next checks blocker and release-notary both pass on this head. The required local pre-push gate passes. verify-local.py passes Swift syntax, localization defaults, and feature flags; its package-grouping check finds the base's missing CmuxDeviceHub workspace entry. This PR changes neither the workspace nor that checker.
  • Independent correctness review: SHIP at this head. Independent visual review: PASS at this head. Both themes were also inspected directly.
  • All 22 selected tests passed: paint 3, readiness 4, composition 3, and masked screenshots 12. The fleet job exited 0 and confirmed workspace reset.

Not run: an independent entire-package suite or macOS 14/15 runtime checks. Builds and native tests run remotely. Desktop capture used a local backend; no Cloud behavior is claimed. Earlier task tags have no running local app. Stopping the previous tag's backend reported no local backend state; its registration was retained.

To repeat the cold-launch check, use a capture state with launch_args: ["--showcase"] and exactly one recorded debug.scene.render {"scene":"main-showcase"} step. Run CMUX_AGENT_ID=your-agent-id cmux-ci capture 93391456dea0de54314f8d9fc74e36fd28eb32ce --job e2bdae04b12e78f372587138 --state STATE.json. Expect success on the first call, a readable transcript and composer, and no retry entry in result.json.

Viewed after image: yes

Visual verdict: Accept — the first render shows a readable transcript and composer in both themes, without a blank page or loading cover.

Capture steps-592ac6381f at 93391456dea0 (fleet build, capture mini, text checked for private data)

Light Dark
light dark

… final engine

On a cold launch the agent page is to show in Chromium but Chromium has not
attached; its hidden backing WKWebView is already in the window and loaded,
so the scene settled with no page on screen and the snapshot answered
"agent page was not composited" with 0 web views and 0 Chromium pages.

The settle predicate now refuses a page whose Chromium is still starting,
a Chromium page the snapshot cannot draw, and a page before its first
paint. The settle deadline grows to 20 s so a cold Chromium start, or its
8 s fallback to WebKit, fits inside the route's 30 s deadline. The
not-settled error names each agent page's state.

Fixes #26468

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Review 8810ed0: HQ feed card · gallery before/after runs · checks

App of this head (app.zip, kept 1 day)

gh workflow run reload-build.yml -R manaflow-ai/cmux --ref feat-cmux-next -f tag=pr27160 -f ref=feat-cmux-next-26468-scene-render-wait -f platform=macos -f backend_mode=local

web and size checks: green

Shipped in:

@github-actions github-actions Bot added the risk:normal Risk tier (docs/ci/risk-tiers.md) label Oct 29, 2026
@blacksmith-sh

blacksmith-sh Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
test_every_listed_hook_is_one_glaeda_released_with_the_check (main.SigningHooksInSt
epWithGlaedaTests.test_every_listed_hook_is_one_glaeda_released_with_the_check)/
test_every_listed_hook_is_one_glaeda_released_with_the_check (main.SigningHooksInSt
epWithGlaedaTests.test_every_listed_hook_is_one_glaeda_released_with_the_check)
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@teamleaderleo

Copy link
Copy Markdown
Collaborator

Bead cx-1dhuqt created for this PR by the cmux coordinator.

@teamleaderleo

Copy link
Copy Markdown
Collaborator

Review (codex gpt-6-astra high fast, drain lane): SHIP at 5b6fcc3

No blocking findings.

The loading cover can mark the pane painted at its give-up deadline even when Chromium has not painted. Require the shared page paint probe and pane content signal together, retaining the legacy WebKit pane signal.

Verification: scoped syntax, default verification and prepush checks pass. The prior regression commit preserves the failing case; fleet red/green execution follows the plain push.
@cursor

cursor Bot commented Oct 31, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@austinywang

Copy link
Copy Markdown
Contributor Author

Review (Codex correctness): SHIP at 450663d

Independent read-only review found no concrete correctness defects in the exact integrated diff. Reviewed engine startup/fallback, document and pane paint signals, snapshot visibility, both capture readiness call sites, and regression dependencies. git diff --check passed. Native tests and cold-launch capture are being verified separately on the fleet.

The previously failing checks job now passes on this head: https://github.com/manaflow-ai/cmux/actions/runs/41148783034/job/124380054462. Its old failure was an undeclared CmuxNextHome dependency in CmuxNextHomeEngineTests; integrating the latest base fixed it.

@austinywang

Copy link
Copy Markdown
Contributor Author

The remaining nightly-guards / workflow-guard-tests / release-notary failure is inherited from integrated base 95b8dc4a64ed3eac8705e3cc12d43b79a3f389cd:

Both fail SigningHooksInStepWithGlaedaTests.test_every_listed_hook_is_one_glaeda_released_with_the_check: the newest signing hook f612f5a8… is absent from the allowlist. This PR changes only capture readiness and its Swift tests; the signing inputs are identical to the base. nightly-guards / Guard status wraps that finding.

@austinywang austinywang added the ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds label Oct 31, 2026
@austinywang austinywang removed the ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds label Oct 31, 2026
Move the readiness value and its behavioral tests out of the app composition target. Both scene paths keep the same paint, engine startup and snapshot eligibility conditions.

Validation: Swift syntax, localization defaults, feature flags, and scoped package conventions pass. Prior focused fleet regression is red at 1345c73 and green at 450663d; rerun the three focused suites on this head after push. Workspace package grouping differs on the fetched base and is unrelated to these six Swift files.
@austinywang

Copy link
Copy Markdown
Contributor Author

Review (Codex correctness): SHIP at a99f645

Independent read-only review of the complete diff against integrated base 8b3fa55 found no concrete correctness defects. Reviewed both scene consumers, the document/content paint conjunction, Chromium startup and fallback, snapshot eligibility, and the 20-second settle budget within the 30-second route. git diff --check passed.

The base merged without conflicts. Capture readiness and its four behavioral tests now belong to the agent-pane module; the app target shrinks by seven lines and the current prepush architecture gate passes. Remote focused tests and the exact-head tagged runtime verification are running separately; this review itself did not compile or launch the app.

@austinywang

Copy link
Copy Markdown
Contributor Author

Current-head CI classification at a99f645: the cmux-next checks failure is inherited from the base, not from the six-file capture diff.

The PR job fails only Tier routing: RouteStep.test_a_feat_cmux_next_push_defers_the_base_tier, test_a_push_whose_scheme_compile_is_the_dev_landing_build_keeps_it, and test_coalescing_off_or_another_branch_runs_the_base_tier_on_the_push. The same three errors occur in the feat-cmux-next base job at a7ebd2a912167e90f142ec5a2805c734f3082d99. The PR does not modify the workflow or routing tests. Pushed commits add no violations passes; the local current prepush gate also passed, including the readiness extraction out of the app target.

The local workspace grouping check also reports a missing CmuxDeviceHub entry; the workspace file is byte-identical to the integrated base. No unrelated generated file was changed.

@austinywang

Copy link
Copy Markdown
Contributor Author

The tooling-tests red at a99f645 is also a base finding. Both the PR job and the feat-cmux-next base job report exactly tests/test_check_objc_selectors_step.py: linux-guard lane is not run by any workflow from the execution registry validator. The registry, validator, workflow, and that test are unchanged by this PR.

The signing-hook guard is likewise red on the base. The only current non-green source checks are these inherited guards and the already classified Tier routing failure.

@austinywang austinywang added the ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds label Oct 31, 2026
@austinywang

Copy link
Copy Markdown
Contributor Author

Visual review (Codex): PASS at a99f645

Independent review inspected the real light and dark captures from fleet job c4e60a77d6761e7f6d80805f. Both show a readable agent transcript, edited-file card, and composer, with no blank page, loading overlay, clipping, or material rendering defect. The primary agent independently viewed both captures and verified the cold first RPC succeeded with no retry, settled_ms=1736.414292, and one Chromium page composited.

@austinywang austinywang removed the ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds label Oct 31, 2026
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent October 31, 2026 10:43 Inactive
@cmux-bot
cmux-bot Bot temporarily deployed to ci-routing-agent October 31, 2026 10:43 Inactive
@austinywang austinywang added the hold cmux-next batch queue: keep this PR out of the batch (docs/ci/cmux-next-batch.md) label Oct 31, 2026
@austinywang

Copy link
Copy Markdown
Contributor Author

Review (Codex correctness): SHIP at 7527bc7

Fresh independent read-only review found no concrete defects in the full six-file diff or the incoming page-parking, Chromium, window-snapshot, and agent-tab startup changes. Parked pages remain excluded from capture readiness and composition. Whitespace check passed; the reviewer ran no builds or tests. The parent is repeating exact-head fleet verification after the bot base merge.

@austinywang

Copy link
Copy Markdown
Contributor Author

Visual review (Codex): PASS at 7527bc7

Independent review opened both current-head captures. Both themes show the readable agent transcript, edited-files card, and composer without a blank page or loading cover. The single first-call debug.scene.render succeeded with settled_ms=2581.2, three transcript rows, a visible composer, and one Chromium page composited. No retries, errors, gaps, or privacy findings were recorded.

Exact-head evidence: all 10 focused tests passed on a Mac in fleet job 62b1406c86e4aedfbe5417b6; Release recipe 2 passed in eb0f7c0b48c8105a9677e257; tagged build e5d96d61c8a1309941320f31 passed through the supported Linux macOS-app builder. All three jobs confirmed workspace cleanup. The capture ran on an isolated Mac and released its slot. Open the verified tagged build; Tag Opener health and registration checked without launching it.

@austinywang austinywang added ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds and removed hold cmux-next batch queue: keep this PR out of the batch (docs/ci/cmux-next-batch.md) labels Oct 31, 2026
@austinywang

Copy link
Copy Markdown
Contributor Author

Swift CI follow-up at 7527bc7f634a35b270d64d491cafac8c4ce430d8: the priority pass executed all 10 tests in the three changed suites successfully. The broader selected-target pass hit its 1,500-second limit (exit 143), leaving incomplete results. PR job.

The latest completed base Swift suite, at 07088897284b6637a4ddb5763e06ca1601d4aae2, also hit the same limit. Twenty-two failing test names overlap; this does not establish that every head failure is inherited. Requested a same-SHA rerun to obtain complete results. The exact-head focused fleet tests, Release compile and cold first-call capture remain passed as recorded above.

@austinywang austinywang removed the ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds label Oct 31, 2026
@cursor

cursor Bot commented Oct 31, 2026

Copy link
Copy Markdown

Bugbot needs on-demand usage enabled

Bugbot uses usage-based billing for this team and requires on-demand usage to be enabled.

A team admin can enable on-demand usage in the Cursor dashboard.

@austinywang

Copy link
Copy Markdown
Contributor Author

Review (Codex correctness): SHIP at 0c67d53

Independent correctness-first review found no defects in the six-file diff against 50bddce5c1deb5477e2fa5db14578ac2fbb8a615, including startup, fallback, document-paint resets, parked-page adoption and snapshot eligibility. Whitespace check passed. Source review only; exact-head fleet verification is in progress. The base was integrated with a normal merge and pushed without force or verification bypasses.

@austinywang

Copy link
Copy Markdown
Contributor Author

At head 0c67d531b27345a6d81b491be4baa94ff90a3db9, the reported cmux-next checks (god files, concurrency, crash safety, l10n) blocker passes. The compile and fast gates also pass, and the PR is conflict-free.

The remaining release-notary red is inherited from the exact merged base 50bddce5c1deb5477e2fa5db14578ac2fbb8a615: head job, base job. Both fail only SigningHooksInStepWithGlaedaTests.test_every_listed_hook_is_one_glaeda_released_with_the_check, because the newest released signing-hook hash is absent from the catalog. Comparing the complete logs with scripts/ci/test_reds.py found no head-only failure, crash, or truncation. Guard status wraps this same failure.

@austinywang

Copy link
Copy Markdown
Contributor Author

Visual review (Codex): PASS at 0c67d53

Independent review opened both real-app captures. Both themes show the readable agent transcript, edited-files card, and composer without a blank page or loading cover. The single first-call debug.scene.render succeeded in 1,259.1 ms: document ready, three transcript rows, composer visible, and one Chromium page composited. No retries, errors, gaps, or privacy findings were recorded. The primary agent also inspected both images.

Scope: the captured cold-launch main-showcase state; after-only evidence, with no before capture. Current-head stills are embedded in the PR description. The preview receipt publisher could not run because its configured agent-author list is absent; the original stills passed the repository's media privacy check before upload.

@austinywang austinywang added the ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds label Oct 31, 2026
@austinywang

Copy link
Copy Markdown
Contributor Author

The repository's full base-red classifier also excuses the current notary failure against the newest completed base verdict:

python3 scripts/ci/base_red_excuse.py --repo manaflow-ai/cmux \
  --base feat-cmux-next --sha 0c67d531b27345a6d81b491be4baa94ff90a3db9 \
  --check 'nightly-guards / workflow-guard-tests / release-notary'

Observed: exit 0, matching base run 41206037511 at 625b1ca07f9d8aaebeab023a446f8f56dd34e264. The per-test comparator likewise reports own: false, no unmatched tests. The signing-hook catalog is unchanged between this PR and the latest fetched base; the existing fix is #29332. No unrelated signing change was added here.

Autoland's report started at 13:32 UTC still marks that failure as PR-owned. The required fast-gate workflow is being refreshed on this same head because the base changed its guard workflow after the previous gate run.

@austinywang

Copy link
Copy Markdown
Contributor Author

Exact-head fleet verification completed at 0c67d531b27345a6d81b491be4baa94ff90a3db9: all 22 tests across the four selected suites passed on a display-enabled Mac (job 170bcc893efb32664449fb31, exit 0, workspace reset confirmed).

  • AgentPaneCapturePaintTests: 3 passed.
  • AgentPaneCaptureReadinessTests: 4 passed.
  • CaptureScenePageCompositedTests: 3 passed.
  • MaskedScreenshotTests: 12 passed, including the previously inconclusive adjacent capture fixture. It reported two offscreen fixture panels left open at process exit; the process exited and workspace cleanup succeeded.

The current-head Release compile, tagged app build, single cold first-call capture, correctness SHIP, and visual PASS are also complete and recorded in the updated description. No source change or new head was needed after review. The repository's full base-red classifier excuses the remaining notary red; waiting for autoland's next evaluation and the same-head fast-gate refresh.

@austinywang austinywang removed the ready-to-land Reviewed at this head; next-autoland merges it into feat-cmux-next when its only reds are base reds label Oct 31, 2026
@austinywang

Copy link
Copy Markdown
Contributor Author

Review (Codex correctness): SHIP at 9339145

Fresh independent correctness-first review found no defects in the six-file diff against merged base 85992aac4598f51dd20c415d4a0ab975c5a43faf. It checked incoming engine, focus, paint, snapshot, wiring, and teardown interactions. git diff --check passed.

The base, including the signing-hook catalog fix #29332, was integrated with a normal merge and plain push. The task diff remains unchanged. This is source review; new exact-head fleet tests, Release compile, tagged build, and cold first-call capture are in progress before refreshing ready-to-land.

@austinywang

Copy link
Copy Markdown
Contributor Author

Visual review (Codex): PASS at 9339145

Independent review opened both real-app captures and found the transcript, edited-files card, and composer drawn in both themes. The single first debug.scene.render call succeeded in 1,371.6 ms, with one Chromium page composited, three transcript rows, and a visible composer. No retry, errors, gaps, or privacy findings were recorded. The primary agent also inspected both images.

Scope: after-only cold-launch main-showcase state, with no before comparison. Captured build e2bdae04b12e78f372587138 is the exact head above; the remote capture slot was released. Both original stills passed the repository's media privacy check before upload. A schema-valid local visual receipt is retained; the preview receipt publisher remains unavailable because its configured agent-author list is absent.

@cmux-bot
cmux-bot Bot merged commit d31ae87 into feat-cmux-next Oct 31, 2026
171 of 174 checks passed
@cmux-bot
cmux-bot Bot deleted the feat-cmux-next-26468-scene-render-wait branch October 31, 2026 14:48
@austinywang

Copy link
Copy Markdown
Contributor Author

Verification (Codex): SHIP at 9339145

The final focused fleet run completed: all 22 tests passed across AgentPaneCapturePaintTests (3), AgentPaneCaptureReadinessTests (4), CaptureScenePageCompositedTests (3), and MaskedScreenshotTests (12). Job 4ec72a05e0ecaa44254940a4 exited 0 and confirmed workspace reset.

I independently checked the diff, exact-head review receipts, Release and tagged-build receipts, and both real captures. The cold launch succeeded on its single first scene-render call in 1,371.6 ms. The reported cmux-next checks blocker passes. The description now contains the completed test result and the tagged build link.

GitHub confirms this reviewed head merged as d31ae8791aea821230adff65db670eb7acd1e277. No history was rewritten.

This branch was previously deployed

1 inactive deployment
ci-routing-agent — 93391456 Deployed Oct 31, 2026 by austinywang via cmux-tui tree preflight #90205
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk:normal Risk tier (docs/ci/risk-tiers.md)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants