From 6324f4b2de56e9d5e45199ce9a57b20ffe3bafa5 Mon Sep 17 00:00:00 2001 From: Adron Hall Date: Mon, 30 Nov 2026 16:57:07 -0800 Subject: [PATCH 1/2] Fix CI: PyYAML venv for contract sync, wait out Save Password sheet in UI test - sync-openapi.sh: install PyYAML into .build/pyvenv when missing; Homebrew's Python on the macos-26 runners refuses `pip install --user` (PEP 668). - SmokeTests: wait up to 15s for the "Save Password?" sheet after sign-in and dismiss it before entering the two-factor code; it arrives late on slow simulators and covers the form. Co-Authored-By: Claude Opus 5.5 --- UITests/SmokeTests.swift | 12 +++++++++--- scripts/sync-openapi.sh | 11 +++++++++-- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/UITests/SmokeTests.swift b/UITests/SmokeTests.swift index f71bb81..c3d0f8f 100644 --- a/UITests/SmokeTests.swift +++ b/UITests/SmokeTests.swift @@ -16,10 +16,16 @@ final class SmokeTests: XCTestCase { app.secureTextFields["Password"].typeText("demo-password") app.buttons["Sign in"].tap() - let code = app.textFields["6-digit code"] - // The Passwords "Save Password?" sheet (from the username/password content types) covers the form. + // The Passwords "Save Password?" sheet follows the sign-in, seconds later on a slow simulator, and covers + // the form. XCTest doesn't treat it as an interruption, so wait it out before touching the next screen. let notNow = app.buttons["Not Now"] - if notNow.waitForExistence(timeout: 3) { notNow.tap() } + if notNow.waitForExistence(timeout: 15) { + notNow.tap() + XCTAssertTrue(notNow.waitForNonExistence(timeout: 5)) + } + + let code = app.textFields["6-digit code"] + XCTAssertTrue(code.waitForExistence(timeout: 5)) code.tap() code.typeText("123456") app.buttons["Verify"].tap() diff --git a/scripts/sync-openapi.sh b/scripts/sync-openapi.sh index 067f62b..0b30d65 100755 --- a/scripts/sync-openapi.sh +++ b/scripts/sync-openapi.sh @@ -17,8 +17,15 @@ DERIVED="Packages/SubstratalKit/Sources/SubstratalAPI/openapi.yaml" if [[ -f "$SOURCE" ]]; then [[ "$SOURCE" -ef "$UPSTREAM" ]] || cp "$SOURCE" "$UPSTREAM"; else curl -fsSL "$SOURCE" -o "$UPSTREAM"; fi -python3 -c "import yaml" 2>/dev/null || python3 -m pip install --quiet --user pyyaml -python3 scripts/derive-openapi.py "$UPSTREAM" "$DERIVED" +# PyYAML goes in a private venv when the system Python lacks it: Homebrew's Python (the macOS runners') +# refuses `pip install --user` under PEP 668. +PYTHON=python3 +if ! python3 -c "import yaml" 2>/dev/null; then + PYTHON=.build/pyvenv/bin/python3 + [[ -x "$PYTHON" ]] || python3 -m venv .build/pyvenv + "$PYTHON" -c "import yaml" 2>/dev/null || "$PYTHON" -m pip install --quiet pyyaml +fi +"$PYTHON" scripts/derive-openapi.py "$UPSTREAM" "$DERIVED" python3 - "$UPSTREAM" "$SOURCE" <<'PY' import hashlib, json, re, sys, datetime From 89d42a7d12c052a009e30a113207e588474fc8c5 Mon Sep 17 00:00:00 2001 From: Adron Hall Date: Mon, 30 Nov 2026 16:58:02 -0800 Subject: [PATCH 2/2] Regenerate scheme with XcodeGen 2.48.0, as CI installs Co-Authored-By: Claude Opus 5.5 --- .../xcshareddata/xcschemes/SubstratalHub.xcscheme | 1 + 1 file changed, 1 insertion(+) diff --git a/SubstratalHub.xcodeproj/xcshareddata/xcschemes/SubstratalHub.xcscheme b/SubstratalHub.xcodeproj/xcshareddata/xcschemes/SubstratalHub.xcscheme index 9331582..121556f 100644 --- a/SubstratalHub.xcodeproj/xcshareddata/xcschemes/SubstratalHub.xcscheme +++ b/SubstratalHub.xcodeproj/xcshareddata/xcschemes/SubstratalHub.xcscheme @@ -5,6 +5,7 @@