feat(miniflare): emit `Cf-Resized` error header on `cf.image` fail-open and support `quality`/`flip`/`blur`/`sharpen` #17219
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.36) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 195 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.316
Real PR Conversation Timeline
1 comments
"Review active on #17219"
general
weight: 0.35
NuroDev
Problem
1. When local
cf.imagefails to transform an origin image (e.g. corrupt/non-image body or unsupported SVG), Miniflare fails open to the source bytes with HTTP 200 but omits theCf-Resized: err=<code>header that production sets—makingCf-Resizederror-checking untestable locally.2. Local Sharp transforms ignored
output({ quality })on theenv.IMAGESbinding as well asflip,blur, andsharpenon bothenv.IMAGESandcf.image.Before / After
cf-resized: err=<code>oncfImageError()(9412decode/transform failure,9520SVG input,9401malformed request,9523Sharp unavailable) and forwards it inoutbound.worker.tson fail-open.output_qualityinimagesLocalFetcherand passes{ quality }to Sharpjpeg()/webp()/avif().flip(h/v/hv),blur, andsharpenin bothrunTransform()andapplyCfImageTransforms().<!-- devin-review-badge-begin -->
---
<a href="https://cloudflare.devinenterprise.com/review/cloudflare/workers-sdk/pull/17219" target="_blank"><picture><source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-devin-review-dark.svg?v=4"><img src="https://static.devin.ai/assets/gh-devin-review-light.svg?v=4" alt="Devin Review"></picture></a>
<!-- devin-review-badge-end -->