mirror of
https://github.com/outbackdingo/optimclaw.git
synced 2026-08-26 15:40:18 +00:00
Address three deferred implementation items flagged during code review: 1. SIGHUP lock held across .await (#883): Split restart_with_addr into merged_router_clone() + install_listener() so the async TcpListener bind happens outside the mutex, eliminating lock contention risk. 2. Recursion depth limit for check_strings (#848): Cap JSON traversal at 32 levels to prevent stack overflow on pathological tool params. 3. Named error type for add_tokens (#788): Replace Result<(), String> with TokenBudgetExceeded { used, limit } for type-safe budget errors. Co-authored-by: Claude Opus 4.6 <[email protected]>
16 lines
419 B
Rust
16 lines
419 B
Rust
//! Per-job context isolation and state management.
|
|
//!
|
|
//! Each job runs with its own isolated context that includes:
|
|
//! - Conversation history
|
|
//! - Action history
|
|
//! - State machine
|
|
//! - Resource tracking
|
|
|
|
mod manager;
|
|
mod memory;
|
|
mod state;
|
|
|
|
pub use manager::ContextManager;
|
|
pub use memory::{ActionRecord, ConversationMemory, Memory};
|
|
pub use state::{JobContext, JobState, StateTransition, TokenBudgetExceeded};
|