feat(zero-throughput): adapt for CloudZero with custom queries and transform endpoint - #6493
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
arv
approved these changes
Sep 5, 2026
aboodman
approved these changes
Sep 5, 2026
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.
Summary
Migrates
apps/zero-throughputfrom legacy ad-hoc queries and local permissions to modern typed custom queries (defineQueries/defineQuery) and introduces a Fastify query-transform/mutator app server modeled afterapps/zbugs.Key Changes
src/queries.ts,src/profile-queries.ts): Replaced raw client queries across all 4 profiles (feed-append,email,forum,relational) with parameterized custom queries usingzod/mini.api/index.ts,src/server.ts): Implemented/api/query(query transform viahandleQueryRequest),/api/mutate(no-op handler viahandleMutateRequest), and health endpoints. Can be deployed standalone or serverless. Note: There is currently no UI for this app.permissions.ts,deployPermissions(), andZERO_ALLOW_LEGACY_QUERIES.src/processes.ts,src/main.ts): Automatically spawns and manages the local app server when startingzero-cachelocally, wiringZERO_QUERY_URLandZERO_MUTATE_URLdirectly. When targeting external instances (e.g. CloudZero via--cache-url), no local app server is spawned.src/client.ts,src/analyze.ts): Passes user authentication headers/tokens during client connection handshake and extracts ASTs from named queries for query plan logging.Verification & Performance Impact
zero-cache; steady-state IVM pipeline throughput, client-visible lag, and advance durations remain unchanged.pnpm --filter zero-throughput run check-types && pnpm --filter zero-throughput run lintpassed.