Skip to content

fix(rules): expose SVHC candidate-list provenance - #51

Merged
LKSNDRTMLKV merged 1 commit into
mainfrom
fix/svhc-list-provenance
Jul 25, 2026
Merged

fix(rules): expose SVHC candidate-list provenance#51
LKSNDRTMLKV merged 1 commit into
mainfrom
fix/svhc-list-provenance

Conversation

@LKSNDRTMLKV

Copy link
Copy Markdown
Member

The embedded ECHA snapshot is 30 of 253 substances. Classification was already honest (NotInEmbeddedList ≠ cleared), but callers couldn't tell how partial the list was.

Adds provenance constants + candidate_list_provenance() so a caller can record what a passport was checked against. Adds the 2026-02-04 additions (n-Hexane, BPAF) whose SCIP deadline is 2026-08-04. Corrects a wrong update-cadence claim.

Still open: ~221 substances. That's bundle-channel work — hand-adding them closes today's gap and reopens it at the next ECHA revision. See dpp-docs/reference/regulatory/ADJACENT-OBLIGATIONS-2026-07.md.

Gate green, 5 new tests.

The embedded ECHA snapshot held 30 CAS numbers against an official list
of 253 at the 2026-02-04 revision. Callers had no machine-readable way
to know how partial it was, so a finding set produced from a 12 percent
snapshot was indistinguishable from one produced against the full list.

Adds ECHA_CANDIDATE_LIST_AS_OF, ECHA_CANDIDATE_LIST_OFFICIAL_COUNT and
candidate_list_provenance(), so a caller can record what a passport was
actually checked against rather than inferring completeness.

Adds the two substances from the 2026-02-04 revision, n-Hexane and BPAF,
whose SCIP notification deadline is 2026-08-04. The snapshot is now 32
of 253 — still partial, and a test asserts it reports itself so.

Corrects the update cadence in the module docs: additions do not follow
the stated June/December rhythm, the most recent being February 2026.

Classification semantics are unchanged and were already correct — an
absent CAS yields NotInEmbeddedList, meaning unknown to this snapshot,
never cleared. A test now guards that against a well-meaning rename.
@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 8 complexity · 0 duplication

Metric Results
Complexity 8
Duplication 0

View in Codacy

AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.

Run reviewer

TIP This summary will be updated as you push new changes.

@codacy-production codacy-production Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR is up to standards and successfully implements the requirements for exposing SVHC candidate-list provenance. It correctly introduces the CandidateListProvenance metadata and updates the embedded substance list to include the February 2026 ECHA additions (n-Hexane and BPAF). The documentation has also been updated to reflect the current ECHA revision cycle. All functional requirements and test scenarios identified by the agents are addressed in the implementation.

Test suggestions

  • Verify that candidate_list_provenance() returns the correct revision date and counts.
  • Verify that is_complete() returns false while the embedded list is a subset.
  • Confirm the 2026-02-04 additions (n-Hexane, BPAF) are present in the list.
  • Ensure the embedded list contains no duplicate CAS numbers.
  • Verify that a substance on the official list but missing from the snapshot returns SvhcFindingKind::NotInEmbeddedList.

TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback

@LKSNDRTMLKV
LKSNDRTMLKV merged commit 43b68e9 into main Jul 25, 2026
9 checks passed
@LKSNDRTMLKV
LKSNDRTMLKV deleted the fix/svhc-list-provenance branch July 25, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant