Loading
Loading
The immutable record of one claim. Frozen, slotted, with a stable wire shape.
@dataclass(frozen=True, slots=True)
class Deposit:
id: str
content: str
polarity: Polarity # positive|negative|cautionary|open
evidence_grade: EvidenceGrade # anecdotal|observed|replicated|verified
scope: Scope
user_id: str
tags: tuple[str, ...]
contradicts: tuple[str, ...]
artifact_refs: tuple[str, ...]
created_at: datetime
author: str | None
author_role: str | None
repro_status: ReproStatus # unreplicated|replicated|failed_repro
task_id: str | NoneSlotted + frozen — you cannot mutate a Depositafter construction. To "edit" a deposit, call contradict()with a new content string and the old deposit's id.
deposit.to_dict() returns a stable JSON shape with a kind: "deposit" discriminator at the top level. This shape is the contract — internal dataclasses.asdict() is forbidden in public code (enforced by a CI gate).
{
"kind": "deposit",
"id": "7e3a1b2c-…",
"content": "Alice prefers oat milk",
"polarity": "open",
"evidence_grade": "anecdotal",
"scope": {"model": null, "dataset": null, ...},
"user_id": "alice",
"tags": ["preference"],
"contradicts": [],
"artifact_refs": [],
"created_at": "2026-05-11T14:23:00.123456+00:00",
"author": null,
"author_role": null,
"repro_status": "unreplicated",
"task_id": null
}Was this page helpful?