4 Commits

Author SHA1 Message Date
a98d62c167 perf(product-analytics): A3 capacity within the 192 MiB cap, recording bytes per minute, and the A3 open-source record (A3)
- Recording chunks, their reads and S3 export files use native zlib instead
  of fflate, so compression runs outside the JS heap.
- test/a3/capacity.ts: 10 minutes of A1's 50 events/s plus 20 recording
  sessions flushing every 2 s plus one webhook export: max 186.4 MiB (ps)
  against the 192 MiB cap; inside view rss 100-116 MiB, heap used 15-32
  MiB, no growth. Stored recordings: 13 232 bytes per recorded minute on
  the fixture (49 923 uncompressed). Written to CAPACITY.md.
- NOTICE files for the vendored and ported parts; test/a3/vendor.test.ts
  pins their hashes and checks the served SDK parts equal the wrapper's.
- docs/analytics/oss/A3.md: what was copied, ported and written, the
  aws4fetch substitution for the AWS SDK and why, environment, security
  notes, test map and the hand-offs (A1 flags route merge for segment
  survey targeting, Shell link, package script, NOTICE line, compose env,
  Expo example provider; flags merge switch).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 08:38:02 +03:00
41334ca940 docs(analytics): A2 capacity measurement (trends 30 d p95 925 ms, 3-step funnel 1.9 s, 8-week retention 0.64 s on 1 000 000 events) and 549 bytes per event
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 06:37:35 +03:00
09a75337f9 docs(analytics): A1 capacity measurement (128.5 MiB max at 50 events/s for 10 min) and the A1 open-source record
- test/a1/capacity.ts runs the service as its own process and samples RSS
  from outside; result written to docs/analytics/CAPACITY.md.
- docs/analytics/oss/A1.md: pinned SDKs and libraries, the files ported
  from the upstream persons code (MIT, cbb1e9253027), the wire protocol, and
  the hand-offs to A2/A3 (including the SDK's /static/ extension scripts).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 04:11:14 +03:00
c6fc339449 docs(analytics): product analytics plan, lim.run gap audit, OSS and capacity notes
Architect pass for Railyard product analytics (branch analytics/2026-09-30).
- PLAN.md: a new apps/product-analytics service that speaks the public
  capture protocol of the MIT/Apache PostHog SDKs (so the unmodified web,
  React Native and server SDKs work), backed by partitioned Postgres on box 2;
  identify, merges and groups ported from PostHog MIT code; insights ported
  from the vendored Umami Postgres SQL plus PostHog query semantics;
  experiments on the existing flags slot (read through its client API, written
  only through its service); three packages A1 (ingest, storage, SDKs,
  identify/groups, GDPR), A2 (insights, cohorts, dashboards, SQL), A3 (replay,
  heatmaps, surveys, experiments, exports) with disjoint file ownership.
- LIMRUN-GAPS.md: G1-G12 gaps of Scribase against lim.run with owner lanes.
- OSS.md: licences verified with gh api and npm view, pinned commits,
  rejected candidates with reasons.
- CAPACITY.md: 192 MiB service cap (est.), no ClickHouse, gate order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 02:41:26 +03:00