Repository navigation
Description
Before submitting
- 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
Real-world A (any host):
- Watch a PR; check
lintfails; the agent is woken with "Checks failed". - The agent reruns the job and ends its turn to wait.
- The rerun starts and fails again between two watch reads.
Real-world B (GitHub, workflow on both push and pull_request):
- Push to the PR branch. Each check runs twice on one head, once per event.
- The
pushrun oflintfails while thepull_requestrun is still running, then thepull_requestrun passes.
Deterministic:
evaluatePullRequestWatchwith a watch that recordedlintfailing at run URL.../job/1, then a read wherelintis failing at.../job/2: no change is returned.toChecksinpackages/source-control-githubover a rollup withlintfailed (eventpush) andlintin progress (eventpull_request): it returnspending; with thepull_requestrun passed, it returnssuccess. With both runs failed, it keeps the first-listed run's URL, so a rerun of the other run that fails again changes nothing the watch can see.
Expected behavior
A failed run the agent has not been told about wakes it, including a rerun that failed again. On GitHub, a check reports the worse of its events' runs (failure over running, running over passed, passed over a run cancelled next to it), and between two failed runs shows the one that finished last.
Actual behavior
A: the watch stays silent; the agent waits for a result that already arrived. B: the check reads pending, then passed, and the failed push run is never reported.
Impact
Major degradation or frequent failure
Version or commit
0.1.8-nightly.20261106.4262 (c55db3e); code read at main 6577c6b, unchanged at 240446e.
Environment
macOS and Linux, T3 server with Claude and Codex providers; GitHub Actions workflows triggered on both push and pull_request.
Logs or stack traces
None kept from a live run; the deterministic cases above fail on main.
Workaround
Ask the agent to poll after a rerun instead of waiting on the watch.
Proposed fix (for the PR, once triaged)
The watch records the failing runs it last read (name and URL) and reports a failing check whose URL changed. The GitHub reader selects workflowRun.event, keeps each event's newest run of a check, and merges by the order above, keeping the required flag. Tests: watch "a rerun that fails again between two reads is news"; GitHub "a failed push run is not hidden by a running pull_request run", "a failed run stays failed after the other event's run passes", "the required flag survives merging the events", "when both events' runs failed, the check shows the run that failed last" (all fail on main), plus guards that pass on both ("runs from both events passing read as passed", "a run cancelled next to a passing run is not a failure", "the same job name in two workflows stays two checks", "reruns within one event keep the newest attempt"). Limit: a host that reports no run URL falls back to the name.
Activity
royalaid commentedon Nov 10, 2026
GitLab hits case A too, and the fix in #32319 does not cover it as written.
toChecksinpackages/source-control-gitlab/src/server/gitLabMergeRequestJson.tsreports a merge request as one check namedPipeline, withurlset tohead_pipeline.web_url. Retrying failed jobs (the "Retry" button orglab ci retry) runs them inside the same pipeline, so the pipeline id andweb_urlstay the same. With #32319, a retry that fails again between two watch reads still matches the told[name, url]pair, and the watch stays silent.Observed on 0.1.9-nightly.20261110.4449, code read at upstream main c6ca605:
runner_system_failureand finished by 00:36:43, so the pipeline went fromrunningback tofailedin about 12 seconds, between two sweeps.The MR's
head_pipelinealready carries a value that changes on each re-finish:finished_at(here2026-11-10T00:39:53.753Z;updated_atalso moves). Folding it into the run identity for the GitLab check, for example aurlor run key ofweb_url#finished_at, or addingfinished_attoRawPipelineSchemaand keyingfailedRunson it, would let #32319's comparison see a retried pipeline that failed again. Reporting per-job checks would also work, but it is a larger change.