harbor run -t openthoughts/tasktrove-exp-flat25-subtle-debug-v3-5k-subtle-0015harbor download openthoughts/tasktrove-exp-flat25-subtle-debug-v3-5k-subtle-0015Note: The workspace contains a partially broken implementation at /app/starter_code.py. Your task is to fix the bugs and complete the implementation to provide a working publish-subscribe system as described below.
Task: Implement a small publish-subscribe (pub/sub) mechanism with Channel-based publishers and observers.
What to implement
Requirements and behavior
Initialization and channels
Attaching observers
Detaching observers (optional but good to implement)
Dispatching
Context management
Initialization and attachment
Update behavior
Observed interface (as used by tests)
What this enables (how tests will pass)
Notes and constraints
This task results in a lightweight, deterministic pub/sub system with channel-based dispatch, default channel behavior, and context-manager support that satisfies the provided test suite.