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
//! **What a detached launch produced** (DESIGN §8.1, §13.3, bl-b95e) — the
//! state a `-2` row's failure is derived from, in place of what its sink said.
//!
//! §13.3's `driver.log` ruling is the general one: *"The log is append-only
//! across launches, so its **content** is never the trigger — a stale line from
//! a healed crash must not alarm — only the diagnosis."* The §8.1 stderr sink
//! was the one capture file yog still read the other way round: a byte in it
//! made the row a rendered failure, and the marker table (`opslog::notice`,
//! bl-1296) existed only to hold back the benign lines that reading swept up.
//! A phrase table over sentences litany is free to reword is not a classifier,
//! and it could never reach the defect underneath it — the sink is append-only
//! for the driver's whole life, so **one** unrecognized line held that row red
//! for every later sweep, however many turns the driver went on to run.
//!
//! The **state** is the orphan's own pair ([`crate::steps_view::orphan`], the
//! template), asked of the thing the launch was fired to produce:
//!
//! - **Nobody is driving it** — the target agent's §3.5 lock is free
//! ([`AgentState::driven`]). A driver at work is the answer to "did it
//! survive", so nothing else is asked.
//! - **It has not acted since the launch** — every matching agent's
//! `last_action_unix` predates the row's own `ts`. A conversation that was
//! born, or a step that was written, is the launch's product; whatever went
//! wrong *after* that belongs to the wound and the orphan, which have a
//! surface to say it on.
//!
//! Both hold **vacuously when the target does not exist at all**, which is the
//! class the sink was added for (bl-4895): a `litany prompt` whose driver died
//! before writing a branch leaves no conversation, no step and no transcript —
//! nothing but its ops row and its sink.
//!
//! Nothing is stored and no new signal is introduced. The verdict is re-derived
//! per sweep from the already-derived §3.5 trees, and the sink is read **only**
//! when it holds — a healthy launch pays no syscall for it, exactly as a
//! healthy conversation pays none for `driver.log`.
//!
//! **It waits, and it never answers over a world it cannot read.** The §7.3
//! grace window (bl-90bf, `Cadence::wound_grace`) is the same catch-up bound
//! the wound banner rides: a launch younger than it has not had time to produce
//! anything, and the rising edge of a healthy start is indistinguishable from a
//! death until yog has looked again (bl-18e8). A workspace with no derived tree
//! is **no verdict** rather than a death — §10's rule against a false definite,
//! and the reason a start into a wall yog has not enumerated yet is silent.
use HashMap;
use PathBuf;
use Duration;
use ;
use crate;
/// litany's start verb, and the flag carrying the §3.3 name the fire minted.
/// Here rather than beside the spawn for [`super::detached::sink`]'s own
/// reason: the launch writes these tokens into `ops.jsonl` and this reads them
/// back, so the two sides of that join have one home and cannot drift.
pub const PROMPT: &str = "prompt";
/// See [`PROMPT`].
pub const NAME_FLAG: &str = "--name";
/// litany's resume verb (§8.2): `advance <workspace> <agent>`, the driver
/// launch behind a capability release and the operator's own nudge.
pub const ADVANCE: &str = "advance";
/// Which agents a detached launch was fired to move — the row's own argv, read
/// back. `Conversation` is a start, named by the §3.3 name the fire minted and
/// matched on [`Agent::name_fact`]; `Agent` is a resume, named by the id it was
/// handed.
/// Whether this ops entry is a detached launch that **produced nothing** —
/// the module's whole question, and the one input to a `-2` row's failure.
///
/// `now` is the derivation's own clock reading and `grace` the §7.3 window
/// ([`Cadence::wound_grace`](crate::app::Cadence::wound_grace)); `trees` is
/// the pass's already-derived §3.5 forest, keyed by workspace path.
pub