Migrate US staging run files to the version 2 contract
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start by reading the version 2 writer introduced by #895, the US fiscal-refresh and exact-count paths from #933, and the telemetry separation in #1099. Trace their writer, fixtures, lifecycle, diagnostics, and delivery tests, then verify US version 2 reads in Calibration Diagnostics before changing the producer. Done means all listed acceptance criteria pass, including removal of the version 1 writer and tests for each run and delivery mode.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
The US fiscal-refresh build still writes schema version 1 staging run files, while UK builds use the stricter, country-neutral version 2 format introduced by #895. Both implementations write the same conceptual run bundle, but Microcosm maintains separate writer classes, fixtures, lifecycle behavior, and dashboard parsing paths.
PR #1099 separates hosted event delivery through LocalTelemetryEmitter from staging run-file persistence. It intentionally leaves the existing US file format unchanged. The next step should migrate US builds to version 2 and remove the version 1 writer.
Version 2 should be the single current staging run-file contract because it provides:
- named and validated document schemas;
- country, operation, pipeline, candidate, release, and run-kind identity;
- explicit lifecycle and delivery state;
- ordered events and consistent bundle validation;
- reviewed aggregate-only artifacts with digests and size limits;
- safeguards against uploading row-level data, credentials, archives, or dataset files;
- optional authenticated remote read-back.
Required changes
- Use the version 2 writer for every US fiscal-refresh build, including exact-count builds covered by #933.
- Replace the two writer classes with one country-neutral
StagingRunBundleWriterimplementation based on the current version 2 code. - Stop producing schema version 1 staging files.
- Remove the version 1 writer, producer fixtures, and producer-only tests after the US path migrates.
- Keep
LocalTelemetryEmitterfunctionally independent. Disabling staging run files with--no-stagingmust not disable hosted event delivery. - Populate the version 2 country, operation, pipeline, candidate, release, run-kind, sampling, and delivery fields for US builds.
- Convert US lifecycle statuses and events to the version 2 contract.
- Audit every US diagnostic currently attached to the staging run. Version 1 accepts arbitrary JSON files; version 2 permits only reviewed aggregate data and rejects record arrays, sensitive keys, dataset files, and oversized files. Summarize or omit artifacts that do not satisfy the version 2 content policy.
- Verify that Calibration Diagnostics reads new US version 2 runs before deploying the producer change. Retaining read-only support for historical version 1 runs is a separate compatibility decision and does not require retaining a version 1 writer.
Acceptance criteria
- US fiscal-refresh and exact-count builds instantiate the single shared staging run-bundle writer.
- No production Microcosm path emits schema version 1 staging files.
- Every US staging document and attached artifact passes version 2 schema and content validation.
- US run identity and delivery fields are complete and consistent across the manifest, progress document, event stream, calibration progress, and run index.
- A staging file write, validation, or upload failure cannot suppress hosted events from
LocalTelemetryEmitter. -
--no-stagingsuppresses only staging run files and their uploads. - Calibration Diagnostics tests cover a US version 2 run before the Microcosm producer change is deployed.
- Tests cover successful, failed, local-only, remote-delivery-failure, and exact-count US runs.
- The obsolete version 1 writer and its producer fixtures are removed.
Context
- #895 introduced the version 2 staging run-file contract for UK builds while explicitly retaining version 1 for US builds.
- #933 covers enabling staging output for US exact-count builds.
- #1099 separates the always-on hosted event emitter from staging run-file persistence.
- Lingua principale
- Python
- Stelle
- 0
- Fork
- 5
- Merge medio
- 1g 19h
- PR unite (30g)
- 115
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di PolicyEngine/microcosm
-
Update two stale comments about the export-mass reviewed-exclusion registerForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
PolicyEngine/microcosm#1108 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
PolicyEngine/microcosm#475 ·
I maintainer di solito rispondono entro 1 giorno
-
Generate complete WIC participation in the ACS local-area buildForse già presa @anth-volk l’ha presa oggi. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
PolicyEngine/microcosm#1155 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
PolicyEngine/microcosm#1154 ·
I maintainer di solito rispondono entro 1 giorno
-
Delegate telemetry and completed Orrery publication to microcosm-local-providerForse già presa @anth-volk l’ha presa oggi. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
PolicyEngine/microcosm#1152 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di PolicyEngine/microcosm
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
MystenLabs/MemWal#1163 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
infertopics leaves new nodes without a topic when untopiced neighbours outnumber topiced onesForse già presa @moneebullah25 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
ClanGenOfficial/clangen#6254 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
FinanceFlash/unvibecode#218 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno