Skip to content

chore(test-types): Add extra="forbid" to CamelModel; fix errors#1989

Merged
fselmo merged 2 commits intoethereum:forks/amsterdamfrom
fselmo:chore/extra-forbid-camel
Jan 8, 2026
Merged

chore(test-types): Add extra="forbid" to CamelModel; fix errors#1989
fselmo merged 2 commits intoethereum:forks/amsterdamfrom
fselmo:chore/extra-forbid-camel

Conversation

@fselmo
Copy link
Contributor

@fselmo fselmo commented Jan 7, 2026

🗒️ Description

I'm still seeing issues from time to time where test writers (including myself) can misspell a kwarg to a test class which could go unnoticed with unintended consequences. This is an attempt to tighten up the pydantic models in our testing framework and prevent these sorts of issues.

  • Use extra="forbid" in CamelModel which our test types inherit from
  • Fix serialization issues by removing computed fields from input dicts on relevant models with singular field issues. For internal fixture models that use combined models to build a simpler model (many fields don't exist), explicitly turn on extra="allow" with a clarifying message on why we want to / need to do it here.
  • Remove redundant model_config for classes that inherit from CamelModel

🔗 Related Issues or PRs

✅ Checklist

  • All: Ran fast tox checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    uvx tox -e static
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Considered adding an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@fselmo fselmo added C-chore Category: chore A-test-types Area: execution_testing.base_types and execution_testing.test_types labels Jan 7, 2026
@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.33%. Comparing base (9e56ac9) to head (4dc89fd).
⚠️ Report is 4 commits behind head on forks/amsterdam.

Additional details and impacted files
@@               Coverage Diff                @@
##           forks/amsterdam    #1989   +/-   ##
================================================
  Coverage            86.33%   86.33%           
================================================
  Files                  538      538           
  Lines                34557    34557           
  Branches              3222     3222           
================================================
  Hits                 29835    29835           
  Misses                4148     4148           
  Partials               574      574           
Flag Coverage Δ
unittests 86.33% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

@fselmo fselmo force-pushed the chore/extra-forbid-camel branch from 79e3c6e to a6dcded Compare January 8, 2026 00:23
@fselmo fselmo force-pushed the chore/extra-forbid-camel branch from a6dcded to 4dc89fd Compare January 8, 2026 00:54
@fselmo fselmo marked this pull request as ready for review January 8, 2026 00:59
@marioevz marioevz self-requested a review January 8, 2026 16:11
Copy link
Member

@marioevz marioevz left a comment

Choose a reason for hiding this comment

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

LGTM, just one question of a change I didn't quite understand. Thanks!

@fselmo fselmo merged commit 0ebfc28 into ethereum:forks/amsterdam Jan 8, 2026
18 checks passed
@fselmo fselmo deleted the chore/extra-forbid-camel branch January 8, 2026 19:19
jsign pushed a commit to jsign/execution-specs that referenced this pull request Jan 20, 2026
…oc-groups` (ethereum#1989)

* refactor: don't hard-code gas limit; pull from env

* bugfix: Use sender fixture for all block calculations

- If a signed transaction has leading zeros in any of the signature fields,
  the rlp encoding will remove those leading zeros. When we swapped the real
  sender in, the signature would change and we could have a variability in the
  block rlp size. So we should use the ``sender`` fixture for the original
  transaction building and pass those original transactions to the final
  block instead of swapping senders (unnecessary).
jsign pushed a commit to jsign/execution-specs that referenced this pull request Jan 20, 2026
…oc-groups` (ethereum#1989)

* refactor: don't hard-code gas limit; pull from env

* bugfix: Use sender fixture for all block calculations

- If a signed transaction has leading zeros in any of the signature fields,
  the rlp encoding will remove those leading zeros. When we swapped the real
  sender in, the signature would change and we could have a variability in the
  block rlp size. So we should use the ``sender`` fixture for the original
  transaction building and pass those original transactions to the final
  block instead of swapping senders (unnecessary).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-test-types Area: execution_testing.base_types and execution_testing.test_types C-chore Category: chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add extra_forbid to CamelModel and fix errors

2 participants