UPG002 - Synthesised value during upgrade¶
Description¶
The v0.6 → v0.7 compat shim filled a missing v0.7-required field from a related v0.6 source rather than failing. The upgraded value is a best-effort guess and should be reviewed before publishing.
Category¶
Compat shim (Phase 4 of docs/plans/UNTP_0.7.0_MIGRATION.md).
Severity¶
warning for envelope-level synthesis; info for synthesis where
the missing field is optional in v0.7 (e.g. Country.countryName).
Common causes¶
| What was synthesised | Source |
|---|---|
Top-level envelope name |
Copied from credentialSubject.product.name (the v0.6 product name). |
Material.symbol upgraded to Image |
Real base64 bytes preserved; name="Material symbol" and mediaType="image/png" synthesised. |
Country.countryName not populated |
The shim only sets the name when the caller passes a country_lookup mapping or the code is in the bundled list. |
How to fix¶
Most synthesised values are reasonable defaults. To exercise the review:
-
Read the sidecar warnings file that the
migrateCLI produces alongside the upgraded payload. Every UPG002 carries a JSONPath locator and the synthesised value's source. -
Override synthesised values before validation:
Python
from dppvalidator.compat import upgrade
upgraded, warnings = upgrade(
payload_v06,
country_lookup={"DE": "Germany", "AU": "Australia"},
)
# Replace the auto-synthesised envelope name with a richer one.
upgraded["name"] = "Battery DPP — EV-300 series"
- Avoid synthesis by providing the field at v0.6: set
credentialSubject.product.name(synthesises envelopename) and a top-levelnamedirectly to skip the warning entirely.
See also¶
- Migration guide: 0.6 → 0.7 — full warning code reference.
UPG003— country-specific UPG variant.UPG004— when synthesis is not possible.- Error Overview