Repository navigation
test(metadata): cover desc order within a block for label txs - #142
Merged
Merged
Conversation
Add Mainnet, Preprod, and Preview fixtures for:
- `/metadata/txs/labels/{label}`
- `/metadata/txs/labels/{label}/cbor`
Each one uses a label whose two newest txs are in the same block.
With `order=desc`, `count=2` must list the later tx of the block first,
and `count=1&page=2` must return the earlier one. The existing fixtures
never put a label on two txs of one block, so a server that reversed
only the block order still passed them.
michalrus
requested review from
slowbackspace and
vladimirvolek
and
a balanced review from Copilot
November 6, 2026 12:21
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The regression depends on external chain data, with no independent repository evidence that each network’s selected hashes are the label’s two newest transactions sharing the stated block and transaction indices.
No open issues 🎉
What changed in this PR
Adds regression fixtures for descending transaction order within a single block across Mainnet, Preprod, and Preview. These cover a gap where reversing only block order could pass existing metadata tests.
Changes:
- Adds 12 fixtures covering the JSON and CBOR label endpoints across all three networks.
- Verifies that
order=desc&count=2returns the later transaction first. - Verifies that
order=desc&count=1&page=2returns the earlier transaction.
| File | Description |
|---|---|
src/fixtures/preview/metadata/txs-labels-label.ts |
Adds Preview JSON ordering and pagination fixtures. |
src/fixtures/preview/metadata/txs-labels-label-cbor.ts |
Adds Preview CBOR ordering and pagination fixtures. |
src/fixtures/preprod/metadata/txs-labels-label.ts |
Adds Preprod JSON ordering and pagination fixtures. |
src/fixtures/preprod/metadata/txs-labels-label-cbor.ts |
Adds Preprod CBOR ordering and pagination fixtures. |
src/fixtures/mainnet/metadata/txs-labels-label.ts |
Adds Mainnet JSON ordering and pagination fixtures. |
src/fixtures/mainnet/metadata/txs-labels-label-cbor.ts |
Adds Mainnet CBOR ordering and pagination fixtures. |
Review effort: Balanced
vladimirvolek
approved these changes
Nov 6, 2026
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.
Related:
order=descin/metadata/txs/labels/{label}txpipe/dolos#1567Add Mainnet, Preprod, and Preview fixtures for:
/metadata/txs/labels/{label}/metadata/txs/labels/{label}/cborEach one uses a label whose two newest txs are in the same block.
With
order=desc,count=2must list the later tx of the block first, andcount=1&page=2must return the earlier one. The existing fixtures never put a label on two txs of one block, so a server that reversed only the block order still passed them.