fix(rules): expose SVHC candidate-list provenance - #51
Conversation
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.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 8 |
| Duplication | 0 |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
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
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.