Behind jackin❯ — crates

jackin-diagnostics

Host observability substrate: structured JSONL run diagnostics, the debug-mode flag, the debug_log! macro, redaction/secret-scrubbing, build-log capture, and the run/summary/screen/terminal reporting helpers. The two-tier telemetry (clog! compact always-on, cdebug! firehose on JACKIN_DEBUG=1) is rooted here.

Terminal-ownership guards are re-exported from jackin_tui::ownership.

What this crate owns

  • Structured run diagnostics (run, summary, observability) and the debug-mode substrate (debug_log_adapter installing the jackin-core debug_log! sink, plus logging).
  • Secret scrubbing (secret_scrub, redact) so logs/telemetry never leak credentials.
  • Build-log capture (build_log), operator notices (operator_notice), and screen/terminal reporting (screen, terminal).

Architecture tier and allowed dependencies

L2 infrastructure. Allowed workspace dependencies: jackin-core, jackin-tui (terminal-ownership guard re-exports). Diagnostic code must not start calling presentation helpers beyond the guard re-exports.

Structure

ModuleOwnsTests
lib.rscrate root, re-exports
run.rs · run/structured run diagnosticstests.rs
summary.rs · summary/run summarytests.rs
operation.rs · operation/typed operation facadetests.rs
metrics.rs · metrics/hot-path metric instrumentstests.rs
observability.rs · observability/OTLP tiertests.rs
debug_log_adapter.rshost sink install for jackin-core::debug_log!
logging.rslogging init
secret_scrub.rs · secret_scrub/secret scrubbingtests.rs
redact.rs · redact/redactiontests.rs
build_log.rs · build_log/build-log capturetests.rs
operator_notice.rs · operator_notice/operator noticestests.rs
screen.rs · screen/screen reportingtests.rs
terminal.rsterminal reporting
tests.rscrate integration and telemetry-conformance scenarios

Public API

Typed operation facade: operation_span / operation_log / operation_error / operation_metric (and enter_operation RAII guard). Names from the semconv registry.

debug_log!/clog!/cdebug!, the run-diagnostics writer, redaction helpers, and the debug-mode flag — consumed by nearly every crate. Two-tier telemetry contract is documented in ENGINEERING.md.

How to verify

cargo nextest run -p jackin-diagnostics
cargo clippy -p jackin-diagnostics --all-targets -- -D warnings
cargo bench --bench summarize_jsonl -p jackin-diagnostics -- --quick

On this page