watchpr: only alert on mergeability lost after the baseline #20

Merged
benvin merged 6 commits from benvin/watchpr-baseline-from-first-poll into main 2026-09-26 21:26:49 +10:00

6 Commits

Author SHA1 Message Date
unkin-agent 91509cb9b2 docs: name the conflict watchpr will never report
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
2026-09-26 21:14:20 +10:00
unkin-agent 15c527ee56 watchpr: emit the baseline under --json
The baseline is the only notice that a watch started against an already
conflicted PR, and it was missing from the mode automation uses. It goes to
stderr as a JSON record, leaving stdout a single result record.
2026-09-26 21:14:20 +10:00
unkin-agent 27e48ac45e watchpr: debounce conflicts on elapsed time, not poll count
Merge-input movement arms the conflict rule and no longer clears the run of
non-mergeable observations, so an arming poll's own false cannot be half the
evidence and a base branch moving under every poll cannot starve a real
conflict. The run must now span conflictWindow, measured on the tick that
fired each poll.
2026-09-26 21:14:20 +10:00
unkin-agent 7baa194c52 docs: mergeable is a plain bool, not a tri-state on the wire
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
2026-09-26 20:48:31 +10:00
unkin-agent 54c1d868d3 watchpr: arm the conflict rule on a new merge computation
A mergeable=false baseline meant a conflict could never be reported, since
Gitea sends false while it recomputes after a push. Arm on a head or base SHA
change as well as on a mergeable poll, break the conflict run on unknown and
failed polls, and print the baseline with the conditions it suppresses.
2026-09-26 20:48:31 +10:00
unkin-agent 6988be9ff3 watchpr: only alert on mergeability lost after the baseline
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
Track mergeability across the whole run and decode it as a tri-state, so a PR already conflicted when watching starts is polled on instead of reported.
2026-09-26 18:45:48 +10:00