Isolate test Application state and fail CI on Linux or macOS#83
Draft
0xLeif wants to merge 8 commits into
Draft
Conversation
Scope FileState to a unique temp directory, override UserDefaults with an in-memory suite, reset DynamicKeyStorage memory and demo keys in setUp and tearDown, and serialize Application access under swift test --parallel. Co-authored-by: Leif <leif.algo@pm.me>
Scripts/build.sh and Scripts/test.sh apply the Observation linker allowance on Linux. Scripts/test-parallel.sh runs swift test --parallel and is wired into fledge lanes.verify. Co-authored-by: Leif <leif.algo@pm.me>
ci.yml uses a matrix for macos-latest and ubuntu-latest (test, parallel isolation, smoke). linux-smoke.yml reuses the portable scripts. Co-authored-by: Leif <leif.algo@pm.me>
Update testing companions for hermetic/parallel expectations and accept CHG-0038 (no canonical API deltas; follow-up #82 filed for DynamicKeyStorage). Co-authored-by: Leif <leif.algo@pm.me>
Empty "${extra[@]}" under set -u fails on the macOS Trust runner. Branch
on uname instead of building an optional args array.
Co-authored-by: Leif <leif.algo@pm.me>
macOS Swift 6.3 rejects DispatchSemaphore.wait from async setUp/tearDown. TestIsolationGate acquire/release keeps Application cases serialized under swift test --parallel without blocking the cooperative pool. Co-authored-by: Leif <leif.algo@pm.me>
Co-authored-by: Leif <leif.algo@pm.me>
CHG-0038 delivery evidence was stale after macOS portability fixes; reopen, re-verify, and re-accept with exact evidence. CHG-0039 covers the same Scripts/ and Tests/apsTests/ paths for the follow-up edits. Co-authored-by: Leif <leif.algo@pm.me>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Hardens
APSTestsso demo AppState is scoped per case (no order-dependent cross-talk), adds aswift test --parallelregression, and folds Linux into the CI matrix so either platform failure fails the gate.Test isolation
FileManager.defaultFileStatePath, tearDown cleanupUserDefaultsviaApplication.override(\.userDefaults)DynamicKeyStorage.resetProcessMemory()+ demo key / stats resets in setUp/tearDownTestIsolationGate) so--parallelcannot interleave Application mutations (async-safe on macOS Swift 6.3)testUserDefaultsStandardIsHermetic,testIsolationStartsWithCleanDemoStateScripts/test-parallel.shwired intofledge lanes verifyLinux / macOS parity
Scripts/build.sh+Scripts/test.shapply the Linux Observation linker allowance via uname branchci.ymlmatrix:macos-latest+ubuntu-latest(test, parallel, smoke); workflow fails if either cell failslinux-smoke.ymlupdated to the same scriptsSpecSync
DynamicKeyStorageStoredState still hitsUserDefaults.standardVerify
fledge lanes run verifypassed on Linux (Swift 6.0.3)