Skip to content

runtime: the global body cap omits the configured single-row limit #328

Closed

Description

@allisonmahmood

Problem

Supported nondefault byte limits can reject an ordinary row before its intended per-operation limit is applied. Defaults are unaffected. The failure occurs when rowBytes + callBytes exceeds both batchBytes + callBytes and postgresBytes.

Reproduction

Set rowBytes=2048, batchBytes=512, callBytes=512 and postgresBytes=512 through the existing ConfigProvider keys. Insert a normal text row with 1212 encoded bytes and a 1381-byte full request.

bodyLimit('tables.insert'): 2560
maxCallBytes: 1024
insert: HTTP 413 too_large
small insert before/after: HTTP 200

Both agents exercised actual RuntimeApi, Runtime dispatch and TableOperations over disposable PGlite. The independent reviewer also changed only batchBytes to 128 KiB and reproduced refusal of a 300 KiB row that succeeds with defaults. Raising only postgresBytes made the original minimized row succeed, isolating the missing maximum term. This is an in-process HTTP-handler reproduction, not a live server test.

Cause and smallest change

Runtime.maxCallBytes takes max(batchBytes + callBytes, postgresBytes). The HTTP reader enforces that before operation dispatch. The correct later row-specific cap is therefore unreachable.

Include rowBytes + callBytes in the maximum, keeping the existing operation and stored-row checks. The independent configuration keys have no rowBytes <= batchBytes invariant. This is a nondefault configuration bug, not a request to raise default limits.

Audited at ef3e790. Found and independently checked by separate GPT-6 Astra agents in Oh My Pi. Only ordinary offline workflows and synthetic data were used.

Activity

  1. added
    bug
    needs-triage
    area:server
    on Sep 20, 2026
  2. added a commit that references this issue on Sep 24, 2026
    53c47b4
  3. added a commit that references this issue on Sep 24, 2026
    340cdc6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:serverbugneeds-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions