Skip to content

Preserve ETERNITY inputs across cache invalidation#483

Merged
anth-volk merged 2 commits intomasterfrom
fix/eternity-input-cache-preservation
Apr 30, 2026
Merged

Preserve ETERNITY inputs across cache invalidation#483
anth-volk merged 2 commits intomasterfrom
fix/eternity-input-cache-preservation

Conversation

@anth-volk
Copy link
Copy Markdown
Collaborator

Fixes #482

Summary

  • Preserve user inputs through storage get/put so ETERNITY period canonicalization is honored during cache invalidation.
  • Add regressions for Simulation.set_input and direct Holder.set_input.

Tests

  • uv run pytest tests/core/test_apply_reform_preserves_user_inputs.py
  • uv run pytest tests/core/test_apply_reform_invalidates_cache.py tests/core/test_subsample_invalidates_cache.py
  • uv run pytest tests/core/test_apply_reform_preserves_user_inputs.py tests/core/test_apply_reform_invalidates_cache.py tests/core/test_subsample_invalidates_cache.py tests/core/test_eternity_subperiods.py tests/core/test_holders.py tests/core/test_storage_delete_branch.py
  • uv run ruff check policyengine_core/simulations/simulation.py tests/core/test_apply_reform_preserves_user_inputs.py
  • uv run ruff format --check policyengine_core/simulations/simulation.py tests/core/test_apply_reform_preserves_user_inputs.py

@anth-volk anth-volk marked this pull request as ready for review April 30, 2026 20:18
@anth-volk anth-volk merged commit 1e667c1 into master Apr 30, 2026
22 checks passed
@anth-volk anth-volk deleted the fix/eternity-input-cache-preservation branch April 30, 2026 20:18
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.

User-set ETERNITY inputs are dropped after Simulation._invalidate_all_caches (3.24.0+)

1 participant