Geo Tracking - Specs

Tests and evidence

Automated coverage, historical simulator runs, and the limits of conclusions about tracking.

The project includes tests for TypeScript rules, native storage, HTTP contracts, the dashboard, and the mobile interface. Each layer answers a different question. Passing a queue test or simulation does not demonstrate physical GPS capture, battery life, or recovery after forced termination.

The execution counts on this page are historical evidence recorded in the repository on October 15, 2026. Writing this documentation did not rerun those mobile scenarios. The suites changed across releases; an old count is not guaranteed to match the current count.

Available automated coverage

LayerCoverage present in codeLimitation
App VitestConnection/sample validation, native bridge, idempotent enrollment, permissions and cancellation, fresh GPS, route calculation and playback, geometry, and the legacy queue.Rule tests with controlled dependencies; they do not measure physical GPS.
Instrumented AndroidCoordinates and timestamps, remote configuration, SQLite, reopening, partial ACK, idempotent counting, and more than ten thousand pending records.Runs Android code; does not represent every manufacturer's restrictions.
Isolated Swift10,005 inserts, batches of 100, partial ACK, rollback, reopening, a persisted stopped session, and validation.A storage executable; not a Core Location background test.
Backend in workerd/MiniflareAuthorization, isolation, atomic batches, concurrent deduplication, versioned configuration, history, WebSocket, catalog, automatic enrollment, and R2 downloads.Exercises the local runtime and its contracts.
Dashboard sessionMultiple devices, snapshots, reconnection, catalog, page resumption, late events, and logout.Tests browser logic; does not replace visual inspection or real networking.
MaestroTracking screen, collapsed sections, access to details/simulation, and the main button remaining visible while scrolling.The current layout flow does not cover the entire background acceptance process by itself.

Polygon tests belong to the legacy domain, with a separate demonstration queue. They must not be counted as real trajectory uploads.

Running code checks

In the geo-demo directory:

npm ci
npm test
npx tsc --noEmit

In the tracking-server directory:

npm ci
npm run check
npm test

For Android tests, with a compatible emulator running, execute in geo-demo/android:

./gradlew :geo-monitoring:connectedDebugAndroidTest

Check the module name in the Gradle project if the native integration has changed. Instrumented tests are in geo-demo/modules/geo-monitoring/android/src/androidTest/. The Swift executable is in geo-demo/modules/geo-monitoring/ios/Tests/GeoTrackingStoreTest.swift; it compiles alongside the models and storage code, with SQLite.

What the current Maestro flows do

From the repository root, with the APK installed:

maestro test -e APP_ID=com.bracaroto.geodemo.fieldtest .maestro/android/tracking.yaml

For an installed iOS build, pass its identifier:

maestro test -e APP_ID=com.bracaroto.geo-demo .maestro/ios/tracking.yaml

Both files check controls and expandable sections on the current screen. The Android helpers tracking-start.yaml and tracking-stop.yaml use the development package, with separate start and stop scenarios. The app's npm run maestro:android script also uses the development package and prepares the Metro port.

Granting permissions through adb, simctl, or the runner prepares the environment. It does not validate the actual permission dialog experience. The old suite description in .maestro/README.md and parts of geo-demo/README.md predate the screen simplification; current behavior is defined by the code and available YAML files.

Recorded historical evidence

RecordDocumented resultInterpretation
Initial October 15 validation71 app Vitest tests; 18 instrumented Android tests; Swift test with 10,005 positions; iOS build with Xcode 27.The code and environment of that run.
Initial backend12 tests, later increasing to 13 with APK downloads through R2.The backend gained later suites; this is not the current tree's count.
Android backgroundEmulator GPS reached the Worker, the offline queue survived reopening, retry after a lost ACK did not duplicate records, and remote pause and local stop were observed.Transport failure was induced through HTTP 503; it is not equivalent to turning off radios.
iOS backgroundA simulator route produced native points; pending records survived reopening; lost ACK and local stop were exercised.The described remote resumption after reopening happened in the foreground.
Direct HTTPSIndependent verification recorded eight unique native iOS events and 49 Android events, followed by a final stop.These are points from the operating systems' simulated GPS.
Synthetic navigationOutbound and return legs of about 60 seconds, each with 121 test points and 29 concurrent native samples; cancellation observed.Execution on an emulator and an earlier APK version.
Screen simplificationThe field guide records TypeScript and 135 passing tests; updates on Android 9 and 17 emulators; start, stop, denied permission, and layout.The complete 60-second route was not repeated in that run.

The native scenarios document preserved IDs, an empty queue after recovery, and no new captures after a local stop. They do not establish collection during force-stop or automatic app wakeup in every scenario.

Reproducing transport failures

scripts/fault-proxy.mjs provides online, offline, and lose-next-ack. Offline mode returns HTTP 503. Lost-ACK mode lets the server write and discards the response, allowing verification that the client retries the same event and the server keeps a single occurrence.

The local backend uses port 8787; historical procedures use proxies on 8788 and 8789 to separate Android and iOS. The app must be configured to use the proxy through the native development API: the current screen has no manual connection fields. See installation and API.

Compare IDs and timestamps as well as counts. An active session can produce legitimate points while a scenario runs. Record whether Sync now was needed; recovery with intervention does not demonstrate automatic resumption.

What remains pending

The physical Galaxy M30, battery life, long routes, manufacturer restrictions, degraded GPS, power saving, reboot, and forced termination require their own execution. Some navigation scenarios are also still marked as not run in the historical procedure, such as stopping during an active leg and returning from a canceled outbound leg in that round's final APK.

On iOS, receiving a remote resume requires an execution window. An app suspended after location has been fully paused may need to be reopened. The Expo 56 base still has the Hermes memory issue recorded in the toolchain guide. These limits prevent claiming reliability or battery equivalence with the commercial SDK used as a reference.

Repository sources

  • docs/validation-2026-10-15.md, docs/navigation-simulation.md, and docs/android-field-test.md.
  • geo-demo/docs/manual-verification.md and docs/ios-toolchain.md.
  • geo-demo/src/features/tracking/__tests__/ and geo-demo/src/features/geo-monitoring/__tests__/.
  • geo-demo/modules/geo-monitoring/android/src/androidTest/ and geo-demo/modules/geo-monitoring/ios/Tests/.
  • tracking-server/test/, .maestro/android/, and .maestro/ios/.

On this page