Set up audit runner test harness scaffold
epic-navigation-and-gesture-accessibility-service-and-audit-task-007 — Scaffold the AccessibilityAuditRunner as a Flutter integration test helper class. Set up the test entry point, import flutter_test and SemanticsController, and establish the runner structure with an empty runAll() method that will be populated in subsequent tasks. This is development/CI only with zero production footprint — confirm via conditional import or test-only package.
Acceptance Criteria
Technical Requirements
Execution Context
Tier 1 - 540 tasks
Can start after Tier 0 completes
Implementation Notes
Place AccessibilityAuditRunner in integration_test/helpers/accessibility_audit_runner.dart to keep it clearly separated from production code. Use IntegrationTestWidgetsFlutterBinding.ensureInitialized() in the test entry point. Define AuditResult as an @immutable class or record (Dart 3 records are acceptable if the project targets Dart 3+). The runAll() signature should accept WidgetTester to allow future audit steps to pump widgets and interact with SemanticsController.
Add a TODO comment in runAll() body listing the checks to be added in subsequent tasks (modal close, back control, horizontal swipe, semantics labels) so the intended scope is clear to whoever implements those tasks. Confirm with the team that integration_test/ is excluded from the production build pipeline — standard Flutter project setup does this automatically, but CI pipelines with custom build steps may need an explicit exclusion.
Testing Requirements
Verification via `flutter test` and `flutter analyze`. Confirm: (1) `flutter test integration_test/accessibility_audit_test.dart` exits with code 0, (2) `flutter analyze` reports zero new issues after scaffold addition, (3) `grep -r 'AccessibilityAuditRunner' lib/` returns zero matches confirming no production references, (4) `flutter build apk --release` (or iOS equivalent) succeeds and binary size does not increase vs baseline — confirming zero production footprint. No functional unit tests needed for the scaffold itself — the scaffold's purpose is to be a stable base for subsequent test tasks.
Flutter's SemanticsController used in integration tests is an internal or semi-internal API that can break between Flutter stable releases. If the audit runner relies heavily on undocumented semantics tree traversal, a Flutter upgrade could silently disable the audit checks without a build failure, creating false confidence.
Mitigation & Contingency
Mitigation: Use only the public flutter_test accessibility APIs (meetsGuideline, SemanticsController.ensureSemantics) and wrap all SemanticsController calls in a versioned helper class with explicit assertions that the expected semantics tree shape is still available. Pin the Flutter SDK range in pubspec.yaml.
Contingency: If SemanticsController APIs break on a Flutter upgrade, fall back to widget-level golden tests that include the semantics tree snapshot, combined with manual Switch Access and VoiceOver QA checklists executed before each release.
Flutter integration tests that simulate Switch Access traversal on multiple screens can be slow (30–120 seconds per test flow), which may make the audit runner impractical to run on every CI commit if the test suite already has long run times.
Mitigation & Contingency
Mitigation: Scope the audit runner to a dedicated integration test target that runs on pull requests targeting main and on nightly builds, not on every push. Parallelise test shards in CI to keep wall-clock time acceptable. Profile audit run times during development and trim any flows that duplicate coverage.
Contingency: If CI run times exceed acceptable thresholds, split the audit runner into a fast smoke suite (touch targets and semantic labels only, runs on every PR) and a thorough traversal suite (Switch Access simulation, runs nightly), with the nightly failure blocking the release branch rather than every PR.