Skip to content

feat(api): resolve declares its payload limit, its latency and its metering (#1365) - #1431

Merged
athvin merged 1 commit into
mainfrom
feat/1365-resolve-limit
Nov 29, 2026
Merged

athvin merged 1 commit into
mainfrom
feat/1365-resolve-limit

Conversation

@athvin

@athvin athvin commented Nov 29, 2026 •

Copy link
Copy Markdown
Owner

Closes #1365

Post-merge is part of this pull request. The ledger below records whether
the follow-up work actually happened. /land-pr closes it.

What

#529's three leftovers for online resolve:

  • Payload limit: one record per call. A serialized record over 32 KiB is a 413 from the handler, checked before any lake or Postgres work. A body over 64 KiB is a 413 from the extractor. The contract now lists 413.
  • Latency, measured: p50 2092 ms, p95 2199 ms at about 520k standardized records on er-dev.
  • Metering: resolve calls don't count toward the record allowance.

All three are recorded in api-contract's launch-readiness.

Why

These needed a measurement or a contract choice, not just code. The latency points at per-request corpus setup, so the optimisation is its own ticket, #1429.

Proof

make check exit 0. A PG-less router test, resolve_refuses_an_oversized_record_and_body, covers both 413s and the pass-through: the record limit sits below the body limit, so its 413 can only come from the handler. The latency is from 55 real calls on er-dev against p3live, after 5 warm-ups; all 60 returned 200. Regenerated the contract artifacts.

Risk & rollback

A record over 32 KiB is now refused; real records are a few hundred bytes. Rollback: git revert <merge-sha>.

Post-merge ledger

Closed by: agent · session Claude Code:24d16c2e-fec6-49d8-9797-060338df4848 on brians-MacBook-Pro · 2026-11-29T11:24:11Z

Specific to this change

Context — plan, discoveries, measurements, files

Plan

Discoveries

Measurements

Files

Measured with p3live resumed for the run and suspended straight after, so no job could hold the lake across a deploy.

🤖 Generated with Claude Code

…tering (#1365)

#529 left three parts of online resolve as a measurement or a contract
choice.

- Payload limit: one record per call, with a 413 for a serialized record
  over 32 KiB (checked before any lake or Postgres work) and a 413 from
  the extractor for a body over 64 KiB. The contract now lists 413. A
  PG-less router test covers both and the pass-through.
- Latency, measured on er-dev at ~520k standardized records over 55
  calls: p50 2092 ms, p95 2199 ms. It is per-request corpus setup, not
  scoring, and the optimisation is #1429.
- Metering (decided in #529, written down here): resolve calls do not
  count toward the record allowance, because they write nothing.

api-contract's launch-readiness records all three.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

The marketing preview was removed because this PR is closed or merged.

@athvin
athvin merged commit 4ed0767 into main Nov 29, 2026
45 checks passed
@athvin
athvin temporarily deployed to marketing-preview November 29, 2026 10:41 — with GitHub Actions Inactive

This branch was previously deployed

1 inactive deployment
marketing-preview — b628a352 Deployed Nov 29, 2026 by athvin via remove closed PR previews #160
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resolve API: measure latency, declare a payload limit, record the metering decision

2 participants