Skip to content

Cover the orphan index entry under ABCI queries too - #4695

Merged
masih merged 1 commit into
mainfrom
masih/1793369212-orphan-test-abci
Oct 30, 2026
Merged

masih merged 1 commit into
mainfrom
masih/1793369212-orphan-test-abci

Conversation

@masih

@masih masih commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

TestGRPCQueryValidatorDelegationsOrphanIndexEntry, added in #4688, only ran in the consensus context, which pages the delegation-by-validator index through FilteredPaginateV66. ABCI queries page it through FilteredPaginate instead, so the check that an index entry without its delegation returns Internal had no coverage on that path.

The test now runs under both abciQuery values, like TestGRPCQueryValidatorDelegationsScanCursorAfterIndexReady beside it. Test-only, with no consensus or state impact. Both subtests fail with the nil guard in validatorDelegationsFromIndex removed.

@devin-ai-integration

Copy link
Copy Markdown
Contributor

I'll fix CI failures and address comments from users with write access that start with 'Devin'.

  • Disable automatic comment, CI, and merge conflict monitoring

@masih
masih marked this pull request as ready for review October 30, 2026 14:09
@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedOct 30, 2026, 2:10 PM

@cursor

cursor Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Only test code changes; no consensus, state, or query handler behavior is modified in this PR.

Overview
Test-only change: TestGRPCQueryValidatorDelegationsOrphanIndexEntry now runs in both consensus and ABCI query contexts (abciQuery=false and true), matching TestGRPCQueryValidatorDelegationsScanCursorAfterIndexReady.

Each subtest calls SetupTest, sets ctx.WithIsABCIQuery(abciQuery), seeds an orphan delegation-by-validator index entry, and still expects ValidatorDelegations to return Internal instead of panicking. This closes a coverage gap where ABCI paging uses FilteredPaginateForContext / FilteredPaginate rather than the consensus FilteredPaginateV66 path.

Reviewed by Cursor Bugbot for commit 3b6469d. Bugbot is set up for automated code reviews on this repo. Configure here.

@seidroid seidroid Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The change is test-only. It runs TestGRPCQueryValidatorDelegationsOrphanIndexEntry under both abciQuery values, so an index entry with no delegation is now checked on the FilteredPaginate (ABCI) path as well as FilteredPaginateV66. FilteredPaginateForContext routes on ctx.IsABCIQuery(), so both subtests reach the nil guard in validatorDelegationsFromIndex, and the per-subtest SetupTest() copies the sibling test; I found nothing blocking. Codex reported no findings, and I agree, so it added nothing to keep or drop. The test was not run because there is no Go toolchain in the sandbox.

seidroid review · decision approve · session 7c65cae568524ed49e3af773fb2f0df2 · turn resp_claude_720e510378a6586b7995d04432d043d4 · item 130b7db25d445e7a94d1e0b0b26ea53e

Findings: 0 blocking | 0 non-blocking | 0 posted inline

@codecov

codecov Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.26%. Comparing base (2949d8d) to head (3b6469d).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4695      +/-   ##
==========================================
- Coverage   60.26%   60.26%   -0.01%     
==========================================
  Files        2027     2027              
  Lines      158078   158078              
==========================================
- Hits        95270    95265       -5     
- Misses      62803    62808       +5     
  Partials        5        5              
Flag Coverage Δ
sei-chain 58.30% <ø> (-0.01%) ⬇️
sei-db 75.17% <ø> (ø)
sei-db-state-db 81.15% <ø> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 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.

@alexander-sei
alexander-sei self-requested a review October 30, 2026 14:16
@masih
masih enabled auto-merge October 30, 2026 14:19
@masih
masih added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 4308c28 Oct 30, 2026
74 of 77 checks passed
@masih
masih deleted the masih/1793369212-orphan-test-abci branch October 30, 2026 14:42
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