Return the allocated buffer size through *buf_size in the ZSTD filter #310
All Vouch review confidence checks passed
Residual risk 0.13 = Change Risk (0.33) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.33 · 159 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 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
Diff Size
diff_size
0.304
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #310"
general
weight: 0.35
nhz2
Split out of #290 so that PR only fixes #289 (allocator mismatch). This PR is stacked on #290's branch; after #290 merges, I'll retarget it to
master.Summary
buf_size(H5Zdevelop.h). The compress path allocatedZSTD_compressBound()bytes but reported the compressed size. It now reports the allocated size, and the return value stays the number of valid bytes.buf_size_outis the allocated size written tobuf_size, andnbytes_outis the return value (the number of valid bytes, matching thenbytesinput).In current HDF5 this has no visible effect: of the built-in filters, only deflate reads the incoming
*buf_size, and only when decompressing, where ZSTD's value was already exact.Testing
Against HDF5 develop (30c756c) with zstd: the plugin builds with no warnings in
H5Zzstd.c(-Wall -Wextra), and the ZSTD ctests pass 5/5. Earlier testing of this change (data round trips, ZSTD followed by Fletcher32, AddressSanitizer) is in the review thread on #290.