1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
//! A typed receipt for what a recall **supplied** to the model — spec P1a.
//!
//! This is a contract, not presentation: it carries data and IDs only, mirrors
//! the doc style of [`super::view`], and lives here (not in a render module) for
//! the same reason [`RecallOutcome`] does — the adapter slice that renders it is
//! a later slice. Nothing displays it yet; P1b consumes it. See
//! `.claude/specs/spec-p1a-recall-receipt.md`.
//!
//! ## What this names, and what it deliberately does not
//!
//! The receipt names what recall **supplied** to the prompt — the claims whose
//! rendered lines reached the context block — never what the model **used**.
//! Recall injects context; the model may ignore it. There is no field here that
//! could be read as "the model applied this claim", because none was measured.
//! `supplied` / `included` are the load-bearing words; `applied` / `used` are
//! avoided on purpose (spec §3, a correctness property).
//!
//! `profile` is the human-facing profile **name**, never the opaque
//! [`ProfileIdentity`]. The identity is a hash over connection material; the
//! receipt has no field for it, by construction — see the structural test
//! `receipt_carries_no_profile_identity_field`.
//!
//! No raw SQL, evidence text, or result cells appear here. `value` is the same
//! short rendered form the prompt block already shows (a column name, an alias),
//! not the claim's stored payload.
use ;
/// The receipt for one recall: what it supplied, what bounds dropped, and
/// whether recall ran at all. Returned beside the context blocks by
/// [`crate::agent::recall_context::recall_context_blocks`].
///
/// `dropped_by_bounds` counts **claims** dropped by the byte or count caps
/// after recall's policy filter — distinct from claims a schema-staleness policy
/// dropped (those never reach the supply path and are surfaced separately via
/// [`super::view::RecallDiagnostics`]). A non-zero `dropped_by_bounds` is the
/// receipt's way of saying "the list above is a subset, not the whole"; zero
/// means the supply path kept everything it selected.
pub
/// Whether a recall ran against the store, or was not run due to configuration
/// or policy.
///
/// The distinction the receipt exists to make: an empty `supplied` under
/// [`RecallOutcomeKind::Ran`] means "recall ran and matched nothing" (or the
/// store was unavailable); under [`RecallOutcomeKind::ConfiguredOff`] it means
/// "recall was configured off"; under [`RecallOutcomeKind::PrivacyGateClosed`]
/// it means "recall was skipped because the privacy gate was closed" — three
/// distinct facts, never collapsible.
pub
/// One object's claims, as supplied to the prompt. `schema_state` is the
/// contract's aggregated state (see [`super::view::ContractSchemaState`]) — a
/// per-object fact, stated once here rather than repeated on every claim.
/// `profile` is the profile **name**, never the opaque identity.
pub
/// One claim as supplied to the prompt. Carries the claim id (so a later phase
/// can name exactly which saved claims shaped an answer), its kind, a short
/// rendered value, and its persisted status — so a `Candidate` reads as
/// `candidate`, not flattened into a single "included" notion (P1b renders it
/// differently; P3 acts on it). No raw payload, evidence, or SQL.
pub