fix: generic criterion matching returned nil for CF-typed attributes#19
Conversation
performGenericAttributeMatch fetched the actual value via
element.attribute(Attribute<Any>(key)), which returns nil for CF-typed
values. Every generic criterion (AXTitle, AXValue, ...) therefore never
matched: a locator like {AXRole: AXWindow, AXTitle: <exact title>}
failed even when the window title matched exactly.
Read the raw attribute value first and fall back to the generic path.
|
Codex review: needs maintainer review before merge. Reviewed July 18, 2026, 4:41 PM ET / 20:41 UTC. Summary Reproducibility: yes. with medium confidence from source and supplied live evidence: the old generic accessor could yield no value for Core Foundation-backed attributes, while the PR body shows a real exact-title lookup and changed-title negative control. The reviewer environment could not independently execute the macOS accessibility fixture. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Retain the narrow raw-value normalization and regression test, then merge after the exact-head build check confirms the refreshed branch remains healthy. Do we have a high-confidence way to reproduce the issue? Yes, with medium confidence from source and supplied live evidence: the old generic accessor could yield no value for Core Foundation-backed attributes, while the PR body shows a real exact-title lookup and changed-title negative control. The reviewer environment could not independently execute the macOS accessibility fixture. Is this the best way to solve the issue? Yes. Reusing the established AGENTS.md: found, but no applicable review policy affected this item. Codex review notes: model internal, reasoning high; reviewed against 55a433fa7316. Label changesLabel changes:
Label justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (3 earlier review cycles) |
Add regression coverage for exact AXTitle matching and document the user-visible fix. Co-authored-by: jeonghan.yun <devops@ranode.net>
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…-matching # Conflicts: # CHANGELOG.md
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
Problem
Generic criteria fetched values through
Attribute<Any>, whose typed conversion could return nil for real Core Foundation-backed accessibility values. A window with a readableAXTitletherefore failed an exactAXRole+AXTitlelookup.Fix
Read the raw AX attribute and normalize it through AXorcist's existing
ValueUnwrapper, retaining the typed accessor as a fallback. This preserves string, boolean, number, and AXValue semantics while fixing generic matching. Add focused automation regression coverage and an Unreleased changelog entry thanking @dalsoop.The contributor branch is refreshed onto current
mainwith a regular merge, preserving both contributor commits and credit without rewriting branch history.Live behavior proof
The refreshed head was built locally, then exercised against a newly built AppKit fixture signed with the repository maintainer's Developer ID. The fixture was live at bundle identifier
org.openclaw.AXorcistProbewith a real window titledAXorcist Probe.This negative control changed only the requested title while keeping the live app and role fixed.
Verification
swift buildswift test --filter ElementSearchTests(the automation suite compiled and was correctly skipped without the automation opt-in)e5863f35e3326f0c1e284fe3cb19148cf4e5d176