Skip to content

Extract process message state machine - #143

Merged
NSIETeam merged 1 commit into
mainfrom
codex/extract-process-message
Jul 31, 2026
Merged

NSIETeam merged 1 commit into
mainfrom
codex/extract-process-message

Conversation

@NSIETeam

Copy link
Copy Markdown
Owner

Summary

  • move inbound-message session-key resolution, delivery setup, stream tracking, and state transition driving out of AgentLoop
  • keep AgentLoop._process_message as a thin compatibility wrapper
  • add focused tests for state-machine flow, stream merge_next forwarding, trace recording, and delivery-session mismatch

Local validation

  • uv run python -m pytest tests/agent/test_process_message.py tests/agent/test_runner_injections.py tests/agent/test_stop_preserves_context.py -q
  • uv run ruff check mira/agent/process_message.py mira/agent/loop.py tests/agent/test_process_message.py
  • uv run mypy
  • uv run python -m pytest tests/agent tests/tools/test_message_tool.py tests/command -q

Issue progress

  • Contributes to issue 120 by reducing mira/agent/loop.py from 1580 to 1451 lines. It remains open because the target is <=800 lines.

@NSIETeam
NSIETeam merged commit 3b73e9c into main Jul 31, 2026
6 checks passed
@NSIETeam
NSIETeam deleted the codex/extract-process-message branch July 31, 2026 06:01
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