Libra CodeHub

CedarCopilot/cedar-mail

Branch: staging

fix(slack): don't strike single-tilde "approximately" values in meeting prep

merged#2483CedarCopilot

CedarCopilot wants to merge 0 commits into staging from fix/slack-single-tilde-strikethrough

Live on prod, no production signal yetTimeline and evidence
  1. Opened
    Aug 14, 2026, 11:00 AM
  2. Merged
    Aug 14, 2026, 11:28 AM
  3. Live on prod
    Aug 14, 2026, 11:28 AM
  4. Observed 2 days
    Aug 14, 2026, 11:28 AM
  5. Pipelines steady after this deploy
    Aug 14, 2026, 11:28 AM
  6. Unobserved

    Live on prod, no production signal yet

    Aug 17, 2026, 9:26 AM

Behaviors Libra is checking

Slack integration behavior from notifications/markdown-to-slack-richtext.ts keeps working in prod.Inconclusivelow confidence

Strict CloudWatch fallback found 5 recent prod failure log lines for [backfillSlackChannelHistory] Backfill failed (Superglue workflow failed: fetch failed), but the same failure had 4 log lines in the comparable pre-deploy baseline. Libra is not blaming this PR intent without.

prod, checked Aug 17, 2026, 9:26 AM

Libra has verdicts on 0 of 1 tracked behaviors on prod; 1 is still being checked. Libra checks hourly for 3 days after each deploy.

Problem

A Greptile/Jihoon meeting prep in Slack rendered a whole sentence with a strikethrough through it. The struck span started at $3K and ended right before 2 , the tell.

The agent wrote two approximations using a leading tilde: ~$3K and ~2 (tilde = "approximately"). It did not write any strikethrough.

This is not a remark-gfm issue (that's the web app). Slack prep is built server-side by Cedar's own converter markdownToSlackRichTextparseInline, whose inline tokenizer deliberately supported single-tilde strikethrough (~strike~, Slack's native syntax). The two stray single tildes got paired, striking everything between them.

Fix

  • Drop the single-tilde alternative from the inline regex , strikethrough now requires double tildes (~~strike~~); a lone ~ is left literal.
  • Renumber the downstream capture-group references after removing the branch.
  • Update comments to document why single-tilde strike is gone.

Single-tilde strike is vanishingly rare in agent output; single-tilde "approximately" (and ~/path, ~5%) is common , same tradeoff as remark-gfm's singleTilde: false.

Tests

  • Replaced the stale "renders ~strike~" assertion with double-tilde-only.
  • Added a regression test feeding ~$3K … ~2 that asserts nothing is struck and both literal ~$3K/~2 survive.

21/21 tests pass in markdown-to-slack-richtext.test.ts; edited file typechecks clean.

Scope note

The sister converter convertMarkdownToSlackMrkdwn (utils/slack-mrkdwn.ts) is untouched , it has no tilde rule and only produces the plain-text fallback string, not the visible rich_text blocks. That lower-traffic raw-mrkdwn path (fallback/overflow, slack-bot-chat replies) still relies on Slack's own single-tilde rendering; can be addressed separately if desired.

🤖 Generated with Claude Code

Greptile Summary

The PR prevents approximation markers such as ~$3K and ~2 from being paired as Slack strikethrough delimiters.

  • Restricts rich-text strikethrough parsing to double-tilde Markdown syntax.
  • Renumbers downstream tokenizer capture references consistently.
  • Adds regression coverage ensuring single tildes remain literal and unstruck.

Confidence Score: 5/5

The PR appears safe to merge, with the intended double-tilde-only behavior covered by a focused regression test.

The tokenizer’s capture groups remain correctly aligned after removing the single-tilde branch, and no current caller-visible defect or repository-rule violation remains.

Important Files Changed

FilenameOverview
apps/server/src/services/notifications/markdown-to-slack-richtext.tsRemoves single-tilde strikethrough parsing and consistently adjusts every affected capture-group reference.
apps/server/src/services/notifications/tests/markdown-to-slack-richtext.test.tsReplaces the obsolete single-tilde expectation and adds focused coverage for approximation values containing lone tildes.

Reviews (1): Last reviewed commit: "fix(slack): don't strike single-tilde "a..." | Re-trigger Greptile

Show production surfaces and changed-file mapping

Production surfaces

Libra has not measured any production surfaces for this change yet.

Changed files → surfaces

  • apps/server/src/services/notifications/__tests__/markdown-to-slack-richtext.test.tsno production surface mapped
  • apps/server/src/services/notifications/markdown-to-slack-richtext.tsno production surface mapped