You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: GitLab MR watches do a full read every 2 minutes while a pipeline runs, and see quiet-MR comments up to 10 minutes late #34642
I searched existing issues and did not find a duplicate.
I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
Open a GitLab MR whose pipeline takes 10 minutes or more.
In a thread, call watch_pull_request on it.
Count glab api calls in the server log while the pipeline runs.
After the pipeline ends, comment on the MR from the GitLab UI and note when the agent wakes.
Expected behavior
As on GitHub, the watcher checks a cheap fingerprint each sweep and does a full read only when something changed. A new comment or push wakes the agent within one 2-minute sweep.
Actual behavior
GitLab has no watch fingerprint, so the watcher falls back to full reads. While a pipeline runs, every 2-minute sweep reads the MR twice, the label permission, pipeline stages and line counts, then notes, discussions, commits and award emoji. That's 10 to 11 glab calls per sweep, about 300 an hour per watched MR.
Once the pipeline ends, the watcher rereads only every 10 minutes. A reviewer comment or an outside push can take that long to reach the agent.
I counted this by replaying a scripted MR through the real watcher and GitLab provider with glab faked at the process layer. A 20-minute pipeline cost 102 calls. A comment posted at minute 23 reached the watch at minute 30, and an outside push at minute 63 reached it at minute 70.
Impact
Minor bug or occasional failure
On gitlab.com these calls spend the account's shared API rate limit. A few watches on long pipelines can push the account into throttling, and then every GitLab read in T3 Code stalls.
I tried to reproduce this on the current build and could not.
Commit 8851e30 (origin/main). Not yet seen in a running app: a background run against a real dev server, with T3CODE_DEV_SEED=0, a throwaway gitlab.com MR, an external 'running' commit status, a glab logging shim and the thread.pull-request.watch command, had not reported back when this result was written. Confirmed from the code instead: only packages/source-control-github implements getChangeRequestWatchFingerprint, and the GitLab provider has none. planRead in apps/server/src/orchestration-v2/PullRequestWatchReactor.ts therefore takes the no-fingerprint path, which does a full detail and activity read on every 2-minute sweep while a check is in flight (last.inFlight) and otherwise only every QUIET_REREAD_MS (10 min). Added a test to packages/source-control-gitlab/src/server/GitLabPullRequestProvider.test.ts ('merge request reads' > 'gives watches a fingerprint so a quiet merge request skips full reads'). It fails on main because provider.getChangeRequestWatchFingerprint is undefined. Ran with: vp test run src/server/GitLabPullRequestProvider.test.ts -t "merge request reads" (1 failed, 9 passed). The test only checks that the method exists; the fix should extend it to check how the fingerprint behaves.
Closing as not planned. If it still happens for you, reply with the exact steps and the version you are on and it will be looked at again.
Activity
juliusmarminge commentedon Nov 11, 2026
I tried to reproduce this on the current build and could not.
Commit 8851e30 (origin/main). Not yet seen in a running app: a background run against a real dev server, with T3CODE_DEV_SEED=0, a throwaway gitlab.com MR, an external 'running' commit status, a glab logging shim and the thread.pull-request.watch command, had not reported back when this result was written. Confirmed from the code instead: only packages/source-control-github implements getChangeRequestWatchFingerprint, and the GitLab provider has none. planRead in apps/server/src/orchestration-v2/PullRequestWatchReactor.ts therefore takes the no-fingerprint path, which does a full detail and activity read on every 2-minute sweep while a check is in flight (last.inFlight) and otherwise only every QUIET_REREAD_MS (10 min). Added a test to packages/source-control-gitlab/src/server/GitLabPullRequestProvider.test.ts ('merge request reads' > 'gives watches a fingerprint so a quiet merge request skips full reads'). It fails on main because provider.getChangeRequestWatchFingerprint is undefined. Ran with: vp test run src/server/GitLabPullRequestProvider.test.ts -t "merge request reads" (1 failed, 9 passed). The test only checks that the method exists; the fix should extend it to check how the fingerprint behaves.
Closing as not planned. If it still happens for you, reply with the exact steps and the version you are on and it will be looked at again.