fix(testing): remove ignored StateTest engine_api_error_code#2740
Conversation
|
yes |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #2740 +/- ##
===================================================
+ Coverage 86.26% 86.47% +0.21%
===================================================
Files 599 599
Lines 37038 37632 +594
Branches 3795 3795
===================================================
+ Hits 31949 32542 +593
- Misses 4525 4526 +1
Partials 564 564
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
interesting, CI passed. maybe it is fine to go ahead with this after all |
|
I've reviewed it again, and I now think the upside is mostly API cleanup while the downside is downstream compatibility risk — so I lean toward not making the change. The benefit seems smaller than the risk. |
🗒️ Description
Remove
engine_api_error_codefromStateTest.StateTestcurrently exposesengine_api_error_code, but the value is silently dropped during theStateTest -> Blockconversion in state.py. The native state-fixture path does not consume it either, so the current API advertises a field that is effectively ignored.This field no longer matches the current codebase's abstraction:
engine_api_error_codeis modeled as block/payload metadata in blockchain.py and fixtures/blockchain.pyBlock(...), notStateTest(...)block_exception, it is not wired through_generate_blockchain_blocks()and has no in-treeStateTest(...)call sitesRemoving the field makes the API honest and avoids a footgun where a test author can specify an Engine API error expectation that is silently ignored. With BaseTest configured as
extra="forbid", unsupported usage will fail fast at model construction rather than being silently ignored.🔗 Related Issues or PRs
N/A.
✅ Checklist
just statictype(scope):.Cute Animal Picture