fix(signals): deliver note-only report edits to Slack as the note - #83039
Conversation
A scout edit that only appends a note re-posted the full report message, which reads as a duplicate in the channel. Note-only edits now post the note itself, framed as an update to the existing report. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DYWXRYPWd3cK7pza5gjHd4
|
😎 Merged successfully - details. |
🦔 ReviewHog reviewed this pull requestFound 0 must fix, 1 should fix, 0 consider. Published 1 finding (view the review). |
|
Reviews (1): Last reviewed commit: "fix(signals): deliver note-only report e..." | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 80f50d16dc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
ReviewHog Alpha 🦔 If you find any issues helpful - please reply "valid", "invalid", etc., for evaluation purposes 🙏 |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DYWXRYPWd3cK7pza5gjHd4
|
/trunk merge |
|
Note 🤖 stamphog reviewed A ReviewHog finding confirms this PR's producer can send an
Gate mechanics and policy version
|
Problem
edit_reportenqueues the same delivery as a fresh emit, so the worker re-renders the unchanged title and summary.Changes
_do_edit_reportmarks a delivery as note-only when a note was appended and the title and summary were untouched. An edit that rewrites content still posts the report message, even when it also appends a note.enqueue_scout_slack_deliveryomits theedit_notekwarg when unset, so deliveries without a note keep the payload shape workers on the previous task signature accept during a rolling deploy.What the channel sees when a scout adds a note to a report it already posted (mockups, not screenshots):
Before, a second copy of the report message:
After, the note framed as an update:
The note body gets the same treatment as a summary: markdown to mrkdwn conversion, mention-injection escaping, chart references reduced to labels, section truncation.
No app UI changes. I could not post a rendered message to a Slack workspace from this session, so the examples above are mockups.
How did you test this code?
test_scout_slack_delivery.py: a delivery carrying a note renders the note, not the summary. Catches a revert of the note branch, which would re-post the duplicate report message.test_report_emit_and_edit_enqueue_configured_slack_destination_after_commit: only the note-only edit carriesedit_note; an emit and a summary rewrite with a note do not. Catches the discriminator regressing to "any note".edit_notekwarg when unset. Catches a payload-shape change that would make old workers reject every delivery during a rolling deploy.Automatic notifications
Docs update
None: the scout Slack destination behavior is not separately documented.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
🤖 Generated with Claude Code
https://claude.ai/code/session_01DYWXRYPWd3cK7pza5gjHd4