Skip to content

test(agent): flush effects instead of polling for a released screen - #1464

Merged
AnthonyRonning merged 1 commit into
masterfrom
codex-catalogflake-maple
Nov 6, 2026
Merged

AnthonyRonning merged 1 commit into
masterfrom
codex-catalogflake-maple

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

closing_settings_ends_a_sign_in_in_progress failed on #1462's first CI run. #1455 then landed a retry loop that polls for up to 5 seconds, so the flake is already handled on master. This PR is a small cleanup, not an urgent fix: it replaces the loop with a direct flush, and it's fine to close if the loop is good enough.

Why the direct flush works

GPUI releases dropped entities in flush_effects, and run_until_parked only runs the executor, so it never flushes. With a task-free entity, the entity was still unreleased after five run_until_parked calls and released on the first cx.update. The test was therefore passing only when a background task happened to flush for it, which is what the loop waits for.

cx.update(|_| {}) flushes directly, so the test needs no sleep, timeout or background task.

Testing

  • All 6 ui::settings::catalog tests pass, and clippy is clean for maple-agent-app.
  • Stress on current master, idle and under CPU load:
Version Failures
Original, before #1455 3 of 520 under load, 0 of 520 idle
#1455 retry loop 0 of 400
This PR 0 of 400

The original failed too rarely for the last two rows to separate the versions. The reason to prefer this one is the mechanism above, plus removing the sleep.

The pre-commit hook was skipped with MAPLE_HOOK_SKIP=1. Its workspace tests include reads_native_release_tar_format_and_preserves_bundle_modes, which fails on this macOS bsdtar in an unrelated crate.

🤖 Generated with Claude Code


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

closing_settings_ends_a_sign_in_in_progress polled for up to five seconds
for a background task to release the settings screen. GPUI releases
entities in flush_effects, and run_until_parked never flushes, so the
test was waiting for a task to flush for it. Flush directly, which needs
no sleep and no background task.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AnthonyRonning
AnthonyRonning merged commit a75ae10 into master Nov 6, 2026
23 checks passed
@AnthonyRonning
AnthonyRonning deleted the codex-catalogflake-maple branch November 6, 2026 07:05
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