Skip to content

[argus] patch #45: delivery-report callback for scheduled playbook fires#9

Merged
Nichol4s merged 1 commit into
argusfrom
argus-patch-45-report-callback
Jul 20, 2026
Merged

[argus] patch #45: delivery-report callback for scheduled playbook fires#9
Nichol4s merged 1 commit into
argusfrom
argus-patch-45-report-callback

Conversation

@Nichol4s

Copy link
Copy Markdown

Completes the report_url contract Chronos has been waiting on: the gateway now POSTs delivered|silent|failed (plus channel/chat_id/message_text/delivered_at/error) to the per-run callback URL once an unattended playbook turn resolves.

  • New app/channels/_delivery_report.py: one POST, one retry, never raises — a report failure degrades to exactly the pre-Can't support Azure OpenAI api as configuration guide introduction bytedance/deer-flow#45 ok/unreported timeout behavior on the scheduler side.
  • PlaybookFireRequest/InboundMessage grow an optional report_url; the fire endpoint forwards it.
  • manager._report_unattended_outcome() (no-op unless unattended + report_url) at the outcome seams: silent from both unattended-suppression branches, delivered after the outbound publish, failed on a captured stream error or thread-busy rejection. Interactive turns and fires without report_url are byte-for-byte unchanged.

PATCHES.md updated in the same commit per the ledger rule.

Tests: 26 pass in the touched files; 685 pass across the channel/manager suites.

🤖 Generated with Claude Code

…aybook fires

Chronos has handled a delivered|silent|failed callback on its run rows
since the report_url contract landed, but the gateway never called back:
every channel_notify run sat 'running' for 1800s and closed as
ok/unreported, so the dashboard could not tell a delivered briefing from
a suppressed-silent tick (bytedance#31/bytedance#32/bytedance#34/bytedance#44) or a failed turn.

- New app/channels/_delivery_report.py: report_delivery() POSTs
  {status, channel, chat_id, message_text, delivered_at, error} to the
  report_url with the internal token; one retry, never raises; a report
  failure degrades to exactly the pre-bytedance#45 unreported behavior.
- PlaybookFireRequest + InboundMessage grow an optional report_url;
  the fire endpoint forwards it.
- manager._report_unattended_outcome() (no-op unless unattended with a
  report_url) called at the outcome seams: silent from both
  unattended-suppression branches, delivered after the outbound publish,
  failed on a captured stream error or thread-busy rejection.

Tests: test_delivery_report.py (payload shape, token header,
retry-once/never-raise, message-text cap, manager gate),
test_playbook_fire.py +2 (report_url flow-through, default None).
26 pass in the touched files; 685 pass across channel/manager suites.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PDzGEHrugU91DPkeV3MPLY
@Nichol4s
Nichol4s merged commit 6d9632f into argus Jul 20, 2026
5 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant