Skip to content

feat(relay): announce a pull request merged outside lich - #937

Merged
omartelo merged 1 commit into
mainfrom
feat/announce-outside-merge
Oct 24, 2026
Merged

omartelo merged 1 commit into
mainfrom
feat/announce-outside-merge

Conversation

@omartelo

Copy link
Copy Markdown
Collaborator

Summary

  • A merge made outside lich (github.com, gh in a terminal, an agent) is now announced to the agents in the branch's checkout, as one merged from Pulls is. The relay's new RunMergeWatch reads, each minute, the pull request of every checkout a live provider session runs in (project.BranchPullRequest, one gh pr view per checkout) and calls AnnounceMerge when one read saw it open and a later one sees it merged.
  • AnnounceMerge remembers the merges it announced by checkout and number, so the Pulls merge and the watch never announce one twice, in either order.
  • The merge notice no longer says the merge came from lich, in every prompt language.
  • docs/ceilings.md bullet rewritten: what the watch misses (merged while lich was closed or every agent there was parked, up to a minute late, forgotten on restart). Same audience on every provider, so no provider gap.

Test plan

  • internal/relay/mergewatch_test.go: open then merged announces once; only checkouts with a live agent are read; first seen merged and closed are not announced; a failed read keeps what was seen; the Pulls merge and the watch announce once.
  • internal/project: BranchPullRequest keeps a merged PR, nil for none, passes a gh failure.
  • Local gate: gofmt, go vet ./..., go test ./..., relay merge tests with -race.

A merge made on github.com, with gh in a terminal or by an agent left every
session in its checkout believing the pull request was still open. The relay
now reads, each minute, the pull request of every checkout a live agent runs
in, and announces one it saw open and now sees merged through AnnounceMerge,
which remembers what it announced so the Pulls merge and the watch never tell
it twice. The notice no longer says the merge came from lich.
@omartelo
omartelo merged commit 870f190 into main Oct 24, 2026
7 checks passed
@omartelo
omartelo deleted the feat/announce-outside-merge branch October 24, 2026 12:20
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