Skip to content

Stop the CI poll from waiting on a job held for environment approval - #1473

Merged
max-sixty merged 1 commit into
mainfrom
review-reviewers/36845166779-dormouse-poll-waiting
Oct 1, 2026
Merged

max-sixty merged 1 commit into
mainfrom
review-reviewers/36845166779-dormouse-poll-waiting

Conversation

@tend-agent

@tend-agent tend-agent commented Oct 1, 2026 •

Copy link
Copy Markdown
Collaborator

poll_pr_checks.py counted a CheckRun in status WAITING, a job held by an environment's protection rules, as pending. Only someone outside the run can approve that job, so the poll never settled. This PR reports such a job as settled without a result, so poll exits 2 (unverified, not green) and names it. approval lists it as unverified beside an approval, as it already does for a cancelled check. Three new tests in generator/tests/test_poll_scripts.py cover this, and all three fail on main.

#1450 removed the poll's deadline "until a real run shows the case needs handling". Two such runs have now happened on diffplug/dormouse, which moved to 0.3.5 yesterday:

Dormouse's Hosted PR preview parks deploy (on open PRs) and cleanup (on closed ones) like this, so without this change each review of one costs about six hours of runner time, a red check, and an outage-tracker row.

The WAITING status is kept through the per-name grouping and classified only when the output lists are built. When an earlier green attempt of the same check exists, the grouping therefore still prefers the waiting attempt and doesn't fall back to the green one. One test covers that case with no startedAt. An environment wait_timer also shows as WAITING. It would end on its own, but reporting it as unverified is the fail-closed reading, and a wait timer can last up to 30 days. The monitor-ci skill needs no change, because it already treats any exit other than 0, 1 or 3 as unverified, not green.

Evidence log: https://gist.github.com/tend-agent/ca54094796f3f5c2370cdda4e3ed32d1

A CheckRun in status WAITING is a job parked on an environment's
protection rules; it moves only when someone outside the run approves
it. poll_pr_checks.py counted it as pending, so the post-approval poll
in tend-review held the session until the harness timeout. It now
reports such a job as settled without a result: `poll` exits 2
(unverified, not green) naming it, and `approval` names it beside an
approval as it already does for a cancelled check.
@tend-agent tend-agent added the claude-behavior Behavioral issues found by review-reviewers label Oct 1, 2026
@max-sixty
max-sixty merged commit 570bbc0 into main Oct 1, 2026
11 checks passed
@max-sixty
max-sixty deleted the review-reviewers/36845166779-dormouse-poll-waiting branch October 1, 2026 09:58
max-sixty pushed a commit that referenced this pull request Oct 2, 2026
…'s unverified checks (#1475)

#1473 made `poll_pr_checks.py` treat a job held for an environment's
approval (`WAITING`) as settled without a result. Under `approval`, such
a job now lands in the unverified list beside an `approve:` verdict,
just as a cancelled check does. The text that tells a review session
what those unverified checks mean still listed only cancelled, stale,
and unrecognized conclusions. That covers
[`references/approving.md`](https://github.com/max-sixty/tend/blob/95427f945b047d655920f844bf15af0849acf574/plugins/tend-ci-runner/skills/review/references/approving.md#L19)
and the `approval` docstring. This PR adds the environment-approval case
to both, so the review body can say why a named check never ran.

This changes only docs and a docstring, so there's no regression test.
`test_poll_scripts.py` and `test_repo_pins.py` pass, and the pre-commit
hooks pass on both files.

---------

Co-authored-by: tend-agent <[email protected]>
max-sixty pushed a commit to max-sixty/worktrunk that referenced this pull request Oct 4, 2026
Regenerates the Tend workflows with tend 0.3.7 (from 0.3.5). The effect
for this repo: the generated workflows now pin third-party actions and
`uv` to commits and checksums, and the bot's sessions pick up
0.3.6–0.3.7's skill and runner fixes. No `.config/tend.yaml` change was
needed.

What changes for worktrunk:

- **Supply-chain pinning** — `actions/checkout` and `astral-sh/setup-uv`
are pinned to commit SHAs (version kept as a comment), and the `uv`
download (bumped to 0.12.22) is verified against a per-arch checksum
(max-sixty/tend#1463).
- **Mention prompt moves into a skill** — `tend-mention` now invokes
`/tend-ci-runner:mention` and passes only the triggering event; the
per-event "read the context, respond, make changes" instructions that
were inlined in the workflow now live in the skill.
- **`fetch-tags: true` is dropped from checkouts.** Every Tend checkout
uses `fetch-depth: 0`, which already fetches all tags, so `build.rs`'s
`git describe` still sees them.
- **CI polling no longer waits on a job held for environment approval**
(max-sixty/tend#1473), and nightly reads the last successful run more
robustly so a cached listing can't widen its review range
(max-sixty/tend#1468).
- **Triage opens a PR when a maintainer is reasonably likely to merge
it** rather than defaulting to a comment (max-sixty/tend#1471), and
repair sessions resume unfinished bot work from the live PR state
(max-sixty/tend#1479).
- Claude Code is bumped to 2.1.288 (max-sixty/tend#1491).

Full upstream diff:
max-sixty/tend@0.3.5...0.3.7

Co-authored-by: worktrunk-bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-behavior Behavioral issues found by review-reviewers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants