Skip to content

feat: reconcile Zulip emoji reactions on website PR messages - #890

Open
bryangingechen wants to merge 9 commits into
lean4from
zulip-emoji-reconcile
Open

feat: reconcile Zulip emoji reactions on website PR messages#890
bryangingechen wants to merge 9 commits into
lean4from
zulip-emoji-reconcile

Conversation

@bryangingechen

@bryangingechen bryangingechen commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Wires up mathlib-ci's zulip-emoji-reconcile action so that Zulip messages about this repo's PRs (e.g. the ones message_zulip_on_prs.yml posts to mathlib reviewers > blog and website PRs) carry emoji reactions reflecting the PR's state: merged / closed / awaiting-author, plus CI status.

  • .github/zulip-emoji-config.json: repo-specific config (emoji mirror mathlib4's). No pr_reviews channel key on purpose: that channel's #N topics are mathlib4 PRs, so website PRs are matched by URL only (the website#N linkifier expands to a full PR URL in rendered content).
  • .github/workflows/zulip_emoji_reconcile.yml: event triggers for few-seconds latency — pull_request_target (labeled/unlabeled/closed/reopened) and workflow_run on "build site (pull request)" (requested/completed, PR resolved from the run's head commit) — plus an hourly sweep as the self-healing safety net and workflow_dispatch for manual resyncs (with a dry-run option).

Notes:

  • The leanprover-community-repo-update-bot had to be subscribed to mathlib reviewers (done 2026-07-17). The channel has protected history, so the bot can only see messages posted after that date — older PR announcement messages will never get reactions.
  • The sweep/dispatch path was tested end-to-end from this branch (via a temporary dispatch-only workflow, since removed) against this very PR's announcement message: URL matching in the private channel, ci=running → :yellow:, ci=success → swap to :check:, awaiting-author label add/remove → :writing: add/remove, idempotent re-runs, and human reactions (a stray 🎉) left untouched. The pull_request_target/workflow_run triggers can only fire once this lands on lean4; if an event misbehaves, the sweep repairs the emoji within the hour.

🤖 Generated with Claude Code

bryangingechen and others added 5 commits July 17, 2026 02:50
Wire up mathlib-ci's zulip-emoji-reconcile action so messages about this
repo's PRs (e.g. the ones message_zulip_on_prs.yml posts to 'mathlib
reviewers' > 'blog and website PRs') carry emoji reflecting PR state:
merged/closed/awaiting-author plus CI status.

- .github/zulip-emoji-config.json: repo config (mirrors mathlib4's emoji);
  no pr_reviews key since that channel's #N topics are mathlib4 PRs
- .github/workflows/zulip_emoji_reconcile.yml: hourly sweep +
  workflow_dispatch (dry-run by default)
- bibtool.yml: TEMPORARILY replaced with a dispatch-only copy so the setup
  can be tested from this branch (dispatch only resolves workflows
  registered on the default branch); restore before merging

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@bryangingechen
bryangingechen marked this pull request as ready for review July 17, 2026 07:31
bryangingechen and others added 2 commits July 17, 2026 03:35
pull_request_target (labeled/unlabeled/closed/reopened) and workflow_run
on 'build site (pull request)' (requested/completed) give few-seconds
latency; the sweep stays as the safety net. workflow_dispatch now
defaults to a real run (dry-run remains available as an input) since the
config has been validated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Two interleaved runs could re-assert stale reactions (read-then-write);
a single group with cancel-in-progress: false makes the newest queued
run converge to the final state.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread .github/workflows/zulip_emoji_reconcile.yml Outdated
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