harbor run -t openthoughts/tasktrove-exp-rle-adversarial-5k-adversarial-2108harbor download openthoughts/tasktrove-exp-rle-adversarial-5k-adversarial-2108Task: Implement a minimal, self-contained GroupBy aggregation API (and supporting data structures) that reproduces the behaviors exercised by the provided test suite (especially test_agg_api, test_agg_structs_dataframe/series, test_agg_dict_parameter_cast_result_dtypes, test_agg_item_by_item_raise_typeerror, test_agg_callables, test_agg_nested_dicts, test_groupby_agg_err_catching, etc.).
What you need to build
A compact data framework (minimal DataFrame/Series and a GroupBy object) that can:
Aggregation API (GroupBy.aggregate/GroupBy.agg) with the following capabilities and constraints:
Acceptable input shapes for aggregation
Support for named/di ct-style aggregation
Dict-based aggregation with proper error handling
Error handling for invalid/renamed columns
Support for function equivalence testing (various callables)
Struct-returning aggregation (tuple/list/structure per group)
Type behavior and Series/Frame parity
Deliverables (what to implement)
A Python module (standalone, self-contained) that provides:
The solution should be self-contained and not rely on pandas (or should be clearly separated in a way that the tests provided can be adapted to run against it). The goal is to reproduce the tested behaviors in a compact, readable, and well-documented implementation.
Acceptance criteria (how to verify)
Notes and constraints
Optional hints for implementation (if you want guidance on structure)
Deliverable format
This task yields a focused, actionable objective that maps directly to the behaviors exercised by the tests and is feasible to implement in a self-contained way.
Output only the instruction: