fix(runtime): propagate storage error when reading promise yield indices - #16192
fix(runtime): propagate storage error when reading promise yield indices#16192stedfn wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #16192 +/- ##
==========================================
- Coverage 73.69% 73.68% -0.01%
==========================================
Files 864 864
Lines 192209 192230 +21
Branches 192209 192230 +21
==========================================
+ Hits 141642 141652 +10
- Misses 46085 46094 +9
- Partials 4482 4484 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Pull request overview
Changes:
Reviewed changesPer-file summary
FindingsNo blocking issues. The fix is well-scoped, the helper's own contract ( ✅ Approved |
Greptile SummaryThe PR stops treating storage failures while reading promise-yield indices as an empty queue, ensuring incomplete state witnesses fail validation while preserving the absent-key behavior.
Confidence Score: 5/5The PR appears safe to merge, with the corrected error propagation and unchanged absent-key behavior covered by targeted tests. The runtime now surfaces missing or invalid storage needed for promise-yield queue maintenance instead of silently resetting indices, while the helper continues to default only a genuinely absent key. Reviews (1): Last reviewed commit: "fix(runtime): propagate storage error wh..." | Re-trigger Greptile |
| &epoch_info_provider, | ||
| Default::default(), | ||
| ) | ||
| .unwrap(); |
There was a problem hiding this comment.
Consider adding an assert_matches!(apply_result.outcomes[0].outcome.status, ExecutionStatus::SuccessValue(_)); here
Otherwise if the yield call ever stops succeeding the test would pass without covering the fix
action_function_callread the promise yield indices with.unwrap_or_default(), which swallows anyStorageError, not just a missing key. The helper already returns the default for a genuinely absent key, so the read now propagates with?.No change on the absent-key path, and no protocol change.
Tests:
test_promise_yield_indices_missing_trie_value_not_swallowedreplays a call over a proof with the indices value removed, and asserts the error reaches the caller.test_promise_yield_indices_absent_key_still_applieschecks a non-yield call still succeeds when the key was never written.