Skip to content

Make response budget preflight failures actionable - #5022

Merged
Widthdom merged 4 commits into
mainfrom
fix-issue4909
Aug 1, 2026
Merged

Make response budget preflight failures actionable#5022
Widthdom merged 4 commits into
mainfrom
fix-issue4909

Conversation

@Widthdom

@Widthdom Widthdom commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • emit stable E028_RESPONSE_BUDGET_TOO_SMALL JSON for object, bounded-envelope, and NDJSON preflight failures
  • report raw requested/effective/minimum bytes, explicit uncertainty, the actual 16 MiB ceiling, and actionable increase-or-reduce retry guidance
  • preserve pretty-output retry sizing, capture bounded inner stderr into structured errors, and add bilingual docs plus regression coverage for zero/tiny/exact-minimum/Unicode/duplicate-option/shared-consumer cases
  • align the pre-existing Issue Standardize terminal records and exit status for truncated streaming output #4561 NDJSON hard-cap regression with the structured E028 preflight contract after CI exposed its stale stdout/stderr expectation
  • incorporate latest origin/main at f12e8f8a8, preserving both the main-side query-freshness accounting and this PR's structured response-budget errors

Root 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

Documentation and changelog

  • bilingual user/developer/test documentation updated
  • changelog fragment: changelog.d/unreleased/4909.fixed.md

Fixes #4909

Follow-up: #5015
Follow-up: #5019

@Widthdom
Widthdom marked this pull request as ready for review August 1, 2026 08:32
@Widthdom
Widthdom merged commit d41700d into main Aug 1, 2026
12 checks passed
@Widthdom
Widthdom deleted the fix-issue4909 branch August 1, 2026 08:32
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.

Keep bounded-response preflight failures machine-readable and actionable

1 participant