Skip to Content
EngineeringDecisions (ADRs)ADR 0029 Licence mapping for new sources, attribution lines, chip classes and the third-party flag on uploads

ADR 0029: Licence mapping for new sources, attribution lines, chip classes and the third-party flag on uploads

Status
Accepted
Date
Deciders
Founder

Context

Phase 4 adds dozens of sources (the verified catalogue of 2026-09-15) onto a closed set of eight licence codes. CC BY and share-alike sources carry obligations the viewer did not show; ICH, EMA and ClinicalTrials.gov have attribution terms that are not Creative Commons; uploaded or synced PDFs are often publisher-copyright papers held under a subscription, and SOPs embed pharmacopoeia excerpts, so customer_internal could launder third-party content.

Decision

  • Every new source maps onto the existing codes by the table in PRODUCT-CONTRACT.md 12.4 (US government works cc0; CC BY sources cc_by; ChEMBL, GtoPdb, Open TG-GATEs cc_by_sa; ICH, EMA, ClinicalTrials.gov cc_by with chip class acknowledgement; contractual or unknown sources unknown; customer systems and uploads customer_internal). No licence code is added or renamed.
  • New columns documents.licence_statement, licence_verified_on, pmc_prefix; chip text derives from licence_statement_class ∈ {public_domain, cc_by, cc_by_sa, acknowledgement, internal, third_party_suspected, locator}.
  • An attribution line (title, authors, source, licence link) on every figure card, pin, table and export of a cc_by or cc_by_sa source; an SA line on every derived table and skill output that mixes share-alike rows; guidance clauses carry “excerpt; see full document”.
  • documents.third_party_suspected: on ingest of an uploaded or synced PDF the worker extracts a DOI or publisher metadata (regex plus a Crossref lookup on the existing budget) and sets the flag with third_party_ref. Such documents render inline only to program members, never appear in exports, shared boards, lens briefs, tier 3 or full-text successors; chip “Uploaded by your organisation. Your organisation’s licence applies.”; a toggle under program.documents.manage with a reason is audited document.third_party_flag.
  • Every budget row and connection carries terms_url, verified_on, verified_by; a weekly provider_probe hashes the terms page and flips the connection to terms_changed. R5 (recorded 2026-09-16): the job is registered and returns 0 in R4 because rate_budgets has no terms columns and CONNECTION_STATUSES has no terms_changed value (verified in api/app/db/models/connection.py:16).

Consequences

  • Facts marked “to verify” in the catalogue (GtoPdb key, Tox21 API, Europe PMC Annotations data licence, Atlassian pool, GEO access, SureChEMBL beta terms) block the tools that depend on them until verified.
  • Excluded on licence or access grounds: DrugBank beyond CC0 vocabulary, WHO ICTRP, CDISC standard text, USP-NF, Ph. Eur., ECHA, EU CTIS, EudraGMDP, modified Allotrope schema.

Alternatives considered

  • New licence codes per source: the closed set is what the renderer tests pin; rejected.
  • Trusting the uploader’s classification: laundering by default; rejected in favour of detection plus an audited manual toggle.

Follow-ups

  • Verify the six provider facts before R5; record each in CLAIMS-REGISTER.md.
  • Rendition PDFs and page anchors for internal documents (R5).