content-explorer/tests/onco-reference/README.md
2026-10-12 18:28:16 +02:00

5.6 KiB
Raw Blame History

OnCo reference-slice conformance test (planned / opt-in)

Purpose: validate content-explorer against the real upstream UX and data topology, without treating the OnCo corpus as product data. This is an additional test track, not a replacement for CC0 generic fixture tests.

Non-negotiable rights boundary

  • OnCo software is MIT; OnCo curated dataset is CC BY-NC 4.0, with its own LICENSE-DATA. This repository contains no copied OnCo dataset.
  • The upstream data terms expressly classify a company's internal data pipeline as commercial use requiring the rightsholder's agreement. Small slices and private tests do not automatically create an exception. Before importing real records in an organizational/commercial workflow, obtain written permission or a suitable license, or get independent legal approval for a defensible exception. Until then, use synthetic fixtures and references/URLs only.
  • Record authorization in a private authorization.json document. Do not commit it if it contains contacts/confidential terms. Publication and CI distribution require separate permission evaluation.
  • Attribution wherever permitted OnCo content is presented: Data from OnCo (onco.cc) linking to https://onco.cc; license link https://creativecommons.org/licenses/by-nc/4.0/; source URL, upstream SHA, accessed date, modification notice, and original upstream links. Inspect third-party assets separately; no logo/portrait copying by default.
  • No patient/personal health records, no clinical conclusions, no medical-advice claims.

Reference slice selection (target ~12–25 nodes, not a corpus fork)

Choose a connected induced/test subgraph from an immutable upstream commit. Include one of each: cancer, treatment/drug, target, technology, clinical trial, key paper, institution and glossary term; optionally a person and idea if rights permit. Choose real items after authorization and upstream pinning, not by hard-coded contemporary medical claims.

Coverage requirements:

  1. At least two different types of edges and an inverse/backlink traversal.
  2. At least one one-to-many relationship and one multi-hop path (depth >= 3).
  3. At least one entity with >1 provenance link; dated TL;DR and technical summary.
  4. At least one missing optional field, and at least one unresolved relation handled explicitly (not silently erased).
  5. Two filter facets, full-text query and a stable URL deep link.
  6. A few controlled mutations: renamed title, removed node, bad cross-reference, duplicate id, license metadata removed (all modifications clearly tagged as local tests, never represented as upstream facts).

Proposed workflow

Gate A — authorization: verify rights and record intended use; CI containing the real dataset must remain disabled without sufficient grant.

Gate B — pin & extract: pin upstream commit (git rev-parse HEAD), document source paths and entity ids in slice-selection.yaml; extractor reads only enumerated records. Compute sha256 of originals and emitted projection. No bulk download/auto-discovery as a side effect of normal builds.

Gate C — dual oracle: run the pinned OnCo implementation as reference and capture results for identical user tasks, using stable screenshots and structured browser/graph assertions. Use the same pinned records through the connector to make comparable content states; preserve expected divergences in an explicit exception list.

Gate D — conformance: test source -> projection -> view model -> route using schema tests, semantic invariants, Playwright browser journeys, and visual snapshots. Record each mismatch as extraction, mapping, semantics, presentation, or upstream instability.

Gate E — reproducibility: publish hashes, commit SHA, normalized test descriptions and aggregate results only when permitted; distribute synthetic fixtures as the default executable public tests. Never upload the OnCo slice as a CI artifact without authorization.

Run profiles

  • public-ci: synthetic fixtures only; completely offline and distributable.
  • licensed-reference: locally provisioned real slice, explicitly enabled after authorization; never default, no automatic telemetry/artifact export.
  • visual-upstream: uses browser captures from pinned upstream locally; screenshots may have independent IP considerations; approval needed before publication.

Acceptance gates

  • Signed-off authorization and permitted scope recorded before any organization-run OnCo data extraction.
  • Slice manifest enumerates pinned upstream SHA, 12–25 ids, files, types, edges, provenance and expected license/attribution.
  • Extractor is allowlist-only and deterministic; no unrequested expansion to linked entities.
  • Projection preserves node identity, types, relations, as-of metadata, citations, missingness and applicable rights.
  • ≥95% of agreed deterministic behavioral assertions match reference, with zero silent link loss and zero missing required attribution; exact threshold can be revisited after baseline measurement.
  • Visual differences categorized and reviewed; compare viewport/font/environment under pinned baseline, rather than requiring arbitrary pixel-perfect equality.
  • Public CI passes with no OnCo corpus available; disabling the licensed dataset never breaks product features.
  • Oncology slice and two unrelated synthetic domains exercise exactly the same UI code paths (except declarative presentation configuration).

Evidence

reference-manifest.json, baseline-report.md, projection-diff.json, journey-results.json, visual-review.md, rights-review.md (non-confidential). Keep raw licensed data in ignored local directories.