feat(domain)!: rebuild the unsold-goods disclosure to Impl. Reg. (EU) 2026/2 Annex I - #186
Merged
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 57 |
| Duplication | 23 |
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.
LKSNDRTMLKV
changed the base branch from
docs/truth-pass-and-layout-standard
to
main
August 25, 2026 15:28
LKSNDRTMLKV
force-pushed
the
feat/unsold-goods-annex-i
branch
from
August 25, 2026 15:33
e08ff4d to
352d692
Compare
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.
Rebuilds
UnsoldGoodsReportto the format its implementing act prescribes. Stacked on #185 — that PR adds the layout tripwires this one's baseline edit touches. Merge #185 first.Why this is a rebuild and not a migration
Two acts adopted 9 February 2026 govern this disclosure, and the previous model predated both. Neither was in the instrument catalog either, which mattered more than it sounds:
unsold-goodsis the only binding we markin_forceand determinable, so we were emitting determinations under an act pair we did not record.32026R0002), under ESPR Art. 24(3). Art. 2(1) binds the disclosure's visual presentation and content to Annex I; Art. 3 delimits categories by CN code — two digits, or four for the products of its Annex II; Art. 1 scopes it to the undertaking's financial year, disclosed within 12 months of that year's end.32026R0296), under Art. 25(5) — the closed list of ten derogations, points (a)–(j). Annex I note (h) makes that list the reason vocabulary, so the two acts interlock and neither is complete alone.Almost nothing of the old shape survived, because the axes are different:
operator_namereporting_period: String, e.g."2026-Q2"product_category: String, e.g."apparel"volume_kg: f64destinationenumThree things worth reviewing closely
Total destruction is derived, never stored. Annex I note (i): "Destruction is the sum of recycling, other recovery and disposal." That leaves preparing-for-reuse and unknown outside it, which is not the intuitive reading. It is computed, and the wire has no such field — storing it would create a second home for a number the act already defines in terms of three others.
unknownis an answer, not a gap. Note (i) provides it for the share whose treatment could not be obtained from the waste treatment operator. So a well-formed split totals exactly 100 and nothing is left over — which is what the lint and the plugin check.CnCategoryis a new type and is deliberately notCommodityCode. Two or four digits against six/eight/ten. They are different levels of one nomenclature: substituting a product's own code for a disclosure category files a whole chapter's goods under a single article. My own earlier note said to reuseCommodityCodehere; that was wrong.Two changes that alter behaviour
unsold-goods/v1.0.0is deleted, not migrated. No lens can carry a document forward from it — a financial year is not derivable from"2026-Q2", a CN code is not derivable from"apparel", a percentage split is not derivable from one destination, and the reason lists share no member. Two old reasons (EndOfSeason,OverProduction) named commercial circumstances that are not derogations at all, so a disclosure using them asserted a lawful destruction the act does not permit. Every field of a lens would have been invented. The frozen-fixture guard forces the choice: readable, lensable, or gone. Safe only because nothing has ever been stored under it.A passport in this group no longer requires an Annex VII commodity code. Art. 24's disclosure duty and Art. 25's destruction ban have different scopes — the ban reaches Annex VII's apparel and footwear, the disclosure reaches discarded unsold consumer products generally, as 2026/2's own Annex II shows across 45 CN headings from soap to refrigerators. The old check rejected every lawful disclosure outside those two. The envelope
commodity_codedescribes a product, and a year's disclosure has none; the categories are on the lines.Also in here
InstrumentKind::Implementing. The catalog could name a delegated act but not an implementing one. The Treaty distinction is real — a delegated act may supplement or amend non-essential elements of the basic act, an implementing act only lays down uniform conditions for implementing it — so recording 2026/2 asDelegatedwould assert a power it does not have, andOtherwould drop a distinction the law draws. Same call as whenDelegateditself was added.unsold-goods, bothnotRequired— neither creates a passport. 2026/296 carries a five-year figure that is explicitly not passport availability: Art. 3 requires per-derogation documentation kept five years after destruction and produced within 30 days of a request.EMBEDDED.len(),EMBEDDED_COUNT) after they went stale mid-change — the same defect the docs pass in docs(architecture): make the docs true and put tripwires behind the layout rules #185 is about.just checkgreen; 1160 tests.