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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
//! The **attempt science projection** — one derived row per delivery attempt
//! (VISION §4.10 item 7, bl-40ab; DESIGN §3.9).
//!
//! §4.10 item 7, verbatim: *"The science projection is a query: frozen inputs
//! (goal, pins, governing config commit — model and skills ride it),
//! base/source/target/delivered OIDs, terminal response, usage, wall time,
//! project diff, verdicts (messages), and the accepted/rejected/reworked
//! outcome — all derived at read time from litany step records, balls delivery
//! identities, and git ancestry. Nothing stored."*
//!
//! So this module owns **no fact**. Every column names an authority that
//! already had it, and the projection's whole content is the join:
//!
//! | column | authority |
//! |---|---|
//! | the diff, its two refs and their OIDs, the acceptance mark | [`crate::workdiff`] (§5.1 #32) — composed, not restated |
//! | the conversation bound to the attempt, and its frozen pins | the §4.2 trail's own fire row ([`crate::fan::fires`]) |
//! | the goal | the agent worktree's `goal.md`, frozen at the dispatch commit |
//! | the config commit governing it | §5.1 #17's derivation ([`crate::config_edit::branch`]) — the followed one, read at projection time |
//! | usage, wall time, step count | litany's step records, off the one walk already published as `Snapshot::bills` |
//! | the terminal response and the verdicts | the committed `messages/` tree ([`crate::transcript`]) |
//! | the base the two ends departed from | git: `merge-base target source`, balls' own base formula ([`outcome`]) |
//! | accepted / rejected / reworked | git: the target's history and its ancestry ([`outcome`]) |
//!
//! **The projection composes the work-diff row rather than repeating it.** The
//! diff, the two refs, both OIDs and the derived acceptance mark are already one
//! derivation with one home and one wire spelling; a science row that restated
//! them would be VISION §4.5's two-representations-of-one-fact, and the two
//! would drift the first time a `Change` arm changed. So [`Attempt::diff`] *is* a
//! [`workdiff::Attempt`](crate::workdiff::Attempt), spelled by that module's own
//! codec in both directions.
//!
//! **It is a read, and reads nothing twice.** The step-record columns come off
//! `Snapshot::bills` — the walk the derivation worker already made (bl-9dd4) —
//! filtered in memory by the attempt's own conversation, so a projection over a
//! workspace of ten attempts makes no extra pass over `steps/` at all. The only
//! disk reads it adds are the frozen inputs of each row and, when a sibling has
//! landed, one ancestry probe per superseded attempt.
//!
//! **A seat renders this projection, and yog does not render it for one**
//! (bl-7cc8). The §11 fan-group card's affordance-to-composer-text composition
//! and V3.3's response comparison were derived here and reached nothing:
//! `Reply::Science` carries each row's `response` verbatim and no draft text at
//! all, so a seat that wants a diff has both sides already, and a diff computed
//! here would be the second implementation this module exists to avoid. They
//! left with the face they served (bl-7942).
use Path;
use Xdg;
use crateSnapshot;
use crateBudgetSpend;
use crateOpEntry;
pub
pub use Outcome;
/// One delivery attempt, as science reads it (VISION §4.10 item 7). Held
/// nowhere: every field is re-derived per ask, like every other §5.1
/// projection.
/// One message delivered into an attempt's conversation: who sent it and what
/// it said, verbatim. The envelope-stripped body [`crate::transcript`] already
/// parses — a second parse of a `messages/` entry would be a second reading of
/// one file.
/// Project every attempt the workspace at `workspace` holds (§3.9). The row set
/// is exactly [`crate::workdiff::read`]'s — the ordinary claim attempt and each
/// §3.8 fan candidate — because that is what "one row per attempt" already
/// means on this world, and a second enumeration would be a second answer to
/// "which attempts are there".
///
/// A workspace holding no delivery obligation projects nothing: a bare or path
/// start has no attempt (VISION §4.10 item 8), which is the general path with
/// no inputs.
/// One row: the composed diff, whatever the bound conversation can be asked,
/// and the derived outcome. The three come from three different authorities and
/// are assembled here — this function *is* the join, and there is nothing else
/// in it.