harbor run -t openthoughts/tasktrove-exp-rpt-stack-pytest-large-stack-pytest-1302harbor download openthoughts/tasktrove-exp-rpt-stack-pytest-large-stack-pytest-1302Task: Implement a self-contained Python module at /app/pybind11_tests.py (as a flat module or as /app/pybind11_tests/ package) that provides a pure-Python simulation of the C++ pybind11 copy/move policies used in the tests. The goal is to expose the exact API the tests import from pybind11_tests.copy_move_policies as m and make the test suite deterministically pass without requiring any C++ bindings.
What to implement
A. Copy/move capability helpers
Define two simple marker classes (or objects) exposed at module level:
How to expose (example signature): class LackingCopyCtor: @staticmethod def get_one(): raise RuntimeError("type is non-copyable!") class LackingMoveCtor: @staticmethod def get_one(): raise RuntimeError("type is neither movable nor copyable!") lacking_copy_ctor = LackingCopyCtor() lacking_move_ctor = LackingMoveCtor()
B. State objects for type counters
C. move_and_copy_cstats
D. move_and_copy_casts
E. move_and_copy_loads
F. Move/load optional tests (optional support)
G. Private operator new / reference tests
H. Move issue fallbacks
Note: The task is to implement a self-contained Python surrogate that reproduces the API and test-semantics of the pybind11-based copy/move policies. It does not require actual C++ bindings.