spec tests: enable msg processing root check#2692
Conversation
Greptile SummaryThis PR upgrades the post-duty runner state root check in
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[RunAsPartOfMultiTest] --> B[runPreTesting: process messages]
B --> C[Assert error codes]
C --> D[Compare output messages]
D --> E[Assert beacon broadcasted roots]
E --> F[Compute postRoot via GetRoot]
F --> G{PostDutyRunnerStateRoot == actualPostRoot?}
G -- Yes --> H[Test passes]
G -- No --> I[dumpState: compute diff]
I --> J_OLD["BEFORE: logger.Error — test passes silently ❌"]
I --> J_NEW["AFTER: require.EqualValues — test fails ✅"]
Last reviewed commit: c886984 |
| if test.PostDutyRunnerStateRoot != actualPostRoot { | ||
| diff := dumpState(t, test.Name, test.Runner, test.PostDutyRunnerState) | ||
| logger.Error("post runner state not equal", zap.String("state", diff)) | ||
| require.EqualValues(t, test.PostDutyRunnerStateRoot, actualPostRoot, "post runner state not equal\n%s\n", diff) | ||
| } |
There was a problem hiding this comment.
Inconsistent root check in sibling file
Similar root mismatch check in committee_msg_processing_type.go:86-88 still uses t.Errorf (which marks the test as failed but does not stop execution), rather than require.EqualValues (which calls t.FailNow()). Consider applying the same upgrade there for consistency across spec tests.
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
@greptileai now it's consistent with multi_start_new_runner_duty_type.go
Codecov Report✅ All modified and coverable lines are covered by tests. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
We currently don't fail spec tests on root mismatch in
MsgProcessingSpecTest