Skip to content

rust-ci: Require the reth fork to be pinned by tag - #24070

Closed
aakoshh wants to merge 1 commit into
developfrom
af/reth-pin-tag-check
Closed

aakoshh wants to merge 1 commit into
developfrom
af/reth-pin-tag-check

Conversation

@aakoshh

@aakoshh aakoshh commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

What

A PR that pins the ethereum-optimism/reth fork by anything other than an op-<base>-<n> tag now fails the required required-rust-ci check, through a new rust-reth-pin job (just check-reth-pin in rust/). The job runs alongside the others, so a PR on a rev pin still gets the full CI result and is red only on this one check.

Why

#24024 merged while it pinned the head of an open fork PR stack, before op-v2.7.0-0 existed. rust/UPDATING-RETH.md ("Pinning a fork change") allows a rev pin only while the fork and monorepo PRs are developed together, and requires the switch to a tag before merge, so a fork pin on develop is always a tag. Nothing enforced that, and a reviewer unfamiliar with the rule had no signal that the PR wasn't ready.

How

The recipe reads the tracked Cargo.lock files rather than rust/Cargo.toml, so a fork crate pulled in transitively is caught too; the --locked CI jobs already keep the lockfiles in step with the manifests. It fails closed: a git or grep error fails the check instead of reading as "nothing untagged".

Caveats

  • develop pins rev = "0447ceb…" today, and the fork has no op-v2.7.0-* tag yet. Until develop is re-pinned, this job is red on every PR that runs rust-ci, including this one. Land the re-pin first, or fold this into it. A release branch cut from develop while it is rev-pinned inherits the red job the same way.
  • Only the fork is checked. A rev pin on upstream paradigmxyz/reth still passes, since the guide allows a merge commit on upstream main when no release contains a needed fix.

Alternatives

  • Adding the check to just lint: rejected, because the guide has you run just lint before every push, and it would fail throughout the intended rev-pinned development phase.
  • ci-config-reviewer ran on this diff. Its two findings are fixed: the recipe failed open on a git/grep error, and it rejected tags on an upstream pre-release base (op-v2.8.0-rc.1-0). circleci config validate was not run (CLI unavailable); the merged config was checked with yq only.

🤖 Generated with Claude Code

A rev pin on an open ethereum-optimism/reth PR is fine while the two PRs
are developed together, but #24024 merged on one. Add `just check-reth-pin`
and a required rust-reth-pin job that fails unless every fork crate in the
lockfiles resolves through an op-<base>-<n> tag. It runs apart from the
other jobs, so such a PR still gets its full CI result.
@sebastianst

Copy link
Copy Markdown
Member

🤖 Claude Opus 5.5 says: #24071 supersedes this PR. Both add the same required job (rust-reth-pin here, rust-reth-tag-pin there), so only one should land.

#24071 now includes this PR's lockfile scan: every reth crate in every tracked Cargo.lock has to resolve through a tag. That catches a member crate that pins reth outside the workspace pin. It also goes further in three ways:

  • Tag-only for upstream too. A rev on paradigmxyz/reth fails as well, so develop only ever pins v<semver> or op-<base>-<n> tags. An untagged upstream commit gets an op-<reth-short-sha> fork branch and tag (rust/UPDATING-RETH.md, "Picking the right target commit").
  • Shared, tested parser. The check lives in rust/scripts/upstream-mirrors.py. It uses the pin parser the mirror checker already relies on, which enforces one consistent reth source and the tag grammar, including pre-release bases like op-v2.8.0-rc.1-0. Unit tests cover rev pins and untagged lockfile sources. In real CI it was confirmed red for the right reason on the current rev pin, and it passes on the op-v2.6.0-4 state.
  • The process around it. Reth PRs stay in draft while they pin a rev. A new op-v<version> branch is prepared in one prep PR, rebase-merged so each cherry-pick keeps its -x line, and its merge commit gets the tag. The update-reth skill gains that merge gate. The reth-update-reviewer agent and its review guide report a rev pin as blocking merge, and audit cherry-picks from the old fork branch's tip.

Like this PR, #24071 stays red until develop is repinned to op-v2.7.0-0. It can take the repin once ethereum-optimism/reth#34, #40 and #41 are merged and tagged.

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