Skip to content

deliver: report a settled build once per head - #289

Merged
gitea-mq[bot] merged 1 commit into
mainfrom
effect-delivery-idempotent
Nov 12, 2026
Merged

gitea-mq[bot] merged 1 commit into
mainfrom
effect-delivery-idempotent

Conversation

@Mic92

@Mic92 Mic92 commented Nov 12, 2026

Copy link
Copy Markdown
Owner

A head whose tree matches an earlier build reuses that build and gets no build record of its own. Startup reconciliation looks builds up by commit, so it submits such a head again after every restart, and a redelivered webhook does the same. Each pass goes through the reuse path, queues the pull_request delivery again and resets the effect row, so the effects run a second time. A default-branch push that took over a PR build has the same problem with build_finished.

Deliveries the orchestrator queues for a settled build are now marked once. Such a delivery skips an effect whose row already holds a run for the same PR, head, branch and commit. Deliveries from the forge (label change, reopen, comment) and explicit restarts still reset the row.

Reconciliation is unchanged: resubmitting a reused head now only replays statuses.

Not covered: two PRs sharing one build still share one effect row per kind and name.

Supersedes #276.

A head whose tree matches an earlier build reuses that build and gets no
build record of its own. Startup reconciliation looks builds up by
commit, so it submitted such a head again after every restart, and a
redelivered webhook did the same at any time. Each pass went through the
reuse path, queued the pull_request delivery again, and the upsert reset
the effect row, so the effects ran again and posted their comments
twice. A default-branch push that took over a PR build had the same
problem with build_finished.

Mark deliveries the orchestrator queues for a settled build and skip an
effect whose row already holds a run for the same PR, head, branch and
commit. Deliveries from the forge (label change, reopen, comment) still
reset the row, as do explicit restarts.

Change-Id: I6e1c3b007061e1304cba5f755858d7c990739133
Supersedes: #276
@Mic92
Mic92 force-pushed the effect-delivery-idempotent branch from 3019799 to 171a8c7 Compare November 12, 2026 09:17
@gitea-mq
gitea-mq Bot merged commit 171a8c7 into main Nov 12, 2026
8 checks passed
@gitea-mq
gitea-mq Bot deleted the effect-delivery-idempotent branch November 12, 2026 09:34
@gitea-mq gitea-mq Bot removed the mq/waiting label Nov 12, 2026
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