Conversation
djwok
marked this pull request as ready for review
September 9, 2026 11:33
darekaze
added this pull request to stack #31
September 9, 2026 12:13
…les) (#23) chore: verification gate for Node 22.18, CI, and typecheck Pin the package Node floor at >=22.18, ship Autolink consumer ProGuard keep rules, and add a CI workflow that runs unit tests, typecheck, lint, and Linux native `make test`. Clear typecheck by stubbing connectors and typed NativeModules/Response harnesses instead of invalid casts. Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: 達達 <djwok@users.noreply.github.com>
FM-PS-LYNX-008 E: one LynxHost interface with a PrimJS adapter and a fake test adapter. Native Module lookup, GlobalEventEmitter, platform, text codec, fetch, and AbortController install go through src/host.ts. LynxRemote transport stays in place (A deferred). Co-authored-by: 達達 <djwok@users.noreply.github.com>
Replace the LynxRemote mega-module with a SyncStreamTransport seam and three adapters: NativeHttpFetch (streamingId realtime primary), LynxFetchModule fallback, and identifier fetch. Delete the FM-PS-LYNX-003 one-shot diagnostic in favor of PowerSync logger debug. Idle-complete stays a fallback only (C deferred). Native HTTP module split is B, deferred. Co-authored-by: 達達 <djwok@users.noreply.github.com>
…lete Native sync HTTP lives in NativeSyncHttp (same Autolink lookup, not callNative). Android and iOS emit onData* → onError? → onEnd. Idle-complete is the streamingId fallback with one envelope and shared/sync_http_policy.h. Desktop N-API stays SQL-only. ADR-0003 records the seam. Co-authored-by: 達達 <djwok@users.noreply.github.com>
Presence-check httpFetch without type assertions; oxfmt the HTTP seam. Co-authored-by: 達達 <djwok@users.noreply.github.com>
Replay one catalog (checkpoint+ops, error-then-end, idle-complete) through native-http streamingId tests, Linux make test, make test-ios httpFetch, and Android instrumentation so the B terminal sequence cannot drift. Co-authored-by: 達達 <djwok@users.noreply.github.com>
D: Autolink NativePowerSyncModule SQL RPC is a thin Java/JNI binder over shared ps_sql, dropping androidx.sqlite-bundled. Core still loads from the Maven AAR via sqlite3_load_extension. NativeSyncHttp stays a separate sub-interface. G: iOS NativeSyncHttp no longer walks UIWindows for a LynxView. Hosts inject sendGlobalEvent via setSharedStreamEventSender or initWithParam; missing sender uses the idle-complete fallback. Co-authored-by: 達達 <djwok@users.noreply.github.com>
JNI binder methods must survive consumer minification so SQL RPC stays on shared ps_sql. Co-authored-by: 達達 <djwok@users.noreply.github.com>
Lynx-for-Web always has lynx.getJSModule("GlobalEventEmitter"). identifier
streaming was discarding Response.body and waiting for native onData, so
A↔B download never applied. Keep a usable fetch body; streamingId still
uses GlobalEventEmitter. Read NativeModules as unknown to avoid TS2559.
Co-authored-by: 達達 <djwok@users.noreply.github.com>
Read the PrimJS bag through isNonNullObject and assert NativeModulesHost at the lookup boundary so rspeedy typecheck stays green. Co-authored-by: 達達 <djwok@users.noreply.github.com>
Co-authored-by: 達達 <djwok@users.noreply.github.com>
Do not declare NativeModules, TextCodecHelper, lynx, or SystemInfo on the global namespace in src/globals.ts. @lynx-js/types already owns those vars. PrimJS lookup uses module-local declare const plus a globalThis probe so showcase pluginTypeCheck stays green. Co-authored-by: 達達 <djwok@users.noreply.github.com>
Co-authored-by: 達達 <djwok@users.noreply.github.com>
Mac tip verify: NativeSyncHttp.mm failed to compile sendGlobalEvent on untyped id (pod TU has no LynxView header). Declare PSLynxStreamEventSender and cast after respondsToSelector. Android NDK AttachCurrentThread wants JNIEnv**; keep OpenJDK void** behind !__ANDROID__ for make test. Web download / host-fetch NDJSON path is unchanged. Co-authored-by: 達達 <djwok@users.noreply.github.com>
cursor
Bot
force-pushed
the
drkz/fm-ps-lynx-008-native-build-fix-4330
branch
from
September 9, 2026 12:18
73f3b9c to
4ed232e
Compare
|
Superseding this stacked PR: GitHub refused |
|
Replaced by #32 (same tip branch, now targeting |
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.
Collapses the remaining FM-PS-LYNX-008 stack into one PR targeting
main.H (verification gate) already landed in #23. This branch was rebased onto current
main(verification-gate commit skipped as already applied; no conflict resolutions). Intermediate stacked PRs #24–#29 are superseded by this tip.Stack (E → A → B+C → F → D+G + verify fixes)
E — one LynxHost for PrimJS globals
src/host.ts:PrimJSLynxHost+ fake test host. NativeModules, GlobalEventEmitter, platform, text codec, fetch, and AbortController install go through one seam. Not public API.A — SyncStreamTransport
Three adapters: NativeHttpFetch (primary;
streamingId/ GlobalEventEmitter — issue #21 realtime), LynxFetchModule, host-fetch.LynxRemote.tsis a thin pick. FM-PS-LYNX-003 diagnostics removed.B+C — NativeSyncHttp split + idle-complete fallback
Native
/sync/streamHTTP lives inNativeSyncHttp(Android + iOS), not on the SQL RPC module. Idle-complete is the fallback only whenstreamingIdis absent.F — shared NDJSON fixtures
Canonical catalog at
shared/fixtures/sync-stream.json, replayed by JS tests and native fixture tests.D+G — Android
ps_sqlJNI + iOS host event senderAndroid SQL RPC is JNI
PsSqlEngine→shared/ps_sql(androidx.sqlite-bundledremoved). iOS no longer walksUIWindow; incremental stream needssetSharedStreamEventSender:(showcase already registers the LynxView).Web download
Host-fetch keeps a usable Fetch
Response.body.PrimJSLynxHostfinds barelynxon lynx-bg, so an emitter is always present on web — do not wait on nativeonDatafor identifier fetch.streamingIdstill uses GlobalEventEmitter.src/globals.tsno longer redeclares Lynx globals (rspeedy TS2403).Native build fix
iOS: local
PSLynxStreamEventSenderprotocol sosendGlobalEvent:withParams:compiles without importing LynxView. Android NDK:AttachEnvusesJNIEnv**under__ANDROID__, OpenJDKvoid**for Linuxmake test.Confirmed not dropped
streamingIdrealtime path (native-http Hardening: keep native realtime on streamingId path (regression + README) #21)SyncStreamTransportpick orderLynxHost/PrimJSLynxHostNativeSyncHttpsplit from SQL RPCps_sqlJNI engineVerify
pnpm typecheck,pnpm lint,pnpm testmake test(Linux; includes JNI-cofps_sql_jni.cc)make test-ios/ Android NDK + instrumentation need MacTracking: #18