Define explicit cache ownership contracts through Phase 6
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
- #599 de @anth-volk — cerrado sin fusionar
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
Start by reading the cache and parameter implementations in PolicyEngine Core, then map each cache to the Type A–E ownership and lifecycle requirements in the issue. Break the work into the listed cache, tracing, parameter, and branch behaviors, with deterministic unit and integration tests for the specified cases. Done means the acceptance criteria are met, including downstream migrations without cache-internal changes; Phase 7 remains deferred.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Context
PolicyEngine Core currently uses several caches with different ownership,
isolation, invalidation, and lifetime requirements. Some callers have modified
private cache fields directly because Core did not expose operations for the
required behavior. Parameter tracing also allowed request-specific tracer state
to become associated with reusable parameter views.
Scope
Define and implement the cache architecture through Phase 6:
- Document Type A model-definition state, Type B policy-system caching, Type C
parameter-at-date caching, Type D simulation input and result caching, and
Type E YAML-case execution reuse. - Add generic cache contracts for lifecycle, construction, bounded retention,
revision validation, and branch behavior. - Bound YAML policy-system retention and isolate each YAML case's execution
state. - Keep tracer state local to the active calculation and out of cached parameter
views. - Give parameter trees monotonic revisions, retain eager materialization as the
default, and provide an explicit lazy strategy. - Centralize supplied-input provenance and calculated-result invalidation.
- Allow branches to share immutable array values while retaining independent
indexes. - Expose public parameter replacement, sharing, materialization, and cache
clearing operations for country packages.
Phase 7, which would separate imported model definitions from policy and
execution state, remains outside this issue.
Downstream migrations
- PolicyEngine/policyengine-us#9978
- PolicyEngine/policyengine-uk#2175
Acceptance criteria
- AI-facing documentation specifies each cache type's owner, key, value,
lifetime, mutation rules, invalidation, concurrency, and uncached behavior. - Generic cache bases use typed key and value parameters and concrete caches
implement subsystem-specific behavior. - Every production commit adds at least 40 deterministic unit cases covering
standard behavior, rejected behavior, failure cleanup, copying, serialization,
concurrency, and edge cases. - Integration tests compare cached and uncached YAML execution and exercise
parameter mutation, tracing, simulation cloning, and branch isolation. - PolicyEngine US and PolicyEngine UK can migrate without modifying cache
internals. - Phase 7 remains deferred.
- Lenguaje dominante
- Python
- Estrellas
- 22
- Forks
- 30
- Merge medio
- 2 d 21 h
- PR fusionados (30 d)
- 24
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-core
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
PolicyEngine/policyengine-core#605 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
PolicyEngine/policyengine-core#549 ·
Los mantenedores suelen responder en 2 días
-
`restore_simulation` silently drops memberless group entitiesPosiblemente ocupada @Adelagric la tomó hace 32 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
PolicyEngine/policyengine-core#547 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
PolicyEngine/policyengine-core#609 ·
Los mantenedores suelen responder en 2 días
-
Every new system compiles its variable files again, which sys.monitoring coverage retainsPosiblemente ocupada @MaxGhenis la tomó hace 1 día. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
PolicyEngine/policyengine-core#607 ·
Los mantenedores suelen responder en 2 días
Todos los issues de PolicyEngine/policyengine-core
Issues similares
-
SSM GetParameter throttling during concurrent workflow launchesPosiblemente ocupada @alexiswl la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
-
[Bug] Dev image build fails: `npm install` in the root Dockerfile runs out of memory (exit 134)Posiblemente ocupada @andest01 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
pesu-dev/discord_bot#97 ·
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
gradio-app/gradio#13964 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 93/100
BSData/horus-heresy-3rd-edition#3232 · 1 comentario ·
Los mantenedores suelen responder en 1 día