Skip to content

fix(hub): run catch-up, Triage again and the Settings status from the listener when one is live - #634

Merged
TheGreatAxios merged 4 commits into
mainfrom
cl-11526-run-catch-up-triage-again-and-the-settings-status-from-the
Oct 26, 2026
Merged

TheGreatAxios merged 4 commits into
mainfrom
cl-11526-run-catch-up-triage-again-and-the-settings-status-from-the

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Closes CL-11526

Why
Catch-up, Triage again and the Settings status all looked for a live pr-triage deployment, even in a workspace whose pull requests run in managers. Without that deployment, catch-up stopped, Triage again answered "not running" and Settings said Triage was off, so the old workers could not be removed.

What changed

  • While a host's listener is live, the catch-up pass runs without a pr-triage deployment. It neither replaces nor redeploys one, and it mails its heads through the listener as webhooks already do.
  • With the listener live, Triage again needs no pr-triage deployment and goes through the listener. Whether the head is already being triaged comes from its manager, as recorded by fix(manager): record the manager's verdict when it reports done #637, which this PR is stacked on.
  • Settings counts a host's listener as Triage running only while the hub counts it as up. The existing workflow-versions response now gives each deployment a live field for this. No new route.
  • A listener that was deployed but never got a sidecar within two minutes is released, the same way a stuck manager is, so the next Upgrade deploys it again.
  • Old pr-triage deployments that are still running are left alone while a listener is live. The CL-11525 removal slices cancel them.
  • If the old pr-triage deployment was being replaced when the listener came up, that replacement is abandoned and its copy keeps running until the CL-11525 removal slices cancel it.
  • A listener counts as live the same way a manager does: it is running, it is on its sidecar, or it was deployed in the last two minutes. Catch-up, Triage again and incoming mail all use this one check.
  • A workspace without a listener works as before. Triage again is GitHub-only today, so Bitbucket has no route to change.
  • ARCHITECTURE.md (reconciler) and the route's OpenAPI text describe the listener case.

Verified

  • New tests: the reconciler catches up a head with only a listener live, and mails it only once over many passes while its manager runs and after it reports (with the manager's runs taken away, it mails 3 more times). Triage again mails with only a listener live and refuses a head its manager is running. Both failed before the change and pass after. A third test checks that a listener with no sidecar after two minutes does not count as live and is released.
  • Hub and web tests: 766 of 767 pass in the full run. The one failure, in triage-verdicts.postgres.test.ts (a file this change does not touch), was a 5-second timeout while the machine was heavily loaded, and that file passes 5 of 5 on its own.
  • bun run check, bun run lint and the policy check pass.

@linear-code

linear-code Bot commented Oct 26, 2026

Copy link
Copy Markdown

CL-11526

@TheGreatAxios
TheGreatAxios force-pushed the cl-11526-run-catch-up-triage-again-and-the-settings-status-from-the branch from 642ecfb to 02da276 Compare October 26, 2026 18:23
@TheGreatAxios
TheGreatAxios changed the base branch from main to cl-11520-record-the-managers-verdict-when-it-reports-done October 26, 2026 18:23
@TheGreatAxios
TheGreatAxios force-pushed the cl-11520-record-the-managers-verdict-when-it-reports-done branch 2 times, most recently from cfa69fb to e211911 Compare October 26, 2026 18:46
@TheGreatAxios
TheGreatAxios force-pushed the cl-11526-run-catch-up-triage-again-and-the-settings-status-from-the branch 2 times, most recently from 276da80 to da19b71 Compare October 26, 2026 18:54
@TheGreatAxios
TheGreatAxios changed the base branch from cl-11520-record-the-managers-verdict-when-it-reports-done to main October 26, 2026 18:54
@TheGreatAxios
TheGreatAxios force-pushed the cl-11526-run-catch-up-triage-again-and-the-settings-status-from-the branch from da19b71 to 79c9094 Compare October 26, 2026 19:22
@TheGreatAxios
TheGreatAxios marked this pull request as ready for review October 26, 2026 19:42
@corbits-triage

Copy link
Copy Markdown
Contributor

Triage: Pass

No changes needed from you. A maintainer will review this pull request.

Triage will approve.
Waiting on a maintainer to approve: request review.

@TheGreatAxios
TheGreatAxios merged commit caef436 into main Oct 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant