feat(trigger): add wake_branch() to error dispatch for autonomous handling
After delivering error notification email, now calls wake_branch() to spawn an agent in the target branch immediately. Changes reply_to from @trigger to @devpulse so resolution reports go to devpulse. 370 tests passing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
7c42c3fd9f
commit
c8d299ec8d
@@ -516,10 +516,17 @@ def handle_error_detected(
|
||||
subject=email_subject,
|
||||
message=notification_message,
|
||||
auto_execute=True,
|
||||
reply_to='@trigger',
|
||||
reply_to='@devpulse',
|
||||
from_branch='@trigger'
|
||||
)
|
||||
|
||||
# Wake the target branch so the email is processed immediately
|
||||
try:
|
||||
from aipass.ai_mail.apps.handlers.dispatch.wake import wake_branch
|
||||
wake_branch(recipient, fresh=False, sender='@trigger')
|
||||
except Exception:
|
||||
pass # Silent — email in inbox as fallback
|
||||
|
||||
json_handler.log_operation("dispatch_sent", {"recipient": recipient})
|
||||
|
||||
# Record dispatch for tracking
|
||||
|
||||
Reference in New Issue
Block a user