Skip to content

Merge dev into main: File mounting, session management, and testing improvements#43

Merged
usnavy13 merged 7 commits intomainfrom
dev
Jan 21, 2026
Merged

Merge dev into main: File mounting, session management, and testing improvements#43
usnavy13 merged 7 commits intomainfrom
dev

Conversation

@usnavy13
Copy link
Owner

Summary

  • Enhanced file mounting and session management in ExecutionOrchestrator
  • Added file content update functionality with tests
  • Implemented agent file support for uploads
  • Added functional testing framework for API endpoints
  • Improved state restoration and execution features
  • Standardized code formatting and cleaned up logger initialization
  • Updated dependencies and Docker base images
  • Reduced state archive TTL configuration

Test Plan

  • Unit tests pass (81 tests)
  • Functional tests pass against hosted endpoint (59 tests)
  • CI linting checks pass (Flake8, Black, MyPy, Bandit)

…oration features

- Added an `args` parameter to the `execute_code` function, allowing users to pass command line arguments to the executed code.
- Introduced `restore_state` field in the `RequestFile` model to facilitate state restoration from previously used files.
- Updated `ExecuteCodeRequest` model to include `args` for better flexibility in code execution.
- Enhanced `FileInfo` model with state-related fields (`execution_id`, `state_hash`, `last_used_at`) for improved state management.
- Implemented state hash storage and retrieval in `StateService` for linking files to specific execution states.
- Added integration tests to validate new features and ensure correct functionality across models and services.
- Introduced a new test class `TestUploadedFileStateRestoration` to validate the behavior of uploaded files regarding state management.
- Added tests to ensure uploaded files start without a state hash, receive a state hash after execution, and correctly handle state restoration.
- Verified that the `update_file_state_hash` function works as expected for uploaded files, including proper interaction with Redis.
- Documented expected behavior for state restoration when state hashes are not set.
- Added `update_file_content` method to `FileService` for updating existing file content in MinIO and updating metadata in Redis.
- Introduced `_update_mounted_files_content` method in `ExecutionOrchestrator` to handle in-place edits to mounted files after execution.
- Created integration tests in `test_mounted_file_edits.py` to verify persistence of edits to mounted files.
- Developed unit tests in `test_file_service.py` to ensure correct behavior of the `update_file_content` method, including success and error scenarios.
- Updated the `upload_file` function to create sessions for file uploads, enabling session reuse for referenced files.
- Introduced `is_agent_file` flag to distinguish between user-uploaded files and agent-assigned files, enforcing read-only restrictions on agent files.
- Modified `FileService` to handle the `is_agent_file` attribute in file metadata, ensuring proper storage and retrieval.
- Enhanced `ExecutionOrchestrator` to prevent modifications to files associated with different sessions and agent files.
- Added integration tests to verify the read-only behavior of agent files and the editability of user files.
…trator

- Added optional `session_id` field to `FileRef` model for cross-message file persistence.
- Updated `_mount_files` method to support auto-mounting of all session files when no explicit files are provided.
- Introduced `_auto_mount_session_files` method to handle session file retrieval and ensure security through session isolation.
- Enhanced integration tests to validate new file mounting behavior and session management features.
…ple files

- Added missing commas in field descriptions within `exec.py`, `files.py`, and `state_archival.py` to ensure proper syntax.
- Reformatted multi-line expressions in `file.py`, `orchestrator.py`, and `runner.py` for better readability.
- Updated test functions in `test_exec_languages.py`, `test_exec_workflow.py`, and `test_files.py` to follow consistent formatting practices.
- Cleaned up unnecessary blank lines and improved alignment in various test files to enhance overall code clarity.
- Updated environment variable assignments in `conftest.py` to use `os.environ.setdefault`, allowing for overrides by existing environment variables.
- This change enhances flexibility in test configurations while maintaining default values for local testing.
@usnavy13 usnavy13 merged commit eb42153 into main Jan 21, 2026
1 check passed
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