Repository navigation
feat(audit): run Apple's native accessibility checks on iOS - #4776
Conversation
Size Report
Startup median (7 runs, lower is better):
|
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 4 new findings on 802f5fc. The verdict and the full list are in the summary comment.
|
802f5fc has no code defects, and all 20 checks pass. The committed evidence files were recorded at 1c77d4b, and the only production change since then is one dropped export, so they still apply. Physical iOS devices with the XCTest runner are documented as supported but were not verified live, and it is not yet shown whether the dynamicType pass in performAccessibilityAudit leaves transient UI state that the following heuristic capture sees. The branch now conflicts with main. Before merge, the design question below needs an answer, and the open threads on the audit result name check and the raw rect numbers in the text output should be fixed. The two inline threads on snapshot ordering and unknown names still stand, along with the raw rect numbers in the text output. The memo reuse thread does not apply: the memo is bound per request, so findings are reused only across capture attempts inside one command, and you can resolve it. Could one platform operation, Not blocking, take or leave: the runner-served iOS predicate and its refusal message are written in both snapshot-runtime-binding.ts and native-audit.ts, and one predicate exported from platform-apple would give the rule one owner. Native hitRegion findings repeat the heuristic small-target finding for the same rect (the Dictate button in native.txt counts twice in the warning total), so either document the overlap or omit the duplicate. The help text says to match a finding's rect against a fresh snapshot, but Apple often sends no rect (all three contrast findings in the evidence), so add one sentence saying a finding without a rect names no element and should be reported, not acted on. The |
802f5fc to
6e39135
Compare
|
Rebased on main. Native audit is now one admitted accessibilityAudit operation for runner-served iOS. Heuristic capture and evaluation run first. Apple is called once afterward. Snapshot piggybacking, annotations, the memo, the duplicate predicate, and the capture-owner check are gone. The four threads are fixed and resolved with SHA replies. Capture ordering is tested. Unknown names map to unknown:. Text rects round to one decimal. Unique frame matches include a pinned ref, role, and accessible name. Ambiguous matches stay unbound. All recommendations were taken. One exported predicate owns admission. The hitRegion/small-target overlap is documented and retained. Help says findings without rects are report-only. A type guard replaces the cast. Validation passed: 94 focused unit tests, four provider scenarios, and six XCTest tests. Provider scenarios cover audit before an explicit snapshot, ordering, repeated calls, unknown names, and native-only ref use. The final foreground gate passed all 42 runnable checks with exactCommit=true. Full unit results: 21,114 passed, 10 skipped. Receipt: .tmp/validation/run-HGhgYn/receipt.json. Final-head live contrast evidence is blocked. The required T3 CLI 0.21.36 rejects --native and audit. Cleanup used close --shutdown. Old evidence keeps its original SHA. The evidence README records the gap. The PR is draft pending fresh live evidence. Hosted Apple smoke is incomplete. Its aggregate failed with RESULT: cancelled from the cancelled child jobs. Other hosted checks and fresh review remain pending. SHA: 6e39135. |
|
Live evidence at the final head 6e39135, branch-built
audit --native (text) |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 3 new findings on 6e39135. The verdict and the full list are in the summary comment.
|
The code at 6e39135 is ready. The earlier review's concerns are fixed: the per-request memo and snapshot piggyback are gone, native audit now runs after heuristic capture as its own operation, rects print with one decimal, and unrecognised names map to The hosted Apple jobs (Smoke Tests ios and macos, Runner Build for tvOS, visionOS and watchOS) were cancelled, not run, so no job reported a test or build failure. This diff touches the runner command, Not blocking, take or leave: the evidence README at The open inline threads on a position tolerance constant and on a missing ref fallback still stand as low-priority notes. The thread on |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 finding moved to a new line on dc09d59. The verdict and the full list are in the summary comment.
|
This now conflicts with |
dc09d59 to
b3d3514
Compare
|
Rebased onto main (115c83a) at b3d3514.
|
|
Ready again at b3d3514. The rebase onto main is clean. It follows main's |
This comment has been minimized.
This comment has been minimized.
|
This now conflicts with |
b3d3514 to
5bd1013
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 finding moved to a new line on 5bd1013. The verdict and the full list are in the summary comment.
|
The code in 5bd1013 is ready. The conflict from the earlier review (#4776 (comment)) is gone, and there are no conflicts now. Not blocking, and you can take or leave it: The Runner Build (tvOS + visionOS + watchOS) check failed in "Restore and build visionOS XCTest runner" because the runner could not find On the open threads: the one on audit-output.ts does not apply, because |
5bd1013 to
5d4f3f8
Compare
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Apex Sentinel: 1 new finding and 2 moved to a new line on 5d4f3f8. The verdict and the full list are in the summary comment.
|
The PR is ready at 5d4f3f8. The earlier review of 5bd1013 found no problems, and nothing has regressed since. The Swift alert catch branch has a live Not blocking: the docs line says a pre-iOS 17 runner reports The open inline thread on No conflicts. The 19 test and build checks pass, including the Apple runner build and smoke jobs. |
This comment has been minimized.
This comment has been minimized.
bc4f28b to
a7c8277
Compare
This comment has been minimized.
This comment has been minimized.
|
The ordering fix from 6d08076 is in at a7c8277, and the native findings are now sorted before printing, with a test for both input orders. One tie in that sort still leaves the order unstable.
The open thread on dropped refs does not apply: the ref is left out without a refs generation because Not verified here: the runner error-code generator and the unit tests were not run locally. Generator parity was checked by comparing key order at head. The sort change is host-side only and was not validated live; the earlier live evidence predates it. Before iOS 17 and physical xctest devices were not run live, as you disclosed. No conflicts, and CI is green at a7c8277. After the tie-break fix, the checks need to pass again on the new head before merge. |
…duplicate hit region Apple's Dynamic Type and clipped-text checks resize the app's text while they run and cost about 2 s of the 2.3 s native audit. The runner now requests the five checks that leave the app as it is. A native hitRegion finding on the frame of a heuristic small-target finding is left out.
…tem alert Remove --native, which no release shipped. On an owner that advertises accessibilityAudit, audit adds Apple's findings to its one answer; other owners answer with the heuristic findings alone, and a runner before iOS 17 contributes none. When Apple's audit fails under a system alert, the runner answers NATIVE_AUDIT_BLOCKED_BY_ALERT with the alert title and a hint to accept or dismiss it. The runner build progress message says the build is one-time. matchNativeAuditFindings requires the heuristic findings, so a caller cannot drop the hit-region dedupe.
Apple delivers audit issues in an order that changes between runs of one unchanged screen. Order them by check, then by frame.
…er receives The host reads NATIVE_AUDIT_UNAVAILABLE by its runner code and answers with the heuristic findings alone, so the row declares no reason and the docs say what audit returns before iOS 17.
Two findings with the same check, origin and description but different sizes kept the runner's order. Compare width, then height, last.
a7c8277 to
4a92fbf
Compare
Apex Sentinel · ✅ Approve · review of
|
| Command | What it does |
|---|---|
@apex-sentinel-staging note <context> |
Adds context; Sentinel re-checks the cited code |
@apex-sentinel-staging pivot <why> |
Says the finding is wrong; Sentinel re-checks the cited code |
@apex-sentinel-staging like |
Marks the finding as useful |
@apex-sentinel-staging dislike <why> |
Marks it as not useful, so it is not raised again |
On this conversation, comment @apex-sentinel-staging review to run a full review once again.
|
This PR is ready at 4a92fbf. The tie-break fix from the earlier review is in: native audit findings now sort with a total comparator that breaks ties on width and height, and the reversed-input test would fail on the old comparator, so output order no longer depends on Apple's result order. The review found nothing else to change. All checks pass at 4a92fbf and there are no conflicts. Not verified here: the unit tests were not run locally. The tie-break is host-side only, so it was not re-validated live; the earlier iOS evidence in docs/evidence/ios-native-audit-2026-11-19 still covers the route. Pre-iOS 17 and physical xctest devices were not run live, as the PR discloses. Three earlier inline threads can be resolved. The unstable order thread is fixed at this commit (#4776 (comment)). The dropped ref thread does not apply, because an unpinned ref is refused the same way as heuristic lines and the rect still prints (#4776 (comment)). The frame tolerance thread does not apply, because Apple and snapshot frames share points and a ref attaches only on exactly one match (#4776 (comment)). |
…nts-main * origin/main: feat(platform-apple): admit screen recording on watchOS simulators (#4819) feat(audit): run Apple's native accessibility checks on iOS (#4776) fix(test-app): make the reorder handle a labelled native hold-then-drag (#4811) # Conflicts: # packages/command-surface/src/recording/index.ts
Summary
On an iOS 17+ target served by the XCTest runner,
auditnow also runs Apple's accessibility audit and prints its findings with the heuristic ones. There is no flag. Other targets, and iOS before 17, return the heuristic findings alone.Only Apple's five read-only checks run (contrast, element detection, hit region, description, trait). Dynamic Type and clipped-text are left out: they resize the app's text while they run. A native hit region on the frame of a
small-targetfinding is dropped. Native findings print in a stable order. Part of #4761.Before / after
agent-device audit # iOS Settings, simulatorBefore: 4 warnings, 1 observation.
After: 8 warnings, 1 observation. Added lines:
With a system alert over the app, after:
Runner build progress, before:
Building Apple runner.... After:Building Apple runner (one-time per agent-device version)....Validation
Head
4a92fbfbcf7da9e88f91e85065b9a7031e66a70e.pnpm check:affected --run: all checks passed exceptunit. There, 2 of 21,401 tests timed out on a host at load 36; both pass alone and are unrelated. The last full pass was ata7c8277505.audit-platform-iossimulator (iOS 26.2) with the branch-built CLI: evidence. Warmaudittakes 1.0–1.8 s; the first one after a runner build took 29 s.df8dbd23ae; the alert branch has no unit test and was verified live only.Risks: physical devices and iOS before 17 were not run live.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.