Skip to content

fix: bugfix sweep round 2 — 8 fixes across MCP, PTY, state, and type safety#17

Merged
fraction12 merged 2 commits into
masterfrom
fix/bugfix-sweep-round-2
Apr 2, 2026
Merged

fix: bugfix sweep round 2 — 8 fixes across MCP, PTY, state, and type safety#17
fraction12 merged 2 commits into
masterfrom
fix/bugfix-sweep-round-2

Conversation

@fraction12

Copy link
Copy Markdown
Owner

Summary

  • T-892: Consolidate MCP handle_tool_call from 3 lock acquisitions to 1; handlers now take &mut InterSessionState
  • T-893: Replace fragile Option sentinel unwrap() pattern with Result<T, ()> in structured message validation
  • T-862: Introduce PaneId(u64) newtype to eliminate pane index/ID confusion in injection API
  • T-874: Add turn_id: Option<u64> to TextDone events with conditional active_turn_seq clear (prevents wrong-turn overwrites)
  • T-864: Wire up dirty_rx broadcast receiver via take_dirty_rx() with capacity 64 (no notification gap)
  • T-891: Change openspec_refresh_ticks from u16 to u32 with saturating_add (prevents overflow panic in debug builds)
  • T-894: Fix AppState::default() dead channels — receivers now stored instead of dropped
  • T-868: Add kill signal to PTY stderr reader task via watch channel

Additionally, 9 tickets were verified as already fixed from prior work (T-858, T-863, T-869, T-875, T-880, T-881, T-884, T-886, T-890).

Full OpenSpec change: openspec/changes/bugfix-sweep/

Test plan

  • cargo check — clean
  • cargo test — 829 passed, 0 failed, 2 ignored
  • cargo fmt --check — clean
  • Code reviewed by Reviewer (Pane 2) and RUSure (Pane 4)
  • RUSure caught and verified fix for T-874 unconditional active_turn_seq clear bug
  • RUSure caught and verified fix for T-862 PaneId test callsite wrapping
  • Manual smoke test: launch potato, spawn 2+ agents, verify MCP messaging and dirty redraws

🤖 Generated with Claude Code

fraction12 and others added 2 commits April 1, 2026 23:39
…safety

Consolidate MCP handle_tool_call from 3 lock acquisitions to 1 (T-892).
Replace fragile Option sentinel unwraps with Result<T,()> in message
validation (T-893). Introduce PaneId newtype to eliminate index/ID
confusion in injection API (T-862). Add turn_id: Option<u64> to TextDone
events with conditional active_turn_seq clear to prevent wrong-turn
overwrites (T-874). Wire up dirty_rx broadcast receiver properly with
take_dirty_rx() and capacity 64 (T-864). Change openspec_refresh_ticks
from u16 to u32 with saturating_add to prevent overflow panic (T-891).
Fix AppState::default() dead channels by storing receivers (T-894). Add
kill signal to PTY stderr reader task via watch channel (T-868).

Reviewed and verified by Reviewer and RUSure. 829 tests pass, cargo
check clean, cargo fmt clean.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove 7 needless_borrow references in mcp/tools.rs where &st was
passed but st is already a reference (auto-deref handles it). Fix 3
broken intra-doc links in pty/real.rs by qualifying with Self:: prefix.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@fraction12
fraction12 merged commit fa1a909 into master Apr 2, 2026
9 checks passed
@fraction12
fraction12 deleted the fix/bugfix-sweep-round-2 branch April 29, 2026 02:11
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