[argus] patch #45: delivery-report callback for scheduled playbook fires#9
Merged
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.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#45ok/unreportedtimeout behavior on the scheduler side.PlaybookFireRequest/InboundMessagegrow an optionalreport_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 withoutreport_urlare 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