evm: Add abort_unless() for API contract violations in all builds #1884
All Vouch review confidence checks passed
Residual risk 0.08 = Change Risk (0.50) × (1 − Review Confidence (0.83)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 67 lines diff across 6 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.90 · 2 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.252
Self Review
self_review
0.140
Real PR Conversation Timeline
2 comments
lib/evmone/vm_context.cpp
"Duplicates the assert below. Replace the assert actually with abost_unless. Keep he comment."
test
weight: 0.55
lib/evmone/vm_context.hpp
"Skip this change."
clarifying
weight: 0.45
chfast
Add abort_unless(condition, message), an inline test that calls the cold, out-of-line fatal_error(), which prints the message to stderr and aborts. Unlike assert(), it stays in release builds. Use it for violations of the API contract by the caller and for resource exhaustion.
Check the call depth of an execution: a caller passing a message with depth above 1024 now aborts the process. Previously, the execution state was taken from outside the reserved storage. The memory allocation failure now aborts via fatal_error() instead of std::terminate().