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
//! The **cohort**, derived (VISION §4.10 items 3 and 6; DESIGN §3.8).
//!
//! §4.10 item 6, verbatim: *"There is no Adopt verb and no stored winner: the
//! accepted candidate is the attempt whose delivery the target's history records
//! … cohort = attempts sharing (target, base); provenance is ancestry; rejection
//! is the absence of a delivery."* So there is no fan registry, no membership
//! field and no yog project index here — only a fold over facts yog already
//! wrote down for other reasons.
//!
//! **The join is by pointer** (§4.10 item 4). The pointer is the fire's own
//! `--cwd` argv on the §4.2 trail: yog logged which conversation it bound to
//! which directory, and a directory is a candidate exactly when balls' own
//! [`attempt_path`] formula reproduces it from the handle its leaf names. yog
//! parses no meaning out of the handle and builds no path — it re-derives balls'
//! and compares, so a formula change upstream shows up as an empty cohort rather
//! than as a wrong one.
//!
//! **The trail, never the agent's mark.** litany's `refs/litany/cwd/<agent-id>`
//! also names a bound directory, and it is the wrong source for exactly the
//! reason [`crate::control::root`] gives for the writable root: the mark is
//! rewritten by the agent's own `cd`, so a cohort read from it would be a set
//! the candidates could edit themselves. The trail row is yog's own act.
use ;
use attempt_path;
use Xdg;
use crateOpEntry;
/// The logical `argv[0]` of a fire row (§8.2's logical-vs-physical argv).
const LITANY: &str = "litany";
/// The subcommand a start fires (§8.1).
const PROMPT: &str = "prompt";
/// The minted conversation name's flag (§3.3).
const NAME: &str = "--name";
/// bl-6654's typed work-target binding — the pointer this join follows.
const CWD: &str = "--cwd";
/// §3.7's instruction freeze, one per frozen document (bl-aa8b).
const PIN: &str = "--pin";
/// One **bound fire** as the trail records it (§3.9, bl-40ab): the
/// conversation yog minted, the directory it was bound to, and the instruction
/// documents that fire froze.
///
/// It is the row [`members`] filters and the row the science projection joins
/// on, which is why the argv is parsed once here rather than twice: a fire's
/// `--name`/`--cwd`/`--pin` triple is one reading of one row, and the two
/// consumers differ only in what they then ask of the directory — the cohort
/// asks whether it is an *attempt* ([`handle_of`]), the projection asks which
/// attempt of any kind it is (`science::bound`).
/// Every bound fire in `workspace`, oldest first — the one parse of the §4.2
/// trail's fire rows. A row that is not a `litany prompt`, or one that named no
/// `--cwd`, contributes nothing: it bound no work target, so there is no
/// attempt for it to be about.
/// One candidate of a cohort, as the trail records it: the conversation yog
/// fired and the attempt it was bound to. Held nowhere — re-derived on each
/// read, like every other §5.1 projection.
/// Every candidate of `project` that a fire in `workspace` bound an agent to,
/// oldest first, one member per attempt (a re-fire onto one candidate is one
/// candidate — the **last** row wins, the same rule the writable root's claim
/// join keeps).
///
/// A workspace that only ever started ordinary N = 1 balls has no members: its
/// fires bound `work/<id>` worktrees, which balls' attempt formula does not
/// reproduce. That is the derivation stating "no fan here", not an empty
/// special case.
/// The candidates alone — the writable-root question (§4.11 item 3), which asks
/// *where* and never *who*.
/// The bound fire one trail row names. Any other row — a `bl` verb, a fire
/// that bound no work target — contributes nothing.
/// The member one bound fire names, when its directory is a candidate of
/// `project`. A fire bound to the ordinary `work/<id>` claim contributes
/// nothing here — that is the projection's row, not the cohort's.
/// The value following `name` in an argv tail, when it is there. Owned on the
/// way out (rule 1): the tail is borrowed, elided, and what comes back names
/// nothing of it.
/// **Every** value following `name`, in argv order — the repeating-flag
/// reading, which `--pin` needs and which [`flag`] is the first element of. One
/// scan, so a flag that may repeat and one that may not are read by one rule.
/// The handle `bound` belongs to, iff balls' own [`attempt_path`] over that
/// handle reproduces `bound` exactly. The leaf is a guess; the reproduction is
/// the proof — which is what keeps the path formula balls' single fact.