Define explicit cache ownership contracts through Phase 6
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
- #599 @anth-volk による — マージされずにクローズ
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 22
- フォーク
- 30
- 平均マージ
- 2日 19時間
- マージ済み PR(30日)
- 25
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PolicyEngine/policyengine-core のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
PolicyEngine/policyengine-core#605 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
PolicyEngine/policyengine-core#549 ·
メンテナーはふだん 2 日以内に返信
-
`restore_simulation` silently drops memberless group entities対応中かも @Adelagric が 33 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
PolicyEngine/policyengine-core#547 ·
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 57/100
PolicyEngine/policyengine-core#614 ·
メンテナーはふだん 2 日以内に返信
-
A reform simulation's baseline reads the reform's default for people the situation gives no value対応中かも @MaxGhenis が 1 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
PolicyEngine/policyengine-core#612 ·
メンテナーはふだん 2 日以内に返信
PolicyEngine/policyengine-core の issue をすべて見る
似ている issue
-
Atomic append fails to create a missing file対応中かも @harbinresearcher が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
fabiocaccamo/python-fsutil#201 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
task
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
danparshall/claude_researcher#87 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
GhostManager/Ghostwriter#998 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
datajoint/datajoint-python#1586 ·
メンテナーはふだん 1 日以内に返信