Skip to content

New @lde/distribution-health leaf: validity verdicts + usability rollup #468

Description

@ddeboer

Part of the distribution-health feature: netwerk-digitaal-erfgoed/dataset-register#2103 (reachability + validity → usability).

New leaf package @lde/distribution-health, depending on @lde/distribution-probe. Deliberately acyclic: it interprets the prober’s raw results; the prober does not produce verdicts.

Modules (all pure)

  • validity-verdict type + reasons (parse-error, empty), carrying a best-effort parser message, the validatedFingerprint, and producer depth.
  • probe-result → verdict mapper (shallow) and import-outcome → verdict mapper (deep).
  • usability rollup: (reachability, validity verdict(s), current fingerprint) → { usable | unusable | unknown, cause }.
    • Precedence: unavailable ⇒ unusable; reachable + false ⇒ unusable; reachable + true ⇒ usable; reachable + none/stale ⇒ unknown.
    • Staleness gate: a verdict applies only if validatedFingerprint equals the current fingerprint, else it decays to unknown.
    • Depth preference: a deep verdict wins over a shallow one.
  • validity → DQV/PROV quads mapping.

Tests

External-behavior (input → output) tests on the three pure modules; an exhaustive case matrix for the rollup (reachability × validity × fingerprint-fresh/stale × depth). Prior art: sourceFingerprint.test.ts, report.test.ts.

Vocabulary lands in definitions; the normative usability rule is specified in the PRD (netwerk-digitaal-erfgoed/dataset-register#2103).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions