Multi-Artifact Content Units receive Duplicate Key Error with DeclarativeVersion
The pulp_gem plugin code here  is written correctly, and the fixture data they use is also correct .
I've been able to reproduce the issue described to me on IRC.
There is a bug in the ArtifactDownloader stage whereby a unit with multiple Artifacts incorrectly reuses the first downloader's information (incorrectly) for subsequent Artifacts. This causes the Artifact to have the same sha256 value which raises the duplicate key exception.
Fix the bug by removing the extra, incorrect loop that is present.