Skip to content

refactor(tests): move state and forkchoice tests under forks/lstar (Stage 6 of #686)#706

Merged
tcoratger merged 1 commit intoleanEthereum:mainfrom
tcoratger:refactor/test-reorg-stage6
May 4, 2026
Merged

refactor(tests): move state and forkchoice tests under forks/lstar (Stage 6 of #686)#706
tcoratger merged 1 commit intoleanEthereum:mainfrom
tcoratger:refactor/test-reorg-stage6

Conversation

@tcoratger
Copy link
Copy Markdown
Collaborator

Summary

Per the multi-fork roadmap, Stage 6 reorganizes tests so files exercising fork-specific containers or fork choice live next to the fork they target. Only lstar exists right now, so the new tree is tests/lean_spec/forks/lstar/{state,forkchoice}/.

Source Destination
tests/lean_spec/subspecs/containers/test_state_*.py (3 files) tests/lean_spec/forks/lstar/state/
tests/lean_spec/subspecs/containers/conftest.py tests/lean_spec/forks/lstar/state/conftest.py
tests/lean_spec/subspecs/forkchoice/*.py (7 tests + conftest) tests/lean_spec/forks/lstar/forkchoice/

Conftests follow their only consumers:

  • container_key_manager is used solely by test_state_aggregation.py — fixture moves with the test.
  • pruning_store and sample_store are used only by tests in forkchoice/.

The empty subspecs/forkchoice/ directory is removed. Files in subspecs/containers/ that target fork-stable types (test_checkpoint.py) or attestation containers stay where they are; Stage 6 was scoped to state and forkchoice tests only.

The third Stage 6 item — mirroring the structure under devnet5/ — is dropped because devnet5 was unified back into lstar.

Test plan

  • uvx tox -e all-checks — ruff, format, ty, codespell, mdformat all pass
  • pytest tests/lean_spec/forks tests/lean_spec/subspecs/containers — 134 passed (targeted)
  • pytest tests -n auto — 3291 passed (same total as before the move; no test lost)

Tracks #686.

🤖 Generated with Claude Code

…tage 6 of leanEthereum#686)

Per the multi-fork roadmap, test files that target fork-specific containers
or fork choice belong next to the fork they exercise. Until the roadmap is
finished, only lstar exists, so the tree starts as forks/lstar/{state,
forkchoice}/.

Each conftest moves with its only consumers:

- containers/conftest.py provided container_key_manager, used solely by
  test_state_aggregation.py — both move to forks/lstar/state/.
- forkchoice/conftest.py provided pruning_store and sample_store, used by
  tests now under forks/lstar/forkchoice/.

The empty subspecs/forkchoice/ directory is removed. Files in
subspecs/containers/ that target fork-stable types (test_checkpoint.py)
or attestation containers stay where they are; Stage 6 was scoped to
state and forkchoice tests only.

The Stage 6 item that mirrors the structure under devnet5 is dropped
because devnet5 was unified back into lstar.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tcoratger tcoratger merged commit 941abe7 into leanEthereum:main May 4, 2026
13 checks passed
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.

1 participant