Skip to content

Record durable extraction runs and proposition run lineage #67

Description

@jimador

Goal

Record durable, tenant-scoped extraction runs and link propositions to every run that
produced or confirmed them without changing source-grounding cardinality.

Context

Projection and collector runs establish the DICE storage pattern. Extraction needs its
own lifecycle, metadata envelope, indexes, parent/superseded links, and a dedicated
proposition-to-run relation. ProvenanceEntry and DerivedFrom remain source evidence.

A run may contain zero, one, or many model invocations because of chunking or retries.
Requested configuration, observed execution facts, optional provider-effective facts,
and protected replay evidence must remain distinct.

The design borrows the separation of run/job/input/output from OpenLineage, the
parameters/metrics/context/artifact split from MLflow, requested-versus-response model
facts and opt-in content from OpenTelemetry GenAI, and #64's S3/W3C-PROV-style stable
source plus opaque revision. It uses typed fields rather than generic facet/tag maps.

The resulting evidence supports troubleshooting failures, comparing and evaluating runs,
approximate reproduction, auditing proposition output, and investigating user-context
effects. Experiment/user-context comparisons use tenant-scoped run pages and host-side
grouping; they do not imply new push-down filters or REST endpoints.

Acceptance criteria

  • ExtractionRun records tenant, profile, ordered source revisions, pass, parent/
    superseded lineage, experiment/cohort, prompt/template and schema fingerprints,
    metamodel, extractor/host/runtime, status, timing, counts, and bounded failures.
  • Requested model configuration records portable model/role, temperature, penalties,
    max tokens, top-k/top-p, thinking/selection fingerprints, and timeout without
    serializing provider extension objects.
  • Repeatable invocation records capture only genuinely observed configured service,
    usage, timing, attempt, outcome, and optional provider-response facts.
  • Opaque actor, request, session, personalization, and deployment references support
    audit without retaining PII or arbitrary user-context maps.
  • Raw prompt/source/user-context payloads are absent by default; optional replay
    material is represented only by classified, expiring protected-content references.
  • Replay fidelity is explicit and never promises exact deterministic replay.
  • DICE ships scoped in-memory and Drivine stores, indexes, schema registration,
    lifecycle coordination, invocation correlation, and autoconfiguration.
  • Empty, completed, failed, and cancelled headers persist; retries are idempotent and
    incompatible terminal rewrites are rejected.
  • Proposition-to-run is dedicated many-to-many attribution using canonical saved ids.
  • Parent and superseded chains are axis-explicit, bounded, cycle-safe, and queryable.
  • Repository, authorized REST, and bundle lineage expose run refs separately from sources.
  • Two identical-content runs produce one proposition/source grounding and two run links.
  • Every lookup, join, inverse query, chain, page, and aggregate fails closed across tenants.
  • Legacy callers, Java descriptors, existing /why JSON, and hosts without configured
    run storage retain current behavior.

Constraints

Out of scope

  • Atomic product commit.
  • Product batching and later-pass orchestration.
  • Host replay policy or exact replay guarantees.
  • Encrypted blob storage, KMS, retention scheduling, authentication, or actor-directory ownership.

Original request

Record which model, prompt, schema, profile, source revisions, runtime, user/request
context, and observed execution conditions produced knowledge so extraction incidents,
evaluation, cost, drift, testing, and re-analysis are auditable.

Activity

Metadata

Metadata

Assignees

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