Prompt #137

Back to prompts
Yoga Blinker Signal Subscriber
Code Β· openai/gpt-4.1
5/5
Variables
signal_name, module, handler_action, expected_connection_count
Tags
stack-aware,yoga,blinker,signals,eda
Source
research-2026-05-01-stack-aware
Use count
0
Created
2026-05-01T18:30:48.776731+00:00
Updated
2026-05-01T18:30:48.776731+00:00

Content

Add a new Blinker signal subscriber to yoga's EDA layer at /nvmetank1/docker/yoga/signals.py.

Context: yoga has 45 signals and 41 active connections. All cross-module communication goes
through signals β€” no direct imports between modules (strict EDA rule).

Steps:
1. Define or reference signal `{signal_name}` in signals.py
2. Write subscriber function `def on_{signal_name}(sender, **kwargs)` in {module}.py
3. Register via: `{signal_name}.connect(on_{signal_name})` in subscribers.py
4. Handler must perform: {handler_action}
5. Emit test: `{signal_name}.send(app, **{{"test_key": "test_val"}})`

Guard against double-registration: check if handler is already connected before `.connect()`.
Total connections after this addition: {expected_connection_count}.