Repository navigation
fix(smoke): stop Calculator, Text Editor and Settings lookups waiting far too long when the app is missing - #1081
Conversation
… far too long when the app is missing Closes #1038 Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
hive/awaiting-ci: CI pending — sweep will merge when green. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-opus-5.5 copilot=1.0.88 |
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Summary: This change makes the Calculator, Text Editor and Settings desktop tests report a missing app promptly instead of stalling on slow built-in retries. The code change is correct and matches what the tracked issue asked for. One thing to fix before merging: the PR says it fully closes the tracked issue, but that issue also carries two unrelated leftover items that this change does not touch, and the issue itself says those must be handled or split out before it is closed.
What I need from you: Change "Closes #1038" to "Refs #1038" (or file the two leftover items as their own issues first).
intent-alignment
- (medium, in-scope)
Closes #1038would close an issue with two unaddressed folded-in items. #1038's comments fold in "Restore step cannot recover if migration.feature switches the VM mid-run" (tests/lifecycle/features/steps/steps.py:310) and "scripts/e2e_summary.py edits still bypass kde-smoke routing" (scripts/vm_validation_plan.py:105), each stating "address it together with this issue or file it separately before closing". Neither file is in this diff, and at headscripts/vm_validation_plan.py:108still routes onlyassert_passed.pywith noe2e_summary.pyrule. The per-alias lookup part of #1038 (calculator:48,128; text_editor:41,136; settings:87,95,177; firefox:115,293) is fully resolved at this head — only docstrings mentiontree.root.application(name)now. Fix: useRefs #1038in the body, or open two follow-up issues for the leftovers and cite them.
correctness
- (info, in-scope, advisory) Startup slack shrinks, not just the missing-app wait. Before,
_calculator_app()/_text_editor_app()inherited dogtail's internal retry per alias, socalculator_window_is_accessible(gnome_calculator_steps.py:112-120) andtext_editor_window_has_editable_text_area(gnome_text_editor_steps.py:116-131) effectively waited far longer than their nominal 20×0.5 s after launch. Now the post-launch budget is a hard 10 s. This matches what #1056 already did for Files (gnome_files_steps.py:48-51,135), so it is the established norm; flagging only so a slow-VM regression in these two steps is recognised quickly if it appears.
style
- (low, in-scope)
_calculator_appand_text_editor_appraise... not found via AT-SPI: Nonewhen the snapshot simply lacks the app (gnome_calculator_steps.py:46-54,gnome_text_editor_steps.py:39-47):last_erroris only set on exception._settings_appsetslast_error = f"none of {SETTINGS_APP_NAMES} registered"(gnome_settings_steps.py:83); the other two should do the same for a readable failure.
docs-currency
- (low, out-of-scope)
docs/skills/test-authoring/gnome/SKILL.md:163still says_firefox_app()"falls back to per-nametree.root.application()lookups";firefox_steps.py:113at head explicitly has no such fallback. Pre-existing drift from the earlier Firefox fix, not this PR.
No findings from: security.
Confidence: 3/5 (needs attention) — 1 medium finding; 1 perspective requested changes
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive filed review findings that do not block this PR as backlog items:
Cap: 10 backlog item(s) per PR per day. |
… errors Empty applications() snapshots raised '... not found via AT-SPI: None'. Mirror _settings_app and report which aliases were not registered. Also drop the stale Firefox per-name fallback description from the GNOME test-authoring skill doc. Hive-Fix-Attempt: 1/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Summary: Some desktop tests wait far too long before reporting that Calculator, Text Editor or Settings is not running, because each app name is looked up with its own slow, built-in retry. This change makes those tests check the list of running apps once per poll, so a missing app now fails on time with a clear message.
The same per-alias
tree.root.application(name)pattern that #1056 removed from the Files/apps helpers remained in_calculator_app,_text_editor_appand_settings_app(including its post-deadline fallback). dogtail retries that call internally, so each missing alias multiplied the caller's timeout. These helpers now scan a singleapplications()snapshot, same approach as #1056; Settings keeps its existing matching rules and its deadline is capped withmin(0.5, remaining). The close-wait steps and Firefox were already fixed in earlier work, so they are untouched.Tests: new unit tests use a fake root whose per-name lookup burns fake-clock time, asserting the lookup is never called and the deadline holds; text editor tests moved from
application()mocks toapplications()snapshots.Overlap check: open PRs #1057, #1076 and #1037 touch none of these files.
Refs #1038 (the per-alias lookup part; the two folded-in leftovers — lifecycle restore after migration and e2e_summary.py kde-smoke routing — remain open on #1038)
— hive: agent=scanner backend=copilot model=claude-opus-5.5 copilot=1.0.88