Fix: validate AppQC/CommitQC index alignment#2865
Conversation
Ported sei-v3 PR #509 to reject mismatched QCs and add regression tests for pruning behavior. Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2865 +/- ##
==========================================
- Coverage 57.19% 57.17% -0.02%
==========================================
Files 2091 2091
Lines 171514 171524 +10
==========================================
- Hits 98089 98063 -26
- Misses 64681 64706 +25
- Partials 8744 8755 +11
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
Run gofmt -s on inner_test.go to satisfy lint. Co-authored-by: Cursor <cursoragent@cursor.com>
| // We replace the CommitQC at index 0 with a CommitQC that has a different index (index 1). | ||
| qc1 := makeQC(utils.Some(qc0), nil) | ||
|
|
||
| for inner, ctrl := range state.inner.Lock() { |
There was a problem hiding this comment.
I haven't previously paid attention to this test. Why are we corrupting the internal state here? Can we somehow create a realistic scenario instead?
There was a problem hiding this comment.
That's a good point, my first time using Cursor and I found out AI can add unnecessary tests. This should be covered under QC verify, removing these tests.
Keep mismatch coverage focused on incoming AppQC/CommitQC pairing. Co-authored-by: Cursor <cursoragent@cursor.com>
arajasek
left a comment
There was a problem hiding this comment.
Seems reasonable to me!
Summary
Test Plan
go test ./sei-tendermint/internal/autobahn/...Made with Cursor