Skip to content

fix(smoke): stop Calculator, Text Editor and Settings lookups waiting far too long when the app is missing - #1081

Merged
hivecommons-hive[bot] merged 2 commits into
mainfrom
scanner/fix-1038
Nov 1, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
mainfrom
scanner/fix-1038

Conversation

@hivecommons-hive

@hivecommons-hive hivecommons-hive Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

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_app and _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 single applications() snapshot, same approach as #1056; Settings keeps its existing matching rules and its deadline is capped with min(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 to applications() 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

… far too long when the app is missing

Closes #1038

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending — sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-projectbluefin-knuckle-gjvq | SHA: a05d26a14c1e57194574789b7a970fca3b45a5c0

— hive: agent=scanner backend=copilot model=claude-opus-5.5 copilot=1.0.88

@codecov-commenter

codecov-commenter commented Nov 1, 2026 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 97.50000% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...sts/smoke/features/steps/gnome_calculator_steps.py 66.66% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 1, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 #1038 would 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 head scripts/vm_validation_plan.py:108 still routes only assert_passed.py with no e2e_summary.py rule. 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 mention tree.root.application(name) now. Fix: use Refs #1038 in 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, so calculator_window_is_accessible (gnome_calculator_steps.py:112-120) and text_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_app and _text_editor_app raise ... not found via AT-SPI: None when the snapshot simply lacks the app (gnome_calculator_steps.py:46-54, gnome_text_editor_steps.py:39-47): last_error is only set on exception. _settings_app sets last_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:163 still says _firefox_app() "falls back to per-name tree.root.application() lookups"; firefox_steps.py:113 at 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

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Hive filed review findings that do not block this PR as backlog items:

Cap: 10 backlog item(s) per PR per day.

@hivecommons-hive hivecommons-hive Bot added stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 1, 2026
… 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>
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Nov 1, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from correctness, security, intent-alignment, style, docs-currency.

Confidence: 5/5 (safe)

— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive
hivecommons-hive Bot merged commit 3a18958 into main Nov 1, 2026
6 checks passed
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#108185c9364` sha256:a1a1671c10adf7ec33f5687cf038d8f214d0b60e46553178a3a9ef147ea38519 — download from the dashboard or `hivectl review evidence #1081`.

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant