Make response budget preflight failures actionable - #5022
Merged
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.
Summary
E028_RESPONSE_BUDGET_TOO_SMALLJSON for object, bounded-envelope, and NDJSON preflight failuresorigin/mainatf12e8f8a8, preserving both the main-side query-freshness accounting and this PR's structured response-budget errorsRoot cause
Response-size preflight failures bypassed the normal machine error writer and emitted human-readable stderr (or empty stdout). Clamped budgets and reserialized pretty payloads could also recommend retries that were impossible or still too small.
The CI failure was a stale regression assertion: the old Issue #4561 test still expected empty stdout and human-readable stderr for a one-byte NDJSON budget, while the Issue #4909 contract intentionally returns structured E028 JSON on stdout.
Validation
dotnet build CodeIndex.sln -c Debug --no-restore -p:UseSharedCompilation=falsedotnet build CodeIndex.sln -c Release --no-restore -p:UseSharedCompilation=falsedotnet format CodeIndex.sln --no-restore --verify-no-changesdotnet run --project tools/CodeIndex.Changelog -- check(92 fragments)Documentation and changelog
changelog.d/unreleased/4909.fixed.mdFixes #4909
Follow-up: #5015
Follow-up: #5019