improve interoperability with stdlib sentinel errors and deprecate aliases #392
All Vouch review confidence checks passed
Residual risk 0.08 = Change Risk (0.39) × (1 − Review Confidence (0.80)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.39 · 120 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.69 · 5 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 50%
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.287
Real PR Conversation Timeline
8 items
cc @jterry75 PTAL 🤗
Let me add a small unit-test for this, to assert we're matching the various sentinel errors.
👍 done 😅
Approved
Approved these changes.
Derp: of course linter has something to say 🤣
I'll have a look at making it happy when I get back to my computer
@jterry75 fixed the linting issues (helps to run golangci-lint with GOOS=windows 😂 )
Approved
Approved these changes.
jterry75
thaJeztah
deprecate ErrPipeListenerClosed in favor of net.ErrClosed
This error was made an alias in 02e8aff16e653a6639ae0c91b566abd4a0129a4f.
Deprecate the alias in favor of stdlib.
updates 02e8aff16e653a6639ae0c91b566abd4a0129a4f
deprecate ErrFileClosed in favor of os.ErrClosed
ErrFileClosed represents the same condition as os.ErrClosed. Use the
standard library sentinel directly and deprecate the package-specific
name.
This also allows callers to consistently use errors.Is(err, os.ErrClosed)
for operations on closed files.
file: make ErrTimeout unwrap os.ErrDeadlineExceeded
timeoutError.Unwrap returns os.ErrDeadlineExceeded so that callers can
use errors.Is(err, os.ErrDeadlineExceeded) for portability with the
standard library and other packages that check for deadline errors.
The ErrTimeout sentinel value and its Error/Timeout/Temporary methods
are unchanged, so this is fully backwards compatible.
remove errPipeWriteClosed in favor of io.ErrClosedPipe
Replace the private errPipeWriteClosed error with io.ErrClosedPipe.
The previous error was not exported, so callers could not reliably use it
as a sentinel. Its error string was technically observable, but a search
did not find consumers depending on that specific message.
Using io.ErrClosedPipe aligns this case with the standard library and gives
callers a stable error they can identify with errors.Is.