harbor run -t openthoughts/tasktrove-exp-rpt-curriculum-hard-curriculum-hard-0097harbor download openthoughts/tasktrove-exp-rpt-curriculum-hard-curriculum-hard-0097Objective Implement a robust, high-performance plugin discovery and task listing system in a Python package rooted at /app. The solution must expose exact public surfaces and behaviors so a pytest-based suite can drive and validate it. The tests patch and inspect modules under thegirder_worker namespace via the /app path; design for concurrency, large-scale discovery, and edge cases while preserving compatibility with the test expectations.
What to implement and where
Create a Python package at /app/girder_worker (i.e., the directory path /app/girder_worker) with these modules:
The tests import (via the test runner’s path setup) from girder_worker.*. Ensure /app is on sys.path in the test harness so this package is importable as girder_worker.
The package must expose a minimal, patchable app container:
Public API to implement (signatures and behaviors must match tests)
Global state
get_extension_manager() -> ExtensionManager
class ExtensionManager
import_all_includes() -> None
get_plugin_task_modules() -> List[str]
discover_tasks(app) -> None
get_extensions() -> List[str]
set_extensions(exts: List[str]) -> None
get_module_tasks(module_name: str) -> List[str]
get_extension_tasks(extension_name: str, celery_only: bool = False) -> List[str]
Notes on design choices for entrypoint.py
Thread-safety and performance
Edge cases and robustness
Namespace switching
Task discovery module
Import behavior
Celery include integration
State and persistence
Performance and concurrency
Unicode and edge-case handling
Design pattern considerations
Notes
Deliverable