Skip to content

groundtruth: tighten messaging-performance-analyzer against Sent docs snapshot#20

Merged
sent-dm merged 1 commit into
devfrom
batch2/unit-1-mpa-gt
May 19, 2026
Merged

groundtruth: tighten messaging-performance-analyzer against Sent docs snapshot#20
sent-dm merged 1 commit into
devfrom
batch2/unit-1-mpa-gt

Conversation

@sent-dm
Copy link
Copy Markdown
Contributor

@sent-dm sent-dm commented May 19, 2026

Summary

Updates messaging-performance-analyzer against references/_inputs/sent-docs-v3-2026-05-19.md so the skill's references and playbook are keyed on Sent's actual normalized error catalog (HTTP envelope + per-message description field) instead of generic provider-bucket guesses.

Scope

  • skills/messaging-performance-analyzer/references/mdr-status-codes.md — rewritten around the full Sent error catalog (AUTH_*, VALIDATION_*, RESOURCE_*, BUSINESS_* incl. the operationally-interesting 002/003/004/005/006/007 codes, CONFLICT_001, SERVICE_001, INTERNAL_*) and the 3 send-time codes (ERR_CONSENT_BLOCKED, ERR_ROUTE_DENIED, ERR_TEMPLATE_PARAMS_INVALID). Documents the verified webhook payload envelope {field, sub_type, timestamp, payload} and the confirmed QUEUED -> ROUTED -> SENT -> DELIVERED -> READ (+ FAILED, RECEIVED) lifecycle. Provider-level codes (WhatsApp 131xxx, RBM, carrier) demoted to a clearly illustrative-only section.

  • skills/messaging-performance-analyzer/references/performance-diagnosis-playbook.md — generic decision tree replaced with symptom-driven diagnosis keyed on real Sent codes:

    • stuck QUEUED -> ROUTED -> check BUSINESS_002/003/008
    • whole-batch sync failure -> check the response envelope AUTH_*/BUSINESS_*/VALIDATION_*
    • per-recipient FAILED -> fetch message detail, inspect description for ERR_* codes
    • missing customer-side webhooks -> check is_active, consecutive_failures, last_successful_delivery_at, event_filters
  • skills/messaging-performance-analyzer/SKILL.md — tightened "Unverified claims" section: removed the "MDR isn't a v3 endpoint" and "exact normalized buckets unverified" disclaimers (the snapshot confirms both); kept the cohort-threshold heuristic and external provider IDs caveats.

  • skills/messaging-performance-analyzer/scripts/analyze_mdr_funnel.py — new --show-errors flag that tallies ERR_* codes parsed from FAILED message description fields. Existing behavior and exit codes unchanged.

Test plan

  • bash scripts/validate-skills.sh exits 0 (all 8 skills pass)
  • python skills/messaging-performance-analyzer/scripts/analyze_mdr_funnel.py good.json -> exit 0
  • python skills/messaging-performance-analyzer/scripts/analyze_mdr_funnel.py bad.json -> exit 3
  • --show-errors correctly tallies ERR_CONSENT_BLOCKED, ERR_ROUTE_DENIED, ERR_TEMPLATE_PARAMS_INVALID on a synthetic fixture
  • Both reference files start with <!-- Grounded against references/_inputs/sent-docs-v3-2026-05-19.md ... -->
  • SKILL.md body 140 lines (well under 500)

Update messaging-performance-analyzer references against
references/_inputs/sent-docs-v3-2026-05-19.md so the skill
keys diagnoses on real Sent error codes instead of generic
buckets.

- mdr-status-codes.md: rewrite around Sent's normalized error
  catalog (AUTH_*, VALIDATION_*, RESOURCE_*, BUSINESS_*,
  CONFLICT_001, SERVICE_001, INTERNAL_*), add the 3 send-time
  ERR_* codes that surface in the message description field,
  add the verified webhook payload envelope, confirm the
  QUEUED -> ROUTED -> SENT -> DELIVERED -> READ (+ FAILED, RECEIVED)
  lifecycle, and move provider-level codes to a clearly
  illustrative-only section.

- performance-diagnosis-playbook.md: replace the generic
  decision tree with symptom -> Sent code mappings keyed on
  real codes (stuck QUEUED -> BUSINESS_002/003/008; sync batch
  failure -> AUTH_*/BUSINESS_*/VALIDATION_*; per-recipient
  FAILED -> ERR_CONSENT_BLOCKED/ROUTE_DENIED/TEMPLATE_PARAMS_INVALID;
  missing webhooks -> is_active/consecutive_failures/
  last_successful_delivery_at).

- SKILL.md: tighten the "Unverified claims" section, dropping
  the MDR-is-not-an-endpoint and provider-bucket disclaimers
  (snapshot now confirms both surface and normalized codes),
  and retain only the cohort-threshold heuristic and external
  provider IDs disclaimers.

- analyze_mdr_funnel.py: add --show-errors flag that tallies
  ERR_* codes parsed from FAILED message descriptions. Existing
  behavior and exit codes unchanged; good.json still exits 0,
  bad.json still exits 3.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sent-dm sent-dm merged commit 2b1b0e2 into dev May 19, 2026
1 of 2 checks passed
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.

1 participant