Skip to content

test(blocksync): build handover tests against BlockResponse.Height - #1621

Merged
lklimek merged 1 commit into
devfrom
fix/blocksync-tests-after-1595-1618
Nov 12, 2026
Merged

lklimek merged 1 commit into
devfrom
fix/blocksync-tests-after-1595-1618

Conversation

@Claudius-Maginificent

@Claudius-Maginificent Claudius-Maginificent commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

TL;DR: The block sync tests on dev no longer compile after two PRs merged on top of each other; this updates the tests so dev builds and passes CI again.

Detailed discussion

Internal test-only change, no user-observable effect, so there is no user story or scenario.

#1595 replaced the decoded block in the synchronizer's BlockResponse with its committed bytes (BlockBytes) and a Height field. #1618 was merged after it, and its handover tests still set and read BlockResponse.Block. Each PR passed CI on its own; together they leave the internal/blocksync test package uncompilable (unknown field Block in struct literal of type BlockResponse), which fails golangci-lint and the test jobs on every PR based on dev, including the v2.0.0-dev.2 release PR #1620.

The affected tests only use the height (Synchronizer.addBlock reads resp.Height), so they now set Height and read resp.Height.

Blocks #1620 (release v2.0.0-dev.2), which will be re-frozen on the dev tip containing this fix.

Testing

  • go test -count=1 ./internal/blocksync/: ok
  • go vet ./...: clean; gofmt -l internal/blocksync: clean

🤖 Generated with Claude Code

https://claude.ai/code/session_01WunYYgi2uMsQDcBcKAwLdt

🤖 Co-authored by Claudius the Magnificent AI Agent

PR Hygiene · 03258aa

  • Bots — thepastaclaw ✓
  • Self-review — not asked of a bot author
  • Build green
  • Approvals
    • files with no dedicated owner (internal/blocksync/ask_every_peer_test.go, internal/blocksync/handover_deadline_test.go, internal/blocksync/handover_late_supply_test.go and 1 more) — approved by lklimek

When every merge requirement is met, the PR Hygiene check passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.

#1595 replaced the decoded block in the synchronizer's BlockResponse with
its committed bytes and a Height field. The handover tests from #1618,
merged after it, still set and read BlockResponse.Block, so the
blocksync test package no longer compiled on dev. They only need the
height, which addBlock reads from Height.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WunYYgi2uMsQDcBcKAwLdt
@coderabbitai

coderabbitai Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Waiting for bot review — thepastaclaw not yet. Wait for the missing reviews, or a writer can post /skip-bots to proceed without them; blocking findings still need addressing.
Full checklist in the description.

@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Nov 12, 2026
@thepastaclaw

thepastaclaw commented Nov 12, 2026 •

Copy link
Copy Markdown

✅ Final review complete — no blockers (commit 03258aa) · triage: low

@lklimek
lklimek enabled auto-merge (squash) November 12, 2026 20:01

@thepastaclaw thepastaclaw 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.

Final validation — Phase 1 + Phase 2

At head 03258aa, the test-only changes correctly replace stale BlockResponse.Block references with Height while preserving the fixtures' heights, ordering, and timing behavior. No in-scope issues were found; current CI passes build, lint, vet, all six test shards, and both e2e jobs, with only PastaClaw review and PR Hygiene pending. Validation was static; no local builds or tests were run.

Review provenance

Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.1-sol (agent: phase2-reviewer, role: general); final verifier: gpt-6.1-sol (agent: sol-verifier, role: final-verifier)

  • Triage: low by gpt-6.1-sol (effort low) — This is a small, contained test-only update that replaces obsolete BlockResponse.Block references with the existing Height field and does not change production behavior.
  • Phase 1 reviewers: glm-5.3-flash — general (completed, effort high); agent phase1-reviewer
  • Phase 1 model: glm-5.3-flash — zai quota: 5h 91% left, weekly 59% left; passed over gemini-3.8-flash-high (antigravity quota lookup failed)
  • Fresh verifier: gpt-6.1-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.1-sol — general (completed, effort medium); agent phase2-reviewer
Out-of-scope follow-up suggestions (1)

These are valid observations, but they are outside this PR's scope and should be handled in separate issues or author/maintainer-requested PRs rather than blocking this review.

  • Stacked-PR merge order broke dev despite per-PR CI — The proposed post-merge CI follow-up is already implemented: .github/workflows/tests.yml and build.yml both run on pushes to dev. The asserted merge order is also reversed in the actual history: #1595's commit 0bdad33 directly follows #1618's commit 4e15907. The base's stale test references are real and this PR repairs them, but they do not establish the claimed missing post-merge checks; adding a merge queue is a broader workflow proposal outside this test repair's responsibility.
    • Follow-up: Consider creating a separate issue or author/maintainer-requested PR for this.

@github-actions

Copy link
Copy Markdown

Policy satisfied — this can merge.
Full checklist in the description.

@github-actions github-actions Bot removed the waiting-bots Waiting for the review bots to report on this head label Nov 12, 2026
@lklimek
lklimek merged commit f49c25d into dev Nov 12, 2026
23 checks passed
@lklimek
lklimek deleted the fix/blocksync-tests-after-1595-1618 branch November 12, 2026 20:13
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.

3 participants