Skip to content

Polish Edge chat alerts to match the Mantis CLI - #117

Open
adamXbot wants to merge 2 commits into
mainfrom
codex/mantis-edge-alert-polish
Open

adamXbot wants to merge 2 commits into
mainfrom
codex/mantis-edge-alert-polish

Conversation

@adamXbot

@adamXbot adamXbot commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Slack, Discord and Teams alerts now follow the Mantis CLI's memo-first hierarchy: red tripped state, trigger time, user@host or device event, command, then secondary metadata. This makes the actor and incident easier to scan consistently across destinations.

  • Distinguish reported SSH addresses from the IP observed by the worker, and keep full IPv6 addresses readable.
  • Improve long-value truncation, missing-detail messages, escaping and inert canary references. Raw webhook payloads retain full values.
  • Use native rich text, relative timestamps where supported, and a readable Teams command line with a shell prompt.
  • Document the formatting and add regression coverage for payload shape, display limits and hostile text.

Validation

  • TypeScript check passed.
  • All 135 Edge tests across 9 files passed, including a new backslash regression test after simplifying Teams escaping to one pass in response to CodeQL. Standard and narrow stress payloads for all three platforms remain byte-for-byte identical to the reviewed round-56 candidate.
  • Microsoft Adaptive Cards rendering passed normal and 320-pixel checks in light and dark themes, with no overflow, links or schema errors.
  • git diff --check passed.

Visual review

Full scores, review history and remaining findings

The final independent reviews were Astra: 10 in every category and Opus 5.5: 8.5 overall, with 1 of 8 categories at 9 or above. The requested 9-per-category threshold from both reviewers was not met. Opus still flagged label prominence, consecutive bold lines, the Teams command font and the minimal alert's message tier.

Slack and Discord screenshots are previews of the actual outgoing payloads; Teams uses Microsoft's Adaptive Cards renderer and published host settings. Live-client rendering and delivery remain unverified; no live alerts were sent and nothing was deployed.

The comparison below shows the polish-loop baseline versus the final candidate, not the original repository main state. Teams baseline and final payloads use matching renderer settings. All pictured alerts use synthetic data.

Polish-loop baseline and final Mantis Edge alerts

Comment thread mantis-edge/src/escape.ts Fixed
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.

2 participants