Skip to content

Keep AXe 2 JSON compact and recover duplicate tap IDs safely - #144

Merged
bitomule merged 4 commits into
mainfrom
fix/axe2-tap-envelope
Nov 13, 2026
Merged

bitomule merged 4 commits into
mainfrom
fix/axe2-tap-envelope

Conversation

@bitomule

@bitomule bitomule commented Nov 13, 2026 •

Copy link
Copy Markdown
Owner

Fixes ordinary AXe 2 output and tap recovery that were reproduced on main before #143 and on the final goal-engine revision from #143. This PR is independent of the goal planner and targets main.

Input commands keep MAV's compact result line on stdout; --raw exposes native JSON. Reads continue printing their requested data, and flow evidence keeps the native envelope. ui tree's nodes= now counts its printed, deduplicated elements.

A no-receipt error proves no input only for tap and the four source-checked codes elementNotFound, ambiguousElement, elementNotHittable, rejectedBeforeInput. Native receipts always take precedence. Each receipt is classified before aggregation: a later clean refusal cannot erase earlier delivered or uncertain input, and a negative count cannot cancel earlier events. Unknown cleanup/outcomes and quarantine remain unsafe to replay. An exit-zero envelope cannot hide an earlier failed native receipt.

Slider errors remain uncertain without a receipt. AXe resolves its selector again after dragging, so the original assumption that those codes proved no slider input was incorrect. This is backed by Slider.swift's action and verification and post-input resolution. Tap's ordinary and compound routes resolve before input: Tap.swift. SelectedInputOutput describes one request, not all earlier requests in a composed scroll or batch.

After an ordinary selector tap is refused as ambiguous with no input sent, a fresh uncached AXe tree can resolve an ID repeated by structural ancestors and one innermost button. The nodes must form a real ancestor chain with containing frames (0.5 pt tolerance). Type filters and the state of all actual ancestors are retained. Siblings, distinct actionable controls, hidden/disabled ancestry and non-containing frames stay ambiguous. Selected display/process input retains its original refusal. The fallback reports selector_via=tree nested=true matches=N; it is an ordinary read-before-coordinate tap, not atomic snapshot/ref admission. Goal's checked reference executor does not use it.

Verification

  • Fetched main at 0f6cf50; ran the PR's original regressions through a tests-only overlay: native stdout, selector delivery, duplicate-id tap and printed node count all fail with executed assertions. Raw-output and real-ambiguity controls pass.
  • Ran the same overlay against Add verified goal engine and controlled agent comparison #143 at 29d1b41: the same regressions fail. This is evidence that Add verified goal engine and controlled agent comparison #143 does not cover this PR's ordinary command paths.
  • Original Keep AXe 2 JSON compact and recover duplicate tap IDs safely #144 regressions passed at c5a298a; independent review then reproduced type/context loss, geometry-only ambiguity, inactive targets/ancestors, omitted raw data and receipt-precedence/aggregation errors. Every reproduced defect has a promoted regression test and passes after its fix.
  • The optional-flow test fixture used the nonexistent cleanup status complete. It now uses AXe's canonical notNeeded; complete is retained as a negative unknown-cleanup case. No skip/retry assertion was removed or weakened.
  • make check and go vet ./...: PASS. Rebased onto main at 94b6399, including the merged goal engine from Add verified goal engine and controlled agent comparison #143. Seven benchmark tests and two packaging tests also pass.
  • 17 guard ablations PASS: every removed guard caused an executed assertion FAIL; restored production code passed the same test. This covers both stdout gates, node count, source-based classification, receipt precedence/aggregation/completion, fallback admission, type, context, fresh reads, parentage, one actionable control, ancestor state, containment and no replay.

The original PR reports live checks of the first revision's output/count behavior; this adoption's stricter fallback and receipt changes have deterministic runner tests. No new physical-device or real-app test is claimed.

The fixes will ship with the task's planned release including goal. The unshipped 0.34.1 note draft is removed; the fixes are included in the 0.35.0 notes delivered with the migration to main. #145 merged into its original engine base, so that migration is being carried forward against main separately.

Public content review: read the English AXe guide, skill changes, synthetic fixtures and this description. No personal paths, device identities or private app names are added. No public images are introduced.

Representative executed red/green evidence:

Main 0f6cf50 and goal 29d1b41, original tests only:
  TestAXeEnvelopeStaysOffStdoutAfterTheResultLine FAIL
    stdout must carry only mav's own line, got 2
Restored adopted branch:
  same output tests PASS
  TestAXeReceiptAggregationCannotEraseEarlierUncertainDelivery PASS
  TestTapFallbackNeverReplaysUncertainOrPartialDelivery PASS
17 individual guard removals: assertion FAIL; each restored guard: PASS.

- Stdout carries only the ok/fail line. An input's AXe completion record
  and a failure's envelope are printed only with --raw. Reads still print
  their data.
- elementNotFound, ambiguousElement and elementNotHittable from tap and
  slider report delivery=notSent: AXe resolves the selector before input.
  The same codes from scroll-until or batch stay uncertain.
- When AXe refuses a tap selector as ambiguous and every tree match has
  one frame (a container repeating its button's id), mav taps that
  frame's centre. Matches in different places stay ambiguous.
- ui tree nodes= counts the printed node lines. It counted raw JSON
  objects under "children" only, so it disagreed with the list.
With Liquid Glass on, the nav bar container is wider than the button it
wraps, so requiring identical frames left the id ambiguous. Matches are
one target when their frames form a nesting chain, with 0.5 pt
tolerance. mav taps the innermost frame's centre and reports nested=true.
Side-by-side or overlapping matches stay ambiguousElement.
@bitomule
bitomule force-pushed the fix/axe2-tap-envelope branch from c5a298a to aca0d0d Compare November 13, 2026 11:00
@bitomule bitomule changed the title Keep AXe 2 envelopes off stdout and tap same-frame id matches Keep AXe 2 JSON compact and recover duplicate tap IDs safely Nov 13, 2026
@bitomule
bitomule merged commit ef55d28 into main Nov 13, 2026
1 check passed
bitomule added a commit that referenced this pull request Dec 3, 2026
* Keep AXe 2 envelopes off stdout and tap same-frame id matches

- Stdout carries only the ok/fail line. An input's AXe completion record
  and a failure's envelope are printed only with --raw. Reads still print
  their data.
- elementNotFound, ambiguousElement and elementNotHittable from tap and
  slider report delivery=notSent: AXe resolves the selector before input.
  The same codes from scroll-until or batch stay uncertain.
- When AXe refuses a tap selector as ambiguous and every tree match has
  one frame (a container repeating its button's id), mav taps that
  frame's centre. Matches in different places stay ambiguous.
- ui tree nodes= counts the printed node lines. It counted raw JSON
  objects under "children" only, so it disagreed with the list.

* Tap the innermost of nested id matches, not only identical frames

With Liquid Glass on, the nav bar container is wider than the button it
wraps, so requiring identical frames left the id ambiguous. Matches are
one target when their frames form a nesting chain, with 0.5 pt
tolerance. mav taps the innermost frame's centre and reports nested=true.
Side-by-side or overlapping matches stay ambiguousElement.

* Add release notes for 0.34.1

* Preserve AXe receipt uncertainty and constrain duplicate ID tap recovery
bitomule added a commit that referenced this pull request Dec 3, 2026
* Keep AXe 2 envelopes off stdout and tap same-frame id matches

- Stdout carries only the ok/fail line. An input's AXe completion record
  and a failure's envelope are printed only with --raw. Reads still print
  their data.
- elementNotFound, ambiguousElement and elementNotHittable from tap and
  slider report delivery=notSent: AXe resolves the selector before input.
  The same codes from scroll-until or batch stay uncertain.
- When AXe refuses a tap selector as ambiguous and every tree match has
  one frame (a container repeating its button's id), mav taps that
  frame's centre. Matches in different places stay ambiguous.
- ui tree nodes= counts the printed node lines. It counted raw JSON
  objects under "children" only, so it disagreed with the list.

* Tap the innermost of nested id matches, not only identical frames

With Liquid Glass on, the nav bar container is wider than the button it
wraps, so requiring identical frames left the id ambiguous. Matches are
one target when their frames form a nesting chain, with 0.5 pt
tolerance. mav taps the innermost frame's centre and reports nested=true.
Side-by-side or overlapping matches stay ambiguousElement.

* Add release notes for 0.34.1

* Preserve AXe receipt uncertainty and constrain duplicate ID tap recovery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant