Problem
Simulation.subsample() rebuilds a simulation from to_input_dataframe(). After safe exports started excluding computed variables by default, formula-backed structural IDs such as person_id can be omitted from the DataFrame used for the rebuild.
This breaks subsampling for country packages where structural IDs are formula-backed rather than plain input variables.
Expected fix
subsample() should preserve computed structural dataset variables for its internal rebuild path without changing the public safe-export defaults for to_input_dataframe() or to_input_dict().
Testing
Add focused regression coverage with a synthetic formula-backed person_id so the test fails under the safe default export and passes when subsampling uses the full internal export.
Problem
Simulation.subsample()rebuilds a simulation fromto_input_dataframe(). After safe exports started excluding computed variables by default, formula-backed structural IDs such asperson_idcan be omitted from the DataFrame used for the rebuild.This breaks subsampling for country packages where structural IDs are formula-backed rather than plain input variables.
Expected fix
subsample()should preserve computed structural dataset variables for its internal rebuild path without changing the public safe-export defaults forto_input_dataframe()orto_input_dict().Testing
Add focused regression coverage with a synthetic formula-backed
person_idso the test fails under the safe default export and passes when subsampling uses the full internal export.