Economy runs fail with 400 SPM_CONFIGURATION_UNAVAILABLE while the simulation worker lags an API deploy
Los mantenedores suelen responder en 3 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 22/100
Línea de trabajo
Start in policyengine_api/libs/simulation_entrypoint.py near line 408, where the canonical-spm-v1 capability is checked against /versions and SPMValidationError("SPM_CONFIGURATION_UNAVAILABLE") is raised, then read docs/canonical-spm.md for the intended deploy order. Done means that lookup failures return 503 with Retry-After, and reports created in the window are not left pending with no run. The deploy-ordering part needs maintainer input, so confirm the approach before changing code.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happened
On 2026-10-16, society-wide reports started from the app failed for a period after the API update 71dba65b ("Update PolicyEngine API", 06:55 UTC). Example: report 4526 (requested_at 13:42:09 UTC, reform policy 98772, US, 2026) recorded:
[SOCIETY_WIDE_CALC_FAILED] Society-wide calculation failed (400): {"status": "error", "message": "Cannot validate the selected worker's canonical SPM capability", "result": null, "errors": [{"code": "SPM_CONFIGURATION_UNAVAILABLE", ...}]}
Reports 4524 and 4525 (13:41 UTC) are still pending and never ran. Later, the same economy call for report 4526 succeeded, so the worker caught up and the reform itself was fine.
Cause (from the code)
policyengine_api/libs/simulation_entrypoint.py (~line 408) validates the selected worker's canonical-spm-v1 capability from /versions before cache access or submission, and raises SPMValidationError("SPM_CONFIGURATION_UNAVAILABLE", ...) on any lookup failure. docs/canonical-spm.md says this happens "until such a worker is deployed" (sim-API PR 703). So between the API deploy and a matching worker deploy, every new economy run is refused.
Requests
- Deploy order / readiness: deploy (or verify) the matching simulation worker before the API version that requires its capability goes live, or keep serving with the previous bundle until the worker reports a matching capability.
- Status code: return 503 (with
Retry-After) forSPM_CONFIGURATION_UNAVAILABLE, not 400. It is a server-side readiness condition; a 400 tells clients the request is invalid, so they do not retry, and the app told users to edit their reform. - Stuck reports: reports created during the window stay
pendingwith no active run (4524, 4525). Consider marking themerrorwith a retryable code, or re-queueing them once the worker matches.
The app now treats *_UNAVAILABLE 4xx errors as retryable server faults (PolicyEngine/policyengine-app-v2#1310), but the outage itself needs the API-side fix.
🤖 Generated with Claude Code
- Lenguaje dominante
- Python
- Estrellas
- 18
- Forks
- 33
- Merge medio
- 2 d 7 h
- PR fusionados (30 d)
- 28
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de PolicyEngine/policyengine-api
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
PolicyEngine/policyengine-api#3911 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
PolicyEngine/policyengine-api#3910 ·
Los mantenedores suelen responder en 3 días
-
Drop the empty simulation-domain tables and retired association columns from the v2 schemaPosiblemente ocupada @anth-volk la tomó hoy. Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 20/100
PolicyEngine/policyengine-api#3961 ·
Los mantenedores suelen responder en 3 días
-
Stop using the simulation-domain v2 tables and retired association columns before they are droppedPosiblemente ocupada @anth-volk la tomó hoy. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
PolicyEngine/policyengine-api#3960 ·
Los mantenedores suelen responder en 3 días
-
Make dual-write log failed v2 copies instead of returning HTTP 503Posiblemente ocupada @anth-volk la tomó hoy. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
PolicyEngine/policyengine-api#3958 ·
Los mantenedores suelen responder en 3 días
Todos los issues de PolicyEngine/policyengine-api
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
mihai-vlc/sublime-jsfmt#56 ·
-
comp/cli comp/plugins P2 type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
NousResearch/hermes-agent#141917 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Go device SDK: Whisper transcriber keeps buffering and transcribing audio appended after Stop()Posiblemente ocupada @apoorvdarshan la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
BasedHardware/omi#22770 ·
Los mantenedores suelen responder en 1 día
-
bug needs-acceptance wg/router-models-inference-runtime
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
vllm-project/semantic-router#5295 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
huggingface/huggingface_hub#5210 ·
Los mantenedores suelen responder en 1 día