Skip to content

test(store): wait for append before checking head - #408

Closed
loglapa wants to merge 1 commit into
celestiaorg:mainfrom
loglapa:fix/test-store-sync-head
Closed

test(store): wait for append before checking head#408
loglapa wants to merge 1 commit into
celestiaorg:mainfrom
loglapa:fix/test-store-sync-head

Conversation

@loglapa

@loglapa loglapa commented Aug 21, 2026

Copy link
Copy Markdown

Overview

Stabilizes TestStore by waiting for the asynchronous append pipeline before asserting the contiguous head. Store.Append intentionally returns after enqueueing writes (see #244), and GetRange can observe pending headers before advanceHead updates contiguousHead; the previous test therefore compared the new range with the old head intermittently.

The production behavior is unchanged.

Validation

  • Reproduced the original test failure 3 times in 200 runs
  • Updated test: 500/500 focused runs pass
  • go test ./store
  • go test -race ./store
  • go vet ./...
  • golangci-lint run (0 issues)
  • git diff --check

The repository-wide suite is currently blocked on an unrelated deterministic panic introduced on main by merged #406 (TestExchangeServer_partialRangeNotExpanded calls the newly required Tail method through a nil embedded store). It reproduces on both Go 1.26/darwin and Go 1.27/linux; details are posted on #406. This PR changes only store/store_test.go.

@loglapa
loglapa marked this pull request as ready for review August 23, 2026 08:03
@loglapa
loglapa requested a review from a team as a code owner August 23, 2026 08:03
@loglapa
loglapa requested a review from rach-id August 23, 2026 08:03
@rach-id

rach-id commented Aug 23, 2026

Copy link
Copy Markdown
Member

Please stop pass by PRs.

@rach-id rach-id closed this Aug 23, 2026
@loglapa

loglapa commented Aug 23, 2026

Copy link
Copy Markdown
Author

Hi @rach-id. I understand the concern about drive-by contributions, but I’d appreciate a more specific explanation for closing this PR.

This is a one-line, test-only change backed by a reproduced failure (3/200 runs), 500 successful focused runs after the fix, race testing, vet, and lint. I’m available to address review feedback and maintain the contribution.

If there is a repository process I missed, such as obtaining approval before starting an issue, please point me to it and I’ll follow it going forward. Otherwise, could you please reconsider reopening the PR or provide the technical/process reason why this contribution should not proceed?

I’ll pause new go-header contributions until this is clarified.

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.

2 participants