feat(insights): define storage contract and scoped reports - #1236
feat(insights): define storage contract and scoped reports#1236gronxb wants to merge 72 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: e978bb6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@hot-updater/android-helper
@hot-updater/apple-helper
@hot-updater/bsdiff
@hot-updater/cli-tools
@hot-updater/console
@hot-updater/core
hot-updater
@hot-updater/react-native
@hot-updater/server
@hot-updater/aws
@hot-updater/bare
@hot-updater/bugsnag-plugin
@hot-updater/cloudflare
@hot-updater/datadog-plugin
@hot-updater/expo
@hot-updater/firebase
@hot-updater/js
@hot-updater/plugin-core
@hot-updater/postgres
@hot-updater/rock
@hot-updater/sentry-plugin
@hot-updater/standalone
@hot-updater/supabase
commit: |
🟡 HotUpdater E2E is running.
Logs are available in the dashboard. |
|
@hot-updater-agent HotUpdater E2E completed successfully. 🟢
|
|
@hot-updater-agent HotUpdater E2E completed successfully. 🟢
|
|
@hot-updater-agent HotUpdater E2E completed successfully. 🟢
|
|
@hot-updater-agent HotUpdater E2E completed successfully. 🟢
|
|
@hot-updater-agent HotUpdater E2E completed successfully. 🟢
|
|
@hot-updater-agent HotUpdater E2E completed successfully. 🟢
|
|
@hot-updater-agent HotUpdater E2E completed successfully. 🟢
|
|
@hot-updater-agent HotUpdater E2E completed successfully. 🟢
|
|
@hot-updater-agent HotUpdater E2E completed successfully. 🟢
|
Insights now uses a fixed persistence contract with scoped operational and bundle-report views. Event history is cursor-paginated without a 50,000-event cap; providers store immutable reports and one latest row per installation instead of implementing product summaries.
Changes
record,listEvents,findInstallations,countInstallations, andcountEvents. Core prepares reports, filters, windows, cursors, and product responses.Breaking changes and initial setup
The previous Insights method names have no aliases. This schema has not shipped, so 1.0.0 is the only initial schema. PostgreSQL, Supabase, D1, and standalone SQL include final Insights indexes and exact identity collations from initialization; Supabase includes the atomic record RPC in its initial migration. There is no 1.0.1 migration or Insights-only upgrade path.
DynamoDB writes its event-ID and outcome keys with new reports without a separate readiness marker or backfill API. Firebase uses encoded installation IDs in its initial collection and retains its existing internal adapter marker 4; the added marker-5 upgrade and copy path are removed. MongoDB initializes its final indexes directly and requires MongoDB 5+ on a replica set or sharded cluster.
Generate ORM schemas before deployment and apply emitted Prisma PostgreSQL/MySQL collation statements within the initial SQL migration. Prisma SQL Server Insights explicitly rejects before I/O because its padded string equality and ordering do not meet this contract. Its other models remain available.
Specification: accepted Insights contract, custom-provider guide.
Validation
Current commit:
8a0a38417a3dea976ce1c0ef06bbde1847eb864badds--no-daemonand Kotlinin-processto the E2E Android build so native-build JVMs exit before scenarios run. Current-head complete ordered local build/type/lint/unit/integration checks pass: 2,611 unit tests and 374 integration tests. GitHub CI is green (integration run34031549387, 10m9s). An initial local attempt hit DynamoDB/Supabase time limits; after reclaiming completed build artifacts, the unchanged full retry passed without changing time limits or assertions. Final managed E2E runs Firebase → Supabase → AWS → Cloudflare sequentially.Prior validated commit:
5719b2f9168907ee3cea04bda2f21625f1c1da9f. Migration consolidation isa40e4cca7228a2c9b28ce725f3e4a8e830ca9e42; the follow-up changes E2E cleanup only, with package/provider sources unchanged.5719b2f91:pnpm -w build→pnpm -w test:type→pnpm -w lint→pnpm -w test→pnpm -w test:integration.34016836602).Prior full E2E baseline on commit
54712dc4867cd6b6eb66b5d19804c76c77ba050e(before migration consolidation): all five runs passed withhot-updater-agent verify -platform fullagainst that baseline commit: 260/260 scenarios and 260 actual Insights checks. Each profile covers all 26 default scenarios on both iOS and Android. Final audit matched every passing scenario to the commit's default manifest, verified no skipped Insights checks, and confirmed all five job statuses and commit SHAs.job-20260905154207-6dmvbujob-20260905164239-9p9vt4job-20260905175630-e7g6jrjob-20260905190503-xbgq8pjob-20260905201359-rwfrvlThe first DynamoDB attempt on this commit (
job-20260905144049-ssdfo0) passed 51/52 scenarios. One iOS crash recovery hit a React Native Blob response-read error before the catalog request. The unchanged full retry passed 52/52, including that scenario; no assertions were relaxed and no React Native internals were patched.Browser QA exercised the updated views at 1280×900 and 375×844: scoped counts, B → A recovery drill-down, B → B adoption, Android empty scope, and exact user lookup. No horizontal overflow or captured console errors. Evidence.
Managed-provider follow-up uses
examples/v0.85.0andinit --provider <provider> --from-env-file .env.hotupdater. Runtime keys are synchronized to each encrypted E2E profile immediately after initialization; full verification runs one provider at a time.hot-updaterAWS profile; runtime keys synced5719b2f91, jobjob-20260906092404-ixtqzf, with fresh native builds. Manifest, commit, and no skipped checks audited. One-off SDK cleanup and existing Insights reconciliation preserved 745 event payloads and restored 207 latest installations with indexed reads/counts verified.5719b2f91, jobjob-20260906071828-n7xklw, with fresh native builds. Manifest, commit, and no skipped checks audited. Previous attempt exposed an obsolete API key in cached artifacts; assertions unchangedThese E2E profiles exercise managed database/storage plugins behind the bot's local server harness. Initialization deploys the corresponding managed infrastructure separately.
E2E performance follow-up: AWS and Cloudflare each passed the complete suite, but took about two hours. Measured local bundle building dominates individual deploy time; upload/database and Insights checks are comparatively small. Bot fixes are pushed to its
mainatb1cd34d: environment-aware cache identity with the server-only job namespace excluded, runnable iOS app artifacts only, four native entries retained, and native Git worktree removal with completion checks and visible cleanup timing. The previous 15-second removal timeout fell back to recursive filesystem deletion, adding 9m30s after the last AWS test and leaving stale Git registrations. Bot full checks passed (213 tests), and the local bot was restarted successfully.The actual bundler is Re.Pack/Rspack. Production A/B runs produced identical outputs. Limiting Rust workers increased mean time from 14.70s to 19.86s; limiting Babel/SWC loader workers reduced memory but increased mean time from 23.32s to 31.14s. Neither tuning was applied. The E2E build lifecycle follow-up is committed at
8a0a38417so Gradle/Kotlin processes exit after native compilation. Final-head managed-provider verification is running sequentially; prior AWS/Cloudflare results above remain explicitly tied to5719b2f91.