Skip to content

License lineage: repository licenses and data-typed papers - #2522

Merged
neuromechanist merged 7 commits into
devfrom
fix/lineage-gaps-280
Nov 28, 2026
Merged

neuromechanist merged 7 commits into
devfrom
fix/lineage-gaps-280

Conversation

@neuromechanist

@neuromechanist neuromechanist commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Closes the license-lineage gaps a depositor reported in support ticket #280 (owner-approved, 2026-11-28). Resolver license-lineage/7, DOI cache key doi4:. Owner rules kept: anything the resolver cannot determine is unresolved (no mail), nothing is guessed, and a failed fetch never moves an outcome toward permission. Fixtures 69 to 92 were recorded from one live read of each public registry (two Dataverse contact emails redacted).

What changed

  • Repository licenses for empty DataCite rights: Kaggle (/ds/<id> redirect, then the datasets/view API's license name), listed Dataverse installations (Recherche Data Gouv, DANS Data Stations, DataverseNL, Harvard; license name/URI, custom terms or a restricted file are unresolved), and Research Data Australia for Curtin (10.25917; Curtin has no public repository API, RDA's rights record is machine-readable). A repository that states no license leaves the record as today; a failed read is unresolved.
  • GitHub repository URLs in SourceDatasets are sources, read for license.spdx_id; only a data license (CC family, CC0, ODC family, etalab-2.0) counts. A code license (MIT, BSD, Apache, GPL, Unlicense), no license or NOASSERTION is unresolved. Not added to OWN_RECORD_RESOLVERS.
  • OSF "Other" license: the one license file in the project's OSF Storage root (at most 64 KiB) is read; only an exact CC legal-code title, CC/ODC URL with version or data-license SPDX id counts, and all statements must agree; any carve-out or restriction text beyond the statement (outside a whole legal code, the license's own name removed) is unresolved. The 64 KiB cap holds while streaming when there is no Content-Length. No license file stays as today.
  • Recognition: ODC-By v1.0, ODC URLs with hyphenated versions, SPDX license-list URLs, and etalab-2.0 (attribution class, permissive-attribution, from its text: attribution is its only condition and it names CC BY 2.0+ and ODC-By as compatible; reasoning in the ADR 0139 amendment). COAR access-rights entries are not licenses.
  • Paper-typed records holding data: a Zenodo publication or a figshare journal contribution whose recognized data-format files (recordings, .mat, .nwb, .h5, .csv/.tsv; never archives or generic .json/.xlsx) hold at least 90% of bytes and at least 1 MiB is a dataset under its license. A record mostly of archives or generic formats, or with unknown sizes beside such files, is unresolved (never a dataset, never a publication). PDF/figures-only and other types (software, poster) stay publications. Such a record never counts as an own-record upstream for the bulk acknowledgment. The Zenodo/figshare read is now retried and a failed read is unresolved. Card note updated for both cases; a resolver-6 record keeps the 0.10.59 sentence.
  • ScienceDB (nm000337): the DOI was dropped because the dataset also gives it as DatasetDOI; now only a NEMAR (10.82901) DatasetDOI is dropped as the dataset's own, from every input.
  • Kaggle: a database license with unlicensed contents ("Database: Open Database, Contents: © Original Authors") or a copyright notice is unresolved; only ODbL + Database Contents is read. The unused one-attempt fetch was removed (the Zenodo read is retried on purpose: it now decides the outcome).
  • ADR 0139 and 0142 dated amendments, index lines, CHANGELOG Unreleased entry, fixture README.

Expected outcomes (from the fixtures)

nm000543, nm000704, nm000749, nm000926, nm001048, nm000568: compatible_attribution. nm000819: compatible. nm000714, nm000337: compatible_nc. unresolved: nm000661 (one zip archive), nm001046 (MIT is a code license), nm001045 (GitHub detects no license).

Test plan

  • bun run typecheck, bun run lint, biome on changed files
  • Targeted tests: test/license-lineage*.test.ts (new license-lineage-repositories.test.ts, the ticket's twelve datasets end to end), license-check spawn, decision card, upstream-ack, auto-deny, license-permission, review inputs, backend lineage and upstream-ack routes (713 pass after review round 1)
  • ADR index and changelog format tests
  • Review round 1 mutation checks: counting archives as data, dropping a non-NEMAR DatasetDOI, accepting a code license, skipping the restriction check, the Kaggle contents rule, the undetermined-to-unresolved step and the bulk-acknowledgment exclusion each fail a test
  • Mutation checks: the data-paper rule forced true fails the PDF-only and mostly-not-data tests; forced false (or the dataset switch removed) fails the data-paper tests; the own-DOI rule, COAR access rights, license-file agreement, Kaggle "Other (description)" and GitHub NOASSERTION mutants each fail a test
  • Full bun test not run (epic-level gate); would check the whole suite because RegistryBases gained fields

@github-actions

github-actions Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

📦 Package Preview

Your package is ready to test!

bun install -g nemar-cli@PR2522

Version: 0.10.60-PR2522.b066a47
Commit: b066a47


🤖 Updated on each push.

@neuromechanist
neuromechanist merged commit 40ec507 into dev Nov 28, 2026
27 checks passed
@neuromechanist
neuromechanist deleted the fix/lineage-gaps-280 branch November 28, 2026 18:29
This was referenced Nov 28, 2026

This branch was previously deployed

1 inactive deployment
npm — b066a47a Deployed Nov 28, 2026 by neuromechanist via publish #5277
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