Repository navigation
fix(mention): keep both halves of the 👀 reaction in one job - #990
Conversation
tend-agent
left a comment
There was a problem hiding this comment.
The fix is right and lands at the right depth — the invariant now lives in the macro comment and in an assertion (reacting == {job}) rather than in a per-workflow convention, so a future split fails a test instead of stranding reactions. --paginate on the lookup is the only way to reach the bot's own reaction on a busy thread, since the delete needs a reaction id and there's no "delete my reaction" endpoint. I rendered the mention/review/triage workflows (Claude and Codex) and ran actionlint 1.7.12 over them — clean, including the new block-scalar if: and the reworked run: under shellcheck. The regtest snapshots match exactly the set of templates that render eyes steps.
One thing the description understates. "The reaction now lands after verify finishes rather than at the end of it — a few seconds" holds only for an unqueued mention. In the burst case — the one the fix exists for — handle sits behind an in-flight session under tend-mention-handle-<number> with cancel-in-progress: false, so the second mention's 👀 now waits out the whole first session, and a third mention evicts that queued handle before it ever reacts, leaving the second comment with no acknowledgment at all. Previously it got one immediately (stranded, which is the bug).
I think that's the correct trade — 👀 means "a session is working on this right now", and under the new placement it is never claimed falsely, whereas silence on a queued comment is recoverable via the prompt's "handle any other unaddressed comments too". But it's a visible change to what a user sees on a busy thread, not a few seconds of latency, and worth stating that way in the description so the trade is signed off knowingly rather than discovered later.
|
Fair — "a few seconds" only described the idle case, and the burst case is the one the fix exists for. Rewrote the description: the latency claim now covers both, and a The trade this makes section states plainly that a queued mention's 👀 waits out the in-flight session and a third mention can evict it before it ever reacts, so that comment gets no acknowledgment where it previously got a stranded one. No code change — the placement is still the right one, and the argument for it is now in the description rather than implied. |
Bumps the generator to 0.1.18 and adds the CHANGELOG section the release workflow publishes as the GitHub Release notes. 8 commits since 0.1.17. The two fixes: `repo-secret-allowlist` now reports only the org secrets the repo can actually read, instead of flagging every org secret as available to all workflows (#994); and both halves of the 👀 reaction sit in one job on `tend-mention`, with a paginated removal lookup (#990). Two bundled-skill changes go out with them — `running-in-ci` scopes PR-description claims to the merge base (#992), and tells a fork-PR session that no successor will pick up its own review's findings (#985). `uv run pytest` (564), the worker's vitest suite (31) and typecheck, and `pre-commit run --all-files` all pass on the branch. > _This was written by Claude Code on behalf of max-sixty_
Automated nightly regeneration of tend's workflow files, picking up tend 0.1.18. **tend version:** 0.1.17 → 0.1.18 Notable changes: - `tend-mention`: both halves of the 👀 reaction now live in the `handle` job. Previously `verify` added the eyes and `handle` removed them, so a burst of mentions on one thread could cancel a queued `handle` — which allocates no runner and runs no steps, `always()` included — leaving the reaction stranded (max-sixty/tend#990). - `tend-review` / `tend-triage`: the eyes-removal lookup now paginates (`--paginate`, `per_page=100`). A thread with more than 30 reactions could push the bot's own eyes off the first page, so the removal silently found nothing (max-sixty/tend#990). - `tend check`: the secret audit now reports only org secrets this repo can actually read, instead of every org secret (max-sixty/tend#994). - `running-in-ci` skill: notes that fork PR reviews reach no successor session, and scopes PR-description claims to the merge base (max-sixty/tend#985, max-sixty/tend#992). Full comparison: max-sixty/tend@0.1.17...0.1.18 Co-authored-by: worktrunk-bot <[email protected]>
Post-release regeneration for 0.1.18. The eight generated workflows move to the `max-sixty/tend/[email protected]` pin, and `review-reviewers.yaml` is restamped by hand, since `init` never rewrites it. Beyond the pin, the 👀 reaction fix from #990 lands here: `tend-mention`'s `React with eyes` moves out of `verify` and becomes `handle`'s first step, so a queued `handle` evicted by a later mention on the same thread can no longer strand a reaction with no session behind it. The removal lookup in all three reacting workflows now paginates at `per_page=100`, so the bot's own 👀 is still found on an issue carrying more than 30 of them. `pre-commit run --files .github/workflows/*.yaml` passes, actionlint included. > _This was written by Claude Code on behalf of max-sixty_
Problem
tend-mentionput the 👀 on inverifyand took it off inhandle.always()on the remove step only governs step execution within a job that started — a job cancelled while still queued allocates no runner and runs no steps at all.handle'scancel-in-progress: falseholds a running job; GitHub still evicts a pending one when a newer run arrives (workflow-syntax). So a burst of three mentions on one thread evicts run 2's pendinghandleafter itsverifyalready reacted, leaving a 👀 that claims a session is working with no session and nothing left to remove it. Eviction is the routine path; any route wherehandlenever starts (averifyfailure after the react, an environment-protection refusal) has the same shape.reviewandtriagewere never exposed — both halves are steps of one job there.Separately, the remove step listed reactions with no
--paginate, so it read only the first 30. Onreviewandtriagethe target is the issue/PR itself, where 👀 is also the ordinary "watching this" reaction — past 30 of them the bot's own falls off page 1,REACTION_IDcomes back empty, and the step exits 0 having silently kept the reaction.Both bugs strand the same signal, so they're fixed together.
Solution
Move
react_eyesintohandleas its first step, matchingreviewandtriage: the eyes can only go on once the job that removes them has started. Itsif:drops theshould_runconjunct (the job's ownifalready carries it) and readsneeds.verify.outputs.reasoninstead ofsteps.check.outputs.reason.Add
--paginate(andper_page=100) to the reaction lookup inunreact_eyes; the existing--jqfilter andhead -n1already handle the rest.Of the issue's three options this is #1. #3 (
queue: max) would run every queued session instead of dropping the redundant ones — a cost change, not a fix.The trade this makes
What a user sees changes, and not only by a few seconds. On an idle thread the 👀 now lands after
verifyfinishes rather than at the end of it — seconds, on a signal that already lags the comment by the length ofverify. On a busy thread — the burst case this fix exists for —handlequeues behind the in-flight session undertend-mention-handle-<number>withcancel-in-progress: false, so the second mention's 👀 waits out that whole session, and a third mention evicts the queuedhandlebefore it ever reacts, leaving the second comment with no acknowledgment at all. Before this change that comment got its 👀 immediately — stranded, which is the bug.That's the intended trade: 👀 means "a session is working on this right now", and under the new placement it is never claimed falsely. Silence on a queued comment is recoverable — the handling prompt already tells the session to pick up other unaddressed comments on the thread — whereas a stranded 👀 is a standing false claim nothing clears.
Testing
test_eyes_come_off_when_the_session_endsnow asserts the invariant the bug violated — that exactly one job in each workflow carries eyes steps — plus--paginateon the lookup. Both assertions fail on the old templates (mention: the eyes are split across {'handle', 'verify'};triage/review: the reaction lookup only reads the first page) and pass after. Regtest snapshots regenerated; full Python suite green (554 passed).The generated
tend-*.yamlin this repo are untouched — they track the released generator and update on the nightly regen.Closes #989 — automated triage