Skip to content

fix(api): restore legacy endpoint compatibility - #6552

Merged
TheodoreSpeaks merged 1 commit into
stagingfrom
fix/legacy-usage-limits-contract
Aug 11, 2026
Merged

fix(api): restore legacy endpoint compatibility#6552
TheodoreSpeaks merged 1 commit into
stagingfrom
fix/legacy-usage-limits-contract

Conversation

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator

Summary

  • restore the legacy usage-limits rate-limit response
  • preserve the legacy table-group auto-run default
  • accept log cursors issued before order binding

Type of Change

  • Bug fix

Testing

  • 10 focused tests
  • full lint and 24 CI audits
  • Sim typecheck and block-registry checks

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 11, 2026 6:51pm

Request Review

@cursor

cursor Bot commented Aug 11, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches authenticated usage/rate-limit responses and table group execution defaults; changes restore documented legacy behavior and are covered by focused route/contract tests.

Overview
Restores backward-compatible behavior on three APIs that had regressed, with contracts and tests to keep the shapes stable.

GET /api/users/me/usage-limits again returns the full legacy payload: sync/async rate-limit status (via RateLimiter), usage, and storage, with authType set to api vs manual from hybrid auth. Request validation runs after auth (401 before billing/rate-limit reads). The response is enforced through a strict usageLimitsResponseSchema instead of a loose passthrough contract.

POST /api/table/[tableId]/groups maps autoRun with body.autoRun ?? true, so omitted autoRun keeps the legacy default of auto-run while autoRun: false still opts out.

Public workflow log pagination accepts legacy cursors that only contain startedAt and id by treating missing order as the caller’s expectedOrder, instead of rejecting them.

Reviewed by Cursor Bugbot for commit ad665ca. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Restores three legacy API behaviors without changing their established authentication boundaries.

  • Restores rate-limit details in the usage-limits response and validates the complete response contract.
  • Preserves the first-party table-group auto-run default while honoring explicit opt-out.
  • Allows pre-order-binding log cursors to continue under the requested order.
  • Adds focused route, contract, and cursor compatibility tests.

Confidence Score: 5/5

The PR appears safe to merge, with no actionable changed-code defects identified.

The restored defaults and response fields match established legacy contracts, rate-limit status retrieval fails softly, explicit modern cursor order binding remains enforced, and focused tests cover the compatibility paths.

Important Files Changed

Filename Overview
apps/sim/app/api/table/[tableId]/groups/route.ts Restores the legacy omitted-value default for the one-shot group auto-run input while preserving explicit false.
apps/sim/app/api/users/me/usage-limits/route.ts Restores synchronous and asynchronous rate-limit status fields after authentication and validates the assembled legacy response.
apps/sim/lib/api/contracts/usage-limits.ts Replaces the permissive usage-limits response contract with a strict schema matching the restored endpoint and SDK shape.
apps/sim/lib/logs/public-queries.ts Accepts orderless legacy cursors by binding them to the request order while retaining mismatch rejection for modern order-bound cursors.

Reviews (1): Last reviewed commit: "fix(api): restore legacy endpoint compat..." | Re-trigger Greptile

@TheodoreSpeaks
TheodoreSpeaks merged commit 061ecd3 into staging Aug 11, 2026
29 checks passed
@TheodoreSpeaks
TheodoreSpeaks deleted the fix/legacy-usage-limits-contract branch August 11, 2026 19:12
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.

1 participant