Skip to content

fix(tools): repair no-op --check in op-chain-config generator and update generated configs - #1641

Merged
popescuoctavian merged 5 commits into
mainfrom
popescuoctavian/op-config-generator-git-diff-issue
Aug 25, 2026
Merged

fix(tools): repair no-op --check in op-chain-config generator and update generated configs#1641
popescuoctavian merged 5 commits into
mainfrom
popescuoctavian/op-config-generator-git-diff-issue

Conversation

@popescuoctavian

@popescuoctavian popescuoctavian commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

The --check of op-chain-config generator which runs in CI was always succeeding. I've discovered this while testing #1639.

Problem

The cargo op-chain-config -- --check step in the "Check generated files" workflow has never detected out-of-date configs. It used git diff -G'' --exit-code, which was broken three ways:

  • The single quotes were part of the argument (Command::arg passes it verbatim — no shell strips them), so the pattern could never match.
  • The slashes were doubled (https:////github.com//...) as if they needed escaping.
  • -G selects files whose changed lines match the regex; the intent ("ignore the // source: line") requires --ignore-matching-lines (-I), which discounts matching lines instead.

Changes

Generator (crates/tool/op_chain_config_generator):

  • Use git diff --ignore-matching-lines='^// source: ...' with a corrected regex, scoped to the generated paths, so SHA-only changes pass and any real drift fails.
  • Wipe the generated directory before regenerating, so chains removed from the registry no longer leave stale modules behind.
  • Fix the --check rollback: it missed generated.rs (the generated/* pathspec doesn't cover it) and couldn't remove newly generated untracked files (now handled with a scoped git clean).

Workflow (.github/workflows/check-generated-files.yml):

  • Removed the redundant cargo op-chain-config generation step before the --check step — a leftover of the workflow's original implementation; --check regenerates on its own.

Regenerated configs (first regeneration since December):

  • Added: Celo Sepolia.
  • Removed (removed upstream from the registry): Arena-Z, Swell, Creator Chain testnet, Ethernity Sepolia, Base (mainnet + Sepolia).

Dropped built-in Base support (crates/edr_op):

  • Beyond the regenerated configs, removed the hand-written Base hardfork activations (hardfork/base.rs) and the Base-specific tests. Base no longer follows the OP stack protocol, so EDR's OP chain configs cannot represent it correctly. If EDR supports Base again, it should model Base's own protocol.
  • Added a changeset for the removed built-in chain configurations.

@popescuoctavian popescuoctavian self-assigned this Aug 21, 2026
@popescuoctavian popescuoctavian added the no changeset needed This PR doesn't require a changeset label Aug 21, 2026
@popescuoctavian
popescuoctavian temporarily deployed to github-action-benchmark August 21, 2026 12:14 — with GitHub Actions Inactive
@changeset-bot

changeset-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5785b20

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@nomicfoundation/edr Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@popescuoctavian
popescuoctavian temporarily deployed to github-action-benchmark August 21, 2026 12:16 — with GitHub Actions Inactive
@popescuoctavian
popescuoctavian temporarily deployed to github-action-benchmark August 21, 2026 12:16 — with GitHub Actions Inactive
@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 62.96296% with 20 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.89%. Comparing base (f0df8b5) to head (5785b20).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
crates/tool/op_chain_config_generator/src/main.rs 0.00% 20 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1641      +/-   ##
==========================================
- Coverage   80.02%   79.89%   -0.13%     
==========================================
  Files         464      460       -4     
  Lines       80392    80024     -368     
  Branches    80392    80024     -368     
==========================================
- Hits        64330    63937     -393     
- Misses      13856    13882      +26     
+ Partials     2206     2205       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Base no longer follows the OP stack protocol, so EDR's OP chain
configs cannot represent it correctly. If EDR supports Base again,
it should model Base's own protocol.
@anaPerezGhiglia
anaPerezGhiglia temporarily deployed to github-action-benchmark August 24, 2026 18:44 — with GitHub Actions Inactive
@anaPerezGhiglia
anaPerezGhiglia temporarily deployed to github-action-benchmark August 24, 2026 18:46 — with GitHub Actions Inactive
Generating the files in a previous step was a leftover of
the original implementation of the workflow
@anaPerezGhiglia anaPerezGhiglia removed the no changeset needed This PR doesn't require a changeset label Aug 24, 2026
@anaPerezGhiglia
anaPerezGhiglia temporarily deployed to github-action-benchmark August 24, 2026 19:01 — with GitHub Actions Inactive
@anaPerezGhiglia
anaPerezGhiglia temporarily deployed to github-action-benchmark August 24, 2026 19:03 — with GitHub Actions Inactive
@anaPerezGhiglia
anaPerezGhiglia temporarily deployed to github-action-benchmark August 24, 2026 19:03 — with GitHub Actions Inactive
@popescuoctavian
popescuoctavian marked this pull request as ready for review August 25, 2026 07:06
@popescuoctavian
popescuoctavian requested a review from a team August 25, 2026 07:06

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

LGTM! thanks for pushing for fixing this! 🙇

@popescuoctavian
popescuoctavian added this pull request to the merge queue Aug 25, 2026
Merged via the queue into main with commit df14790 Aug 25, 2026
64 checks passed
@popescuoctavian
popescuoctavian deleted the popescuoctavian/op-config-generator-git-diff-issue branch August 25, 2026 13:52
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