vault e2e: fix flaky batch response ordering assumption#21801
Merged
prashantkumar1982 merged 1 commit intodevelopfrom Apr 1, 2026
Merged
vault e2e: fix flaky batch response ordering assumption#21801prashantkumar1982 merged 1 commit intodevelopfrom
prashantkumar1982 merged 1 commit intodevelopfrom
Conversation
The Vault DON processes batch requests through OCR consensus, which does not guarantee the response array order matches the request array order. The create, update, and delete test assertions were using positional indexing (Responses[i] == namespaces[i]), causing intermittent failures when the DON returned responses in a different order. Replace positional checks with map-based lookups keyed by namespace, so the assertions are order-independent. Made-with: Cursor
Contributor
|
👋 prashantkumar1982, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
Contributor
|
✅ No conflicts with other open PRs targeting |
|
|
cedric-cordenier
approved these changes
Mar 31, 2026
Tofel
approved these changes
Apr 1, 2026
prashantkumar1982
added a commit
that referenced
this pull request
Apr 2, 2026
The Vault DON processes batch requests through OCR consensus, which does not guarantee the response array order matches the request array order. The create, update, and delete test assertions were using positional indexing (Responses[i] == namespaces[i]), causing intermittent failures when the DON returned responses in a different order. Replace positional checks with map-based lookups keyed by namespace, so the assertions are order-independent. Made-with: Cursor
bolekk
pushed a commit
that referenced
this pull request
Apr 6, 2026
The Vault DON processes batch requests through OCR consensus, which does not guarantee the response array order matches the request array order. The create, update, and delete test assertions were using positional indexing (Responses[i] == namespaces[i]), causing intermittent failures when the DON returned responses in a different order. Replace positional checks with map-based lookups keyed by namespace, so the assertions are order-independent. Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.





Summary
Fixes an intermittent test failure in the vault e2e
basic_crudtest where batch responses (create, update, delete) were asserted by positional index, but the Vault DON's OCR consensus does not guarantee response ordering.Error observed:
Root cause:
Responses[0]was assumed to correspond tonamespaces[0]("main"), but the DON returned "alt" first.Fix: Replace positional
Responses[i]checks with map-based lookups keyed by namespace. Applied to all three batch assertion blocks (create, update, delete). The "invalid" key entries in update/delete are matched by key name instead of by position.