Remove the webhook action probe artifact #17
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/remove-probe-artifact"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
While finishing up PR #15 (the merge-history-on-edit bug fix) a follow-up question came up: what action string does Forgejo actually fire for a merge webhook? The test in PR #15 assumes
"closed", matching GitHub convention, but the only way to be confident was to observe it directly.To observe it, a throwaway PR #16 with an empty
.webhook-probefile was opened and merged. The DEBUG log added temporarily tohandlePREventconfirmed Forgejo firesaction="closed" merged=trueon merge — so the guard in PR #15 is correct. But merging #16 landed the empty.webhook-probefile on main as a side effect.This PR removes the file. One line of diff, no code changes, no test changes. The diagnostic logging was never committed.
Why PR #15's merge didn't create a history entry
Worth recording this since it explains a visible gap in orbit's history stage. PR #15 was merged at 20:18:16, and the deploy sequence that followed (
go build && install && systemctl restart) restarted orbit's systemd service at 20:18:17 — almost exactly when Forgejo was trying to deliver the merge webhook. The delivery landed in the ~1-second restart window and was either refused by Caddy or silently dropped; Forgejo did not retry successfully.The PR row for #15 exists in the
pull_requeststable because the periodic sync running on startup backfilled it from Forgejo's API. But the periodic sync only upserts PR rows — it does not create history entries. History entries are webhook-only, and the webhook was lost. The history entry for PR #15 will be inserted manually via SQL as part of this cleanup.Lesson: avoid restarting orbit immediately after merging a PR that it webhooks into. Separate the operations by at least a few seconds so the webhook has time to land.