Coverage for node / src / stigmem_node / models / provenance.py: 100%
11 statements
« prev ^ index » next coverage.py v7.13.5, created at 2026-05-25 01:49 +0000
« prev ^ index » next coverage.py v7.13.5, created at 2026-05-25 01:49 +0000
1"""Fact provenance models."""
3from __future__ import annotations
5from pydantic import BaseModel
8class ProvenanceEntry(BaseModel):
9 """One entry in a fact's derived_from chain.
11 exists=False means the referenced entity is tombstoned or the fact is otherwise
12 inaccessible. Shape is identical in both cases so
13 callers cannot distinguish tombstone from unauthorized.
14 """
16 hash: str
17 fact_id: str | None = None
18 entity: str | None = None
19 exists: bool
22class ProvenanceResponse(BaseModel):
23 """Response for GET /v1/facts/:id/provenance."""
25 fact_id: str
26 cid: str | None = None
27 derived_from: list[ProvenanceEntry]