Skip to content

Real-time Slack alert from the publish pipeline (git-native)#178

Merged
PavelMakarchuk merged 1 commit into
mainfrom
restore-publish-slack-hook
Jun 24, 2026
Merged

Real-time Slack alert from the publish pipeline (git-native)#178
PavelMakarchuk merged 1 commit into
mainfrom
restore-publish-slack-hook

Conversation

@PavelMakarchuk

Copy link
Copy Markdown
Contributor

What

Restores the publish-time release alert: populace-publish-release posts a Slack message the moment latest.json goes live. This lives in the codebase (git), fires wherever publishing runs, and needs no HuggingFace-account webhook.

(Supersedes the earlier HF-webhook approach, which was an out-of-band account config; the dashboard's webhook endpoint is removed in PolicyEngine/calibration-diagnostics#50.)

How

  • populace.data.slack.notify_release(...) posts to a per-country incoming webhook.
  • Channel from the repo id (populace-uk* → UK, else US); URL from SLACK_WEBHOOK_POPULACE_US / _UK.
  • No-op when the env var is unset (safe to merge before webhooks exist); never raises (a Slack failure is logged, not fatal).
  • Stdlib only (urllib), no new dependencies.
  • Wired into publish_cli.main right after the pointer is published.

Setup to activate

Set SLACK_WEBHOOK_POPULACE_US / SLACK_WEBHOOK_POPULACE_UK (incoming webhooks for #populace-us / #populace-uk) in whatever environment runs populace-publish-release. Until then it's a silent no-op.

Tests

tests/test_slack.py — country inference, no-op without webhook, posts to the country webhook, never raises on failure. Passing alongside test_release.py.

🤖 Generated with Claude Code

Restore the publish-time release alert (a code-side hook, in git, fired
the moment latest.json goes live) instead of an out-of-band HuggingFace
webhook. Posts to a per-country channel via SLACK_WEBHOOK_POPULACE_US /
_UK; a no-op unless that env var is set, and never raises — a Slack
failure must not fail an otherwise-successful publish. Stdlib only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@PavelMakarchuk PavelMakarchuk merged commit 91b09d5 into main Jun 24, 2026
4 checks passed
@PavelMakarchuk PavelMakarchuk deleted the restore-publish-slack-hook branch June 24, 2026 02:10
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