Files
OSGKeyboard/.github/workflows/ci.yml
T
rockyandClaude Opus 5 0023741455 feat(app): add crash visibility, memory relief, and clipboard reply work
Squashes the working tree that had accumulated on cloud-agent. Two
strands of work, kept in one commit at the maintainer's request.

Crash and stability (this session):

- Subscribe to MetricKit so crash, hang, CPU, and disk-write diagnostics
  are recorded on device. Keyboard-extension memory kills are the most
  likely way a user loses the keyboard mid-sentence and iOS does not
  classify them as crashes, so they never reach App Store Connect.
- Upload those reports to POST /v1/analytics/diagnostics from internal
  builds only (local Debug and TestFlight), reusing the analytics
  installation identifier and skipping entirely when analytics are off.
  App Store builds keep everything on device.
- Shed the Chinese engine, English lexicon, and in-flight pipeline work
  at the 40 MiB and 48 MiB budget thresholds instead of waiting for a
  system memory warning that jetsam often preempts.
- Install audio taps with the input node's live format through one
  shared adaptive resampler, so an audio-route change mid-recording no
  longer raises an uncatchable format-mismatch exception. Covers the
  dictation preview and the Mac recorder, which still used the pattern
  the Flow capture path had already moved away from.
- Harden the librime bridge: never pass a nil string across a nonnull
  boundary when a user dictionary holds malformed UTF-8, null-check the
  engine API vector, and distrust a candidate count without its array.
- Guard the expanded candidate grid against a list that shrinks while
  the collection view is still laying out against the previous count.
- Resolve localized text without the App Group so the screen shown when
  that container is missing renders its message instead of crashing on
  launch, which is the one situation it exists to handle.
- Gate CI on the App Group and Keychain wiring that the keyboard
  extension hard-depends on, with a self-test proving the check fails.

Clipboard, reply, and semantics (pre-existing working tree):

- Unify the reply center, refresh keyboard AI features, and add native
  event and reminder exporters.
- Expand clipboard semantic routing with authored corpora and a
  product-blind holdout, plus the scripts that build and validate them.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 17:31:29 -07:00

126 lines
4.3 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
validate:
name: Validate manifests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Validate test suite manifest
run: ./Scripts/run-tests.sh validate
- name: Check sensitive logs
run: |
python3 Scripts/check_sensitive_logs.py --self-test
python3 Scripts/check_sensitive_logs.py
- name: Check App Group / Keychain wiring
run: |
python3 Scripts/check_app_group_wiring.py --self-test
python3 Scripts/check_app_group_wiring.py
- name: Check localization parity and bare LocalizedStringKey
run: ./Scripts/check_l10n_keys.sh
lint:
name: SwiftLint
runs-on: macos-26
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Verify toolchain
run: |
set -euo pipefail
sudo xcode-select -s /Applications/Xcode_26.6.app
xcodebuild -version
test "$(xcodebuild -version | awk 'NR == 1 { print $2 }')" = "26.6"
test "$(xcrun --sdk iphonesimulator --show-sdk-version | cut -d. -f1)" = "26"
command -v swiftlint >/dev/null || brew install swiftlint
test "$(swiftlint version)" = "0.65.0"
- name: Run SwiftLint
run: swiftlint lint --quiet --strict
ios:
name: iOS / Extension
needs: [validate, lint]
runs-on: macos-26
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Verify toolchain
run: |
set -euo pipefail
sudo xcode-select -s /Applications/Xcode_26.6.app
xcodebuild -version
test "$(xcodebuild -version | awk 'NR == 1 { print $2 }')" = "26.6"
test "$(xcrun --sdk iphonesimulator --show-sdk-version | cut -d. -f1)" = "26"
- name: Install pinned XcodeGen
run: ./Scripts/install-xcodegen-ci.sh
- name: Generate project
run: ./Scripts/generate-xcodeproj.sh
- name: Run PR test preset
run: SKIP_GENERATE=1 ./Scripts/run-tests.sh pr
- name: Run simulator-stable UI regressions
run: |
set -euo pipefail
xcodebuild \
-project OSGKeyboard.xcodeproj \
-scheme OSGKeyboardUITests \
-destination 'platform=iOS Simulator,name=iPhone 17' \
-only-testing:OSGKeyboardUITests/AccountCenterUITests \
-only-testing:OSGKeyboardUITests/AssistantKeyboardUITests \
-only-testing:OSGKeyboardUITests/EditPagerUITests \
-onlyUsePackageVersionsFromResolvedFile \
test
- name: Build Release
run: |
set -euo pipefail
xcodebuild \
-project OSGKeyboard.xcodeproj \
-scheme OSGKeyboard \
-destination 'generic/platform=iOS Simulator' \
-configuration Release \
-onlyUsePackageVersionsFromResolvedFile \
CODE_SIGNING_ALLOWED=NO \
build
mac:
name: macOS
needs: [validate, lint]
runs-on: macos-26
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Verify toolchain
run: |
set -euo pipefail
sudo xcode-select -s /Applications/Xcode_26.6.app
xcodebuild -version
test "$(xcodebuild -version | awk 'NR == 1 { print $2 }')" = "26.6"
test "$(uname -m)" = "arm64"
- name: Install pinned XcodeGen
run: ./Scripts/install-xcodegen-ci.sh
- name: Generate project
run: ./Scripts/generate-xcodeproj.sh
- name: Run macOS tests
run: SKIP_GENERATE=1 ./Scripts/run-tests.sh mac
- name: Build Release
run: |
set -euo pipefail
xcodebuild \
-project OSGKeyboard.xcodeproj \
-scheme OSGKeyboardMac \
-destination 'platform=macOS' \
-configuration Release \
-onlyUsePackageVersionsFromResolvedFile \
CODE_SIGNING_ALLOWED=NO \
build