feat(core): trace deliberate cancels as cancelled run status #12188
All Vouch review confidence checks passed
Residual risk 0.19 = Change Risk (0.36) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 197 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 #12188"
general
weight: 0.35
mangeshraut712
LangChainTracernow sends an explicit runstatus(cancelled/interrupted) for deliberate stops, so a user-cancelled run is no longer traced as a plain error.ExpectedCancellationerror in@langchain/core/errors. Abort a run with it (controller.abort(new ExpectedCancellation())) to mark the stop as deliberate.statusfrom the same error that setsrun.error, and finds the marker on an error'scausechain. A later plain error clears an earliercancelled, so the two never disagree.@langchain/coretakes no LangGraph dependency.Compatibility
statusis only sent once the installedlangsmithclient forwards it on run patches; olderlangsmithversions ignore it, so behavior is unchanged until then. No change to thelangsmithpeer range yet; the minimum version will be recorded once that release is out.Related: langgraphjs#3329.
Release note
LangChainTracertraces runs aborted withExpectedCancellationascancelled, and LangGraph interrupts asinterrupted._This PR was written with an AI coding agent._