sed: skip an input file that can't be read and exit with 2 #643
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.31) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.31 · 111 lines diff across 1 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.282
Real PR Conversation Timeline
1 comments
"Review active on #643"
general
weight: 0.35
qodelicious
When one of the input files can't be opened, GNU sed prints an error, carries on with the other files and exits with 2 at the end. We stopped at the first missing file with status 1, so nothing after it got processed.
Our sed printed only the error and returned 1.
Now the error is shown, the file is skipped and the exit status is 2. A few details I matched with GNU sed 4.9:
$still matches the last line of the last file that can actually be opened, sosed -n '$p' f missingprintsb.qsets another exit code later, like GNU does.Added
test_missing_input_file_is_skipped. It fails on main and passes with the change.cargo test,cargo fmt --checkandcargo clippy --all-targets --all-features -- -D warningspass.