Commit Graph
2 Commits
Author SHA1 Message Date
JD Davis 7f44a64490 ci(release): announce completed GitHub Releases in Slack (#3607)
## Description

- announce a GitHub Release in Slack only after `create-release` has
successfully uploaded its assets
- build an accessible Block Kit payload with the exact release name,
tag, repository, actor, and GitHub Release link
- isolate the incoming webhook to the delivery step and fail closed on
missing configuration or an unexpected Slack response
- add a reproducible `act` smoke workflow whose `ACT=true` guard builds
and validates the production payload without sending network traffic

## Changes Made

- Adds a gated release-notification job, a local composite action, a
payload builder, and smoke/regression coverage.

## Boundary and rollout

This notification means **the GitHub Release and its assets are ready**.
It intentionally does not claim that every package registry publish
succeeded, matching the existing `create-release` contract.

Configure `SLACK_RELEASES_WEBHOOK_URL` as a repository Actions secret
containing an incoming webhook already bound to `#headroom`. Slack
incoming webhooks cannot override their configured channel. No Slack
request was made while developing or validating this PR.

This is additive to the current publication flow and does not implement
or bypass the future Gate B work tracked by Linear HEAOSS-19.

## Testing

- Rebased onto current `main` at `94206e265`; refreshed focused
qualification on `477f68047`.

- [x] Focused tests pass

### Test Output

```text
68 passed
```

- `uv run --extra dev pytest tests/test_release_workflows.py
tests/test_release_version.py -q` (68 passed)
- `uv run --extra dev ruff check
.github/actions/release-slack-notification/build_payload.py
tests/test_release_workflows.py`
- `uv run --extra dev ruff format --check
.github/actions/release-slack-notification/build_payload.py
tests/test_release_workflows.py`
- `actionlint .github/act/release-slack-notification.yml
.github/workflows/release.yml`
- `act workflow_dispatch -W .github/act/release-slack-notification.yml
-j smoke --pull=false`

## Type of Change

- [x] CI / release automation

## Real Behavior Proof

- Environment: maintainer macOS/Python 3.13 checkout at aedf2c2e.
- Exact command / steps: `python -m pytest
tests/test_release_workflows.py tests/test_release_version.py -q`.
- Observed result: 68 passed; current hosted build, test and security
checks pass. Payload and workflow guards are covered by the focused
tests.
- Not tested: delivery to the production Slack webhook. No notification
or release was sent during this review.

## Runtime Rollout Safety

- Rollout-managed feature(s): no runtime feature; release notification
only.
- Minimum rollout channel: human-reviewed repository workflow
deployment.
- Stable/default behavior changed: successful GitHub Release asset
publication triggers the notification.
- Kill switch / disable path: disable or revert the notification job;
missing webhook configuration fails that job.
- Unsafe override required: no.
- Qualification impact: notification signifies GitHub Release assets
ready, not registry-wide publication success.
- Rollback path: revert the additive notification workflow/action.

## Review Readiness

- [x] I have performed a self-review
- [x] This PR is ready for human review
2026-09-23 22:57:50 -05:00
chopratejas 11f59aed16 ci(release): fix workflow-validation for new release trigger
scripts/validate-workflows.sh exercises release.yml with an `act`
dry-run that posted a synthesized push-to-main event. After the
previous commit retired that trigger in favor of `release:
published`, the dry-run started failing in CI because release.yml
no longer responds to push events.

Simulate the new trigger instead: feed release.yml a
release-published event (.github/act/release-published.json) and
move the push-to-main dry-run onto release-please.yml — the
workflow that now owns that event.
2026-05-25 18:36:12 -07:00