Skip to content

test: cover desc address ordering on preview accounts/:stake_address/addresses - #106

Merged
slowbackspace merged 1 commit into
mainfrom
test/preview-account-addresses-desc
Aug 18, 2026
Merged

test: cover desc address ordering on preview accounts/:stake_address/addresses#106
slowbackspace merged 1 commit into
mainfrom
test/preview-account-addresses-desc

Conversation

@slowbackspace

Copy link
Copy Markdown
Contributor

What

Adds an order=desc case for /accounts/{stake_address}/addresses to the preview fixture set. It reuses the account from the existing "bf stake address with many addresses" fixture.

Why

desc ordering for this endpoint was only covered by a mainnet fixture. Implementations that run the suite against preview never exercise it. This gap let an ordering bug in dolos/minibf go unnoticed (see txpipe/dolos#1140, fixed by txpipe/dolos#1221).

The account discriminates the common failure mode well. Its oldest address is also its most recently used one:

address first use (block) last use (block)
…surhhy9 317791 2207128
…snq24zy 318188 2206793
…srdg8p9 515922 515922

Blockfrost orders addresses by first on-chain appearance, and desc returns the exact reverse of the asc list: […srdg8p9, …snq24zy, …surhhy9]. An implementation that orders desc by latest appearance returns […surhhy9, …snq24zy, …srdg8p9] instead — maximally wrong, so the test cannot pass by accident.

Verification

  • Expected response is the reverse of the already-verified asc fixture for the same account.
  • Cross-checked first/last appearance blocks via Koios preview.
  • update-fixtures-ids, check-fixture-wiring, type-check, lint, and unit tests all pass.
  • I could not run the integration suite against production Blockfrost preview (no project id at hand) — please give it one CI run.

🤖 Generated with Claude Code

@slowbackspace
slowbackspace marked this pull request as ready for review August 18, 2026 10:25
@slowbackspace
slowbackspace merged commit 229a9a1 into main Aug 18, 2026
2 checks passed
@michalrus
michalrus deleted the test/preview-account-addresses-desc branch August 27, 2026 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant