:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(signals): split threaded Slack reports on bold section labels (#93733)
posthog[bot]403fb4c2936e
diff --git a/products/replay_vision/frontend/generated/api.schemas.ts b/products/replay_vision/frontend/generated/api.schemas.tsindex bdc912edc7fb..18fbb1b727b3 100644--- a/products/replay_vision/frontend/generated/api.schemas.ts+++ b/products/replay_vision/frontend/generated/api.schemas.ts@@ -1673,7 +1673,7 @@ export interface SignalScoutSlackDestinationApi {* @items.pattern ^[UW][A-Z0-9]{4,}\s*(\|.*)?$*/users?: string[] | null- /** When true, post a report as a thread: a short lead in the channel and the rest split by the report's Markdown headings into replies. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post. */+ /** When true, post a report as a thread: a short lead in the channel and the rest split into replies at the summary's section labels, which can be Markdown headings or bold labels. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post. */thread_reports?: boolean}diff --git a/products/replay_vision/frontend/generated/api.zod.ts b/products/replay_vision/frontend/generated/api.zod.tsindex 2dd24b1c68cf..f587f3620e97 100644--- a/products/replay_vision/frontend/generated/api.zod.ts+++ b/products/replay_vision/frontend/generated/api.zod.ts@@ -1016,7 +1016,7 @@ export const VisionScannersScoutsCreateBody = /* @__PURE__ */ zodvisionScannersScoutsCreateBodyConfigOneOutputDestinationsOneSlackOneThreadReportsDefault).describe(- "When true, post a report as a thread: a short lead in the channel and the rest split by the report's Markdown headings into replies. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post."+ "When true, post a report as a thread: a short lead in the channel and the rest split into replies at the summary's section labels, which can be Markdown headings or bold labels. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post."),}),zod.null(),diff --git a/products/signals/backend/scout_harness/AGENTS.md b/products/signals/backend/scout_harness/AGENTS.mdindex 2e9dbcbbfd52..73afb2fafefb 100644--- a/products/signals/backend/scout_harness/AGENTS.md+++ b/products/signals/backend/scout_harness/AGENTS.md@@ -30,7 +30,7 @@ In production it is driven by `SignalsScoutCoordinatorWorkflow` (periodic tick e- `slack_delivery.py` / `slack_delivery_queue.py` / `slack_charts.py`Best-effort direct Slack delivery for configured scout outputs. Finding emissions and surfaced report emits/edits snapshot the run config's destination after their database write commits, then enqueue the shared retrying Celery worker. The destination targets a single channel or up to `MAX_SCOUT_SLACK_DM_TARGETS` members who each get an individual DM (one Celery task per recipient, so retries and permanent failures stay independent; a group DM would need the `mpim:write` scope the Slack app doesn't request). Integrations are project-scoped, so a workspace connected from any environment in the project can receive the canonical parent team's scout output.A report message renders its `charts` through the exports facade (`render_png_export`, attributed to the run's acting user, so the insight access check applies; a system render that expires with its delivery url, so it stays out of the user's export quota and does not outlive its only reference) and appends them as `image` blocks pointing at a signed delivery url; chart links in the prose still reduce to their label. A threaded report carries its charts on the lead message, since the replies only hold the summary's tail. Only `InsightVizNode` / `SavedInsightNode` charts render, capped per report and by a render-time budget (a render only starts if it can finish inside the budget), with rendered assets remembered per delivery so a Slack retry does not re-render, and every failure is skipped rather than failing the delivery — the whole chart build is best effort, not only the render. The Slack integration row is resolved again after the build, since a workspace reconnected during the render window replaces the token on the same row.- A threaded report splits its summary at the shallowest Markdown heading level that summary repeats at, so a sub-heading rides in its parent's reply and the thread mirrors the outline the reader sees in the inbox; a level used once is the report's own title rather than a seam, so the split descends past it. The split runs at any length, because a typical digest fits inside one Slack section and a length test leaves it in the channel as the wall of text threading exists to break up. A summary with no heading has no seam and stays one message, hard-chunked only past the section cap.+ A threaded report splits its summary at the shallowest section level that summary repeats at, so a sub-section rides in its parent's reply and the thread mirrors the outline the reader sees in the inbox; a level used once is the report's own title rather than a seam, so the split descends past it. A section is opened by an ATX heading or by a bold label, since scouts label their sections in bold far more often than they write a heading and Slack renders `**Evidence**` and `## Evidence` identically. Bold labels rank below every heading level, and a label standing on its own line ranks above one leading a paragraph, so a report that mixes the forms still splits at its headings. A bold run inside a paragraph, one with no blank line before it, and one too long to read as a label are all left alone. The split runs at any length, because a typical digest fits inside one Slack section and a length test leaves it in the channel as the wall of text threading exists to break up. A summary with no section label has no seam and stays one message, hard-chunked only past the section cap.Slack fetches each image url itself and rejects the whole message when it cannot reach one, so a rejected message is posted again without its charts, which carry `CHART_BLOCK_ID_PREFIX` block ids to be dropped as whole units; a deployment Slack cannot reach still gets the prose and the report link.This path bypasses the HTTP chart-render throttle, so the cap is the guard.One `ChartRenderBudget` spans a delivery's initial build and any rebuild, so an edit landing mid-render cannot buy a second set of renders; only a cache miss spends one. The budget also holds the assets the delivery has rendered, so a rebuild keeps them even where the retry cache is off. That cache is written after every render (the task acks late, so a worker lost mid-delivery leaves finished renders for the retry) and signs each entry with `SIGNALS_SLACK_CHART_CACHE_SIGNING_KEYS` (comma-separated `new,old`; first signs, all verify) rather than `SECRET_KEY`; reuse is off wherever that setting is unprovisioned. A content edit made through the scout's edit tool enqueues a fresh full delivery and claims the report's latest-delivery marker before publishing to the broker, giving the claim up again if the publish fails (a claim naming a task that never runs would silence the report for the marker's whole TTL). Every full delivery yields to a marker naming another delivery, not only one that rebuilt mid-render: an edit landing before a delivery starts leaves its build nothing to rebuild, so the content is already current and it would otherwise post the edited report a second time. The marker is scoped to the destination as well as the report, since two scouts editing one report into different channels are not competing. A note-only delivery carries its own note rather than report content and is never marked, so it never yields.diff --git a/products/signals/backend/scout_harness/serializers.py b/products/signals/backend/scout_harness/serializers.pyindex e829b1eefc32..8c31d230b874 100644--- a/products/signals/backend/scout_harness/serializers.py+++ b/products/signals/backend/scout_harness/serializers.py@@ -1133,7 +1133,8 @@ class EmitReportRequestSerializer(serializers.Serializer):"The report body the inbox shows. Markdown is supported (headings, lists, code, links; ""images are not rendered). Lead with one plain declarative sentence — the inbox card uses ""your first line verbatim as the headline (~140 chars, emphasis stripped), then renders the "- "full markdown in the detail view."+ "full markdown in the detail view. A heading, or a bold label on a line of its own with a "+ "blank line above it, marks a section that a threaded Slack delivery splits into its own reply."),)evidence = serializers.ListField(@@ -1265,7 +1266,9 @@ class EditReportRequestSerializer(serializers.Serializer):help_text=("Optional new summary. Markdown is supported (headings, lists, code, links; images are not ""rendered); lead with one plain declarative sentence — it becomes the inbox card headline. "- "The pipeline may later re-research and overwrite it."+ "A heading, or a bold label on a line of its own with a blank line above it, marks a section "+ "that a threaded Slack delivery splits into its own reply. The pipeline may later re-research "+ "and overwrite it."),)append_note = serializers.CharField(@@ -2118,8 +2121,9 @@ class SignalScoutSlackDestinationSerializer(serializers.Serializer):default=False,help_text=("When true, post a report as a thread: a short lead in the channel and the rest split "- "by the report's Markdown headings into replies. Keeps a long summary from being clipped "- "at Slack's section limit. Off by default, and it does not change how findings post."+ "into replies at the summary's section labels, which can be Markdown headings or bold "+ "labels. Keeps a long summary from being clipped at Slack's section limit. Off by "+ "default, and it does not change how findings post."),)diff --git a/products/signals/backend/scout_harness/slack_delivery.py b/products/signals/backend/scout_harness/slack_delivery.pyindex 6c87a18d2b89..dfdff4792630 100644--- a/products/signals/backend/scout_harness/slack_delivery.py+++ b/products/signals/backend/scout_harness/slack_delivery.py@@ -1,5 +1,6 @@from __future__ import annotations+import uuidfrom dataclasses import dataclassfrom typing import Literalfrom urllib.parse import quote@@ -25,6 +26,7 @@ from products.signals.backend.scout_harness.slack_charts import (from products.signals.backend.slack_formatting import (chunk_slack_mrkdwn,escape_slack_mrkdwn,+ group_segments_to_limit,markdown_to_slack_mrkdwn,slack_channel_id_from_target,split_markdown_by_headings,@@ -355,17 +357,20 @@ def build_scout_report_slack_message(def _report_summary_chunks(report: SignalReport) -> list[str]:- """Convert the report summary to mrkdwn and split it into one chunk per heading section.+ """Convert the report summary to mrkdwn and split it into one chunk per section.Called only for a threaded delivery. The first chunk leads the channel and each later onebecomes a reply, so the thread mirrors the report's outline at any length. Length is not thetest: a typical digest fits inside one Slack section, so a length test leaves it as one wall of- text. A summary with no headings has no seam and stays one chunk. A section too long for one+ text. A section is opened by a Markdown heading or a bold label, so the summary threads whether+ the scout wrote `## Evidence` or `**Evidence**`. A summary with neither has no seam and stays+ one chunk. A summary with more sections than `MAX_THREAD_SEGMENTS` has them grouped, so one+ delivery cannot post a reply per paragraph of a malformed report. A section too long for oneSlack section is hard-chunked on its line ends. The split runs after `strip_chart_references`so a chart link never straddles two messages."""summary_text = strip_chart_references((report.summary or "").strip())chunks: list[str] = []- for segment in split_markdown_by_headings(summary_text):+ for segment in group_segments_to_limit(split_markdown_by_headings(summary_text)):rendered_segment = markdown_to_slack_mrkdwn(segment.strip())if not rendered_segment:continue@@ -537,7 +542,11 @@ def _post_scout_report_thread_replies(thread_ts=thread_ts,blocks=blocks,text=fallback,- client_msg_id=f"{delivery_id}:{index}",+ # Slack rejects a client_msg_id that is not a UUID, and this loop swallows the+ # error, so a plain `id:index` string costs every reply silently. The `reply`+ # infix keeps the derivation clear of the one the DM fan-out uses for extra+ # recipients (`<delivery_id>:<index>`), which would otherwise collide.+ client_msg_id=str(uuid.uuid5(uuid.NAMESPACE_OID, f"{delivery_id}:reply:{index}")),unfurl_links=False,unfurl_media=False,)diff --git a/products/signals/backend/slack_formatting.py b/products/signals/backend/slack_formatting.pyindex a69e1ed29b9d..cddb9103ebd2 100644--- a/products/signals/backend/slack_formatting.py+++ b/products/signals/backend/slack_formatting.py@@ -129,44 +129,97 @@ def truncate_slack_section(text: str) -> str:# A top-of-line ATX heading (`# `…`###### `). The scout writes its summary in Markdown, so its own# headings are the natural seams to split a long report on for threaded Slack delivery._MARKDOWN_HEADING_RE = re.compile(r"^(#{1,6})[ \t]+\S")-# Opens or closes a fenced code block (``` or ~~~, up to three leading spaces per CommonMark). A-# `# ` line inside a fence is code, not a heading: splitting there would orphan the fence and hand-# the snippet to the mrkdwn converter as prose.+# Opens a fenced code block (``` or ~~~, up to three leading spaces per CommonMark), with anything+# after the marker read as the info string. A `# ` line inside a fence is code, not a heading:+# splitting there would orphan the fence and hand the snippet to the mrkdwn converter as prose._MARKDOWN_FENCE_RE = re.compile(r"^ {0,3}(`{3,}|~{3,})")+# Closes one. CommonMark allows only trailing whitespace after a closing fence, so a marker line+# carrying other text stays code. Reading it as the close resumes seam detection inside the+# snippet, which splits the report mid-fence.+_MARKDOWN_FENCE_CLOSE_RE = re.compile(r"^ {0,3}(`{3,}|~{3,})[ \t]*$")++# A line that opens with a bold run (`**Label**` or `__Label__`), keeping the rest of the line so+# `_bold_seam_level` can read what follows the label. The label itself cannot hold the marker, so+# `**one** and **two**` reads as inline bold instead of one long label.+_LEADING_BOLD_RUN_RE = re.compile(r"^(\*\*|__)(?=\S)((?:(?!\1).)+)(?<!\s)\1(.*)$")+# What separates a bold label from the prose it leads: `**Label**: prose`, or `**Label** - prose`+# with a hyphen, an en dash, or an em dash.+_BOLD_LEAD_SEPARATOR_RE = re.compile(r"^(?::[ \t]+|[ \t]+[-–—][ \t]+)\S")+# `**Label:** prose` keeps the colon inside the bold run, so there the space alone separates them.+_BOLD_LEAD_SPACE_RE = re.compile(r"^[ \t]+\S")+# A label longer than this is a sentence bolded for emphasis rather than a section label. Slack+# renders the two the same way, so length is what tells them apart.+_MAX_BOLD_LABEL_LENGTH = 80+# Bold seams rank below every ATX level (1 to 6), so a summary that also has real headings splits+# at those and keeps its bold labels inside their section. A label on a line of its own marks a+# section more strongly than one leading a paragraph, so it ranks ahead of it.+_STANDALONE_BOLD_LEVEL = 7+_BOLD_LEAD_PARAGRAPH_LEVEL = 8@frozen-class _MarkdownHeading:- """Where an ATX heading starts in the text, and how deep it is. Both fields are plain ints, so a- tuple would let a call site read the level as an offset."""+class _MarkdownSeam:+ """Where a section starts in the text, and how deep the seam that opens it is. Both fields are+ plain ints, so a tuple would let a call site read the level as an offset."""offset: intlevel: int-def _markdown_headings(text: str) -> list[_MarkdownHeading]:- """Every ATX heading in the text, skipping any inside a fenced code block."""- headings: list[_MarkdownHeading] = []+def _bold_seam_level(line: str) -> int | None:+ """The pseudo-heading level of a bold-labelled line, or None when the line is not a seam.++ Scouts label their sections in bold much more often than they write an ATX heading, and Slack+ renders `**Evidence**` and `## Evidence` identically, so a bold label has to count as a seam or+ threading does nothing for those reports. Two shapes count: a label standing alone on its line,+ and a label leading its paragraph's prose. A bold run with prose after it but no separator, as+ in `**31** organizations reported this`, is emphasis rather than a label."""+ match = _LEADING_BOLD_RUN_RE.match(line)+ if not match:+ return None+ label, rest = match.group(2), match.group(3)+ if len(label) > _MAX_BOLD_LABEL_LENGTH:+ return None+ if rest.strip() in ("", ":"):+ return _STANDALONE_BOLD_LEVEL+ if _BOLD_LEAD_SEPARATOR_RE.match(rest) or (label.endswith(":") and _BOLD_LEAD_SPACE_RE.match(rest)):+ return _BOLD_LEAD_PARAGRAPH_LEVEL+ return None+++def _markdown_seams(text: str) -> list[_MarkdownSeam]:+ """Every seam the text can split at: its ATX headings, and its bold section labels.++ Anything inside a fenced code block is code rather than a seam. A bold label counts only when a+ blank line or the start of the text comes before it, so bold inside a paragraph is left alone+ and a label a list item continues onto stays part of that list."""+ seams: list[_MarkdownSeam] = []fence: str | None = None # marker of the currently open fence, else None+ preceded_by_blank = True # the start of the text opens a block the same way a blank line doesoffset = 0for line in text.split("\n"):- fence_match = _MARKDOWN_FENCE_RE.match(line)if fence is not None:# Close only on the same fence character, at least as long as the opener (CommonMark).- if fence_match and fence_match.group(1)[0] == fence[0] and len(fence_match.group(1)) >= len(fence):+ close_match = _MARKDOWN_FENCE_CLOSE_RE.match(line)+ if close_match and close_match.group(1)[0] == fence[0] and len(close_match.group(1)) >= len(fence):fence = None- elif fence_match:+ elif fence_match := _MARKDOWN_FENCE_RE.match(line):fence = fence_match.group(1)else:heading_match = _MARKDOWN_HEADING_RE.match(line)if heading_match:- headings.append(_MarkdownHeading(offset=offset, level=len(heading_match.group(1))))+ seams.append(_MarkdownSeam(offset=offset, level=len(heading_match.group(1))))+ elif preceded_by_blank:+ bold_level = _bold_seam_level(line)+ if bold_level is not None:+ seams.append(_MarkdownSeam(offset=offset, level=bold_level))+ preceded_by_blank = not line.strip()offset += len(line) + 1 # +1 for the "\n" that split dropped- return headings+ return seams-def _split_heading_level(levels: list[int]) -> int:- """The shallowest heading level the text repeats at, else the shallowest level present.+def _split_seam_level(levels: list[int]) -> int:+ """The shallowest seam level the text repeats at, else the shallowest level present.A level that appears once is the summary's own title rather than a seam between sections, sosplitting there would return the whole summary as one segment."""@@ -176,20 +229,21 @@ def _split_heading_level(levels: list[int]) -> int:def split_markdown_by_headings(text: str) -> list[str]:- """Split a Markdown summary into the lead and one segment per top-level heading.+ """Split a Markdown summary into the lead and one segment per top-level section.- The first element is the text before the first split point (empty when the summary opens with a- heading of that level). Each later element is a heading and everything under it, including its- sub-headings, so a segment holds the same block a reader folds shut. Headings inside fenced code- blocks are left in place, so a snippet is never split mid-fence. No content is dropped."""+ A section is opened by an ATX heading or by a bold label, whichever the summary uses. The first+ element is the text before the first split point (empty when the summary opens with a seam of+ that level). Each later element is a seam and everything under it, including its sub-sections,+ so a segment holds the same block a reader folds shut. Seams inside fenced code blocks are left+ in place, so a snippet is never split mid-fence. No content is dropped."""text = text.strip()if not text:return []- headings = _markdown_headings(text)- if not headings:+ seams = _markdown_seams(text)+ if not seams:return [text]- split_level = _split_heading_level([heading.level for heading in headings])- starts = [heading.offset for heading in headings if heading.level == split_level]+ split_level = _split_seam_level([seam.level for seam in seams])+ starts = [seam.offset for seam in seams if seam.level == split_level]segments = [text[: starts[0]]]for index, start in enumerate(starts):end = starts[index + 1] if index + 1 < len(starts) else len(text)@@ -197,6 +251,26 @@ def split_markdown_by_headings(text: str) -> list[str]:return segments+# A threaded delivery posts one Slack message per segment, in sequence. A well-formed report has a+# handful of sections, so a summary that yields more than this labelled every paragraph or repeated+# one label. Grouping the overflow keeps the thread readable and bounds the requests one delivery+# makes to Slack, which it sends one after another with every failure swallowed.+MAX_THREAD_SEGMENTS = 12+++def group_segments_to_limit(segments: list[str], limit: int = MAX_THREAD_SEGMENTS) -> list[str]:+ """Merge neighboring segments until at most `limit` remain, leaving the lead on its own.++ The lead is the channel message, so it keeps exactly what the summary put before its first+ section. The sections after it are grouped in even runs, so the thread still follows the+ report's order. No content is dropped."""+ if len(segments) <= limit:+ return segments+ lead, sections = segments[0], segments[1:]+ per_group = -(-len(sections) // max(1, limit - 1)) # ceiling division+ return [lead] + ["".join(sections[index : index + per_group]) for index in range(0, len(sections), per_group)]++# End of a sentence, allowing a closing quote or bracket before the space that follows it._SENTENCE_END_RE = re.compile(r"[.!?…][\"')\]]*\s")_WHITESPACE_RUN_RE = re.compile(r"\s+")diff --git a/products/signals/backend/test/test_scout_slack_delivery.py b/products/signals/backend/test/test_scout_slack_delivery.pyindex d337d8ee4f32..a75949f02a6c 100644--- a/products/signals/backend/test/test_scout_slack_delivery.py+++ b/products/signals/backend/test/test_scout_slack_delivery.py@@ -1,3 +1,5 @@+import uuid+import pytestfrom posthog.test.base import BaseTestfrom unittest.mock import MagicMock, patch@@ -368,16 +370,26 @@ class TestScoutSlackDelivery(BaseTest):assert not any(text.endswith("…") for text in section_texts)assert any(tail_marker in text for text in section_texts)- def test_threaded_short_report_posts_one_reply_per_heading_section(self) -> None:+ @parameterized.expand(+ [+ ("headings", "Lead line.\n\n## First\nshort body\n\n### Detail\ndeeper body\n\n## Second\nshort body"),+ (+ "bold_labels",+ "Lead line.\n\n**First**\n\nshort body\n\n**Detail** - deeper body\n\n**Second**\n\nshort body",+ ),+ ]+ )+ def test_threaded_short_report_posts_one_reply_per_section(self, _name: str, summary: str) -> None:# The bug: threading only kicked in past the section cap, so a typical digest that fits one- # section posted as one wall of text. A report with headings now threads at any length, and- # a sub-heading rides in its parent's reply instead of opening one of its own.+ # section posted as one wall of text. A report now threads at any length, whether it labels+ # its sections with headings or in bold, and a sub-section rides in its parent's reply+ # instead of opening one of its own.emission = self._make_emission()report = SignalReport.objects.create(team=self.team,status=SignalReport.Status.READY,title="Checkout failures",- summary="Lead line.\n\n## First\nshort body\n\n### Detail\ndeeper body\n\n## Second\nshort body",+ summary=summary,)integration = Integration.objects.create(team=self.team, kind=Integration.IntegrationKind.SLACK)fake_client = MagicMock()@@ -403,6 +415,11 @@ class TestScoutSlackDelivery(BaseTest):lead_sections = [block["text"]["text"] for block in calls[0].kwargs["blocks"] if block["type"] == "section"]assert lead_sections == ["Lead line."]first_reply, second_reply = calls[1].kwargs, calls[2].kwargs+ # Slack rejects a client_msg_id that is not a UUID, and the reply loop swallows the error,+ # so a malformed id costs every reply while the delivery still reports success.+ reply_ids = [first_reply["client_msg_id"], second_reply["client_msg_id"]]+ assert [str(uuid.UUID(reply_id)) for reply_id in reply_ids] == reply_ids+ assert len(set(reply_ids)) == 2assert first_reply["thread_ts"] == "1785418710.000600"assert "First" in first_reply["blocks"][0]["text"]["text"]assert "Detail" in first_reply["blocks"][0]["text"]["text"]@@ -410,9 +427,9 @@ class TestScoutSlackDelivery(BaseTest):assert "Second" in second_reply["blocks"][0]["text"]["text"]assert calls[3].kwargs["blocks"][0]["type"] == "context"- def test_threaded_report_without_headings_posts_a_single_message(self) -> None:- # Headings are the seams threading splits on. A summary with none has nothing to split, so it- # stays one channel message rather than being cut mid-prose.+ def test_threaded_report_without_section_labels_posts_a_single_message(self) -> None:+ # Headings and bold labels are the seams threading splits on. A summary with neither has+ # nothing to split, so it stays one channel message rather than being cut mid-prose.emission = self._make_emission()report = SignalReport.objects.create(team=self.team,diff --git a/products/signals/backend/test/test_slack_formatting.py b/products/signals/backend/test/test_slack_formatting.pyindex 8d0d6504bf3d..154f1f946bca 100644--- a/products/signals/backend/test/test_slack_formatting.py+++ b/products/signals/backend/test/test_slack_formatting.py@@ -7,6 +7,7 @@ from parameterized import parameterizedfrom products.signals.backend.slack_formatting import (SLACK_SECTION_TEXT_MAX_LEN,chunk_slack_mrkdwn,+ group_segments_to_limit,markdown_to_slack_mrkdwn,split_markdown_by_headings,strip_chart_references,@@ -134,11 +135,27 @@ class TestSplitMarkdownByHeadings(SimpleTestCase):def test_empty_summary_yields_no_segments(self) -> None:assert split_markdown_by_headings(" ") == []- @parameterized.expand([("backtick_fence", "```"), ("tilde_fence", "~~~")])- def test_column_zero_hash_inside_a_fence_does_not_split(self, _name: str, fence: str) -> None:+ @parameterized.expand(+ [+ ("backtick_fence_heading", "```", "# not a heading"),+ ("tilde_fence_heading", "~~~", "# not a heading"),+ ("backtick_fence_bold_label", "```", "**not a label**"),+ ("tilde_fence_bold_label", "~~~", "**not a label**"),+ ]+ )+ def test_seam_inside_a_fence_does_not_split(self, _name: str, fence: str, inner: str) -> None:# The bug this guards: a `# ` line inside a fenced code block used to be read as a heading and# split there, orphaning the fence and mangling the snippet when each segment was converted.- summary = f"Intro.\n\n{fence}\n# not a heading\nconfig value\n{fence}\n\nTail."+ # A bold line in a config or JSON snippet is the same trap for the bold-label seam.+ summary = f"Intro.\n\n{fence}\n{inner}\nconfig value\n{fence}\n\nTail."+ assert split_markdown_by_headings(summary) == [summary]++ def test_a_fence_closes_only_on_a_marker_line_with_nothing_after_it(self) -> None:+ # CommonMark allows only trailing whitespace after a closing fence, so a marker line that+ # carries other text is still code. Reading it as the close resumes seam detection inside+ # the snippet and splits the report mid-fence, which mangles the code once each segment is+ # converted on its own.+ summary = "Intro.\n\n```\n```not-a-close\n\n**Evidence**\n\nstill code\n```\n\nTail."assert split_markdown_by_headings(summary) == [summary]def test_real_heading_after_a_fence_still_splits(self) -> None:@@ -149,6 +166,75 @@ class TestSplitMarkdownByHeadings(SimpleTestCase):assert segments[1].startswith("## Real heading")assert len(segments) == 2+ @parameterized.expand(+ [+ ("standalone_asterisks", "**Evidence**", "**Impact**"),+ ("standalone_underscores", "__Evidence__", "__Impact__"),+ ("colon_inside_the_bold_run", "**Evidence:**", "**Impact:**"),+ ("colon_after_the_bold_run", "**Evidence**:", "**Impact**:"),+ ("lead_paragraph_colon", "**Evidence**: two retries failed.", "**Impact**: one team."),+ ("lead_paragraph_hyphen", "**Evidence** - two retries failed.", "**Impact** - one team."),+ ("lead_paragraph_en_dash", "**Evidence** – two retries failed.", "**Impact** – one team."),+ ("lead_paragraph_inside_colon", "**Evidence:** two retries failed.", "**Impact:** one team."),+ ]+ )+ def test_bold_section_labels_split_like_headings(self, _name: str, first: str, second: str) -> None:+ # The bug this guards: scouts label their sections in bold far more often than they write an+ # ATX heading, and Slack renders both the same way. While only `#` counted as a seam, a+ # threaded delivery of such a report posted the whole summary as one message with no replies.+ summary = f"Lead line.\n\n{first}\n\nbody one\n\n{second}\n\nbody two"+ segments = split_markdown_by_headings(summary)++ assert segments[0].strip() == "Lead line."+ assert segments[1].startswith(first)+ assert segments[2].startswith(second)+ assert len(segments) == 3++ @parameterized.expand(+ [+ ("bold_number_opening_a_paragraph", "**31** organizations reported this.\n\n**42** did too."),+ ("bold_inside_a_paragraph", "Some text **bold** more text.\n\nAnother **bold** run here."),+ ("bold_line_with_no_blank_line_before_it", "Prose line.\n**Evidence**\nmore prose.\n\ntail"),+ ("bold_leading_a_list_item", "Lead.\n\n- **Evidence**: two retries\n- **Impact**: one team"),+ ("sentence_bolded_for_emphasis", "Lead.\n\n**" + "word " * 19 + "word**\n\n**" + "more " * 19 + "more**"),+ ]+ )+ def test_bold_that_is_not_a_section_label_is_no_seam(self, _name: str, summary: str) -> None:+ # Splitting on any bold run would cut a report mid-argument: a bolded number opening a+ # paragraph, an emphasized phrase, and a bold list label all read as section headings in+ # Slack but structure nothing. A seam needs a label shape and a block boundary before it.+ assert split_markdown_by_headings(summary) == [summary]++ @parameterized.expand(+ [+ (+ "repeated_headings_outrank_bold_labels",+ "Lead.\n\n## First\n\n**Evidence**\n\none\n\n## Second\n\n**Evidence**\n\ntwo",+ ["## First", "## Second"],+ ),+ (+ "a_lone_title_leaves_bold_labels_as_the_seam",+ "# Title\n\nLead.\n\n**Evidence**\n\none\n\n**Impact**\n\ntwo",+ ["**Evidence**", "**Impact**"],+ ),+ (+ "standalone_labels_outrank_bold_lead_paragraphs",+ "Lead.\n\n**First**\n\n**Detail** - one\n\n**Second**\n\n**Detail** - two",+ ["**First**", "**Second**"],+ ),+ ]+ )+ def test_the_summary_splits_at_its_shallowest_repeated_seam(+ self, _name: str, summary: str, expected_starts: list[str]+ ) -> None:+ # Seam detection must not assume one writing style. Real headings stay the primary seam, and+ # a bold label becomes the seam only when it is the shallowest structure the summary repeats+ # at, so a mixed report threads at its headings rather than bursting into a reply per label.+ segments = split_markdown_by_headings(summary)++ assert len(segments) == len(expected_starts) + 1+ assert [segment[: len(start)] for segment, start in zip(segments[1:], expected_starts)] == expected_starts+class TestChunkSlackMrkdwn(SimpleTestCase):def test_short_text_is_one_chunk(self) -> None:@@ -207,3 +293,18 @@ class TestChunkSlackMrkdwn(SimpleTestCase):assert all(len(chunk) <= SLACK_SECTION_TEXT_MAX_LEN for chunk in chunks)assert any(link in chunk for chunk in chunks)+++class TestGroupSegmentsToLimit(SimpleTestCase):+ @parameterized.expand([("at_the_limit", 3), ("one_over_the_limit", 4), ("far_over_the_limit", 40)])+ def test_the_lead_and_every_section_survive_grouping(self, _name: str, section_count: int) -> None:+ # A threaded delivery posts one Slack message per segment in sequence, so a summary that+ # labels every paragraph would post a reply each and flood the channel. Grouping has to+ # bound the count without dropping a section or folding one into the channel message.+ segments = ["lead\n\n"] + [f"**Label {index}**\n\nbody {index}\n\n" for index in range(section_count)]++ grouped = group_segments_to_limit(segments, limit=4)++ assert len(grouped) <= 4+ assert grouped[0] == "lead\n\n"+ assert "".join(grouped) == "".join(segments)diff --git a/products/signals/frontend/generated/api.schemas.ts b/products/signals/frontend/generated/api.schemas.tsindex db7330d42657..fe43e87589f3 100644--- a/products/signals/frontend/generated/api.schemas.ts+++ b/products/signals/frontend/generated/api.schemas.ts@@ -1880,7 +1880,7 @@ export interface SignalScoutSlackDestinationApi {* @items.pattern ^[UW][A-Z0-9]{4,}\s*(\|.*)?$*/users?: string[] | null- /** When true, post a report as a thread: a short lead in the channel and the rest split by the report's Markdown headings into replies. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post. */+ /** When true, post a report as a thread: a short lead in the channel and the rest split into replies at the summary's section labels, which can be Markdown headings or bold labels. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post. */thread_reports?: boolean}@@ -3393,7 +3393,7 @@ export interface EditReportRequestApi {*/title?: string | null/**- * Optional new summary. Markdown is supported (headings, lists, code, links; images are not rendered); lead with one plain declarative sentence — it becomes the inbox card headline. The pipeline may later re-research and overwrite it.+ * Optional new summary. Markdown is supported (headings, lists, code, links; images are not rendered); lead with one plain declarative sentence — it becomes the inbox card headline. A heading, or a bold label on a line of its own with a blank line above it, marks a section that a threaded Slack delivery splits into its own reply. The pipeline may later re-research and overwrite it.* @nullable*/summary?: string | null@@ -3571,7 +3571,7 @@ export interface EmitReportRequestApi {* @maxLength 300*/title: string- /** The report body the inbox shows. Markdown is supported (headings, lists, code, links; images are not rendered). Lead with one plain declarative sentence — the inbox card uses your first line verbatim as the headline (~140 chars, emphasis stripped), then renders the full markdown in the detail view. */+ /** The report body the inbox shows. Markdown is supported (headings, lists, code, links; images are not rendered). Lead with one plain declarative sentence — the inbox card uses your first line verbatim as the headline (~140 chars, emphasis stripped), then renders the full markdown in the detail view. A heading, or a bold label on a line of its own with a blank line above it, marks a section that a threaded Slack delivery splits into its own reply. */summary: string/*** The observations backing the report — each becomes a bound signal. At least one.diff --git a/products/signals/frontend/generated/api.zod.ts b/products/signals/frontend/generated/api.zod.tsindex 01fdb39b2dd0..27bcd64d5fa5 100644--- a/products/signals/frontend/generated/api.zod.ts+++ b/products/signals/frontend/generated/api.zod.ts@@ -476,7 +476,7 @@ export const SignalsScoutCreateBody = /* @__PURE__ */ zodsignalsScoutCreateBodyConfigOneOutputDestinationsOneSlackOneThreadReportsDefault).describe(- "When true, post a report as a thread: a short lead in the channel and the rest split by the report's Markdown headings into replies. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post."+ "When true, post a report as a thread: a short lead in the channel and the rest split into replies at the summary's section labels, which can be Markdown headings or bold labels. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post."),}),zod.null(),@@ -651,7 +651,7 @@ export const SignalsScoutConfigCreateBody = /* @__PURE__ */ zod.boolean().default(signalsScoutConfigCreateBodyOutputDestinationsOneSlackOneThreadReportsDefault).describe(- "When true, post a report as a thread: a short lead in the channel and the rest split by the report's Markdown headings into replies. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post."+ "When true, post a report as a thread: a short lead in the channel and the rest split into replies at the summary's section labels, which can be Markdown headings or bold labels. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post."),}),zod.null(),@@ -823,7 +823,7 @@ export const SignalsScoutConfigUpdateBody = /* @__PURE__ */ zod.boolean().default(signalsScoutConfigUpdateBodyOutputDestinationsOneSlackOneThreadReportsDefault).describe(- "When true, post a report as a thread: a short lead in the channel and the rest split by the report's Markdown headings into replies. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post."+ "When true, post a report as a thread: a short lead in the channel and the rest split into replies at the summary's section labels, which can be Markdown headings or bold labels. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post."),}),zod.null(),@@ -965,7 +965,7 @@ export const SignalsScoutEditReportBody = /* @__PURE__ */ zod.string().nullish().describe(- 'Optional new summary. Markdown is supported (headings, lists, code, links; images are not rendered); lead with one plain declarative sentence — it becomes the inbox card headline. The pipeline may later re-research and overwrite it.'+ 'Optional new summary. Markdown is supported (headings, lists, code, links; images are not rendered); lead with one plain declarative sentence — it becomes the inbox card headline. A heading, or a bold label on a line of its own with a blank line above it, marks a section that a threaded Slack delivery splits into its own reply. The pipeline may later re-research and overwrite it.'),append_note: zod.string()@@ -1100,7 +1100,7 @@ export const SignalsScoutEmitReportBody = /* @__PURE__ */ zodsummary: zod.string().describe(- 'The report body the inbox shows. Markdown is supported (headings, lists, code, links; images are not rendered). Lead with one plain declarative sentence — the inbox card uses your first line verbatim as the headline (~140 chars, emphasis stripped), then renders the full markdown in the detail view.'+ 'The report body the inbox shows. Markdown is supported (headings, lists, code, links; images are not rendered). Lead with one plain declarative sentence — the inbox card uses your first line verbatim as the headline (~140 chars, emphasis stripped), then renders the full markdown in the detail view. A heading, or a bold label on a line of its own with a blank line above it, marks a section that a threaded Slack delivery splits into its own reply.'),evidence: zod.array(diff --git a/products/signals/frontend/inbox/components/config/scouts/ScoutSlackDestination.tsx b/products/signals/frontend/inbox/components/config/scouts/ScoutSlackDestination.tsxindex 101a9208ad4d..f50a4f62d55d 100644--- a/products/signals/frontend/inbox/components/config/scouts/ScoutSlackDestination.tsx+++ b/products/signals/frontend/inbox/components/config/scouts/ScoutSlackDestination.tsx@@ -207,7 +207,7 @@ export function ScoutSlackDestination({onChange={setThreadReports}disabledReason={disabledReason}label="Post reports as a thread"- tooltip="Post a short lead in the channel and split the rest by the report's headings into replies, so the channel stays readable and a long summary is not cut off."+ tooltip="Post a short lead in the channel and split the rest of the report into replies, one per section, so the channel stays readable and a long summary is not cut off."bordered/>) : null}diff --git a/products/signals/skills/authoring-scouts/references/report-contract.md b/products/signals/skills/authoring-scouts/references/report-contract.mdindex acbdf3d479a3..61cd09e11ce4 100644--- a/products/signals/skills/authoring-scouts/references/report-contract.md+++ b/products/signals/skills/authoring-scouts/references/report-contract.md@@ -46,6 +46,10 @@ the entity itself. Two spots stay plain text, because the inbox renders them asthe summary's first line, which the inbox lifts out as the card headline. The harness prompt(_Linking what you reference_) carries the full rule.+**Section labels are where a Slack thread splits.** A destination with "Post reports as a thread" on posts a short lead in the channel and each later section as a reply.+A heading (`## Evidence`) and a bold label on a line of its own (`**Evidence**`) both mark a section, so write the outline you want the reader to get and either form works.+Leave a blank line above each label, since a label the line above runs onto is part of that paragraph rather than a new section.+**Status is decided for you, from safety × actionability:**| Safety judge | `actionability` | Resulting status | Surfaces in inbox? |diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex fa3f81436f8d..9aea3f380e0e 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -29648,7 +29648,7 @@ export namespace Schemas {*/title?: string | null;/**- * Optional new summary. Markdown is supported (headings, lists, code, links; images are not rendered); lead with one plain declarative sentence — it becomes the inbox card headline. The pipeline may later re-research and overwrite it.+ * Optional new summary. Markdown is supported (headings, lists, code, links; images are not rendered); lead with one plain declarative sentence — it becomes the inbox card headline. A heading, or a bold label on a line of its own with a blank line above it, marks a section that a threaded Slack delivery splits into its own reply. The pipeline may later re-research and overwrite it.* @nullable*/summary?: string | null;@@ -30062,7 +30062,7 @@ export namespace Schemas {* @maxLength 300*/title: string;- /** The report body the inbox shows. Markdown is supported (headings, lists, code, links; images are not rendered). Lead with one plain declarative sentence — the inbox card uses your first line verbatim as the headline (~140 chars, emphasis stripped), then renders the full markdown in the detail view. */+ /** The report body the inbox shows. Markdown is supported (headings, lists, code, links; images are not rendered). Lead with one plain declarative sentence — the inbox card uses your first line verbatim as the headline (~140 chars, emphasis stripped), then renders the full markdown in the detail view. A heading, or a bold label on a line of its own with a blank line above it, marks a section that a threaded Slack delivery splits into its own reply. */summary: string;/*** The observations backing the report — each becomes a bound signal. At least one.@@ -65996,7 +65996,7 @@ export namespace Schemas {* @items.pattern ^[UW][A-Z0-9]{4,}\s*(\|.*)?$*/users?: string[] | null;- /** When true, post a report as a thread: a short lead in the channel and the rest split by the report's Markdown headings into replies. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post. */+ /** When true, post a report as a thread: a short lead in the channel and the rest split into replies at the summary's section labels, which can be Markdown headings or bold labels. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post. */thread_reports?: boolean;}diff --git a/services/mcp/src/generated/signals/api.ts b/services/mcp/src/generated/signals/api.tsindex 649fcbf474ca..6a6d4961f813 100644--- a/services/mcp/src/generated/signals/api.ts+++ b/services/mcp/src/generated/signals/api.ts@@ -609,7 +609,7 @@ export const SignalsScoutCreateBody = () => zodsignalsScoutCreateBodyConfigOneOutputDestinationsOneSlackOneThreadReportsDefault).describe(- "When true, post a report as a thread: a short lead in the channel and the rest split by the report's Markdown headings into replies. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post."+ "When true, post a report as a thread: a short lead in the channel and the rest split into replies at the summary's section labels, which can be Markdown headings or bold labels. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post."),}),zod.null(),@@ -799,7 +799,7 @@ export const SignalsScoutConfigCreateBody = () => zod.boolean().default(signalsScoutConfigCreateBodyOutputDestinationsOneSlackOneThreadReportsDefault).describe(- "When true, post a report as a thread: a short lead in the channel and the rest split by the report's Markdown headings into replies. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post."+ "When true, post a report as a thread: a short lead in the channel and the rest split into replies at the summary's section labels, which can be Markdown headings or bold labels. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post."),}),zod.null(),@@ -980,7 +980,7 @@ export const SignalsScoutConfigUpdateBody = () => zod.boolean().default(signalsScoutConfigUpdateBodyOutputDestinationsOneSlackOneThreadReportsDefault).describe(- "When true, post a report as a thread: a short lead in the channel and the rest split by the report's Markdown headings into replies. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post."+ "When true, post a report as a thread: a short lead in the channel and the rest split into replies at the summary's section labels, which can be Markdown headings or bold labels. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post."),}),zod.null(),@@ -1386,7 +1386,7 @@ export const SignalsScoutEditReportBody = () => zod.string().nullish().describe(- 'Optional new summary. Markdown is supported (headings, lists, code, links; images are not rendered); lead with one plain declarative sentence — it becomes the inbox card headline. The pipeline may later re-research and overwrite it.'+ 'Optional new summary. Markdown is supported (headings, lists, code, links; images are not rendered); lead with one plain declarative sentence — it becomes the inbox card headline. A heading, or a bold label on a line of its own with a blank line above it, marks a section that a threaded Slack delivery splits into its own reply. The pipeline may later re-research and overwrite it.'),append_note: zod.string()@@ -1556,7 +1556,7 @@ export const SignalsScoutEmitReportBody = () => zodsummary: zod.string().describe(- 'The report body the inbox shows. Markdown is supported (headings, lists, code, links; images are not rendered). Lead with one plain declarative sentence — the inbox card uses your first line verbatim as the headline (~140 chars, emphasis stripped), then renders the full markdown in the detail view.'+ 'The report body the inbox shows. Markdown is supported (headings, lists, code, links; images are not rendered). Lead with one plain declarative sentence — the inbox card uses your first line verbatim as the headline (~140 chars, emphasis stripped), then renders the full markdown in the detail view. A heading, or a bold label on a line of its own with a blank line above it, marks a section that a threaded Slack delivery splits into its own reply.'),evidence: zod.array(diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-config-create.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-config-create.jsonindex 632cc74b4ab7..fbbcd06824f9 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-config-create.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-config-create.json@@ -65,7 +65,7 @@},"thread_reports": {"default": false,- "description": "When true, post a report as a thread: a short lead in the channel and the rest split by the report's Markdown headings into replies. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post.",+ "description": "When true, post a report as a thread: a short lead in the channel and the rest split into replies at the summary's section labels, which can be Markdown headings or bold labels. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post.","type": "boolean"},"users": {diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-config-update.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-config-update.jsonindex d98893980ff6..a2fe354bff92 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-config-update.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-config-update.json@@ -68,7 +68,7 @@},"thread_reports": {"default": false,- "description": "When true, post a report as a thread: a short lead in the channel and the rest split by the report's Markdown headings into replies. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post.",+ "description": "When true, post a report as a thread: a short lead in the channel and the rest split into replies at the summary's section labels, which can be Markdown headings or bold labels. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post.","type": "boolean"},"users": {diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-create-prepare.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-create-prepare.jsonindex 3a39dafbfec8..36415b1b45b2 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-create-prepare.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/scout-create-prepare.json@@ -72,7 +72,7 @@},"thread_reports": {"default": false,- "description": "When true, post a report as a thread: a short lead in the channel and the rest split by the report's Markdown headings into replies. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post.",+ "description": "When true, post a report as a thread: a short lead in the channel and the rest split into replies at the summary's section labels, which can be Markdown headings or bold labels. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post.","type": "boolean"},"users": {diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-config-create.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-config-create.jsonindex 632cc74b4ab7..fbbcd06824f9 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-config-create.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-config-create.json@@ -65,7 +65,7 @@},"thread_reports": {"default": false,- "description": "When true, post a report as a thread: a short lead in the channel and the rest split by the report's Markdown headings into replies. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post.",+ "description": "When true, post a report as a thread: a short lead in the channel and the rest split into replies at the summary's section labels, which can be Markdown headings or bold labels. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post.","type": "boolean"},"users": {diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-config-update.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-config-update.jsonindex d98893980ff6..a2fe354bff92 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-config-update.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/signals-scout-config-update.json@@ -68,7 +68,7 @@},"thread_reports": {"default": false,- "description": "When true, post a report as a thread: a short lead in the channel and the rest split by the report's Markdown headings into replies. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post.",+ "description": "When true, post a report as a thread: a short lead in the channel and the rest split into replies at the summary's section labels, which can be Markdown headings or bold labels. Keeps a long summary from being clipped at Slack's section limit. Off by default, and it does not change how findings post.","type": "boolean"},"users": {