iOS test suite: first real execution found 34 failures across 7 classes + 1 crash-restart #233

Closed
opened 2026-11-19 21:29:57 +01:00 by amiryahaya · 1 comment
Owner

Context: the new self-hosted macOS runner (#146, PR #232) executed the iOS unit-test suite for the first time ever (previously compile-verified only).

Result: 455 tests executed in 126s — 34 failures, 2 unexpected (1 crash-restart mid-suite).

Environment: macOS 27.2.1 arm64, Xcode 27.2 (27B52), iOS 27.2 simulator, iPhone 16 device, Debug config, signing disabled per workflow.

Failure breakdown by class:

  • JoinTenantViewModelTest — 8
  • ShamirSecretSharingTest — 5 (crypto logic, e.g. ShamirSecretSharingTests.swift:38)
  • InviteAcceptViewModelTest — 2
  • FolderKeyWrapTest — 2 (7.1 slice 2, PR #231)
  • FileBrowserSearchTest — 2 (e.g. XCTAssertEqual failed: ("0") is not equal to ("1") at FileBrowserSearchTests.swift:115 — unmocked async/timing pattern)
  • LoginViewModelTest — 1
  • InvitationsListViewModelTest — 1
  • Plus 1 mid-suite Restarting after unexpected exit, crash, or test timeout (2 "unexpected" in totals)

Also observed during diagnosis: one KDF re-encryption test froze the guest app for ~25 min at 0% CPU when the simulator stack was in a mixed Xcode-26/27 state (stale Simulator.app from the replaced Xcode). Clean stack restart fixed it; defaults write com.apple.Simulator NSAppSleepDisabled -bool YES applied on the runner host as prevention. Worth keeping in mind for CI reliability.

Scope: this is pre-existing product test debt, not caused by the runner or PR #232 (failures reproduce identically with/without the patch). Suggested slicing: (1) ShamirSecretSharing crypto failures — correctness-critical; (2) the crash-restart; (3) ViewModel mocking/timing batch.

Blocks: green CI for PR #232 (merge held per never-merge-without-green-CI). Relates to #223 (iOS slices) and #146 (runner).

Context: the new self-hosted macOS runner (#146, PR #232) executed the iOS unit-test suite for the first time ever (previously compile-verified only). **Result: 455 tests executed in 126s — 34 failures, 2 unexpected (1 crash-restart mid-suite).** Environment: macOS 27.2.1 arm64, Xcode 27.2 (27B52), iOS 27.2 simulator, iPhone 16 device, Debug config, signing disabled per workflow. Failure breakdown by class: - `JoinTenantViewModelTest` — 8 - `ShamirSecretSharingTest` — 5 (crypto logic, e.g. ShamirSecretSharingTests.swift:38) - `InviteAcceptViewModelTest` — 2 - `FolderKeyWrapTest` — 2 (7.1 slice 2, PR #231) - `FileBrowserSearchTest` — 2 (e.g. `XCTAssertEqual failed: ("0") is not equal to ("1")` at FileBrowserSearchTests.swift:115 — unmocked async/timing pattern) - `LoginViewModelTest` — 1 - `InvitationsListViewModelTest` — 1 - Plus 1 mid-suite `Restarting after unexpected exit, crash, or test timeout` (2 "unexpected" in totals) Also observed during diagnosis: one KDF re-encryption test froze the guest app for ~25 min at 0% CPU when the simulator stack was in a mixed Xcode-26/27 state (stale Simulator.app from the replaced Xcode). Clean stack restart fixed it; `defaults write com.apple.Simulator NSAppSleepDisabled -bool YES` applied on the runner host as prevention. Worth keeping in mind for CI reliability. Scope: this is pre-existing product test debt, not caused by the runner or PR #232 (failures reproduce identically with/without the patch). Suggested slicing: (1) ShamirSecretSharing crypto failures — correctness-critical; (2) the crash-restart; (3) ViewModel mocking/timing batch. Blocks: green CI for PR #232 (merge held per never-merge-without-green-CI). Relates to #223 (iOS slices) and #146 (runner).
Author
Owner

RESOLVED via PR #235 (merged 91c598d) — suite is green: 474 tests, 0 failures, 3 documented skips, ~143s on the macOS runner (ios-ci run 645, first fully green iOS CI run in project history).

Root causes fixed (details in PR #235):

  • ShamirSecretSharing: GF(256) exp table built by ×2 (order 51, not 255) — recovery crypto was silently broken; fixed to generator 3.
  • JoinTenantViewModel: Optional("id") interpolated into the accept URL; now guards nil + test.
  • Wire-format models: data envelopes the server never sends (AcceptInvitation.cs / CreateInvitation.cs verified) — removed.
  • KDF test moved off-main (debug bcrypt/Argon2 blocked main → watchdog killed the test host mid-suite — that was the original mid-suite crash).
  • Stale test fixtures/endpoints (13 /api-prefixed keys, acceptWithWallet flow bypassed, pre-local-cache search assertions, keychain/mock mismatches).

3 skips, each documented in-test:

  • 2 × FolderKeyWrap roundtrips: ML-KEM placeholder cannot decapsulate what it encapsulates (slice 3, #223). MlKem.usesPlaceholder added as the runtime flag.
  • 1 × Login keychain roundtrip: test host has no keychain entitlements (raw SecItemAdd → -34018). Proper fix = protocol injection (DI audit R1–R5).

Follow-ups filed: #234 (server: authenticated join-by-code is structurally unusable — /code omits id, accept requires it; + client envelope drift on /invitations lists). Also noted: Forgejo requires the patched forgejo/upload-artifact@v4 (stock actions v4 fails), and runner jobs need an explicit UTF-8 LANG or xcpretty crashes on non-ASCII output — both now fixed in-tree/runner.

**RESOLVED via PR #235 (merged 91c598d) — suite is green: 474 tests, 0 failures, 3 documented skips, ~143s on the macOS runner (ios-ci run 645, first fully green iOS CI run in project history).** Root causes fixed (details in PR #235): - **ShamirSecretSharing**: GF(256) exp table built by ×2 (order 51, not 255) — recovery crypto was silently broken; fixed to generator 3. - **JoinTenantViewModel**: `Optional("id")` interpolated into the accept URL; now guards nil + test. - **Wire-format models**: `data` envelopes the server never sends (AcceptInvitation.cs / CreateInvitation.cs verified) — removed. - KDF test moved off-main (debug bcrypt/Argon2 blocked main → watchdog killed the test host mid-suite — that was the original mid-suite crash). - Stale test fixtures/endpoints (13 `/api`-prefixed keys, `acceptWithWallet` flow bypassed, pre-local-cache search assertions, keychain/mock mismatches). **3 skips, each documented in-test:** - 2 × FolderKeyWrap roundtrips: ML-KEM placeholder cannot decapsulate what it encapsulates (slice 3, #223). `MlKem.usesPlaceholder` added as the runtime flag. - 1 × Login keychain roundtrip: test host has no keychain entitlements (raw SecItemAdd → -34018). Proper fix = protocol injection (DI audit R1–R5). **Follow-ups filed:** #234 (server: authenticated join-by-code is structurally unusable — /code omits id, accept requires it; + client envelope drift on /invitations lists). Also noted: Forgejo requires the patched `forgejo/upload-artifact@v4` (stock actions v4 fails), and runner jobs need an explicit UTF-8 `LANG` or xcpretty crashes on non-ASCII output — both now fixed in-tree/runner.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
primatekuntech/failsulit#233
No description provided.