Repository navigation
feat: enforce 500KB size limit on raw image buffer ingestion - #28
Merged
REX-codebase merged 1 commit intoJul 18, 2026
Conversation
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.
Problem & Context
Currently, our system processes image buffers without validating their file size at ingestion. This allows unoptimized assets (greater than 500KB) to bypass performance gates and proceed to decoding, which degrades system performance and compromises our Largest Contentful Paint (LCP) targets.
To protect system stability and performance, we need a strict, low-overhead guardrail that halts the processing of oversized assets immediately.
Key Decisions & Rationale
buffer.length) as the very first step, we fail-fast and prevent costly decompression cycles for oversized files.500 * 1024bytes) for binary precision. Softer targets, such as the 100KB sustainability budget, are deliberately omitted from this blocker and reserved for downstream soft-auditing tiers.Changes Made
Verification Results