feat(debug): add reverse time travel - #13
Merged
Merged
Conversation
- `.tower/config.toml`: Configure debug record and replay support - `.zpm/kb/architecture/journal.wal`: Record architecture decisions for reverse debugging - `.zpm/kb/feedback/journal.wal`: Record feedback rules for debug implementation - `AGENTS.md`: Document reverse debugging MCP tools - `Makefile`: Add reverse debug workflow targets - `README.md`: Document time-travel debugging capabilities - `crates/core_engine/src/adapters/config/debug.rs`: Add rr record and replay configuration - `crates/core_engine/src/adapters/daemon/engine.rs`: Gate rr debug tools by runtime support - `crates/core_engine/tests/extension_debug_e2e.rs`: Cover rr-backed debug tool discovery - `crates/core_engine/tests/functional_debug_reverse_mcp.rs`: Add reverse debugging MCP tests - `crates/extension_protocol/tests/protocol_tests.rs`: Validate reverse debug protocol schemas - `docs/README.md`: Add reverse debugging documentation links - `docs/extensions.md`: Document debug extension rr support - `docs/getting-started.md`: Add setup guidance for debug tracing - `docs/mcp-tools.md`: Document reverse debug MCP tools - `docs/user-guide/debug-sessions.md`: Explain record and replay debug sessions - `extensions/debug/extension.toml`: Expose rr reverse debug tool metadata - `extensions/debug/src/eval_at.rs`: Integrate eval-at with trace evidence capture - `extensions/debug/src/main.rs`: Route rr record and replay tool handlers - `extensions/debug/src/origin.rs`: Add origin-finding reverse debug workflow - `extensions/debug/src/protocol.rs`: Add reverse debug protocol DTOs - `extensions/debug/src/rr.rs`: Add rr runtime preflight and recorder support - `extensions/debug/src/session.rs`: Support replay sessions and reverse execution - `extensions/debug/src/tools.rs`: Add rr reverse debug tool definitions - `extensions/debug/src/traces.rs`: Add persisted trace metadata store - `extensions/debug/src/types.rs`: Add trace and reverse debug types - `extensions/debug/tests/eval_at_contract.rs`: Cover eval-at trace contract behavior - `extensions/fixtures/debug_adapter/src/main.rs`: Add scripted reverse debug scenarios - `extensions/fixtures/debug_adapter/tests/eval_at_scenario.rs`: Cover fixture eval-at scenarios Closes #12
pocky
marked this pull request as ready for review
June 24, 2026 21:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
[debug.record] backend = "rr"so unsupported or unconfigured hosts do not advertise unavailable reverse-debug capabilities.Changes
Configuration and Runtime Gating
.tower/config.toml: Add local[debug.record]rr trace retention and recording timeout settings.crates/core_engine/src/adapters/config/debug.rs: Parse, validate, serialize, and test[debug.record]configuration with rr-only backend support and safe relative trace directories.crates/core_engine/src/adapters/daemon/engine.rs: Filter rr-specific debug tools from the bundled manifest unless rr recording is configured.Makefile: Reorder default extension build list to keep the debug extension included in default extension installs.Debug Extension
extensions/debug/extension.toml: Advertise rr-specific record/replay, reverse execution, watchpoint, trace, and origin tools.extensions/debug/src/main.rs: Initialize rr runtime support, route rr tool dispatch, and preserve fixture behavior for reverse-debug tests.extensions/debug/src/protocol.rs: Add record/replay configuration, schema declarations, and rr tool protocol metadata.extensions/debug/src/rr.rs: Add rr preflight detection, bounded record subprocess execution, fixture recording support, output capture, timeout handling, and trace registration.extensions/debug/src/traces.rs: Add trace identifiers, metadata persistence, retention policy, pruning, lookup, completion, and safe deletion.extensions/debug/src/session.rs: Add replay-backed session support, reverse continue, step back, watchpoints, replay seek targets, and replay session metadata.extensions/debug/src/tools.rs: Add public MCP handlers and DTOs for record, replay, reverse_continue, step_back, watchpoint, traces, delete_trace, find_origin, and record_and_find_origin.extensions/debug/src/origin.rs: Add origin-finding workflows over replay sessions, including watchpoint-driven reverse execution and record-and-find orchestration.extensions/debug/src/eval_at.rs: Share captured-variable serialization helpers with origin capture while preserving eval-at behavior.extensions/debug/src/types.rs: Add structured runtime failure DTOs for tool-facing error payloads.Tests and Fixtures
crates/core_engine/tests/extension_debug_e2e.rs: Add rr tool declaration, gating, DTO, cleanup, fixture-backed reverse-debug, real-rr skip/pass, and parallel stress coverage.crates/core_engine/tests/functional_debug_reverse_mcp.rs: Add functional MCP coverage for public record/replay/origin workflows and structured no-prior-write results.crates/extension_protocol/tests/protocol_tests.rs: Update protocol expectations for the expanded debug tool catalog and rr gating behavior.extensions/debug/tests/eval_at_contract.rs: Preserve eval-at captured-variable contract coverage after helper extraction.extensions/fixtures/debug_adapter/src/main.rs: Add scripted record/replay fixture scenarios, deterministic reverse-debug events, cleanup tokens, and side-channel cleanup reporting.extensions/fixtures/debug_adapter/tests/eval_at_scenario.rs: Add fixture scenario selection, cleanup, ordering, and JSON event contract coverage.Documentation and Project Knowledge
AGENTS.md: Document rr-backed reverse-debug MCP tools and their configuration-dependent availability.README.md: Update feature and documentation summaries for rr-backed reverse debugging.docs/README.md: Refresh documentation index entries for reverse-debug support.docs/extensions.md: Document debug extension reverse-debug behavior and tool exposure.docs/getting-started.md: Add rr record/replay setup guidance.docs/mcp-tools.md: Add MCP reference entries for rr record/replay, reverse execution, trace, and origin tools.docs/user-guide/debug-sessions.md: Add user guidance for rr-backed reverse-debug workflows..zpm/kb/architecture/journal.wal: Record architecture decisions and conventions for debug eval-at and reverse-debug implementation context..zpm/kb/feedback/journal.wal: Record reusable feedback rules for trace deletion, rr output capture, and reverse-debug cleanup tests.Test plan
cargo fmt --checkcargo clippy --workspace --all-targets -- -D warningscargo build --workspace --binscargo test --workspaceCloses #12
Generated with awf commit workflow