mirror of
https://github.com/morluto/rea.git
synced 2026-10-23 14:22:30 -05:00
scanRecoveryFile raised a plain AnalysisOutputError when a selected file exceeded the remaining operation-wide input allowance, and snapshotRecoveryInput folded that, read failures and UTF-8 decode failures into one invalid_value request issue. A 64 MiB + 1 input was therefore reported as a retryable invalid argument whose only record of the 67108864-byte budget was message text that also called it an invalid analysis output, and malformed UTF-8 received the same reason. The scanner now marks its byte-bound refusals with the bound it enforced. snapshotRecoveryInput, which owns the meaning of that bound as the remaining total input allowance, reports it as a non-retryable file-size AnalysisResourceConstraintError with maximum_input_bytes and remaining_input_bytes, and decodes UTF-8 separately as an invalid_format issue. Other scanner consumers still receive an AnalysisOutputError, and the limit stays enforced. Fixes #4629 Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>