Skip to content

fix(examples): harden cache and async lifecycle - #48

Closed
fadi-george wants to merge 1 commit into
mainfrom
fadi/sdk-5125
Closed

fix(examples): harden cache and async lifecycle#48
fadi-george wants to merge 1 commit into
mainfrom
fadi/sdk-5125

Conversation

@fadi-george

@fadi-george fadi-george commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Description

One Line Summary

Key demo installs to packed bytes and prevent stale async startup state.

Details

Motivation

Linear: SDK-5125.

The shared stable tarball is retained when packed bytes are unchanged, while each demo records the tarball hash it installed. Effect-local change flags protect live subscription, permission, and user events from stale startup snapshots; cancellation and request sequencing prevent late user updates. Adapted from applicable Capacitor equivalents of OneSignal/react-native-onesignal#1985 and #1981. Metro/env cache handling was not ported.

Scope

Demo setup and lifecycle code only; SDK APIs are unchanged.

Testing

  • vp test run: 179 tests pass; coverage thresholds pass.
  • Focused vp check for both changed hooks: passes.
  • bash -n examples/setup.sh: passes.
  • Cache diagnostics verify unchanged packed bytes preserve the stable tarball inode/hash, each demo stamp equals the tarball hash, and a missing per-demo stamp reinstalls the package.
  • Both examples/demo and examples/demo_pods production web builds: pass.
  • Linux setup reached Android sync, which cannot invoke the repository's vpx command because only the local vp executable is available; cache behavior was isolated with a no-op sync shim.
  • Full vp check has an unchanged baseline README.md formatting failure.

Checklist

  • I have filled out all required sections
  • PR does one thing
  • No public API changes
  • Automated tests pass
  • Diff reviewed
Open in Web Open in Cursor 

Co-authored-by: Fadi George <fadi-george@users.noreply.github.com>
@fadi-george
fadi-george marked this pull request as ready for review September 1, 2026 21:45
@fadi-george
fadi-george requested a review from a team September 1, 2026 21:45
@cursor
cursor Bot deleted the fadi/sdk-5125 branch September 1, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants