test: harden AX content-group path + dedup perform_action probe (1.0.0b13) - #170
Closed
mauricecarrier7 wants to merge 1 commit into
Closed
test: harden AX content-group path + dedup perform_action probe (1.0.0b13)#170mauricecarrier7 wants to merge 1 commit into
mauricecarrier7 wants to merge 1 commit into
Conversation
…0b13) Fast-follow to #169 addressing the three non-blocking reviewer nits (architect + QA) — test hardening + a probe dedup, no behavior change. **Scope:** - ax.py `perform_action`: resolve `_resolve_content_group(window)` ONCE on the not-found path and reuse it for both the carrier search and the WKWebView hint, removing the duplicate position-probe + DFS (architect perf nit). - test_ax_module.py: add direct `_frame` coverage (CGRect-struct path, 4-tuple fallback, and the malformed/missing None paths) — previously monkeypatched away in every content-group test (QA concern). - test_ax_module.py: give the position-probe fixture's container a window parent so `test_position_probe_hits_window_centre` now FAILS if `AXGroup` is dropped from the up-walk stop-set (pins stop-at-nearest-group; QA mutation gap). Verified the mutation makes the test fail, then restored. - Bump 1.0.0b12 -> 1.0.0b13 + CHANGELOG entry. No observable behavior change; perform_action hint tests still pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Closing — superseded by a history-rewrite sanitization pass on main. The fast-follow (_frame test + perform_action probe dedup) will be re-applied on the rewritten main. |
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.
Fast-follow to #169 (merged as 1b149a5, 1.0.0b12). Addresses the three non-blocking nits raised by #169's architect + QA reviews — nothing else. No behavior change: test hardening + a
perform_actionprobe dedup.Reviewer findings addressed
QA (concern):
_framehad zero test coverage. It's monkeypatched away in every content-group test, so neither its CGRect-struct path nor its documented fallback ran. Added direct unit tests against a stubbedApplicationServices: CGRect-struct →{x,y,width,height}, the(x,y,w,h)tuple fallback, and theNonepaths (attribute-read failure, value-unwrap failure, malformed rect).ax.py:99/tests/test_ax_module.py.QA (warning): stop-at-
AXGroupup-walk semantics not pinned. The probe fixture's container had no parent, so droppingAXGroupfrom the stop-set survived (mutation gap). Gave the container a window parent so the up-walk must stop at the nearestAXGroup; ifAXGroupis dropped the walk over-climbs to the window and the test fails. Verified: temporarily removedAXGroupfrom the stop-set →test_position_probe_hits_window_centrefailed → restored.ax.py:376/tests/test_ax_module.py.Architect (perf/warning): redundant
_resolve_content_groupon theperform_actionnot-found path. It was resolved twice (carrier search + WKWebView hint), each re-firing a position-probe + full DFS. Now resolved once and reused. Purely removes the duplicate probe — same return values.ax.py:514.Behavior unchanged
Probe dedup is observably identical: the existing hint tests still pass —
test_perform_action_adds_wkwebview_hint_when_zero_actionsandtest_perform_action_no_hint_when_other_actions_exist, plustest_perform_action_finds_carrier_via_content_group_probe.Tests
cd simdrive && PYTHONPATH=src python3 -m pytest -q --ignore=tests/test_e2e_testkit.py→ 1704 passed, 4 skipped (the e2e suite needs a booted sim and is ignored per convention).Version
1.0.0b12 → 1.0.0b13 + CHANGELOG entry (Changed: probe dedup, no behavior change + test hardening).
🤖 Generated with Claude Code