tix-tracker 0.12.0

A terminal issue tracker: markdown + YAML frontmatter issues with a kanban TUI and CLI
Documentation
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
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
#[allow(clippy::wildcard_imports)]
use super::*;

pub(super) fn defer_recurring_occurrence(
    _config: &Config,
    store: &Store,
    args: &Value,
) -> ToolOutcome {
    lifecycle_tool(store, args, LifecycleAction::Defer)
}

pub(super) fn detect_recurring_due(_config: &Config, store: &Store, args: &Value) -> ToolOutcome {
    let date = opt_string(args, "date")?;
    let timezone = opt_string(args, "timezone")?;
    let index = match recurring_index(store) {
        Ok(index) => index,
        Err(error) => return Ok(error_result(crate::error::render_error(&error))),
    };
    let context = match cmd_recurring::context_for(date.as_deref(), timezone.as_deref()) {
        Ok(context) => context,
        Err(error) => return Ok(error_result(crate::error::render_error(&error))),
    };
    let detection = detect(&index, &context);
    Ok(success_result(
        detection_text(&detection),
        detection_value(&detection, &context),
    ))
}

pub(super) fn end_recurring_series(_config: &Config, store: &Store, args: &Value) -> ToolOutcome {
    lifecycle_tool(store, args, LifecycleAction::End)
}

pub(super) fn generate_recurring_occurrence(
    config: &Config,
    store: &Store,
    args: &Value,
) -> ToolOutcome {
    let raw = req_string(args, "series")?;
    let date = req_string(args, "date")?;
    let actor = recurring_actor(args)?;
    let confirmed = recurring_confirmed(args)?;
    let index = match recurring_index(store) {
        Ok(index) => index,
        Err(error) => return Ok(error_result(crate::error::render_error(&error))),
    };
    let series = match cmd_recurring::resolve(&index, &raw) {
        Ok(series) => series,
        Err(error) => return Ok(error_result(crate::error::render_error(&error))),
    };
    // The key is derived from the series' **stable id** and the explicit date, never
    // from the display name: identity is the id (C-002).
    let context = match cmd_recurring::context_for(Some(&date), None) {
        Ok(context) => context,
        Err(error) => return Ok(error_result(crate::error::render_error(&error))),
    };
    let key = OccurrenceKey::new(&series.id, &DateKey::from_date(context.today));
    let request = GenerationRequest::new(series.id.clone(), key, actor);
    let request = if confirmed {
        request.confirm()
    } else {
        request
    };
    match generate(config, store, &index, &request) {
        Ok(outcome @ GenerationOutcome::Rejected { .. }) => Ok(rejected_result(
            crate::error::render_error(&crate::error::TixError::Refused(outcome.render())),
            generation_value(&outcome),
        )),
        Ok(outcome) => Ok(success_result(
            generation_text(&outcome),
            generation_value(&outcome),
        )),
        Err(error) => Ok(error_result(crate::error::render_error(&error))),
    }
}

pub(super) fn get_recurring_series(_config: &Config, store: &Store, args: &Value) -> ToolOutcome {
    let raw = req_string(args, "series")?;
    let index = match recurring_index(store) {
        Ok(index) => index,
        Err(error) => return Ok(error_result(crate::error::render_error(&error))),
    };
    let series = match cmd_recurring::resolve(&index, &raw) {
        Ok(series) => series,
        Err(error) => return Ok(error_result(crate::error::render_error(&error))),
    };
    let occurrences: Vec<&crate::recurrence::series::OccurrenceRecord> = index
        .occurrences()
        .filter(|record| record.series_id == series.id)
        .collect();
    let dates: Vec<&str> = occurrences
        .iter()
        .map(|record| record.date.as_str())
        .collect();
    let (diagnostics_text, diagnostics) = series_diagnostics(&index);
    let mut text = series_detail_text(&series, &dates);
    text.push_str(&diagnostics_text);
    Ok(success_result(
        text,
        json!({
            "series": series_value(&series),
            "occurrences": occurrences
                .iter()
                .map(|record| {
                    json!({
                        "key": record.key.as_str(),
                        "date": record.date.as_str(),
                        "issue_number": record.issue_number,
                        "filename": record.filename,
                    })
                })
                .collect::<Vec<_>>(),
            "diagnostics": diagnostics,
        }),
    ))
}

pub(super) fn ignore_recurring_occurrence(
    _config: &Config,
    store: &Store,
    args: &Value,
) -> ToolOutcome {
    lifecycle_tool(store, args, LifecycleAction::Ignore)
}

pub(super) fn list_recurring_series(_config: &Config, store: &Store, _args: &Value) -> ToolOutcome {
    let index = match recurring_index(store) {
        Ok(index) => index,
        Err(error) => return Ok(error_result(crate::error::render_error(&error))),
    };
    let (diagnostics_text, diagnostics) = series_diagnostics(&index);
    let mut text = series_rows_text(&index);
    text.push_str(&diagnostics_text);
    Ok(success_result(
        text,
        json!({
            "series": index.series().map(series_value).collect::<Vec<_>>(),
            "series_count": index.series_count(),
            "diagnostics": diagnostics,
        }),
    ))
}

pub(super) fn pause_recurring_series(_config: &Config, store: &Store, args: &Value) -> ToolOutcome {
    lifecycle_tool(store, args, LifecycleAction::Pause)
}

pub(super) fn resume_recurring_series(
    _config: &Config,
    store: &Store,
    args: &Value,
) -> ToolOutcome {
    lifecycle_tool(store, args, LifecycleAction::Resume)
}

pub(super) fn skip_recurring_occurrence(
    _config: &Config,
    store: &Store,
    args: &Value,
) -> ToolOutcome {
    lifecycle_tool(store, args, LifecycleAction::Skip)
}

pub(super) fn dispatch(
    config: &Config,
    store: &Store,
    name: &str,
    arguments: &Value,
) -> Option<ToolOutcome> {
    match name {
        "list_recurring_series" => Some(list_recurring_series(config, store, arguments)),
        "get_recurring_series" => Some(get_recurring_series(config, store, arguments)),
        "detect_recurring_due" => Some(detect_recurring_due(config, store, arguments)),
        "generate_recurring_occurrence" => {
            Some(generate_recurring_occurrence(config, store, arguments))
        }
        "pause_recurring_series" => Some(pause_recurring_series(config, store, arguments)),
        "resume_recurring_series" => Some(resume_recurring_series(config, store, arguments)),
        "end_recurring_series" => Some(end_recurring_series(config, store, arguments)),
        "skip_recurring_occurrence" => Some(skip_recurring_occurrence(config, store, arguments)),
        "defer_recurring_occurrence" => Some(defer_recurring_occurrence(config, store, arguments)),
        "ignore_recurring_occurrence" => {
            Some(ignore_recurring_occurrence(config, store, arguments))
        }
        _ => None,
    }
}

/// The series index for the current repository: one read of the issue tree, one
/// build (T038). Exactly the index the CLI, the board and the Schedule page build.
pub(super) fn recurring_index(store: &Store) -> TixResult<SeriesIndex> {
    Ok(SeriesIndex::build(&store.list()?))
}

/// One series as every surface reports it (T040): identity, metadata, the derived
/// cursor and skipped dates, and the rule's own summary rather than a second one.
pub(super) fn series_value(series: &Series) -> Value {
    json!({
        "id": series.id.as_str(),
        "name": series.name,
        "state": series.state.as_str(),
        "rule": series.rule.summary(),
        "rule_kind": series.rule.kind.as_str(),
        "anchor": match series.rule.anchor_key() {
            Ok(key) => Value::String(key.as_str().to_string()),
            Err(_) => Value::Null,
        },
        "next_cursor": series.next_cursor.as_ref().map(DateKey::as_str),
        "skipped": series.skipped.iter().map(DateKey::as_str).collect::<Vec<_>>(),
        "issue_number": series.issue_number,
        "filename": series.filename,
    })
}

/// The CLI's `tix recurring list` table, row for row (`NFR-003`).
pub(super) fn series_rows_text(index: &SeriesIndex) -> String {
    let mut out = String::from("id\tname\tstate\tnext_cursor\tskipped\n");
    for series in index.series() {
        out.push_str(&format!(
            "{}\t{}\t{}\t{}\t{}\n",
            series.id,
            series.name,
            series.state.as_str(),
            series
                .next_cursor
                .as_ref()
                .map(DateKey::as_str)
                .unwrap_or("-"),
            series.skipped.len()
        ));
    }
    out
}

/// The CLI's `tix recurring show` block, line for line (`NFR-003`).
pub(super) fn series_detail_text(series: &Series, occurrences: &[&str]) -> String {
    let anchor = match series.rule.anchor_key() {
        Ok(key) => key.as_str().to_string(),
        Err(_) => "(invalid)".to_string(),
    };
    let skipped = if series.skipped.is_empty() {
        "-".to_string()
    } else {
        series
            .skipped
            .iter()
            .map(DateKey::as_str)
            .collect::<Vec<_>>()
            .join(",")
    };
    let occurrences = if occurrences.is_empty() {
        "-".to_string()
    } else {
        occurrences.join(",")
    };
    format!(
        "id: {}\nname: {}\nstate: {}\nrule: {}\nanchor: {}\nnext_cursor: {}\nskipped: {}\n\
         issue: #{} ({})\noccurrences: {}\n",
        series.id,
        series.name,
        series.state.as_str(),
        series.rule.summary(),
        anchor,
        series
            .next_cursor
            .as_ref()
            .map(DateKey::as_str)
            .unwrap_or("-"),
        skipped,
        series.issue_number,
        series.filename,
        occurrences
    )
}

/// The index's findings, as the block a surface prints and as values (T040).
pub(super) fn series_diagnostics(index: &SeriesIndex) -> (String, Value) {
    let mut text = String::new();
    for diagnostic in index.diagnostics() {
        text.push_str(&diagnostic.render());
        text.push('\n');
    }
    let values: Vec<Value> = index
        .diagnostics()
        .iter()
        .map(|diagnostic| {
            json!({
                "kind": diagnostic.kind.as_str(),
                "issue_number": diagnostic.issue_number,
                "filename": diagnostic.filename,
                "field": diagnostic.field,
                "message": diagnostic.message,
            })
        })
        .collect();
    (text, Value::Array(values))
}

/// The CLI's `tix recurring detect` output, line for line (`NFR-003`).
pub(super) fn detection_text(detection: &Detection) -> String {
    let mut out = String::new();
    if detection.is_empty() {
        out.push_str(&format!(
            "No occurrences due across {} series.\n",
            detection.series_examined()
        ));
    } else {
        out.push_str("series_id\toccurrence_key\tdue_date\trule\n");
        for warning in detection.warnings() {
            out.push_str(&format!(
                "{}\t{}\t{}\t{}\n",
                warning.series_id, warning.occurrence_key, warning.due_date, warning.rule_summary
            ));
        }
    }
    for note in detection.notes() {
        out.push_str(&format!(
            "note: {}\t{}\t{}\n",
            note.kind.as_str(),
            note.series_id,
            note.message
        ));
    }
    out
}

/// The due answer as values (T040): the date context it was resolved against, each
/// warning's **stable occurrence key** (what a lifecycle tool takes), the actions
/// the warning accepts, and why a series that was examined is not due.
pub(super) fn detection_value(detection: &Detection, context: &RuleContext) -> Value {
    json!({
        "date": context.today.to_string(),
        "timezone": context.timezone.as_ref().map(ToString::to_string),
        "series_examined": detection.series_examined(),
        "warnings": detection
            .warnings()
            .iter()
            .map(|warning| {
                json!({
                    "summary": warning.summary(),
                    "series_id": warning.series_id.as_str(),
                    "series_name": warning.series_name,
                    "occurrence_key": warning.occurrence_key.as_str(),
                    "due_date": warning.due_date.as_str(),
                    "rule": warning.rule_summary,
                    "available_actions": warning
                        .available_actions
                        .iter()
                        .map(|action| action.as_str())
                        .collect::<Vec<_>>(),
                })
            })
            .collect::<Vec<_>>(),
        "notes": detection
            .notes()
            .iter()
            .map(|note| {
                json!({
                    "kind": note.kind.as_str(),
                    "series_id": note.series_id.as_str(),
                    "message": note.message,
                })
            })
            .collect::<Vec<_>>(),
    })
}

/// The CLI's generation lines, word for word.
pub(super) fn generation_text(outcome: &GenerationOutcome) -> String {
    match outcome {
        GenerationOutcome::Created {
            key,
            issue_number,
            filename,
            ..
        } => format!("Created occurrence #{issue_number} for {key}\n  file: {filename}\n"),
        GenerationOutcome::NoOp { key, message, .. } => {
            format!("No-op for {key}: {message}\n")
        }
        GenerationOutcome::Rejected { .. } => outcome.render(),
    }
}

/// The generation outcome as values (T040).
pub(super) fn generation_value(outcome: &GenerationOutcome) -> Value {
    match outcome {
        GenerationOutcome::Created {
            series_id,
            key,
            date,
            issue_number,
            filename,
        } => json!({
            "status": "created",
            "series_id": series_id.as_str(),
            "occurrence_key": key.as_str(),
            "date": date.as_str(),
            "issue_number": issue_number,
            "filename": filename,
        }),
        GenerationOutcome::NoOp {
            series_id,
            key,
            state,
            message,
        } => json!({
            "status": "no-op",
            "series_id": series_id.as_str(),
            "occurrence_key": key.as_str(),
            "key_state": key_state_str(*state),
            "message": message,
        }),
        GenerationOutcome::Rejected { diagnostics } => json!({
            "status": "rejected",
            "diagnostics": diagnostics
                .iter()
                .map(|diagnostic| {
                    json!({
                        "kind": diagnostic.kind.as_str(),
                        "message": diagnostic.message,
                    })
                })
                .collect::<Vec<_>>(),
        }),
    }
}

/// The shared word for a key's state (`generated`/`skipped`/`free`).
pub(super) fn key_state_str(state: KeyState) -> &'static str {
    match state {
        KeyState::Generated => "generated",
        KeyState::Skipped => "skipped",
        KeyState::Free => "free",
    }
}

/// The CLI's lifecycle lines, word for word.
pub(super) fn lifecycle_text(series_id: &SeriesId, outcome: &LifecycleOutcome) -> String {
    match outcome {
        LifecycleOutcome::Applied {
            action,
            state,
            detail,
            ..
        } => format!(
            "{}: series {series_id} is now {}\n  {detail}\n",
            action.as_str(),
            state.as_str()
        ),
        LifecycleOutcome::NoOp {
            action, message, ..
        } => format!("{}: no-op: {message}\n", action.as_str()),
        LifecycleOutcome::Rejected { .. } => outcome.render(),
    }
}

/// The lifecycle outcome as values (T040), including the History entry it wrote.
pub(super) fn lifecycle_value(outcome: &LifecycleOutcome) -> Value {
    match outcome {
        LifecycleOutcome::Applied {
            series_id,
            action,
            state,
            key,
            detail,
        } => json!({
            "status": "applied",
            "series_id": series_id.as_str(),
            "action": action.as_str(),
            "state": state.as_str(),
            "occurrence_key": key.as_ref().map(|key| key.as_str()),
            "history": {
                "kind": crate::model::HistoryEventKind::TransitionAccepted.as_str(),
                "detail": detail,
            },
        }),
        LifecycleOutcome::NoOp {
            series_id,
            action,
            message,
        } => json!({
            "status": "no-op",
            "series_id": series_id.as_str(),
            "action": action.as_str(),
            "message": message,
        }),
        LifecycleOutcome::Rejected { diagnostics } => json!({
            "status": "rejected",
            "diagnostics": diagnostics
                .iter()
                .map(lifecycle_diagnostic_value)
                .collect::<Vec<_>>(),
        }),
    }
}

/// One lifecycle diagnostic, with the kind that makes it branchable.
pub(super) fn lifecycle_diagnostic_value(diagnostic: &LifecycleDiagnostic) -> Value {
    json!({
        "kind": diagnostic.kind.as_str(),
        "message": diagnostic.message,
    })
}

/// A rejected outcome: `isError: true`, the CLI's rendered refusal as the text, and
/// the structured outcome beside it.
///
/// The same shape the templates and views families use for a rejected write
/// (`template_error_result`, the view rejection), and for the reason T040 gives:
/// a rejection has to stay diagnosable, and a sentence alone is not.
pub(super) fn rejected_result(text: String, structured: Value) -> Value {
    json!({
        "content": [{ "type": "text", "text": text }],
        "structuredContent": structured,
        "isError": true,
    })
}

/// The confirmation a request carries: MCP's `confirm`, mapped onto the service's
/// `confirmed` flag.
///
/// MCP does **not** gate this itself, and that is the point: every service refuses
/// an unconfirmed request with its own `not_confirmed` diagnostic *before* the store
/// is touched, so the CLI's `--yes` and this flag produce the same refusal word for
/// word because they are the same code path (C-006). A second gate here could only
/// drift from it.
pub(super) fn recurring_confirmed(args: &Value) -> std::result::Result<bool, ()> {
    Ok(opt_bool(args, "confirm")?.unwrap_or(false))
}

/// Who the History entry is attributed to: the caller's `actor`, or the boundary's
/// identity, which is what the CLI records when it is not told.
pub(super) fn recurring_actor(args: &Value) -> std::result::Result<String, ()> {
    Ok(opt_string(args, "actor")?.unwrap_or_else(cmd_recurring::actor))
}

/// The six lifecycle tools are the six [`LifecycleAction`]s, so the shared service
/// sees exactly what `tix recurring <action>` sends it (T039).
pub(super) fn lifecycle_tool(store: &Store, args: &Value, action: LifecycleAction) -> ToolOutcome {
    let raw = req_string(args, "series")?;
    let confirmed = recurring_confirmed(args)?;
    // A keyed action is about one date and a state action is not; a `date` on a state
    // action is refused rather than ignored, so a caller that meant something else
    // finds out instead of getting a silent pause.
    let date = match (action.needs_key(), opt_string(args, "date")?) {
        (true, Some(date)) => date,
        (true, None) => {
            return Ok(error_result(format!(
                "`{}` is about one occurrence: `date` (`YYYY-MM-DD`) is required, because \
                 the key that records the decision is `<series-id>@<date>`",
                action.as_str()
            )));
        }
        (false, Some(_)) => {
            return Ok(error_result(format!(
                "`{}` is a series-level action and takes no `date`: it is not about one \
                 occurrence",
                action.as_str()
            )));
        }
        (false, None) => String::new(),
    };
    let actor = recurring_actor(args)?;
    let index = match recurring_index(store) {
        Ok(index) => index,
        Err(error) => return Ok(error_result(crate::error::render_error(&error))),
    };
    let series = match cmd_recurring::resolve(&index, &raw) {
        Ok(series) => series,
        Err(error) => return Ok(error_result(crate::error::render_error(&error))),
    };
    let mut request = LifecycleRequest::new(series.id.clone(), action, actor);
    if action.needs_key() {
        let context = match cmd_recurring::context_for(Some(&date), None) {
            Ok(context) => context,
            Err(error) => return Ok(error_result(crate::error::render_error(&error))),
        };
        request = request.about(OccurrenceKey::new(
            &series.id,
            &DateKey::from_date(context.today),
        ));
    }
    if let Some(reason) = opt_string(args, "reason")? {
        request = request.because(reason);
    }
    let request = if confirmed {
        request.confirm()
    } else {
        request
    };
    match apply_lifecycle(store, &request) {
        Ok(outcome @ LifecycleOutcome::Rejected { .. }) => Ok(rejected_result(
            crate::error::render_error(&crate::error::TixError::Refused(outcome.render())),
            lifecycle_value(&outcome),
        )),
        Ok(outcome) => Ok(success_result(
            lifecycle_text(&series.id, &outcome),
            lifecycle_value(&outcome),
        )),
        Err(error) => Ok(error_result(crate::error::render_error(&error))),
    }
}

// ---------------------------------------------------------------------------
// WP08 (mission `repeating-cycle-schedules-01M3C7W1`) — the cycle-schedule surface
// ---------------------------------------------------------------------------
//
// The MCP peer of `tix cycle schedule …`. Every verb is a thin adapter: the
// arguments are read, the same `ScheduleIndex` the CLI builds is built from the
// records on disk, and the same service is called. This section owns no cadence
// arithmetic, no cursor, no snapshot writer and no History grammar (C-008) — the
// outcomes it returns are the services' own (`created`/`no-op`/`rejected`,
// `applied`/`no-op`/`rejected`, and the warning and diagnostic *kinds*), never a
// private spelling.
//
// # One clock, at the boundary
//
// Nothing below reads a clock. `detect` and `generate` take an explicit `date`
// and otherwise resolve today through the same boundary the CLI uses
// (`cmd_recurring::context_for`); a lifecycle action's audit instant is resolved
// the same way (`crate::model::utc_now_rfc3339`), exactly as
// `tix cycle schedule <action>` resolves it, and an explicit `timestamp` overrides
// it for a caller that needs a reproducible record.
//
// # Confirmation
//
// Every mutating verb requires `confirm: true`; without it the tool refuses with
// the CLI's own sentence — built through the crate's one renderer, under the same
// `E-tix-cycle-schedule` id and the same `not_confirmed` kind — and writes
// nothing (C-004). The service re-checks consent as well, so the gate cannot be
// bypassed by a caller that reaches a service path directly.
//
// # One registry for the config CRUD
//
// `create`/`edit`/`delete` are the shared [`crate::cycle_schedule::registry`]
// service's — the same three functions `tix cycle schedule …` and the TUI's `F8`
// Schedule page call (WP07 review finding H4). This adapter reads the arguments,
// hands the service a `ScheduleDraft`/`ScheduleEdit`/selector, and reports what it
// returns; the id-exists refusal, the spent-id guard (a stored record **or** a
// closed snapshot), the selector precedence and every refusal sentence therefore
// have one implementation rather than the copy this file used to carry, which had
// already drifted behind the CLI's.