Repository navigation
Port over file editor tool - #2
Merged
Merged
Conversation
- Created new StrReplaceEditorTool under openhands/runtime/tools/str_replace_editor.py - Integrated OHEditor from openhands-aci for core file editing functionality - Added complete tool schema and descriptions from OpenHands str_replace_editor.py - Implemented all commands: view, create, str_replace, insert, undo_edit - Added proper package structure with __init__.py files - Tool successfully tested with file operations Co-authored-by: openhands <openhands@all-hands.dev>
- Refactored StrReplaceEditorAction from ActionBase inheritance to simple Pydantic BaseModel with Field descriptions - Removed StrReplaceEditorObservation class entirely - Updated _execute_str_replace_editor function to return dict directly instead of observation object - Updated tool creation to use StrReplaceEditorAction.model_json_schema() for input_schema - Removed old STR_REPLACE_EDITOR_SCHEMA dictionary (no longer needed) - Simplified architecture: single Pydantic schema class with Field descriptions, direct dict return from execute function, JSON schema generation from Pydantic model - All functionality tested and working correctly Co-authored-by: openhands <openhands@all-hands.dev>
…comprehensive tests - Copied full OHEditor implementation from openhands-aci into str_replace_editor.py - Added all necessary dependencies (binaryornot, openhands-aci modules) - Updated _execute_str_replace_editor to use local OHEditor class - Added comprehensive test suite from openhands-aci (37 tests for OHEditor) - Created integration tests for StrReplaceEditorTool (6 tests) - Added pytest as dev dependency and openhands-aci as dependency - All 43 tests passing successfully - Implementation now self-contained with full file editing capabilities Co-authored-by: openhands <openhands@all-hands.dev>
…ibility - Updated function signature to accept both dict and StrReplaceEditorAction inputs - Added automatic conversion from dict to StrReplaceEditorAction when needed - Ensures compatibility with Tool.execute_fn interface that passes dict parameters - All 43 tests still passing with enhanced flexibility Co-authored-by: openhands <openhands@all-hands.dev>
- Updated all test files to use new str_replace_editor implementation - Fixed imports from openhands_aci.editor to openhands.core.runtime.tools.str_replace_editor - Updated tests to work with new StrReplaceEditorObservation format instead of XML-wrapped JSON - Consolidated shared logic in conftest.py with helper functions - Fixed @with_encoding decorator to check method signatures before adding encoding parameter - Created missing __init__.py files for proper Python module structure - Updated all test assertions to work with new result format (result.output, result.error) - Added psutil dependency for memory usage testing - Fixed test dependencies by creating temporary files instead of relying on external data - Updated shell utils test to use 'python' instead of 'whoami' for tool installation check Test Results: - 117/118 tests passing (99.2% success rate) - All functional tests working correctly - Only memory leak test failing due to performance characteristics - All core functionality validated and working Co-authored-by: openhands <openhands@all-hands.dev>
- Add null checks for result.error and result.output before using 'in' operator - Fix variable scope issue in test_memory_usage.py - All pre-commit hooks now pass for str_replace_editor tests - Maintain 117/118 tests passing (99.2% success rate) Co-authored-by: openhands <openhands@all-hands.dev>
|
Looks like there are a few issues preventing this PR from being merged!
If you'd like me to help, just leave a comment, like Feel free to include any additional details that might help me get this PR into a better state. You can manage your notification settings |
malhotra5
pushed a commit
that referenced
this pull request
Sep 6, 2025
… requirements - Test requirement #1: Multiple pause method calls successively only create one PauseEvent - Test requirement #2: Calling conversation.pause() while conversation.run() is running in separate thread will pause the agent - Test requirement #3: Calling conversation.run() on an already paused agent will resume it The tests now properly validate the actual pause/resume behavior where run() resets the pause flag and resumes execution. Co-authored-by: openhands <openhands@all-hands.dev>
6 tasks done
2 of 5 tasks
StressTestor
pushed a commit
to StressTestor/software-agent-sdk
that referenced
this pull request
Jun 1, 2026
Co-authored-by: openhands <openhands@all-hands.dev>
This was referenced Jun 16, 2026
Closed
jpshackelford
pushed a commit
that referenced
this pull request
Jul 8, 2026
Fixes three issues when loading root SKILL.md plugins: Issue #1 (🔴): Malformed root .mcp.json silently dropped the entire skill - Plugin-level loader tolerates malformed .mcp.json (logs warning) - Skill-level loader raised SkillValidationError, caught by broad except - Result: skill silently dropped (0 skills loaded) Issue #2 (🟠): Root .mcp.json parsed twice with divergent expansion - Plugin level: expand_defaults=False (preserves ${VAR:-default}) - Skill level: expand_defaults=True (eagerly expands defaults) - Result: same file processed with different semantics Issue #3 (🟡): Redundant resource discovery - discover_skill_resources() called by both Skill.load() and plugin loader - Minor performance issue, but unnecessary duplication Root cause: For root SKILL.md plugins, plugin_dir == skill_root, so .mcp.json at plugin root is the same file both loaders attempt to process. Solution: - Add skip_mcp parameter to Skill.load() (defaults to False) - Pass skip_mcp=True when loading root skills from plugin loader - Remove redundant discover_skill_resources() calls from plugin loader - Add comprehensive regression tests (4 new tests) Test coverage: - test_malformed_root_mcp_json_does_not_drop_skill - test_root_mcp_json_not_double_loaded - test_root_skill_resources_not_duplicated - test_nested_skill_with_own_mcp_json_still_loads All 266 tests pass (46 plugin + 220 skill tests) Co-authored-by: openhands <openhands@all-hands.dev>
1 of 5 tasks
1 task done
1 of 5 tasks
This was referenced Jul 30, 2026
This was referenced Aug 10, 2026
Open
9 tasks
2 of 5 tasks
1 of 5 tasks
1 of 5 tasks
3 of 5 tasks
This was referenced Oct 13, 2026
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.