You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
runtime.postgres.bytes caps the size of a Postgres operation's arguments, such as a raw query's SQL and parameters. Only the browser runtime path enforces it: tier 1 calls through the broker go through Runtime.ts. Tier 2 handlers reach Postgres through the callback gateway (packages/runtime/src/CallbackGateway.ts), which never checks that limit. A tier 2 action can therefore send Postgres arguments larger than the documented contract limit, bounded only by the gateway's general per-call byte cap.
Found while building the PostHog integration. That PR (#662) enforces the equivalent runtime.posthog.bytes on both paths; Postgres was left as it was, to keep that PR to one concern.
Fix
Apply runtime.postgres.bytes to postgres.* callbacks in the gateway, refusing with the same too_large refusal tier 1 gives. Add a tier 2 test beside the existing tier 1 one.
Activity
fix(runtime): tier 2 Postgres calls honor the argument size limit