Return a 400 for economy years the simulation service's model cannot project
Les mainteneurs répondent en général sous 3 jours
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
Piste de recherche
Start in country.py to see how economy_options.time_period is built, then inspect the API's handling of simulation service error codes, especially the SPM input codes. Check the linked PolicyEngine/policyengine-sim-api#969 for the stable error code and message contract. Done means DATASET_YEAR_UNAVAILABLE maps to a readable 400 response and UK metadata years follow the installed model projection; preserve current behavior for unknown codes and services that omit the code.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Problem
A society-wide (economy) request for a year the simulation service's model cannot project its dataset to returns 502, and the failure is stored and replayed for 30 days as a computation failure.
- policyengine-uk projects its UK dataset (data year 2024) only to 2032 (2030 before policyengine-uk 2.130.1). A UK request for 2033 fails in the simulation service. Its job-status endpoint returns 500, and
get_economic_impactreturns 502 with "Simulation entrypoint execution failed: Simulation failed (correlation_id=…)". Every retry returns the same stored failure. - This happened on 2026-10-15 for 2031–2035 and on 2026-10-26 for 2033–2039.
- The UK years in the country metadata (
economy_options.time_period, built incountry.py) still stop at 2030. The app reads that list.
Intended change
- The simulation service will answer such a job with 400 and the stable code
DATASET_YEAR_UNAVAILABLE(PolicyEngine/policyengine-sim-api#969). Map that code to a 400 with the service's readable message, such as "UK results are available for 2024 to 2032", in the same way as the SPM input codes. - Keep today's behaviour for unknown codes, and for a simulation service that doesn't send the code yet.
- Make the UK metadata years follow the installed policyengine-uk's projection, so the list runs to 2032 now and moves with the model.
This is the Public API part of a change that also touches the simulation service and the app.
- Langage dominant
- Python
- Étoiles
- 18
- Forks
- 33
- Merge moyen
- 2 j 16 h
- PR mergées (30 j)
- 53
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de PolicyEngine/policyengine-api
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
PolicyEngine/policyengine-api#4037 ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 1/5 1-3 heures Accessibilité débutants 88/100
PolicyEngine/policyengine-api#3911 ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
PolicyEngine/policyengine-api#3910 ·
Les mainteneurs répondent en général sous 3 jours
-
Document UK breakdown results' withheld area codes, and stop serving breakdowns cached without themOuverte
Difficulté 4/5 3-5 jours Accessibilité débutants 43/100
PolicyEngine/policyengine-api#4091 ·
Les mainteneurs répondent en général sous 3 jours
-
Telemetry error report splits a simulation worker failure between its exception and the recorded copyPeut-être pris @anth-volk l’a pris aujourd’hui. Ouvertebug
Difficulté 3/5 1-2 jours Accessibilité débutants 20/100
PolicyEngine/policyengine-api#4088 ·
Les mainteneurs répondent en général sous 3 jours
Toutes les issues de PolicyEngine/policyengine-api
Issues similaires
-
filesystem: `file://C:/...` bucket_url is read as a UNC share named `C:` and silently lists no filesOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
comp/desktop desktop/shell os/windows P3 tool/file type/bug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
NousResearch/hermes-agent#145928 ·
Les mainteneurs répondent en général sous 1 jour
-
integration:coding-agents
Difficulté 1/5 Moins d'une heure Accessibilité débutants 83/100
vectorize-io/hindsight#6151 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
FormalLanguageConstrainedPathQuerying/FLPQ_Data#174 ·
Les mainteneurs répondent en général sous 1 jour
-
[VLM] granite_vision preset produces empty output and runs ~3× slower with Granite Vision 3.3-2B than with Granite Vision 4.1-4BPeut-être pris @prassu017 l’a pris aujourd’hui. Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
docling-project/docling#5068 · 4 commentaires ·
Les mainteneurs répondent en général sous 1 jour