Skip to content

[design-spec] mailgun-platform-status-health #84

@rw-codebundle-agent

Description

@rw-codebundle-agent

Design Spec: mailgun-platform-status-health

Parent: #82
Target: rw-cli-codecollection

Spec

# CodeBundle Design Spec: mailgun-platform-status-health
# Produced in Architect mode for Issue #82

codebundle_name: "mailgun-platform-status-health"
target_collection: "rw-cli-codecollection"
display_name: "Mailgun Platform Status & Reachability"
author: "rw-codebundle-agent"

purpose: |
  Detect Mailgun-wide service disruptions and loss of regional API reachability before
  authenticated domain checks run. Uses only public status sources and unauthenticated
  HTTP probes so it can execute in environments where API keys are restricted.

tasks:
  - name: "Check Mailgun Status Page for Published Incidents"
    description: |
      Fetches Mailgun's public status page or status API and flags active incidents,
      degraded components, or maintenance windows that explain delivery issues.
    script_name: "check-mailgun-status-incidents.sh"
    expected_issue_severity: [2, 3]
    access_level: "read-only"
    data_type: "logs-config"

  - name: "Check Mailgun Public Incident Feed"
    description: |
      Parses RSS/Atom or JSON incident feed if exposed, correlates recent items with
      the monitoring window, and surfaces unresolved or recent critical events.
    script_name: "check-mailgun-incident-feed.sh"
    expected_issue_severity: [2, 3]
    access_level: "read-only"
    data_type: "logs-config"

  - name: "Verify Mailgun US API Endpoint Reachability"
    description: |
      Performs TLS + HTTP probe to the US API base (api.mailgun.net); expects a
      well-formed response (including 401 without credentials) to confirm routing
      and service availability.
    script_name: "check-mailgun-api-us-reachability.sh"
    expected_issue_severity: [3, 4]
    access_level: "read-only"
    data_type: "metrics"

  - name: "Verify Mailgun EU API Endpoint Reachability"
    description: |
      Same as US check for the EU region base (api.eu.mailgun.net) when EU routing
      is relevant to the workspace.
    script_name: "check-mailgun-api-eu-reachability.sh"
    expected_issue_severity: [3, 4]
    access_level: "read-only"
    data_type: "metrics"

scope:
  level: "Account"
  qualifiers:
    - MAILGUN_STATUS_REGION_FOCUS
  iteration_pattern: |
    Single taskset per workspace (optionally parameterized by which regional reachability
    checks are required). No per-domain iteration; this bundle is platform-wide.

resource_types:
  - "network_service"
generation_strategy: |
  One SLX per workspace (or per environment) with optional qualifier for preferred
  region focus. No Mailgun resource discovery; static configuration only.

env_vars:
  - name: MAILGUN_STATUS_REGION_FOCUS
    description: "Which regional reachability checks matter: us, eu, or both"
    required: false
    default: "both"

  - name: MAILGUN_STATUS_LOOKBACK_HOURS
    description: "Hours of incident history to consider recent"
    required: false
    default: "24"

secrets: []

platform:
  name: "mailgun"
  cli_tools:
    - "curl"
    - "jq"
  auth_methods:
    - "None (public status and unauthenticated probes)"
  api_docs: "https://documentation.mailgun.com/en/latest/api-intro.html"

related_bundles:
  - name: "dns-health"
    relationship: "complements"
    notes: "Generic DNS checks; this bundle does not validate SPF/DKIM/MX for domains."
  - name: "mailgun-sending-domain-health"
    relationship: "complements"
    notes: "Authenticated domain metrics and DNS alignment; run after platform is green."

test_scenarios:
  - name: "status_green_api_reachable"
    description: "No incidents, both endpoints respond with expected HTTP codes"
    expected_issues: 0

  - name: "status_incident_active"
    description: "Status page reports active incident"
    expected_issues: 1
    expected_severities: [3]

  - name: "api_unreachable"
    description: "TLS or HTTP failure to regional API base"
    expected_issues: 1
    expected_severities: [4]

notes: |
  Status page URL and feed format may change; implementers should prefer official
  Mailgun status documentation and add defensive parsing. Reachability checks must
  not log secrets. If Mailgun consolidates US/EU status into a single JSON API, collapse
  the first two tasks into one script with pluggable parsers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    completedAgent work completeddesign-specArchitect has produced a design specnew-codebundleScoped issue for SRE to implement a new CodeBundle

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions