From d7b42dcd2069015c7f7080bfd98127f975a884b5 Mon Sep 17 00:00:00 2001 From: Thomas Coratger <60488569+tcoratger@users.noreply.github.com> Date: Mon, 4 May 2026 12:08:16 +0200 Subject: [PATCH] refactor(tests): move state and forkchoice tests under forks/lstar (Stage 6 of #686) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- tests/lean_spec/{subspecs/forkchoice => forks/lstar}/__init__.py | 0 tests/lean_spec/forks/lstar/forkchoice/__init__.py | 0 tests/lean_spec/{subspecs => forks/lstar}/forkchoice/conftest.py | 0 .../lstar}/forkchoice/test_attestation_target.py | 0 .../lstar}/forkchoice/test_compute_block_weights.py | 0 .../lstar}/forkchoice/test_store_attestations.py | 0 .../{subspecs => forks/lstar}/forkchoice/test_store_pruning.py | 0 .../{subspecs => forks/lstar}/forkchoice/test_time_management.py | 0 .../lstar}/forkchoice/test_validate_attestation.py | 0 .../{subspecs => forks/lstar}/forkchoice/test_validator.py | 0 tests/lean_spec/forks/lstar/state/__init__.py | 0 .../{subspecs/containers => forks/lstar/state}/conftest.py | 0 .../containers => forks/lstar/state}/test_state_aggregation.py | 0 .../lstar/state}/test_state_justified_slots.py | 0 .../lstar/state}/test_state_process_attestations.py | 0 15 files changed, 0 insertions(+), 0 deletions(-) rename tests/lean_spec/{subspecs/forkchoice => forks/lstar}/__init__.py (100%) create mode 100644 tests/lean_spec/forks/lstar/forkchoice/__init__.py rename tests/lean_spec/{subspecs => forks/lstar}/forkchoice/conftest.py (100%) rename tests/lean_spec/{subspecs => forks/lstar}/forkchoice/test_attestation_target.py (100%) rename tests/lean_spec/{subspecs => forks/lstar}/forkchoice/test_compute_block_weights.py (100%) rename tests/lean_spec/{subspecs => forks/lstar}/forkchoice/test_store_attestations.py (100%) rename tests/lean_spec/{subspecs => forks/lstar}/forkchoice/test_store_pruning.py (100%) rename tests/lean_spec/{subspecs => forks/lstar}/forkchoice/test_time_management.py (100%) rename tests/lean_spec/{subspecs => forks/lstar}/forkchoice/test_validate_attestation.py (100%) rename tests/lean_spec/{subspecs => forks/lstar}/forkchoice/test_validator.py (100%) create mode 100644 tests/lean_spec/forks/lstar/state/__init__.py rename tests/lean_spec/{subspecs/containers => forks/lstar/state}/conftest.py (100%) rename tests/lean_spec/{subspecs/containers => forks/lstar/state}/test_state_aggregation.py (100%) rename tests/lean_spec/{subspecs/containers => forks/lstar/state}/test_state_justified_slots.py (100%) rename tests/lean_spec/{subspecs/containers => forks/lstar/state}/test_state_process_attestations.py (100%) diff --git a/tests/lean_spec/subspecs/forkchoice/__init__.py b/tests/lean_spec/forks/lstar/__init__.py similarity index 100% rename from tests/lean_spec/subspecs/forkchoice/__init__.py rename to tests/lean_spec/forks/lstar/__init__.py diff --git a/tests/lean_spec/forks/lstar/forkchoice/__init__.py b/tests/lean_spec/forks/lstar/forkchoice/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/lean_spec/subspecs/forkchoice/conftest.py b/tests/lean_spec/forks/lstar/forkchoice/conftest.py similarity index 100% rename from tests/lean_spec/subspecs/forkchoice/conftest.py rename to tests/lean_spec/forks/lstar/forkchoice/conftest.py diff --git a/tests/lean_spec/subspecs/forkchoice/test_attestation_target.py b/tests/lean_spec/forks/lstar/forkchoice/test_attestation_target.py similarity index 100% rename from tests/lean_spec/subspecs/forkchoice/test_attestation_target.py rename to tests/lean_spec/forks/lstar/forkchoice/test_attestation_target.py diff --git a/tests/lean_spec/subspecs/forkchoice/test_compute_block_weights.py b/tests/lean_spec/forks/lstar/forkchoice/test_compute_block_weights.py similarity index 100% rename from tests/lean_spec/subspecs/forkchoice/test_compute_block_weights.py rename to tests/lean_spec/forks/lstar/forkchoice/test_compute_block_weights.py diff --git a/tests/lean_spec/subspecs/forkchoice/test_store_attestations.py b/tests/lean_spec/forks/lstar/forkchoice/test_store_attestations.py similarity index 100% rename from tests/lean_spec/subspecs/forkchoice/test_store_attestations.py rename to tests/lean_spec/forks/lstar/forkchoice/test_store_attestations.py diff --git a/tests/lean_spec/subspecs/forkchoice/test_store_pruning.py b/tests/lean_spec/forks/lstar/forkchoice/test_store_pruning.py similarity index 100% rename from tests/lean_spec/subspecs/forkchoice/test_store_pruning.py rename to tests/lean_spec/forks/lstar/forkchoice/test_store_pruning.py diff --git a/tests/lean_spec/subspecs/forkchoice/test_time_management.py b/tests/lean_spec/forks/lstar/forkchoice/test_time_management.py similarity index 100% rename from tests/lean_spec/subspecs/forkchoice/test_time_management.py rename to tests/lean_spec/forks/lstar/forkchoice/test_time_management.py diff --git a/tests/lean_spec/subspecs/forkchoice/test_validate_attestation.py b/tests/lean_spec/forks/lstar/forkchoice/test_validate_attestation.py similarity index 100% rename from tests/lean_spec/subspecs/forkchoice/test_validate_attestation.py rename to tests/lean_spec/forks/lstar/forkchoice/test_validate_attestation.py diff --git a/tests/lean_spec/subspecs/forkchoice/test_validator.py b/tests/lean_spec/forks/lstar/forkchoice/test_validator.py similarity index 100% rename from tests/lean_spec/subspecs/forkchoice/test_validator.py rename to tests/lean_spec/forks/lstar/forkchoice/test_validator.py diff --git a/tests/lean_spec/forks/lstar/state/__init__.py b/tests/lean_spec/forks/lstar/state/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/lean_spec/subspecs/containers/conftest.py b/tests/lean_spec/forks/lstar/state/conftest.py similarity index 100% rename from tests/lean_spec/subspecs/containers/conftest.py rename to tests/lean_spec/forks/lstar/state/conftest.py diff --git a/tests/lean_spec/subspecs/containers/test_state_aggregation.py b/tests/lean_spec/forks/lstar/state/test_state_aggregation.py similarity index 100% rename from tests/lean_spec/subspecs/containers/test_state_aggregation.py rename to tests/lean_spec/forks/lstar/state/test_state_aggregation.py diff --git a/tests/lean_spec/subspecs/containers/test_state_justified_slots.py b/tests/lean_spec/forks/lstar/state/test_state_justified_slots.py similarity index 100% rename from tests/lean_spec/subspecs/containers/test_state_justified_slots.py rename to tests/lean_spec/forks/lstar/state/test_state_justified_slots.py diff --git a/tests/lean_spec/subspecs/containers/test_state_process_attestations.py b/tests/lean_spec/forks/lstar/state/test_state_process_attestations.py similarity index 100% rename from tests/lean_spec/subspecs/containers/test_state_process_attestations.py rename to tests/lean_spec/forks/lstar/state/test_state_process_attestations.py