Skip to content

fix(compression): propagate hard-budget unreachable-target warning through the stacked seam (follow-up #5288) - #5291

Merged
diegosouzapw merged 1 commit into
release/v3.8.40from
fix/hard-budget-warning-propagation
Jun 29, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.40from
fix/hard-budget-warning-propagation

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

Summary

Follow-up to #5288 (roadmap #17 hard-budget). The deep review of #5288 found one low-severity gap that shipped: the unreachable-budget validationWarnings is dropped through the stacked-pipeline seam.

applyStackedCompression/...Async gate the warning merge on if (hbResult.compressed). When every unit is preserve-guarded, hard-budget drops nothing → compressed === false → the validationWarnings (the "could not reach target" diagnostic, #5288's own fix #3) are never merged into the accumulator. So through the production stacked path the warning is silently swallowed; it only surfaced when callers invoked applyHardBudget directly.

Fix

Merge the warnings on the else branch in both the sync and async stacked seams (strategySelector.ts), so the advisory surfaces even when no unit could be dropped.

Validation (TDD)

Added a regression test that drives an all-preserve-guarded body through applyStackedCompression and asserts the warning propagates (fails without the fix, passes with it). hard-budget.test.ts 19/19, typecheck clean, file-size OK.

Low severity — advisory diagnostic only, fail-open intact, body passes through unchanged either way; this just restores the stated "warn instead of fail silently" guarantee in the production path.

…rough the stacked seam

The seam gated the validationWarnings merge on hbResult.compressed, so when every unit is
preserve-guarded (nothing dropped, compressed=false) the #17 'warn instead of fail silently'
guarantee was lost through applyStackedCompression. Merge the warnings on the else branch in
both the sync and async stacked paths + add a propagation regression test.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@diegosouzapw
diegosouzapw merged commit 4008bdc into release/v3.8.40 Jun 29, 2026
7 checks passed
@diegosouzapw diegosouzapw mentioned this pull request Jun 29, 2026
@diegosouzapw
diegosouzapw deleted the fix/hard-budget-warning-propagation branch June 29, 2026 14:08
tkgo11 pushed a commit to tkgo11/OmniRoute that referenced this pull request Sep 23, 2026
…rough the stacked seam (diegosouzapw#5291)

Follow-up to diegosouzapw#5288: propagate the hard-budget unreachable-target warning through the stacked seam (else branch in both sync/async paths) + TDD propagation test. Integrated into release/v3.8.40.
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.

1 participant