Closed
Description
After #1074, the Simulation Entrypoint finds or creates every simulation, report and run by its definition key, and the Public API's partial unique indexes decide when identical requests share a row. The service no longer calls the code that created those rows without keys, or the search for an earlier succeeded simulation run to reuse. That code is still in the repository, and only tests call it.
Remove it, with no change in behaviour:
- Create functions that use no keys in
policyengine-simulation-persistence:insert_economy_report,insert_economy_simulation,insert_household_reportandinsert_budget_window_report, their input types (NewEconomyReport,NewEconomySimulation,ReportSimulation,NewHouseholdReport,HouseholdReportSimulation,NewBudgetWindowReport,BudgetWindowYear) and the store methods that wrap them (EconomyRunStore.create_report,create_simulationandcreate_budget_window_report,HouseholdReportStore.create_report). Tests that store records created before keys insert those rows directly instead. - The run-reuse search:
find_reusable_run,find_reusable_run_of,ReusableRun,RunReuse,search_by_definition,search_own_runs, thereuseparameters of the store's input reads, which the service always passes asNone, and thereusable_runandreusable_runsfields they fill. RerunSide.reused, which every re-run refuses when true.- The Simulation Entrypoint's
V2_SIMULATION_OUTPUT_BUCKETsetting:ServiceSettings.output_bucket,Settings.v2_simulation_output_bucket, the deploy script's format check and runtime variable, and the workflow's passing of it to the Cloud Run deploy step. The Stage 12 steps, scripts and Modal workers that write simulation output files to that bucket keep it.
The docs (the persistence and entry READMEs, DEPLOYMENT.md, the Stage 12 migration doc and docstrings) then describe only what remains.
Metadata
Metadata
Assignees
Labels
No labels
Activity