Repository navigation
fix(redis): give chat its own per-user byte budget and name sizes in payload-limit errors - #10219
Merged
Merged
Conversation
…payload-limit errors
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Contributor
[Medium impact] This appears safe to merge; no actionable issues were found. SummaryChat now has its own per-user Redis byte budget, and payload-limit errors show useful sizes and advice.
waleedlatif1 explicitly accepts the higher combined allowance and temporary over-counting during cutover. No actionable issues found. Tests were not run during this review.
|
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 7 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
…nt a size equal to the limit
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
user:<id>key, so counters already in flight still apply. Chat moves tocopilot_stream_user:<id>. During cutover, a refund to the new key just deletes it, which over-counts in the safe direction.ExecutionResourceLimitErrorforexecution_payload_bytesnow names the value's size and the limit, and says what to change. Before, a function reading a 28 MB loop output saw only "Execution memory limit exceeded. Reduce payload size and try again.", so both the user and Chat kept re-running a workflow that could never fit. Redis-budget refusals keep the generic text, because their byte counts describe a write chunk, not anything the user controls.Type of Change
Testing
replay-budget.integration.tscase against real Redis and Postgres: the user's execution counter is held at its full ceiling and a Chat turn completes. Red on the old shared key layout (expected ['error','complete'] to not include 'error'), green on the fix, 24/24.execute-request.test.tscase drives the realsim.values.readbroker with a 28 MB value ref. Red on the old message, green on the new one.byte-budget.server.test.tsandbuffer.test.tsfor the per-kind key. The cleared-buffer check now allow-lists exactly the owner key.lib/core/redis,lib/execution,lib/mothership/request/session,lib/function-execution,app/api/workflows,lib/logs/execution,lib/uploads/utilsandlib/workflows/streaming: 1,975 passed. Biome is clean. CI runs type-check andcheck:audits.Checklist
test-auditauthoring gate)