Skip to content

Declare CoderForge file editor tool metadata#259

Open
neubig wants to merge 2 commits into
mainfrom
fix/data-generation-metadata-tools
Open

Declare CoderForge file editor tool metadata#259
neubig wants to merge 2 commits into
mainfrom
fix/data-generation-metadata-tools

Conversation

@neubig

@neubig neubig commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes coderforge_preview OpenHands SDK conversion by declaring the file-editing tool that its standardized rows already use.

CoderForge standardized trajectories emit ApiAction(function="str_replace_editor", ...), but the dataset metadata previously declared no custom tools. Other SWE-style datasets that emit str_replace_editor declare it in metadata.json, which lets the existing std_to_sft converter initialize the SDK file_editor tool. This PR makes CoderForge follow that existing pattern instead of changing converter behavior or inferring tool availability from observed actions.

Changes

  • Add str_replace_editor to datasets/coderforge_preview/metadata.json
  • Leave available_apis unchanged, because this is a dataset-wide capability rather than per-row tool availability
  • Leave std_to_sft unchanged

Validation

  • pytest tests/test_dataset_structure.py -q
  • Direct CoderForge first-row conversion initializes file_editor with the existing converter

Issue

Closes #260

This PR description update was created by an AI agent (OpenHands) on behalf of Graham Neubig.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Acceptable — The design is sound (metadata-level openhands_tools, the tool_name-before-kwargs fix in map_api_action, and the early-return guard in should_map_to_browser_action are all correct). Two CI failures need to be resolved before merge.


Was this automated review useful? React with 👍 or 👎 to this review to help us measure review quality.
Workflow run: https://github.com/neulab/agent-data-protocol/actions/runs/27097941560

Comment on lines +157 to +159
from agents.openhands_sdk import std_to_sft
from openhands.tools.file_editor import FileEditorTool
from schema.trajectory import Trajectory

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Critical: Pre-commit (ruff) is failing because openhands.tools is a third-party import and must come before the local agents.* / schema.* imports, with a blank line between the two groups.

Suggested change
from agents.openhands_sdk import std_to_sft
from openhands.tools.file_editor import FileEditorTool
from schema.trajectory import Trajectory
from openhands.tools.file_editor import FileEditorTool
from agents.openhands_sdk import std_to_sft
from schema.trajectory import Trajectory

Comment thread schema/dataset_metadata.py Outdated

custom_tools: list[OpenAIToolSpec] = Field(default_factory=list)
code_enabled: list[str] = Field(default_factory=list)
openhands_tools: list[OpenHandsToolName] = Field(default_factory=list)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Critical: Any .py change under schema/ (other than schema/version.py and schema/__init__.py) requires a SCHEMA_VERSION bump in schema/version.py. CI's "Check schema version bump" step is currently failing because of this change. Please bump the patch version in schema/version.py and add the previous version to SUPPORTED_SCHEMA_VERSIONS.

@neubig neubig force-pushed the fix/data-generation-metadata-tools branch from 437f5da to 7323734 Compare June 7, 2026 16:23
@neubig neubig changed the title Declare OpenHands tools in dataset metadata Declare CoderForge file editor tool metadata Jun 7, 2026
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.

Track PR #259: Declare CoderForge file editor tool metadata

1 participant