Generic Support for Meta's Agent Research Environment#55
Merged
Conversation
6-task plan covering: environments package, AREToolWrapper, AREEnvironment core + shorthand path, pyproject.toml extra, and integration tests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Record simulation_time_before, simulation_time_after, and simulation_time_elapsed in invocation meta dict, matching Gaia2GenericTool behavior. Gracefully returns None when simulation time is unavailable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Delegate AREToolWrapper metadata extraction to ARE's AppToolAdapter (canonical source of truth) instead of reading attributes directly. Remove getattr fallbacks in _extract_schema so missing arg_type or has_default attributes raise immediately, surfacing ARE API changes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove the outer try/except Exception block that silently returned ([], [], False) on any error. Exceptions now propagate so the benchmark runner can classify them via fail_on_task_error / fail_on_setup_error. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Existing standalone tool wrapper tests need the same autouse fixture that mocks AppToolAdapter, since AREToolWrapper now delegates to it for metadata extraction. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Gaia2Environment now inherits tool wrapping, notification polling, lifecycle control, and cleanup from AREEnvironment. Only setup_state (preprocess_scenario + judge) and GAIA2-specific gather_traces/config remain as overrides. Gaia2GenericTool is now an alias for AREToolWrapper. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Main branch renamed task_data to environment_data throughout. Updated AREEnvironment, Gaia2Environment, and all tests to use the new parameter name. Regenerated uv.lock. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove unused variable in shorthand path test - Add ty: ignore[unknown-argument] for ARE Scenario constructor (optional dependency not resolvable by type checker) - Apply ruff formatting Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
21 integration tests that exercise AREEnvironment against real ARE apps and scenarios — no mocks. Covers: - Lifecycle (scenario path, shorthand path, start/stop, pause/resume) - Tool wrapping (metadata, calling, error tracing, history) - AUI tool filtering - Oracle mode with real ARE simulation - Tracing and config with real tool calls - Simulation time advancement via wait_for_notification - Convenience accessors returning real ARE objects Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Description
ARE (Agent Research Environments) is Meta's platform for building and evaluating LLM-based agents in dynamic, multi-step simulations. MASEval already integrates with ARE through the GAIA2 benchmark, but the ARE-specific logic (lifecycle control, tool wrapping, notification polling) lives entirely inside
Gaia2Environment. This means any new ARE-based benchmark would need to duplicate that code.This PR extracts a generic
AREEnvironmentandAREToolWrapperso that MASEval can support any ARE-based benchmark through a shared base.Gaia2Environmentbecomes a thin subclass that only retains GAIA2-specific setup and trace gathering.What's new
AREEnvironment(maseval/interface/environments/are.py): full ARE lifecycle (start/stop/pause/resume), notification polling (poll_notifications,get_turn_notifications), AUI tool filtering, oracle mode, and both scenario-path and shorthand construction paths.AREToolWrapper(maseval/interface/environments/are_tool_wrapper.py): wraps any AREAppToolwith simulation-time-aware tracing, invocation history, and JSON schema extraction. Delegates metadata to ARE'sAppToolAdapter.maseval/interface/environments/package for shared environment implementations.areoptional dependency inpyproject.toml.What changed
Gaia2Environmentnow inherits fromAREEnvironment. Only GAIA2-specific logic remains:setup_statewith preprocessing + judge,gather_traces, andgather_config.Gaia2GenericToolis now an alias forAREToolWrapper.Tests
Three test files cover this work: unit tests for
AREToolWrapper, mock-based tests forAREEnvironment, and real ARE integration tests that exercise the full lifecycle with real apps and scenarios.Type of Change
Checklist
Contribution
Documentation
docs/Changelog
CHANGELOG.mdunder[Unreleased]sectionArchitecture (if applicable)
maseval/core/do NOT import frommaseval/interface/