Repository navigation
Conversation
The operation-journey driver read `.confirm-title` as soon as app.screen was a ConfirmScreen. Textual makes a pushed screen current before it composes the screen's widgets, so on a loaded runner the poll landed in between and the read raised "No nodes match '.confirm-title' on ConfirmScreen()". That failed two journeys on main's 3.11 (#478); the second NoMatches in that log came from the journey tearing down after the first. handle() now first waits, through _await_dialog_composed, until the current dialog has its title or is no longer current; a dialog that closes first falls through to the existing closed-before-a-decision path. The new test delays ConfirmScreen's compose by 0.3 seconds and still expects one matched dialog_observed and no hard failures; without the wait it fails every run with CI's exact pair of errors. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The focused test-only fix addresses the composition race, preserves expiry handling, and has targeted regression coverage with no identified blocking issues.
No open issues 🎉
What changed in this PR
This test-only change addresses #478 by preventing the operation-journey driver from reading an approval dialog before Textual has composed its widgets.
Changes:
- Wait for the dialog’s title to exist or for the dialog to close, preserving existing closed-before-decision handling.
- Add a regression test that delays composition and verifies successful dialog observation without hard failures.
| File | Description |
|---|---|
tests/evals/test_operation_journeys.py |
Adds regression coverage for delayed dialog composition. |
tests/evals/operation_app.py |
Waits for dialog composition before reading its contents. |
Review effort: Balanced
5 tasks done
Owner
Author
|
Superseded by #482, which carries this pull request's commits unchanged (b72b03a) together with the other open fixes and the dependency security bumps, so all of them need one CI run and one merge instead of a rebase after each merge. Closing in favour of #482; the branch stays, so this can be reopened if needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #478
Summary
Two operation journeys failed on
main'stest (3.11)(run 39980913476) withNoMatches: No nodes match '.confirm-title' on ConfirmScreen()from the eval driver'shandle(). The secondNoMatchesin that log,'AgentPanel' on Screen(id='_default'), came from the journey tearing down after the first. #477 fixes that teardown error on its own.The driver's readiness check returns as soon as
app.screenis aConfirmScreen, andhandle()read the dialog's title straight away. Textual makes a pushed screen current before it composes the screen's widgets, so on a loaded runner the poll can land in between.handle()now first waits, through_await_dialog_composed, until the current dialog has its title or is no longer current.Verification
tests/evals/test_operation_journeys.py::test_a_dialog_still_composing_is_read_once_it_has_its_widgetsdelaysConfirmScreen's compose by 0.3 seconds. That holds the dialog in the pushed-but-empty state the runner hit. The test expects one matcheddialog_observedand no hard failures.Run locally on macOS with Python 3.13 and the frozen lock. Each step ran directly with the project's environment rather than through
make, because this machine cannot sync from PyPI:pytest -p no:tach tests/evals/python scripts/check_source_size.pyruff check src/ tests/andruff format --check src/ tests/SKIP=mypy,source-size pre-commit run --files <changed files>mypytach checkpytest -n 8 -qChecklist
make checkpasses locally.and a fail-closed audit entry, and sensitive reads are still masked.