Skip to content

skills(review-runs): find a workflow wedged behind a run parked in waiting - #1320

Merged
max-sixty merged 3 commits into
mainfrom
skills/waiting-run-wedge-35432041982
Sep 19, 2026
Merged

max-sixty merged 3 commits into
mainfrom
skills/waiting-run-wedge-35432041982

Conversation

@tend-agent

@tend-agent tend-agent commented Sep 19, 2026 •

Copy link
Copy Markdown
Collaborator

A scheduled run parked in GitHub's pre-job waiting state never concludes, so it holds its concurrency group indefinitely. Under cancel-in-progress: false — which every generated scheduled workflow carries, paired with environment: tend — each later tick takes the one pending slot and is replaced by its successor, and the workflow stops running with nothing red to show for it. Step 1's census admits a row only on a non-null conclusion, so the parked run is absent by construction and the replacements it causes read as ordinary concurrency.

review-runs's Reconcile live work now lists it beside the red-default-branch and Dependabot checks, since a workflow whose queue is dead is live work in the same sense. The remedy is gh run cancel on the parked run, after pending_deployments confirms the gate has no timer and no reviewers to release it.

The wedge test covers event-driven runs too, not just cron ones: environment: tend comes from a shared template that every generated workflow but the secretless tend-mention-relay uses, and tend-review, tend-mention's handle job and tend-ci-fix pair it with cancel-in-progress: false, so a parked run there strands a PR's review queue the same way. Those have no scheduling interval to measure staleness against, so the bullet names the event that created the run as the bound instead.

The bullet also separates queued, which looks similar and needs the opposite handling. I reproduced that half here rather than taking it from the report: tend-notifications run 34748600612 has been queued since 2026-09-13, and gh run cancel on it answers Cannot cancel a workflow run that is completed while the runs API still reports status: queued, conclusion: null. Nothing is held — this repo's tend-notifications has run throughout — so the text says to leave it rather than fight it.

Text only, and deliberately one bullet: #1069 established that the recovery half of this class of finding belongs in a small report-or-remedy step, not a branching instruction table. uv run pytest -k skill passes.

Closes #1314

The wedge test named scheduling intervals only, so a parked `tend-review`,
`tend-mention` or `tend-ci-fix` run — same `environment: tend` gate, same
`cancel-in-progress: false` — had no stated bound to be judged against.

@tend-agent tend-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tend-mention-relay is the exception to "every generated workflow carries the tend environment" — mention-relay.yaml.j2 calls no environment() macro, and its header explains why: the review events it carries run on refs/pull/N/merge, which the operational secrets' environment does not admit, so the workflow holds no secret. A run with no environment has no deployment gate and cannot enter waiting at all, so the universal form is both false and slightly wider than the point it is making. The clause is load-bearing only to stop the check being read as cron-only, and the narrower form still does that — suggestion inline.

@max-sixty
max-sixty merged commit d6f494c into main Sep 19, 2026
11 checks passed
@max-sixty
max-sixty deleted the skills/waiting-run-wedge-35432041982 branch September 19, 2026 16:31
max-sixty pushed a commit to max-sixty/leaf that referenced this pull request Sep 21, 2026
Regenerates the nine `tend-*` workflows against tend 0.2.13 (from
0.2.11). The committed diff is only the pinned action ref and the `uv`
setup version (`0.12.13` → `0.12.17`); everything below rides in the
action and the plugin it loads.

## What changes for this repo

**A cancelled gating check no longer reads as green.**
`poll_pr_checks.py` now treats only `SUCCESS`, `NEUTRAL`, and `SKIPPED`
as green and exits 2 — unverified — on anything else
([max-sixty/tend#1323](max-sixty/tend#1323)).
Cancelled runs are routine here: main serializes the complete suite, so
a newer commit replaces the one waiting for its turn, and `running-tend`
already carries a rule for reading that shape. Under 0.2.11 a session
polling its own push could report such a check as verified; it now has
to say it could not verify.

**CI sessions ignore the bot's claude.ai account.** Skills, plugins, and
MCP connectors enabled on the `leaf-agent` account no longer load into
sessions that push and post as it
([max-sixty/tend#1328](max-sixty/tend#1328)).
Sessions run with this repo's skills and tend's own, and nothing else.

**`/tmp` is writable inside the sandbox**, as scratch private to the run
([max-sixty/tend#1324](max-sixty/tend#1324)). A
tool that hard-codes a `/tmp` path no longer needs an override;
`$TMPDIR` stays the documented place to write.

**The sandbox launch retries a transient bridge-socket failure**, up to
three attempts
([max-sixty/tend#1327](max-sixty/tend#1327)).
SRT gives socat 600 ms to bind, and a slow runner previously lost the
whole job before the agent started.

Three plugin-side fixes also land: `review-runs` can now cancel a run
parked in GitHub's `waiting` state that holds its concurrency group
without ever concluding
([#1320](max-sixty/tend#1320)); `ground-claims`
reads a past run's code at that run's commit rather than at the current
default branch ([#1319](max-sixty/tend#1319));
and `run-tend` corrects its list of instruction paths restored to the
base version on a PR
([#1311](max-sixty/tend#1311)).

## No configuration change needed

0.2.12 moved the agent into the job's own checkout through a
copy-on-write view, which would have changed where dependency setup
belongs. 0.2.13 reverts it
([#1339](max-sixty/tend#1339)): `setup:` and
`sandbox_setup:` behave as they did at 0.2.11, so `.config/tend.yaml` is
unchanged here. This repo pins no `model:`, so the harness default
applies as before.

Full comparison:
[0.2.11...0.2.13](max-sixty/tend@0.2.11...0.2.13).

Co-authored-by: leaf-agent <318509791+leaf-agent@users.noreply.github.com>
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.

review-runs: a run parked in GitHub's pre-job waiting state holds its concurrency group forever, and nothing in tend can see it

2 participants