Repository navigation
feat(blueprint): read GitHub webhook events before polling the API - #1092
Merged
Merged
Conversation
i098
commented
Nov 1, 2026
i098
left a comment
Owner
Author
There was a problem hiding this comment.
Reviewed at head da7ecad. The no-mistakes run passed review, tests, documents, lint and push. The CI event path was fixed to keep one record per check name. Checks are green at this head. Main CI is red from an earlier, unrelated python test failure; this PR does not touch that path. No open findings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1090
Summary
A small Rust webhook receiver and a Firstmate patch let the watcher read GitHub events first and poll the API only as a slow, quota-guarded fallback.
What changed and why
apps/fm-gh-webhook, a Rust receiver on 127.0.0.1:8788. It checks the HMAC-SHA256 signature withGH_WEBHOOK_SECRETfrom the host env file, never logs the secret, and exits 78 without it.ci/, keyed by event type, id and name. The watcher reads onlymerged/for now; CI records have no reader yet (owner decision).0007-watch-webhook-events.patch: the merged-PR poll reads the marker first, then calls the API once perFM_GH_FALLBACK_POLLseconds (default 600).rate_limitis read at most once a minute; below 20 percent remaining the interval is four times longer, below 5 percent no call is made.docs/github-webhook.mdand a changelog fragment. The playbook registers no webhook and writes no secret.Test evidence
cargo testinapps/fm-gh-webhook(6 passed); patch suite 7 of 7 andpytest -k webhook_eventspass; a signed payload gave 204 and a bad signature 401.Checklist
fix(provisions): check the digest before install.uv run pytest). Not applicable: only the new and neighbouring tests were run here; CI runs the full suite.uv run ruff check).--syntax-check). Not applicable:ansible-playbookis not on this host; the YAML parses.launch→launch=changed=0on the second run. Not applicable: the playbook must not run against this host.changelog.d/<issue>.<type>.md(not aCHANGELOG.mdedit), or theno changeloglabel.