You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IdentityResolverSignIntegrationTests should pass reliably in CI regardless of the runner's keychain state.
Current Behavior
Two tests in IdentityResolverSignIntegrationTests intermittently fail on the self-hosted macOS CI runner (latte-ssh) with a keychain error thrown from WalletStorage.swift:95:
Both tests call storage.storeMnemonic(mnemonic, for: walletId), which writes a real BIP-39 mnemonic to the host macOS login keychain via SecItemAdd — no kSecUseDataProtectionKeychain, no test-specific access group, no mock storage. On a headless/SSH CI session the login keychain write can fail nondeterministically. Two different OSStatus codes surfacing across the same run (-60008 vs -60005) is the signature of nondeterministic securityd state, not a deterministic logic error.
Confirmed as an environment flake, not a code defect:
Same tests pass on v4.1-dev runs on the same runner pool.
A clean rerun of the exact same CI job (run 28791155484, job 85376353259) passed with zero code changes (Swift SDK build / Swift SDK build + tests completed green in 9m19s).
Isolate these tests from the real login keychain, e.g.:
Use kSecUseDataProtectionKeychain: true with a dedicated test access group, or
Inject an in-memory/mock WalletStorage for these tests, or
throw XCTSkip(...) when the keychain is unavailable in a headless session, so CI success stops depending on runner keychain state.
Steps to Reproduce (for bugs)
Run the Swift SDK CI job (Swift SDK build / Swift SDK build + tests) on the latte-ssh self-hosted runner enough times.
Occasionally IdentityResolverSignIntegrationTests.testResolverRejectsWrongPathBeforeSigning and/or testResolverSignsForConsistentBreadcrumb fail with a keychainError thrown from WalletStorage.swift:95, while an immediate rerun with no code change passes.
Context
This flake blocked PR #3692's CI checks for reasons unrelated to that PR's own diff, costing review/merge time. Any other PR that happens to run the Swift SDK job on this runner is equally exposed.
Expected Behavior
IdentityResolverSignIntegrationTestsshould pass reliably in CI regardless of the runner's keychain state.Current Behavior
Two tests in
IdentityResolverSignIntegrationTestsintermittently fail on the self-hosted macOS CI runner (latte-ssh) with a keychain error thrown fromWalletStorage.swift:95:testResolverRejectsWrongPathBeforeSigning—keychainError(-60008)testResolverSignsForConsistentBreadcrumb—keychainError(-60005)Both tests call
storage.storeMnemonic(mnemonic, for: walletId), which writes a real BIP-39 mnemonic to the host macOS login keychain viaSecItemAdd— nokSecUseDataProtectionKeychain, no test-specific access group, no mock storage. On a headless/SSH CI session the login keychain write can fail nondeterministically. Two differentOSStatuscodes surfacing across the same run (-60008 vs -60005) is the signature of nondeterministicsecuritydstate, not a deterministic logic error.Confirmed as an environment flake, not a code defect:
v4.1-devruns on the same runner pool.28791155484, job85376353259) passed with zero code changes (Swift SDK build / Swift SDK build + testscompleted green in 9m19s).v4.1-dev) and is unrelated to whatever PR happens to trigger the run.Possible Solution
Isolate these tests from the real login keychain, e.g.:
kSecUseDataProtectionKeychain: truewith a dedicated test access group, orWalletStoragefor these tests, orthrow XCTSkip(...)when the keychain is unavailable in a headless session, so CI success stops depending on runner keychain state.Steps to Reproduce (for bugs)
Swift SDK build / Swift SDK build + tests) on thelatte-sshself-hosted runner enough times.IdentityResolverSignIntegrationTests.testResolverRejectsWrongPathBeforeSigningand/ortestResolverSignsForConsistentBreadcrumbfail with akeychainErrorthrown fromWalletStorage.swift:95, while an immediate rerun with no code change passes.Context
This flake blocked PR #3692's CI checks for reasons unrelated to that PR's own diff, costing review/merge time. Any other PR that happens to run the Swift SDK job on this runner is equally exposed.
Your Environment
packages/swift-sdk/Sources/SwiftDashSDK/Core/Wallet/WalletStorage.swift:93-95(storeMnemonic(_:for:))IdentityResolverSignIntegrationTests(introduced in feat: complete dashpay in platform wallet and swift example app #3841)latte-ssh🤖 Co-authored by Claudius the Magnificent AI Agent