This repository was archived by the owner on Jun 1, 2026. It is now read-only.
Fix: add missing simulator QA harness types so the app compiles#117
Open
justanotheratom wants to merge 1 commit into
Open
Fix: add missing simulator QA harness types so the app compiles#117justanotheratom wants to merge 1 commit into
justanotheratom wants to merge 1 commit into
Conversation
The Maestro simulator harness (#114–#116) references three types that were never committed, so the IngrediCheck target fails to build on main: - DebugScanQAMode (.isEnabled, .presets) — used by SplashScreen, HomeView, ScanCameraView, and DebugBarcodeInjectorSheet - AppRuntimePolicy (.disablesAnalytics, .skipsDeviceRegistration, .usesLocalUITestAuth) — used by AuthController and AnalyticsService This adds both to IngrediCheck/Testing/UITestHarness.swift, alongside the existing UITestHarness, with behavior reconstructed from their call sites: - DebugScanQAMode mirrors UITestHarness's --debug-scan-qa launch-arg parsing (simulator-only) and exposes the barcode injector presets. Preset labels match what the scan flows tap ("Coca-Cola 12 oz", "Invalid") and map to the barcodes seeded in UITestFixtures.makeScans(). - AppRuntimePolicy centralizes the simulator-isolation switches: suppress analytics and backend device registration under any automated run, and gate the local fake-session path to the fully-mocked UITestHarness flows. With this, the project builds and the full 63-flow Maestro suite runs; 61 pass. (The two settings sign-out/delete flows still fail because the post-sign-out SplashScreen signInState handler is commented out — tracked separately.) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Problem
The Maestro simulator test harness (PRs #114–#116) references three types that were never committed, so the
IngrediCheckapp target currently fails to build onmain:DebugScanQAMode(.isEnabled,.presets) — referenced bySplashScreen,HomeView,ScanCameraView, andDebugBarcodeInjectorSheetAppRuntimePolicy(.disablesAnalytics,.skipsDeviceRegistration,.usesLocalUITestAuth) — referenced byAuthControllerandAnalyticsServiceThe README for the Maestro suite even lists "the app branch containing
DebugScanQAMode" as a prerequisite, but the type was never landed.Fix
Adds both types to
IngrediCheck/Testing/UITestHarness.swift(alongside the existingUITestHarness), with behavior reconstructed from their call sites:DebugScanQAModemirrorsUITestHarness's--debug-scan-qalaunch-argument parsing (simulator-only) and exposes the barcode-injector presets. Preset labels match exactly what the scan flows tap ("Coca-Cola 12 oz","Invalid") and map to the barcodes seeded inUITestFixtures.makeScans().AppRuntimePolicycentralizes the simulator-isolation switches: suppress analytics and backend device registration under any automated run, and gate the local fake-session path to the fully-mockedUITestHarnessflows.Verification
Built for the iOS 17 simulator and ran the full 63-flow Maestro suite (
.maestro/flows):scan/*injector flows.settings/10_sign_out_confirm,settings/12_delete_account_dialog) are pre-existing and unrelated to this change: after sign-out the app lands onWelcomeViewinstead of presentingsign_in_sheet, because theonChange(of: authController.signInState)handler inSplashScreen.swiftis commented out. Tracked separately.🤖 Generated with Claude Code