Skip to content

chore(knowledge): tighten the comments on the quota classification - #6870

Closed
waleedlatif1 wants to merge 1 commit into
stagingfrom
chore/tighten-embedding-comments
Closed

chore(knowledge): tighten the comments on the quota classification#6870
waleedlatif1 wants to merge 1 commit into
stagingfrom
chore/tighten-embedding-comments

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Follow-up to #6868, which merged before the comments could be shortened.

The TSDoc there explained the incident that motivated the change rather than the code, which is the kind of thing that stops being true and starts misleading. Trimmed to the reason a reader needs:

  • isQuotaExhaustionBody — keeps "OpenAI returns 429 for both, but only a rate limit reopens"; drops the retelling of the sweep behaviour.
  • isWorthRetrying — keeps the distinction that actually shapes the code, retry against the same provider versus failing over to a different one.
  • quotaExhausted — one line.
  • The quota regression test — two lines instead of five.

No behaviour change; comments only. 86 embedding tests pass.

@vercel

vercel Bot commented Aug 19, 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 19, 2026 10:48pm

Request Review

@cursor

cursor Bot commented Aug 19, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Documentation-only edits in embedding client comments and tests; no logic, API, or configuration changes.

Overview
Follow-up comment-only cleanup in the embeddings client after #6868. No runtime or test behavior changes—only TSDoc and test block comments are shortened.

In client.ts, comments on quotaExhausted, isQuotaExhaustionBody, and isWorthRetrying drop long incident/sweep narratives and keep what readers need: OpenAI’s 429 can mean rate limit vs exhausted balance, only rate limits reopen, and same-provider retry vs failover are decided by different helpers.

The quota regression test comment in client.test.ts is trimmed from five lines to two with the same intent.

Reviewed by Cursor Bugbot for commit 906757c. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR shortens quota-classification documentation without changing executable behavior.

  • Condenses comments describing exhausted-quota classification and the distinction between retrying and provider failover.
  • Shortens the exhausted-balance regression-test explanation.

Confidence Score: 5/5

The PR appears safe to merge because it changes comments only and introduces no actionable defect.

The executable embedding client and its tests are unchanged; the edited comments preserve the existing retry and failover descriptions.

Important Files Changed

Filename Overview
apps/sim/lib/embeddings/client.ts Shortens documentation around quota exhaustion and retry eligibility without modifying runtime logic.
apps/sim/lib/embeddings/client.test.ts Condenses an existing regression-test comment without changing setup or assertions.

Reviews (1): Last reviewed commit: "refactor(knowledge): tighten the comment..." | Re-trigger Greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

Folding this into #6869 rather than spending a PR on a comment trim.

@waleedlatif1
waleedlatif1 deleted the chore/tighten-embedding-comments branch August 19, 2026 22:56
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