Skip to content

Fix: validate AppQC/CommitQC index alignment#2865

Merged
wen-coding merged 4 commits intomainfrom
wen/port_pr_509
Feb 13, 2026
Merged

Fix: validate AppQC/CommitQC index alignment#2865
wen-coding merged 4 commits intomainfrom
wen/port_pr_509

Conversation

@wen-coding
Copy link
Contributor

Summary

  • Reject mismatched AppQC/CommitQC indices and surface errors.
  • Propagate prune errors to avoid silent state corruption.
  • Add regression tests for mismatched QC handling.
  • Port of sei-v3 PR Bump lib version for rollback fixes #509.

Test Plan

  • go test ./sei-tendermint/internal/autobahn/...

Made with Cursor

Ported sei-v3 PR #509 to reject mismatched QCs and add regression tests for pruning behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions
Copy link

github-actions bot commented Feb 11, 2026

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedFeb 13, 2026, 5:24 PM

@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 68.75000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 57.17%. Comparing base (246e482) to head (ae3cfd9).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
sei-tendermint/internal/autobahn/avail/state.go 54.54% 3 Missing and 2 partials ⚠️
Additional details and impacted files

Impacted file tree graph

@@            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     
Flag Coverage Δ
sei-chain 52.64% <68.75%> (-0.02%) ⬇️
sei-cosmos 48.16% <ø> (ø)
sei-db 68.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
sei-tendermint/internal/autobahn/avail/inner.go 91.42% <100.00%> (+0.51%) ⬆️
sei-tendermint/internal/autobahn/avail/state.go 72.46% <54.54%> (-0.76%) ⬇️

... and 31 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>
Copy link
Contributor

@arajasek arajasek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me!

@wen-coding wen-coding enabled auto-merge (squash) February 13, 2026 17:23
@wen-coding wen-coding merged commit 7407960 into main Feb 13, 2026
41 of 42 checks passed
@wen-coding wen-coding deleted the wen/port_pr_509 branch February 13, 2026 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants