Skip to content

Multiple‑license selection yields a CITATION.cff that passes local validation but breaks Zenodo ingestion #872

@maehr

Description

@maehr

Describe the Bug

When selecting multiple SPDX identifiers in the License step of cffinit, the GUI concatenates selections as a comma‑separated string (e.g. AGPL‑3.0,CC‑BY‑4.0). However, the downloaded CITATION.cff encodes the licenses as an array:

license:
  - AGPL-3.0
  - CC-BY-4.0

This array is valid according to the CFF 1.2.0 schema and passes both cffinit’s internal validator and cffconvert.
However, Zenodo supports only a subset of CFF, accepting a single string for license. As a result, a repository that validates locally fails Zenodo’s validation during archival.

Steps to Reproduce

  1. Open cffinit.
  2. Complete required metadata.
  3. Select two or more licenses in the License step (e.g. AGPL‑3.0 and CC‑BY‑4.0).
  4. Download the CITATION.cff, commit it to a GitHub repository linked to Zenodo.
  5. Create a release and trigger Zenodo import.

Current Behaviour

  • cffinit displays “Your CITATION.cff is valid.”
  • Zenodo rejects the release with:
    Citation metadata load failed

Expected Behaviour

One of the following should occur:

  1. Restrict license selection to a single SPDX identifier.
  2. Coerce multiple selections into a comma‑separated string ("AGPL-3.0,CC-BY-4.0") in the YAML file, which Zenodo accepts.
  3. Emit a warning/error when >1 license is selected, explaining that Zenodo requires a single license string.

Any of these would prevent silent generation of files that pass CFF validation but break common downstream workflows.

Environment

  • cffinit commit/version: (current production deployment, 2025‑07‑15)
  • Browsers: Safari 17.2, Chrome 125 (identical behaviour)
  • Zenodo: zenodo.org, 2025‑07‑15

Additional Context

The CFF 1.2.0 schema (schema guide, §license) allows arrays (interpreted as OR), but Zenodo’s documentation shows and enforces a single-string value.
See also: cffinit issue #234 (possible duplicate).

Possible Implementation Ideas

  • Frontend: Restrict UI to single selection or display a Zenodo compatibility warning badge if >1 is selected.
  • Backend: If license is an array of length >1, join as a comma-separated string before serialisation.
  • CI: Add a regression test validating output against both cffconvert and Zenodo’s schema (e.g. via their REST API).

Rationale & References

Bridging this mismatch in cffinit would improve user experience and interoperability for archival workflows.


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions