Publish a JSON Schema for calibration diagnostics schema 8
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 22/100
Research direction
Start with the pydantic models CalibrationDiagnosticsV8 and the UK extension in microcosm-diagnostics, then with calibration_diagnostics_json_schema(), which currently merges schema 8 with the legacy 6/7 envelope. Generate a Draft 2020-12 schema for schema 8 only, commit it under a versioned path, and add a drift test. Done means the drift test passes, the US and UK test builders validate, and every model validator is listed in the schema description. Open PR #1298 already targets this, so check it before starting.
Written by the indexing model from the issue text.
Description
Problem
calibration_diagnostics.json (schema 8) is defined only by the pydantic models in microcosm-diagnostics (CalibrationDiagnosticsV8 and the typed UK extension). Anything that receives the file outside Microcosm has no machine-readable contract to check it against without importing those models.
The collector-as-hub plan has the emitter submit the diagnostics bytes to the collector, which should validate them at intake before building calibration trees. The collector needs a published, versioned schema to do that.
calibration_diagnostics_json_schema() already exists, but it returns the parse adapter's union of schema 8 and the legacy schema-6/7 envelope. It declares no JSON Schema dialect and isn't committed anywhere. It also doesn't say which model rules it leaves out.
Change
- Generate a Draft 2020-12 JSON Schema for schema 8 from the pydantic models, with a dialect, title,
$idand a description. - Commit the generated schema at a stable path in
microcosm-diagnosticswhose name carries the schema version. A tool undertools/can regenerate or check it. - Add a drift test so the committed file always equals freshly generated output.
- Validate real diagnostics from the existing US and UK engine-free test builders against the committed schema, and check that representative invalid documents fail.
- Some rules the models enforce can't be expressed in a generated JSON Schema. These include cross-field reconciliations, finite-number checks, strict integers and non-blank text. List each one in the schema's description, and pin with a test that every model validator is listed.
The diagnostics format doesn't change, and nothing is published outside the repository.
- Dominant language
- Python
- Stars
- 0
- Forks
- 5
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 146
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PolicyEngine/microcosm
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
PolicyEngine/microcosm#1220 ·
Maintainers usually reply within 1 day
-
Update two stale comments about the export-mass reviewed-exclusion registerPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
PolicyEngine/microcosm#1108 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
PolicyEngine/microcosm#475 ·
Maintainers usually reply within 1 day
-
Project Orrery artifacts without the content store, and write the execution overlay as its own filePossibly taken @anth-volk claimed this today. Open
Difficulty 4/5 3-5 days Newbie friendliness 12/100
PolicyEngine/microcosm#1294 ·
Maintainers usually reply within 1 day
-
Thin US calibration epoch telemetry to the UK's rule (every tenth epoch plus each solve's last)Possibly taken @anth-volk claimed this today. Open
Difficulty 3/5 1-2 days Newbie friendliness 25/100
PolicyEngine/microcosm#1292 ·
Maintainers usually reply within 1 day
All issues in PolicyEngine/microcosm
Similar issues
-
documentation good first issue
Difficulty 2/5 Half a day Newbie friendliness 72/100
sujithputta02/Esapay#13 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
gke-labs/kube-agents#3277 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
jbacalso24/mimry#291 ·
Maintainers usually reply within 1 day
-
good first issue
Difficulty 2/5 Under an hour Newbie friendliness 82/100
eli-alvarado/us-watchlist-alerts#14 ·
Maintainers usually reply within 1 day