Publish S3 dataset cache files atomically #745
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 239 lines diff across 2 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.328
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #745"
general
weight: 0.35
MarkWolters
Summary
Fix a shared-cache race in the benchmark dataset loader's S3 download path.
Currently, S3 downloads write directly to the final cache filename.
ensureFileAvailableaccepts an existing path as a cache hit, so another process can use a partially downloaded file. A killed process can leave that partial file at the cache name. Failed attempts also delete the shared destination, potentially removing another process's completed download.Each S3 attempt now downloads to a unique temporary file in the destination directory. After completion and the existing content-length check, it atomically renames that file to the cache path. Failures delete only their own temporary file. HTTP already uses atomic publication and is unchanged.
This is based on current main
056d93c2. It changes the examples dataset loader only.Validation
Limits
Concurrent callers may still download the same object independently; publication is atomic rather than serialized by a new locking mechanism. Hard termination may leave an ignored temporary file. Existing cached files are not retroactively validated, so previously interrupted downloads should be removed before reuse.
A bug-fix release note is included.