feat: replace the [ok] summary line with a ✓/✗ echo marker

An audit of the command surface found the `[ok] <verb> <subject>`
summary line duplicated the echo line above it everywhere; its only
unique signal was success-vs-error. Retire it: a command's echo line
now resolves from `running: <input>` to `<input> ✓` / `<input> ✗`
on completion, and the symmetric `"<verb> <subject>" failed:` prefix
is dropped (only the reason remains). Content lines (row counts,
structure, plan tree, teaching echo) are unchanged.

Echo lines carry an EchoStatus; executed commands push Pending and
resolve the oldest-pending echo on their result event (FIFO worker —
correct under interleaving). Parse-time and pre-flight rejections are
not executed and keep their running: + caret rendering. App-command
[ok] lines (rebuild/export/replay) are payload-bearing and untouched.
ADR-0040.
This commit is contained in:
claude@clouddev1
2026-05-30 21:38:48 +00:00
parent f62cccec55
commit 8311de44a8
9 changed files with 546 additions and 124 deletions
+1 -2
View File
@@ -393,7 +393,7 @@ pub const KEYS_AND_PLACEHOLDERS: &[(&str, &[&str])] = &[
("archive.unsafe_entry", &["entry"]),
("archive.zip", &["path", "message"]),
// ---- DSL failure wrapper / running echo ----
("dsl.failed", &["verb", "subject", "rendered"]),
("dsl.failed", &["rendered"]),
("dsl.running", &["input"]),
// ---- Persistence-fatal banner ----
("fatal.persistence", &["operation", "path", "message"]),
@@ -529,7 +529,6 @@ pub const KEYS_AND_PLACEHOLDERS: &[(&str, &[&str])] = &[
("ok.rows_deleted", &["count"]),
("ok.rows_inserted", &["count"]),
("ok.rows_updated", &["count"]),
("ok.summary", &["verb", "subject"]),
// ---- Client-side success notes (ADR-0017 §6, ADR-0018 §9) ----
("client_side.auto_fill_add_serial", &["count"]),
("client_side.auto_fill_add_shortid", &["count"]),
+13 -11
View File
@@ -665,12 +665,15 @@ project:
# ---- DSL failure wrapper + advanced-mode placeholder + fatal --------
dsl:
# Wrapper around the friendly-error layer's translated
# message, surfaced as `"<verb> <subject>" failed: <rendered>`.
failed: '"{verb} {subject}" failed: {rendered}'
# The friendly-error layer's translated reason, shown beneath the
# failed command's echo line. ADR-0040: the redundant
# `"<verb> <subject>" failed:` prefix was dropped — the echo line
# carries the ✗ marker and names the command.
failed: "{rendered}"
# Echo line `running: <input>` shown above each command's
# response so the user has on-screen context for the
# output that follows.
# response while it executes; ADR-0040 resolves it to
# `<input> ✓` / `<input> ✗` on completion (the marker replaces
# the old `[ok] <verb> <subject>` summary line).
running: "running: {input}"
# ---- Value-validation errors (per-column at bind time) --------------
@@ -916,12 +919,11 @@ db:
# locale lands.)
ok:
# Generic `[ok] <verb> <subject>` header used for every
# successful DSL command. Verbs come from `Command::verb()`
# (already English keywords); subjects are the table /
# relationship endpoints derived in `Command::display_subject()`.
summary: "[ok] {verb} {subject}"
# Per-operation row-count footers shown beneath the summary.
# ADR-0040: the generic `[ok] <verb> <subject>` summary line was
# retired — a successful command's echo line now carries a ✓
# marker (the verb+subject duplicated the echo above it). The
# per-operation row-count footers below still convey real payload
# and are unchanged.
rows_inserted: " {count} row(s) inserted"
rows_updated: " {count} row(s) updated"
rows_deleted: " {count} row(s) deleted"