chore(deps): repin dpp-core to 0.11.0 - #58
Merged
Conversation
Collapses the sector country fields onto countryOfOrigin across code, CSV templates and demo data, adopts the Gtin newtype and the Audience/Disclosure disclosure model, and binds every dpp-render section fixture through the typed SectorData so a renamed field fails a test instead of silently rendering a dash.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pins
dpp-core0.10.0 → 0.11.0. Plan and measurements:dpp-docs/work/CORE-REPIN-0-11-PLAN.md.The 27 compile errors were the easy half. The work was the part with no compile signal:
dpp-rendercompiled clean and was wrong, because every section reads its fields by string key with a"-"fallback and each section's test fixture was a hand-written JSON literal using the same stale key. Production code and fixture were consistently wrong, so the suite stayed green while the public page silently lost data.Changes
Mechanical (compiler-caught).
countryOfManufacture/countryOfProduction/countryOfManufacturing→countryOfOriginacross seven sectors;MaterialEntry::originCountry→countryOfOrigin; the validatedGtinnewtype; six new optionalBatteryDatafields;AccessTier→Audience+Disclosurein the vault's public view and the resolver.The passport-level
manufacturerCountryis a different field and is untouched.validate_gtin_checksumbecameparse_gtin, returning the parsed value instead of validating and discarding it — the sector structs now holdGtin, and parsing once means no call site re-parses a string it has already proven valid.Structural (the actual fix).
dpp-rendernow takesdpp-domainas a dev-dependency and every section fixture round-trips through the typedSectorDatabefore rendering. A renamed required field now fails the deserialise; a renamed optional one comes back absent. Either way the assertion fails instead of the value quietly disappearing.That guard immediately found four defects the old fixtures were hiding:
productionRoute: "EAF"#[serde(other)]—"EAF"silently becameOtherproductionRoute: "Primary""primary"surfactants: ["anionic", ...]Vec<SurfactantEntry>— the fixture shape was structurally impossiblerepairabilityScore: 7.5RepairabilityScorestruct — see belowA live defect, pre-dating this repin. The electronics section read
repairabilityScoreas a scalar, butElectronicsDatahas carried aRepairabilityScorestruct ({ overall, criteria }) since before 0.10.0. The lookup always missed, so the public electronics page has never shown a repairability score — it rendered a dash. Furniture's field genuinely is anf64and was always correct. Fixed here because the guard surfaced it.Operator-facing. CSV templates edited in place (
countryOfOrigin,material_N_countryOfOrigin); 13 demo datasets and 2 sample JSON files swept to match.Breaking — all in CHANGELOG with migration notes
serdealias exists for the old names, so a row either fails to deserialise (six sectors, required) or silently loses the value (textile top-level andMaterialEntry, optional). No migration ships — there are no deployed nodes and no operator data, so it would be code that never runs. Drop and re-seed dev/staging.stateOfHealthPctandlintResultare now correctly excluded. BecausepublicJwsSignaturesigns that view, a passport published before this release will not verify against a view recomputed after it. Snapshots diverge the same way, and BOM pins bypublicJwsHashchange.short_serialwas cut from a UUIDv7's leading bytes — a millisecond timestamp — so serials sorted by creation order and decoded to the creation instant. Now from the random tail. Resolution is GTIN-keyed and unaffected; printed labels no longer match.Verification
cargo check --workspace --all-targetsclean;just checkexits 0cargo auditclean, register still 1 entryTwo fixtures only reachable behind
--features integration-testsbroke and were invisible to the default build — same class as the superuser-guard break in #51. Worth noting that the feature-gated tier is a recurring blind spot.Follow-on, not in this PR
0.11.0 adds
SealFormat::Cades, whichdpp-seal's tests are waiting on (#57, ADR-009 §7). It also gives core a correctAudience/Disclosuremodel that the engine only exercises forAudience::Public— there is no endpoint serving the authority or legitimate-interest views. That is new capability the engine does not yet expose.