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
+9
View File
@@ -1311,6 +1311,13 @@ impl App {
return Vec::new();
}
debug!(
persistent_mode = ?self.mode,
submission_mode = ?submission_mode,
len = effective_input.len(),
"submit"
);
// Parse-first: app-level commands and DSL commands now
// share the chumsky parser (per the round-5 refactor).
// App commands work in both modes — they're not gated by
@@ -1342,6 +1349,7 @@ impl App {
source: &str,
) -> Vec<Action> {
use crate::dsl::{AppCommand, MessagesValue, ModeValue};
debug!(command = ?cmd, "dispatch app command");
match cmd {
AppCommand::Quit => vec![Action::Quit],
AppCommand::Help { topic } => {
@@ -1700,6 +1708,7 @@ impl App {
| Command::AddRelationship { .. }
| Command::DropRelationship { .. }
) {
debug!(verb = command.verb(), width = self.last_output_width, "render: relationship diagrams (ADR-0044)");
for line in crate::output_render::render_structure_with_diagrams(
desc,
self.last_output_width,