Skip to content

Conversation

@plusplusoneplusplus
Copy link
Owner

Summary

This PR adds comprehensive test coverage for the automation agents and ensures unified session management across all agent-based workflow operations.

Key Changes

1. DecomposeAgent Refactoring (decompose_agent.py)

  • Extracted inline DecomposeAgent class to dedicated module
  • Comprehensive system prompt with detailed decomposition guidelines
  • Proper integration with unified session management system
  • Reusable decompose() method for task decomposition

2. Test Coverage (54 total tests, 100% passing)

DecomposeAgent Tests (21 new tests):

  • ✅ Initialization and configuration
  • ✅ System prompt generation (with/without session context)
  • ✅ Decomposition method with various parameters
  • ✅ Complex question handling
  • ✅ Integration scenarios (multiple questions, different models)
  • ✅ Error handling (executor errors, edge cases)
  • ✅ Session management validation

ExploreAgent Tests (9 new session management tests):

  • ✅ Session ID propagation
  • ✅ Session storage path configuration
  • ✅ Session context inclusion in prompts
  • ✅ Session persistence across calls
  • ✅ Session history inclusion
  • ✅ Session isolation between agents

3. Unified Session Management

Updated workflow operations to use consistent session configuration:

Parameters supported:

  • session_id - Track conversations across agent calls
  • session_storage_path - Configure persistent storage location
  • include_session_in_prompt - Control session context inclusion

Files updated:

  • plugins/automation/workflows/steps/operations/decompose.py
  • plugins/automation/workflows/steps/operations/exploration.py

Test Results

54 tests collected, 54 passed (100% pass rate)
✓ DecomposeAgent: 21/21 tests passing
✓ ExploreAgent: 33/33 tests passing (including 9 new session tests)

Benefits

  1. Improved Test Coverage: Comprehensive testing for both agents
  2. Consistent Session Management: Unified approach across all operations
  3. Better Code Organization: DecomposeAgent in dedicated module
  4. Enhanced Maintainability: Well-tested, reusable components
  5. Session Persistence: Proper conversation tracking and storage

Testing

All tests pass successfully:

uv run pytest plugins/automation/tests/test_decompose_agent.py \
             plugins/automation/tests/test_explore_agent.py -v

Related

  • Builds on session unification work
  • Ensures all workflow operations follow consistent patterns
  • Provides foundation for future agent development

🤖 Generated with Claude Code

…for agents

This commit introduces extensive test coverage for both ExploreAgent and
DecomposeAgent, along with refactoring to ensure unified session management
across all agent-based workflow operations.

Changes:
- Create DecomposeAgent class in dedicated file (decompose_agent.py)
- Add 21 comprehensive tests for DecomposeAgent
- Add 9 session management tests for ExploreAgent
- Update workflow operations (decompose.py, exploration.py) to use unified
  session management with session_storage_path and include_session_in_prompt
- Export DecomposeAgent from agents module

Test Coverage (54 total tests, 100% passing):
- DecomposeAgent: 21 tests covering initialization, decomposition methods,
  integration scenarios, error handling, and session management
- ExploreAgent: 33 tests including new session management validation

Session Management Features:
- session_id: Conversation tracking across agent calls
- session_storage_path: Persistent storage location configuration
- include_session_in_prompt: Optional session context inclusion

All agents and operations now consistently implement the unified session
management approach for improved conversation persistence and tracking.

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
@plusplusoneplusplus plusplusoneplusplus enabled auto-merge (squash) November 17, 2025 16:58
@plusplusoneplusplus plusplusoneplusplus merged commit a76a6c5 into main Nov 17, 2025
16 checks passed
@plusplusoneplusplus plusplusoneplusplus deleted the feat/agent-session-management-tests branch November 17, 2025 17:08
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.

2 participants