Skip to content

feat: Add structured tracing to ACP runner for debugging#52

Merged
CSRessel merged 2 commits intomainfrom
acp-tracing-debug
Nov 17, 2025
Merged

feat: Add structured tracing to ACP runner for debugging#52
CSRessel merged 2 commits intomainfrom
acp-tracing-debug

Conversation

@CSRessel
Copy link
Copy Markdown
Collaborator

Summary

  • Added file-based logging via tuicore's .use_disk_logs(true) configuration
  • Instrumented ACP runner with tracing macros (info/debug/warn) throughout lifecycle
  • Logs written to ~/.nori-cli/logs/ with automatic daily rotation
  • Fixed pre-existing test failure in model_backend_ordering_test.rs

Changes

src/main.rs: Enabled disk logs in TuiApp builder
src/acp_runner.rs: Added ~15 tracing calls covering:

  • ACP initialization and handshake
  • Session creation and management
  • Prompt handling
  • File operations (read/write)
  • Permission requests
  • All error conditions

tests/model_backend_ordering_test.rs: Fixed test to use BACKEND_OPTIONS constant

Test Plan

  • All 107 existing tests pass
  • Cargo build succeeds
  • Cargo clippy passes (pre-existing warnings only)
  • Manual verification: logs created in ~/.nori-cli/logs/
  • Manual verification: ACP lifecycle events logged with appropriate levels

🤖 Generated with Claude Code

CSRessel and others added 2 commits November 17, 2025 16:30
- Enable file logging via tuicore's `.use_disk_logs(true)`
- Add tracing instrumentation throughout ACP lifecycle in acp_runner.rs
- Use info! for key events, debug! for details, warn! for errors
- Logs written to ~/.nori-cli/logs/ with daily rotation
- Fix pre-existing test in model_backend_ordering_test.rs
- Add tracing-subscriber as dev dependency

All tests passing (107 tests, 0 failures).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@CSRessel CSRessel merged commit c988eb9 into main Nov 17, 2025
3 checks passed
@CSRessel CSRessel deleted the acp-tracing-debug branch November 17, 2025 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant