feat(analytics): World ID unique-verifications data layer (1/3) - #2191
Open
soamdesai-tfh wants to merge 12 commits into
Open
feat(analytics): World ID unique-verifications data layer (1/3)#2191soamdesai-tfh wants to merge 12 commits into
soamdesai-tfh wants to merge 12 commits into
Conversation
Dual v3/v4 action-day rollup tables with cascading FKs, the singleton watermark state table, the tracked return-shape table, the atomic five-minute dual-source rollup function under advisory lock (533214,43), the combined app-daily read function, service-only Hasura metadata, the protected cron route with a rollout-disable gate, operator scripts for the out-of-band v3 index and backfill validation, and the fresh-stack contract harness with its data-layer tests.
soamdesai-tfh
temporarily deployed
to
development
July 31, 2026 04:35 — with
GitHub Actions
Inactive
This was referenced Jul 31, 2026
soamdesai-tfh
temporarily deployed
to
development
July 31, 2026 04:43 — with
GitHub Actions
Inactive
soamdesai-tfh
force-pushed
the
feat/world-id-analytics-data
branch
from
July 31, 2026 07:41
2d9c3d9 to
093f412
Compare
soamdesai-tfh
temporarily deployed
to
development
July 31, 2026 07:41 — with
GitHub Actions
Inactive
soamdesai-tfh
temporarily deployed
to
development
July 31, 2026 08:32 — with
GitHub Actions
Inactive
The default and --million paths invoked integration.test.ts and million.test.ts, which land with the read slice; jest exits 1 on a pattern with no matches, so both entrypoints failed on this branch. The read slice restores them alongside the files. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
soamdesai-tfh
temporarily deployed
to
development
July 31, 2026 16:46 — with
GitHub Actions
Inactive
soamdesai-tfh
temporarily deployed
to
development
July 31, 2026 21:24 — with
GitHub Actions
Inactive
soamdesai-tfh
temporarily deployed
to
development
July 31, 2026 21:28 — with
GitHub Actions
Inactive
soamdesai-tfh
temporarily deployed
to
development
August 1, 2026 00:59 — with
GitHub Actions
Inactive
soamdesai-tfh
temporarily deployed
to
development
August 3, 2026 00:49 — with
GitHub Actions
Inactive
soamdesai-tfh
marked this pull request as ready for review
August 3, 2026 00:49
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9f175224c5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
soamdesai-tfh
temporarily deployed
to
development
August 3, 2026 08:00 — with
GitHub Actions
Inactive
A plain CREATE INDEX in the transactional migration blocks nullifier_v4 verification inserts for the build duration while old pods serve during a rolling deploy. Build it out of band with CONCURRENTLY like the v3 twin: the operator script now creates and validity-gates both indexes, and the backfill gate refuses to run until both are valid. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
soamdesai-tfh
temporarily deployed
to
development
August 3, 2026 18:48 — with
GitHub Actions
Inactive
soamdesai-tfh
temporarily deployed
to
development
August 3, 2026 21:39 — with
GitHub Actions
Inactive
…ats_daily The API contract (legacy_actions) and UI scope type (source: "legacy") already named this concept 'legacy'; only the SQL layer said 'v3'. v3 was never a real protocol generation here - nullifier/action predate v4 entirely and internally split by engine (on-chain/cloud), not by any versioning scheme. Align the table/index name and source tags with the terminology the other two layers already settled on. Regenerated graphql.schema.json/graphql.ts against the renamed table; tsc and prettier clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
soamdesai-tfh
force-pushed
the
feat/world-id-analytics-data
branch
from
August 3, 2026 21:43
2cd5cd5 to
3c2ff71
Compare
soamdesai-tfh
temporarily deployed
to
development
August 3, 2026 21:43 — with
GitHub Actions
Inactive
soamdesai-tfh
temporarily deployed
to
development
August 3, 2026 21:54 — with
GitHub Actions
Inactive
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.
First of three stacked PRs implementing single-metric World ID analytics (Unique Verifications across legacy v3 and v4 actions).
Scope
action_v3_stats_daily/action_v4_stats_dailymirror rollup tables (cascading FKs to their action parents), singletonworld_id_analytics_statewatermark, tracked empty return-shape tablerollup_world_id_analytics(): atomic dual-source absolute rebuild under advisory lock(533214,43), 5-minute safety delay, ~25h overlap horizon, monotonic watermark; deletion always wins races (FK failure aborts the run; the next 5-minute cron heals)world_id_analytics_app_daily(): STABLE combined v3+v4 app-day aggregation in PostgreSQL*/5cron trigger; protected/_rollup-world-id-analyticsroute behind a fail-closedWORLD_ID_ANALYTICS_ROLLUP_ENABLEDgate (cron no-ops unless it is exactly"true")CREATE INDEX CONCURRENTLYonnullifier(created_at)andnullifier_v4(created_at), plus backfill validation SQL. Neither index lives in the transactional migration — a plain build there would block verification inserts for the build duration while old pods still serve during a rolling deploy. The backfill gate refuses to run until both indexes are valid.Verification
pnpm test:world-id-analytics:freshtsc --noEmit; prettier cleanProduction rollout gates (deliberately outstanding, see the ops scripts): concurrent v3 + v4 index builds + validation, real backfill + canonical comparisons,
uses = 0evidence, production p95 vs latency budget,HASURA_GRAPHQL_STRINGIFY_NUMERIC_TYPES=trueverification.