Skip to content

Add CI check that protocol bumps come with an overlay version bump - #5316

Merged
sisuresh merged 1 commit into
stellar:masterfrom
sisuresh:protocol-overlay-version-check
Oct 15, 2026
Merged

sisuresh merged 1 commit into
stellar:masterfrom
sisuresh:protocol-overlay-version-check

Conversation

@sisuresh

@sisuresh sisuresh commented Jun 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds a CI check that fails if the ledger protocol version (MAX_SUPPORTED_PROTOCOL_VERSION) is bumped without also bumping OVERLAY_PROTOCOL_VERSION in the same change.

  • scripts/check-protocol-overlay-versions.sh compares both constants between the PR base and head (can also be run locally, e.g. ./scripts/check-protocol-overlay-versions.sh origin/master).
  • New protocol-version-check job in build.yml (not yet in complete's needs, so it doesn't block merges), and a matching standalone job in build-private.yml.

Checklist

  • Reviewed the contributing document
  • Rebased on top of master (no merge commits)
  • Ran clang-format v8.0.0 (make format or the Visual Studio extension)
  • Compiles
  • Ran all tests
  • If change impacts performance, include supporting evidence per the performance document

Copilot AI review requested due to automatic review settings June 3, 2026 19:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a guardrail in CI to ensure that whenever Config::CURRENT_LEDGER_PROTOCOL_VERSION is bumped, the maximum supported overlay protocol version (OVERLAY_PROTOCOL_VERSION) is also bumped, keeping peer capability signaling aligned with protocol upgrades.

Changes:

  • Added a repo script that compares protocol/overlay version constants between a base revision and the PR head (or working tree).
  • Added a public CI job (protocol-version-check) to run that script on PR/merge-group events and wired it into the complete aggregator job.
  • Added an equivalent job in the private CI workflow.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
scripts/check-protocol-overlay-versions.sh New script that diffs ledger/overlay protocol constants across git revisions and fails if overlay wasn’t bumped alongside a ledger protocol bump.
.github/workflows/build.yml Adds a new CI job running the protocol/overlay bump check and makes complete depend on it.
.github/workflows/build-private.yml Adds the same check job for the private workflow.

@sisuresh
sisuresh force-pushed the protocol-overlay-version-check branch from 3ebbcc0 to a2badb9 Compare June 3, 2026 20:27
@sisuresh
sisuresh requested a review from anupsdf June 4, 2026 23:16
@sisuresh

sisuresh commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

This PR only bumps the max overlay version, but we could also require updates to the min depending on a set criteria cc @marta-lokhova

Copilot AI balanced review requested due to automatic review settings October 1, 2026 18:26
@sisuresh
sisuresh force-pushed the protocol-overlay-version-check branch from a2badb9 to 4672562 Compare October 1, 2026 18:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The documented one-argument local invocation is rejected by the script.

Review effort: Balanced
Findings: 1 Low severity

Open (1)
Resolved since last review (1)

Copilot AI balanced review requested due to automatic review settings October 1, 2026 18:29
@sisuresh
sisuresh force-pushed the protocol-overlay-version-check branch from 48f64e1 to 4672562 Compare October 1, 2026 18:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The incomplete protocol promotion causes Soroban version mismatches and leaves required LCM goldens stale.

Review effort: Balanced
Findings: 1 Low severity

Open (1)

Copilot AI balanced review requested due to automatic review settings October 1, 2026 18:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The local invocation documentation conflicts with the required arguments, and checkout paths containing spaces break the script.

Review effort: Balanced
Findings: 1 Medium severity · 1 Low severity

Open (2)

Copilot AI balanced review requested due to automatic review settings October 1, 2026 18:42
@sisuresh
sisuresh force-pushed the protocol-overlay-version-check branch from 4672562 to 2be6627 Compare October 1, 2026 18:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

The protocol bump leaves normal builds using Soroban protocol 29, causing a startup panic.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity · 1 Low severity

Open (3)

Comment thread src/main/Config.cpp Resolved
Copilot AI balanced review requested due to automatic review settings October 1, 2026 18:45
@sisuresh
sisuresh force-pushed the protocol-overlay-version-check branch from 80b0563 to 731cf27 Compare October 1, 2026 18:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Protocol 30 is not promoted in normal Rust builds, and the new check permits overlay-version decreases.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity · 1 Low severity

Open (3)
Resolved since last review (1)

Copilot AI balanced review requested due to automatic review settings October 1, 2026 18:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The script and workflow integrations correctly implement the stated protocol-version safeguard.

Review effort: Balanced
Findings: 1 High severity · 1 Medium severity · 1 Low severity

Open (3)

Copilot AI balanced review requested due to automatic review settings October 1, 2026 20:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The public check is not included in complete.needs, so failures do not block merging as described.

Review effort: Balanced
Findings: 1 High severity · 1 Low severity

Open (2)
Resolved since last review (2)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

The public protocol check does not block merges because it is missing from complete.needs.

Review effort: Balanced
Findings: 1 High severity

Open (1)
Resolved since last review (1)

Copilot AI balanced review requested due to automatic review settings October 14, 2026 00:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The script cannot parse the current protocol definition, and the public check does not gate the required aggregate status.

2 open findings

🧠 Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 14, 2026 00:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The public check is omitted from complete.needs, so its failures do not block merges.

1 open finding
1 resolved since last review
Previously missed (1)

In code that hasn't changed since last review

Medium severity Compare overlay version against PR base, not prior ledger bump

scripts/​check-protocol-overlay-versions.sh:138

This deliberately compares against the overlay value from the previous ledger bump rather than the PR base, so a ledger bump with HEAD_OVERLAY == BASE_OVERLAY passes whenever the overlay was incremented earlier. That contradicts the stated base-vs-head contract that the protocol-bump change must also bump the overlay version. Either compare against BASE_OVERLAY, or explicitly revise the PR contract to permit pre-bumps and explain how intermediate builds remain distinguishable.

🧠 Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 14, 2026 01:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The public check is absent from complete.needs, allowing merges when it fails.

1 open finding

🧠 Review effort: Balanced

@sisuresh
sisuresh force-pushed the protocol-overlay-version-check branch from 28908ed to a5e8101 Compare October 14, 2026 01:35
scripts/check-protocol-overlay-versions.sh fails if the ledger protocol version
increases without OVERLAY_PROTOCOL_VERSION increasing in the same change, or if
the overlay version is lowered. Runs as a non-blocking protocol-version-check job.
Copilot AI balanced review requested due to automatic review settings October 14, 2026 22:53
@sisuresh
sisuresh force-pushed the protocol-overlay-version-check branch from a5e8101 to fb5c4d3 Compare October 14, 2026 22:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused CI changes match the stated requirements, with no unresolved correctness or integration issues identified.

1 open finding

🧠 Review effort: Balanced

@drebelsky drebelsky left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a non-blocking check, I think this is fine. If/when we move it to blocking there are some more things we'll want to consider. For example, suppose we have a PR A that bumps the overlay version and a PR B that bumps the protocol version. If B is pushed before A merges but is added to the merge queue later, we could get an error when the merge queue check runs. Claude also notes that the docs for github.event.merge_group.base_sha aren't super clear in the case with multiple PRs in the queue. I think this case is pretty unlikely.

It's also maybe worth considering what we want to do if we've bumped overlay before we bump protocol. Since the check is currently non-blocking, we can figure out how we want to handle that when it happens (burn a sequence number or ignore the check). If we get rid of the separate no-op bumps we do before protocol upgrades, I think this will be even rarer.

@sisuresh

Copy link
Copy Markdown
Contributor Author

As a non-blocking check, I think this is fine. If/when we move it to blocking there are some more things we'll want to consider. For example, suppose we have a PR A that bumps the overlay version and a PR B that bumps the protocol version. If B is pushed before A merges but is added to the merge queue later, we could get an error when the merge queue check runs. Claude also notes that the docs for github.event.merge_group.base_sha aren't super clear in the case with multiple PRs in the queue. I think this case is pretty unlikely.

It's also maybe worth considering what we want to do if we've bumped overlay before we bump protocol. Since the check is currently non-blocking, we can figure out how we want to handle that when it happens (burn a sequence number or ignore the check). If we get rid of the separate no-op bumps we do before protocol upgrades, I think this will be even rarer.

So I intentionally made the check non-blocking due to those scenarios. I don't think this should ever be a blocking check.

@sisuresh
sisuresh enabled auto-merge October 15, 2026 16:50
@sisuresh
sisuresh added this pull request to the merge queue Oct 15, 2026
Merged via the queue into stellar:master with commit c7f52d6 Oct 15, 2026
58 of 60 checks passed
@sisuresh
sisuresh deleted the protocol-overlay-version-check branch October 15, 2026 17:58
dappbowkick pushed a commit to dappbowkick/stellar-core that referenced this pull request Oct 17, 2026
…#5475)

Adds a daily workflow that reads pubnet's protocol version from Horizon
and, once every release supporting that protocol has an overlay version
above `OVERLAY_PROTOCOL_MIN_VERSION`, opens (or updates) a single PR
raising the min to the lowest such overlay version and asking the
reviewer to verify the versions. `scripts/check-overlay-min-version.sh`
also fails if the min is above that value. Follow-up to stellar#5316.
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.

4 participants