Free fork of NotProton: Windows Steam games in Mac Steam, on CodeWeavers' Wine and Apple's Game Porting Toolkit
Swift apple-silicond3dmetaldxmtdxvkgame-porting-toolkitgptkmac-gamingmacosmetalfxrosetta-2steamsteam-playwinewinecx
test(installer): cover version resets and record local validation
tememumtazaf852dcda91d1
diff --git a/app/Tests/BridgeplayInstallerCoreTests/InstallerServiceTests.swift b/app/Tests/BridgeplayInstallerCoreTests/InstallerServiceTests.swiftindex 1adde0d..c1351b4 100644--- a/app/Tests/BridgeplayInstallerCoreTests/InstallerServiceTests.swift+++ b/app/Tests/BridgeplayInstallerCoreTests/InstallerServiceTests.swift@@ -117,6 +117,22 @@ struct InstallerServiceTests {#expect(try Data(contentsOf: config) == Data("user override".utf8))}+ @Test func updatesByBuildWhenPublicVersionReturnsToZeroSeries() throws {+ let root = try temporaryDirectory()+ defer { try? FileManager.default.removeItem(at: root) }+ let destination = root.appending(path: "Applications/Bridgeplay.app", directoryHint: .isDirectory)+ try writeSignedApp(at: destination, version: "3.5.0", build: "43")+ let key = Curve25519.Signing.PrivateKey()+ let (offered, archive) = try makeSignedArchive(in: root, build: "44", version: "0.7.0", key: key)+ let installer = service(at: destination)+ guard case .updateAvailable = try installer.state(for: offered) else {+ Issue.record("A higher build must update even when its public version is lower.")+ return+ }+ try installer.install(release: offered, archive: archive)+ #expect(try installer.state(for: offered) == .upToDate(build: 44, version: "0.7.0"))+ }+@Test func treatsSameBuildAndVersionAsCurrent() throws {let root = try temporaryDirectory()defer { try? FileManager.default.removeItem(at: root) }diff --git a/docs/NATIVE-INSTALLER-VALIDATION.md b/docs/NATIVE-INSTALLER-VALIDATION.mdnew file mode 100644index 0000000..7cf7751--- /dev/null+++ b/docs/NATIVE-INSTALLER-VALIDATION.md@@ -0,0 +1,47 @@+# Native installer validation++Local validation on 2026-10-21, Apple Silicon, macOS 27.0.1. The implementation is based+on upstream `9ada9fe`; this records local evidence, not a maintainer-signed release approval.++| Check | Result |+|---|---|+| Standalone debug and release installer builds | Passed using Command Line Tools, Swift 6.2.3 / macOS SDK 26.2 |+| Final local release DMG | 771,820 bytes; below the 5 MiB packaging budget |+| `codesign --verify --strict --deep` on installer app | Passed (ad hoc local signature) |+| `make scriptcheck runcheck` | Passed with ShellCheck 0.11.0; 41 shell scripts |+| `make native-installercheck` | Passed: signed fixtures, install/update detection, save/config preservation, rejected inputs, lock, rollback, recovery; eight cleanup-identification checks |+| Build ordering after public version reset | Passed: a higher build with a lower 0.x public version remains eligible and installs |+| Live production release 0.7.0 / build 44 | Downloaded 79,164,423 bytes; EdDSA verification, extraction, code signature, isolated installation and installed-state check passed |+| UI download and running-app guard | Real network progress observed; installation refused while the user's Bridgeplay was running |+| Already-current wizard | Current signed 3.5.0 fixture detected; no reinstall requested |+| Mounted-DMG completion | Finish with Open disabled ejected the disposable source image and moved that exact DMG to Trash; verified both outcomes |+| Packaged resources and translations | App rendered en, it and zh-Hans with development resource bundles unavailable; all 55 source strings have translations |+| Independent source review | Four material issues found and fixed: cross-user lock access, offline recovery, cleanup working directory and shared initializer visibility |++The mounted-image test started the executable with its working directory on that image.+The cleanup helper moved to an external working directory before waiting for exit, so it+did not keep the image busy. The real installed Bridgeplay app was not replaced or quit;+Steam, prefixes, saves and user configuration were not deployed to or modified.++## Remaining gates++Xcode 27.1 was subsequently installed, but its license is not yet accepted. The official+build attempt stops at prerequisites (`cmake`, Homebrew `bison`, and Xcode tools unavailable+until license acceptance). Homebrew also refuses further dependency installation at this+gate. The prior CLT app-test attempt could not load the `Testing` module, so the Swift+Testing suites are authored but are not counted as passing. The full product build and+existing app snapshot comparison must run with the supported Xcode toolchain.++Public-distribution verification still requires a maintainer signing decision and an actual+quarantined/browser-downloaded launch, including App Translocation and Downloads access.+The local ad hoc build is not notarized. Installer flock serializes installers, while the+process guard provides best-effort coordination with Sparkle; a newly launched updater can+still race it. Multiple real macOS users and external/non-APFS/case-sensitive volumes require+additional runtime coverage. No gameplay, Steam deployment or engine-compatibility claims+are made from bootstrap tests.++Local DMG SHA-256 at the recorded size:++```text+64cda3ee3f8e206445e90a9ff735aaee558df963d206aa8bc68eef44c6d09faa+```diff --git a/installer/tests/native-installer-core-smoke.swift b/installer/tests/native-installer-core-smoke.swiftindex 4230037..3a25e39 100644--- a/installer/tests/native-installer-core-smoke.swift+++ b/installer/tests/native-installer-core-smoke.swift@@ -147,6 +147,16 @@ struct NativeInstallerCoreSmoke {)[.posixPermissions] as? NSNumbertry require(lockMode?.intValue == 0o644, "persistent lock is readable by other macOS accounts")+ let zeroVersionRoot = root.appending(path: "zero-version-release", directoryHint: .isDirectory)+ try FileManager.default.createDirectory(at: zeroVersionRoot, withIntermediateDirectories: true)+ let (zeroVersion, zeroArchive) = try makeSignedArchive(in: zeroVersionRoot, build: "36", version: "0.7.0", key: key)+ guard case .updateAvailable = try service.state(for: zeroVersion) else {+ throw SmokeFailure("A higher build with a lower public version must remain eligible.")+ }+ try service.install(release: zeroVersion, archive: zeroArchive)+ try require(try service.state(for: zeroVersion) == .upToDate(build: 36, version: "0.7.0"), "build ordering survives public version reset")+ print("PASS higher build updates from 3.x to 0.x public version")+let updateDirectory = root.appending(path: "update-flow", directoryHint: .isDirectory)try FileManager.default.createDirectory(at: updateDirectory, withIntermediateDirectories: true)let updateDestination = updateDirectory.appending(path: "Bridgeplay.app", directoryHint: .isDirectory)