Skip to content

3.0.0 release readiness: cross-platform Observation, Cache pin, docs - #153

Merged
0xLeif merged 3 commits into
mainfrom
cursor/3.0-release-readiness-fbc4
Jul 17, 2026
Merged

0xLeif merged 3 commits into
mainfrom
cursor/3.0-release-readiness-fbc4

Conversation

@0xLeif

@0xLeif 0xLeif commented Jul 17, 2026

Copy link
Copy Markdown
Owner

Summary

Ships the remaining work for AppState 3.0.0 with honest cross-platform Observation, a WASM/Linux-safe Cache pin, and install-doc hygiene.

Incorporates #152 (cross-platform notifyChange() delivery + canImport guards) and finishes the release checklist from the confidence assessment.

GitHub release 3.0.0 is published from this branch (1656972) after green CI. Please squash-merge this PR into main so the default branch matches the tag (branch protection still requires a human approving review).

Library

  • Pure Observation delivery — every mutation path calls notifyChange(); the unused Combine consume(object: cache) bridge is removed from Application
  • notifyChange() contract documented — must stay synchronous on the main thread (async hops would break withObservationTracking)
  • @ObservedDependency gated with canImport(SwiftUI) so WebAssembly does not pull SwiftUI/Combine incorrectly
  • Cache pin — depends on 0xLeif/Cache@33ef0d7 (the #30 commit) for WASM canImport(Combine) + Linux collection-cast fix. Switch back to a versioned from: pin once Cache tags that fix

Tests

  • Adds CrossPlatformObservationTests using async @MainActor entry points so Linux/Windows XCTest can discover them
  • Verified on Ubuntu CI: both cross-platform Observation tests passed
  • Keeps the fuller ObservationTests / ObservationBridgeTests Apple-gated (sync @MainActor XCTest limitation) — documented in-file

Docs / tooling

  • Installation guides (all languages) recommend from: "3.0.0"
  • English upgrade guide notes cross-platform Observation
  • fledge.toml drops the stale Examples/SwiftDataExample lane

Issues

Closes #149, closes #150, closes #151 (via the Cache#30 revision pin) when this PR merges.

Test plan

  • Branch includes Cross-platform observation delivery + WebAssembly build support #152 mutation-path notifyChange() changes
  • CI green: macOS / Ubuntu / Windows (strict)
  • Ubuntu log shows CrossPlatformObservationTests executed and passed
  • Published GitHub release 3.0.0
  • Human approving review + squash merge to main (branch protection)
  • Maintainer merge/release of Cache#30 so AppState can later drop the revision pin
Open in Web Open in Cursor 

0xLeif and others added 2 commits June 11, 2026 09:22
#149 (WASM): switch Combine/OSLog/SwiftUI-gated #if !os(Linux) && !os(Windows)
guards to their canImport(...) checks. os(WASI) is neither Linux nor Windows, so the
old guards pulled Combine/SwiftUI into the wasm build. Keychain/iCloud stay Apple-only.

#150 (observation off Apple): delivery was bridged through Combine's
consume(object: cache) (Apple-only), so withObservationTracking never fired on
Linux/Windows/wasm. Now every mutation path (State/StoredState/FileState/SyncState/
SecureState/DependencySlice) calls notifyChange() directly on all platforms, and the
Combine cache bridge is removed so Apple still fires exactly once.

163 tests pass on macOS. Observation tests stay gated off Linux/Windows: swift-corelibs
-xctest cannot discover synchronous @mainactor test methods there (it force-casts test
thunks to () -> () and aborts) — a test-harness limitation, not a runtime one. The #150
delivery code itself is cross-platform. Full wasm build + Linux collection-typed state
also need the Cache fix (0xLeif/Cache#30).

Addresses #149, #150.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Drop the unused Combine cache bridge from Application; document that
  notifyChange() must stay synchronous on the main thread
- Add CrossPlatformObservationTests (async @mainactor) so Linux/Windows CI
  exercises Observation delivery; keep the fuller Apple-gated suites
- Gate ObservedDependency on canImport(SwiftUI) for WebAssembly
- Pin Cache to the 0xLeif/Cache#30 commit for WASM + Linux collection casts
- Point installation guides at 3.0.0; remove stale Examples fledge lane

Co-authored-by: Leif <leif.algo@pm.me>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

Application.state(...).value is an immutable rvalue; assign through a
mutable local like the other AppStateTests.

Co-authored-by: Leif <leif.algo@pm.me>
@cursor
cursor Bot marked this pull request as ready for review July 17, 2026 20:14
@0xLeif
0xLeif merged commit 515e7c3 into main Jul 17, 2026
3 checks passed
@0xLeif
0xLeif deleted the cursor/3.0-release-readiness-fbc4 branch July 17, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants