chore(deps): repin dpp-core to 0.17.0 - #108
Merged
Merged
Conversation
1 task
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
| Duplication | 1 |
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
Repins the workspace to
dpp-core0.17.0 and carries the three of its changesthat reach into this repo, plus the fallout that only shows up at runtime. The
version bump itself is one line; everything else here is a decision the bump
forced.
Two of 0.17.0's new refusals are not adopted here and are unreachable in
this engine — see "Not in this PR". That is a deliberate scope line, not an
oversight, but it means this PR adopts the release's types without its rules.
Changes
Stored battery documents below schema v2.5.0 are permanently unreadable.
batteryTypebecame required and closed at v2.5.0, anddpp-domainrefuses toupgrade a record that predates the mandate rather than inventing a regulatory
classification the operator never stated. No lens can rescue them. Each affected
shape is recorded in a new
UNREADABLE_FIXTURESlist beside the existingRETIRED_ENVELOPE_KEYSconvention; the fixtures are untouched, because a frozendocument edited to make a test pass has stopped being evidence. The list asserts
those documents still fail, so a row that stops being true has to be removed
rather than left to rot.
Disclosure now resolves from the passport's own schema version. A published
passport is filtered by the classes in force when its signature was frozen, not
by whatever the catalog says today. The part worth reading twice is the
fail-closed backstop: it used to key on "is the sector unknown to the catalog",
which was the same condition while the policy was unversioned and is not any
more — a known sector at an unknown version resolves to no policy, and a
sector-only check would have served every
sectorDatafield publicly. It nowkeys on whether the policy resolved.
batteryTypeis a required CSV column, including in the downloadable importtemplate, which is a shipped artifact rather than a fixture.
Battery create bodies in the integration suite were broken by the bump and the
gate could not see it.
batteryTypehas no serde default, so every batterycreate body without one fails to deserialize —
missing field batteryType. Theyare JSON literals inside
json!, socheck-integrationcompiles them andjust testskips them; the failure only appears when the feature-gated suiteactually runs. Twenty bodies fixed.
POST /api/v1/dpprefuses aschemaVersionthat is not the sector's currentone. Previously it was accepted and silently discarded — the handler resolved
it and
PassportService::createoverwrote it from the catalog on persist, so nocaller value ever reached the database, and nothing told the caller that. That
overwrite is also, as of this release, the only thing standing between a caller
and the disclosure table its passport is served under. An older table classifies
fewer fields and defaults the rest to public: battery v1.0.0 annotates 11 against
v2.6.0's 68, so filtering at v1.0.0 serves
stateOfHealthand thirteen others.an_older_schema_version_widens_the_public_viewpins that hazard so the reasonfor the check survives independently of the check.
productCategoryis gone from the documented passport response. Core removedPassport.product_category, so the spec described a field the response does notcarry. No wire change — it was
skip_serializing_ifand alwaysNone, so thekey was never emitted. This supersedes #104, whose content is prose saying the
field is slated for removal once the pinned core version picks up the change.
Not in this PR
Core's two new compliance gates, because this engine never calls the methods
they live on.
Passport::transition_to(Published)refuses a first publish whena battery omits content its category makes mandatory; publish here checks
PassportStatus::can_transition_toand setsstatus,published_atandretention_lockedby hand, so the gate never runs — roughly twenty mandatoryfields for ev/lmt/industrial against the six a passport publishes with today.
Passport::validate()is never called either, so the new unsold-goodscommodity-code requirement is equally inert. Neither is a regression (both are
new in 0.17.0), and neither is fixed here: routing publish through
transition_tochanges what an operator can publish and fails every batterytest until its fixture is complete. Tracked in #110.
Frozen fixtures for the schema versions that moved — battery v2.5.0/v2.6.0,
textile v1.2.0, electronics v1.2.0. All six battery fixtures are now in
UNREADABLE_FIXTURES, so the guard for that sector is currently inert. Theconvention requires a fixture captured from a real document, which needs a
create+publish against a real database, so none are invented here.
Checklist
just lintpasses locallyjust fmtappliedjust testpasses (unit)just test-integration— not run, Docker unavailable in the authoringenvironment. This PR changes the create path and repairs twenty bodies in
that suite, so it needs a green run before merge.
println!/eprintln!/dbg!in service-cratesrc/.envfiles in the diffapi/openapi.yaml,CHANGELOG.md)