fix(ci): use jq for Slack notification payload#15
Conversation
…ial chars The Slack notification returned HTTP 400 because the JSON payload was built via shell string concatenation with escaped quotes. Commit messages containing markdown, backticks, or parentheses produced malformed JSON. Replace with jq --arg which handles all JSON escaping automatically. Tested against the exact commit message that triggered the 400: "chore(simplify): simplify recent changes in qurl-python (#11)" Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
PR Review — fix(ci): use jq for Slack notification payloadVerdict: Approve — this is a clean, well-motivated fix. A couple of minor observations below. What's good
Minor observations
SummaryThe fix is correct, the approach is idiomatic, and the PR description does a great job explaining the problem and linking to the failing run. Ship it. Reviewed by Claude |
## Summary Adds Slack build notifications to the CI workflow, matching the pattern established in qurl-python. - Notifies on push-to-main only (not PRs) - Uses `jq` for JSON payload construction (avoids shell escaping bugs — see layervai/qurl-python#15) - Reports test status, branch, trigger, commit message - Skips gracefully when `SLACK_WEBHOOK_URL` secret is not configured - `continue-on-error: true` + `timeout-minutes: 5` — notification failure never blocks CI ## Prerequisites The `SLACK_WEBHOOK_URL` secret must be configured in the repo settings. Until then, the job logs "not configured, skipping" and exits cleanly. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
Slack notification returned HTTP 400 on run #24266878474 because the JSON payload was built via shell string concatenation with escaped quotes. The commit message
chore(simplify): simplify recent changes in qurl-python (#11)contained characters that broke the hand-crafted JSON.The
|| echo "Slack notification failed (non-critical)"swallowed the error, so the step showed as success despite the 400.Fix
Replace shell string concatenation with
jq -n --argwhich handles all JSON escaping automatically. The payload is now built as a singlejqexpression — no manual quote escaping, no string concatenation, no special character issues.Test plan
jqlocally🤖 Generated with Claude Code