Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Migrate simulation caching to Core ownership APIs

Aperta
#9,978 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

  • #9980 di @anth-volk — chiusa senza merge

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
25/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

This work depends on policyengine-core#598 and its released cache ownership APIs; first confirm the required Core release and update the US dependency constraint and lockfile. Then locate the SPM simulation, reform, holder-rebinding, and period-override code that accesses the private cache fields described in the issue, and review the focused SPM, source-input, and branch tests. Done means those paths use public Core operations, preserve sharing, isolation, inputs, branch behavior, and trace attribution, and the specified tests pass; an open linked pull request is already in progress.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Context

PolicyEngine US currently contains SPM simulation and period-branch code that
modifies private PolicyEngine Core cache fields. Those paths manually clear
parameter views, supplied-input records, holder storage, and fast result
lookups. The SPM tracing workaround also copies parameter roots to prevent one
simulation's tracer from being retained by shared parameter state.

Dependency

This work depends on PolicyEngine/policyengine-core#598 and the Core release
that contains its public cache ownership APIs. The US dependency constraint and
lockfile must reference that release before this change can merge.

Scope

  • Use Core's public parameter-sharing and parameter-replacement operations for
    SPM policy copy-on-write behavior.
  • Remove the SPM-specific parameter tracing workaround after Core makes tracing
    local to each calculation.
  • Use Core's supplied-input provenance operations during holder rebinding.
  • Use Core's calculated-result clearing operation for period override branches.
  • Preserve policy-system sharing, reform isolation, branch behavior, and trace
    attribution.

Acceptance criteria

  • Production code no longer reads or writes the targeted private parameter,
    supplied-input, holder-storage, or fast-result cache fields.
  • Separate traced simulations record their own parameter accesses without
    modifying the shared parameter tree.
  • SPM reforms detach parameter trees before mutation.
  • Period override branches preserve supplied inputs and remove calculated
    values.
  • Formatting, focused SPM tests, source-input tests, and branch tests pass
    against the released Core version.
  • The minimum Core version and lockfile include the required release.

This refactor does not change tax or benefit policy rules, so Axiom parity is
not applicable.

Lingua principale
Python
Stelle
170
Fork
217
Merge medio
4g 8h
PR unite (30g)
400

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PolicyEngine/policyengine-us

Tutte le issue di PolicyEngine/policyengine-us

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.