Skip to content

Add continuity parsing, workspace paths, and relay-pty tests#217

Merged
khaliqgant merged 7 commits intomainfrom
feature/rust-infrastructure
Jan 19, 2026
Merged

Add continuity parsing, workspace paths, and relay-pty tests#217
khaliqgant merged 7 commits intomainfrom
feature/rust-infrastructure

Conversation

@khaliqgant
Copy link
Copy Markdown
Member

@khaliqgant khaliqgant commented Jan 18, 2026

Summary

This PR enhances the relay-pty component with better support for agent session continuity and workspace isolation.

Key Changes

  • Continuity Command Parsing: Added file-based continuity command support in relay-pty to parse save, load, and uncertain actions from the relay protocol. These commands are now emitted as JSON alongside traditional relay commands, enabling agents to preserve and recover session state across disconnections.

  • Workspace Path Isolation: Implemented namespace support for default socket and outbox paths using the WORKSPACE_ID environment variable. This enables multiple workspaces to coexist safely without path conflicts, critical for multi-tenant deployments.

  • Enhanced Test Coverage: Significantly expanded relay-pty unit test suite to cover:

    • Message injection behavior and timing
    • PTY lifecycle management
    • Socket communication error paths
    • Edge cases in command parsing

Why This Matters

Agents need reliable session recovery to continue work across connection failures. This PR provides the foundation for seamless session persistence while ensuring workspace isolation prevents cross-workspace data leaks.

Testing

  • ✅ Unit tests expanded for injection, PTY, and socket error scenarios
  • ⚠️ Full integration testing blocked: cargo test fails locally due to missing Rust toolchain setup (not a code issue)
  • Manual testing confirmed on both tmux and PTY wrappers

Next Steps

  • Configure CI to run Rust tests with proper toolchain
  • Add integration tests for cross-workspace isolation

@my-senior-dev-pr-review
Copy link
Copy Markdown

my-senior-dev-pr-review Bot commented Jan 18, 2026

🤖 My Senior Dev — Analysis Complete

👤 For @khaliqgant

📁 Expert in .trajectories/ (11 edits) • ⚡ 83rd PR this month

View your contributor analytics →


📊 7 files reviewed • 2 high risk • 2 need attention

🚨 High Risk:

  • relay-pty/src/inject.rs — Potential race conditions and critical logic flaws increase risks during message processing.

⚠️ Needs Attention:

  • relay-pty/src/inject.rs — The file contains core logic related to message injection that could lead to unexpected behaviors affecting overall functionality if not thoroughly reviewed.

🚀 Open Interactive Review →

The full interface unlocks features not available in GitHub:

  • 💬 AI Chat — Ask questions on any file, get context-aware answers
  • 🔍 Smart Hovers — See symbol definitions and usage without leaving the diff
  • 📚 Code Archeology — Understand how files evolved over time (/archeology)
  • 🎯 Learning Insights — See how this PR compares to similar changes

💬 Chat here: @my-senior-dev explain this change — or try @chaos-monkey @security-auditor @optimizer @skeptic @junior-dev

📖 View all 12 personas & slash commands

You can interact with me by mentioning @my-senior-dev in any comment:

In PR comments or on any line of code:

  • Ask questions about the code or PR
  • Request explanations of specific changes
  • Get suggestions for improvements

Slash commands:

  • /help — Show all available commands
  • /archeology — See the history and evolution of changed files
  • /profile — Performance analysis and suggestions
  • /expertise — Find who knows this code best
  • /personas — List all available AI personas

AI Personas (mention to get their perspective):

Persona Focus
@chaos-monkey 🐵 Edge cases & failure scenarios
@skeptic 🤨 Challenge assumptions
@optimizer Performance & efficiency
@security-auditor 🔒 Security vulnerabilities
@accessibility-advocate Inclusive design
@junior-dev 🌱 Simple explanations
@tech-debt-collector 💳 Code quality & shortcuts
@ux-champion 🎨 User experience
@devops-engineer 🚀 Deployment & scaling
@documentation-nazi 📚 Documentation gaps
@legacy-whisperer 🏛️ Working with existing code
@test-driven-purist Testing & TDD

For the best experience, view this PR on myseniordev.com — includes AI chat, file annotations, and interactive reviews.

@khaliqgant khaliqgant changed the title Add continuity parsing and improve relay-pty tests Add continuity parsing, workspace paths, and relay-pty tests Jan 18, 2026
@khaliqgant khaliqgant merged commit e4b9849 into main Jan 19, 2026
8 checks passed
@khaliqgant khaliqgant deleted the feature/rust-infrastructure branch January 19, 2026 13:34
khaliqgant pushed a commit that referenced this pull request Jan 19, 2026
Resolves conflicts with latest main branch updates (PR #217, #228).
Taking main's parser.rs to avoid import conflicts while maintaining
all protocol and schema updates from both branches.
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