feat: comprehensive logging across parser, app, persistence, runtime (X1)

Completes the X1 full sweep started in a8ad0c6 (db.rs). Closes X1 -> [x].

- persistence/mod.rs: debug! on every yaml/CSV/history write -- the
  silent-failure-prone disk paths (write_schema, write_table_data incl.
  the empty->delete branch, append_history/_failure).
- runtime.rs: debug! on execute_command_typed dispatch (one per executed
  command, complements the db.rs executor logs).
- app.rs: debug! on submit (route + submission mode), dispatch_app_command,
  and the ADR-0044 diagram-vs-prose render-mode choice.
- dsl/parser.rs: trace! on parse begin/outcome at the parse_command_inner
  choke point -- trace, not debug, because the live overlay/completion
  re-parse per keystroke (hot path).
- logging.rs: documented level discipline (error/warn/info/debug/trace) so
  the convention survives across sessions.

Levels verified end-to-end through the real worker thread + logging::init.
~75 -> 135 tracing sites total. Tests: 2207 pass / 0 fail / 1 ignored.
Clippy clean.
This commit is contained in:
claude@clouddev1
2026-06-10 11:38:22 +00:00
parent a8ad0c6cc3
commit 0a7612efe2
6 changed files with 87 additions and 12 deletions
+19 -9
View File
@@ -804,17 +804,27 @@ since ADR-0027.)
## Cross-cutting
- [/] **X1** Comprehensive logging via the project's logging
- [x] **X1** Comprehensive logging via the project's logging
infrastructure per `CLAUDE.md` (decision points, parameter
values, fallback paths).
*(Partial, verified 2026-06-07: the logging **harness** is
wired — `src/logging.rs` sets up file-backed `tracing` with an
env filter — but instrumentation is **sparse**: ~25 `tracing::`
call sites across the tree, concentrated in `runtime.rs` and
`undo.rs` and mostly error/warning on failure paths. The
decision-point / parameter-value / fallback-path coverage the
`CLAUDE.md` "log liberally" standard calls for — especially in
`db.rs`, the parser, and the executors — is largely absent.)*
*(Done 2026-06-10 via a full-sweep instrumentation pass. The
prior state (verified 2026-06-07) was a wired harness
(`src/logging.rs`) but sparse instrumentation — failure-path
heavy, nothing in `db.rs`/parser/executors. The sweep brought
every layer to the "log liberally" bar under a documented level
discipline (see the `logging.rs` module doc): **`db.rs`** gained
entry-level `debug!` on all 34 `do_*` executors plus decision-point
logs (rebuild-table primitive, insert auto-fill, delete cascade,
FK resolution) — so the route through delegating executors is
visible in the log sequence; **persistence** logs every
yaml/CSV/history write (the silent-failure paths); **runtime**
logs `execute_command_typed` dispatch; **`app.rs`** logs
submit / app-command dispatch / render-mode choice; the **parser**
logs parse begin/outcome at `trace` (it is a per-keystroke hot
path). Levels: `debug` for per-command detail (off by default,
`RDBMS_PLAYGROUND_LOG=debug`), `info` for lifecycle, `warn` for
fallbacks, `trace` for hot paths. Emission verified end-to-end
through the real worker thread + `logging::init`. ~75 → ~135 sites.)*
- [~] **X2** Language: English-only for v1; multi-language is an
open question to revisit later.
- [~] **X3** Accessibility: TUI screen-reader support is