Repository navigation
Make Tend review runs less visible - #1078
Conversation
tend-agent
left a comment
There was a problem hiding this comment.
Removing the gate and the stamp is the right direction — the mechanism cost more to reason about than the boots it saved, and bot-review-state.sh's last_substantive/at_head already covers the duplicate-review case it was really protecting (an empty-body APPROVE counts as substantive, so a queued run still stops at step 1). Two defects in the replacement, plus a coupling worth naming.
Step 9 has no termination guard. Its re-entry condition is "a session whose first pre-flight found STARTED_DRAFT == true", and step 1 says to keep the first STARTED_DRAFT value. After the forced pass runs, both are still true — STARTED_DRAFT was true at first pre-flight, and LIVE_DRAFT is still false — so the condition re-fires. "One full non-draft pass" is the intent, but nothing in the state distinguishes "already ran". Step 5's ALREADY_POSTED stops the second post (draft_mode is false on the full review it just published), so this isn't a duplicate-review bug — it's the whole review flow, code-review pass included, re-running until the job timeout. Inline suggestion below.
--argjson force "$FORCE_FULL_REVIEW" fails open toward a duplicate post. The step-1 preamble warns that shell state doesn't persist between tool calls, so FORCE_FULL_REVIEW has to be re-derived in the step-5 invocation. When it isn't, --argjson force "" is a jq parse error, ALREADY_POSTED comes back empty, and the run posts a second review at a head that already carries one. Note the asymmetry with the neighbouring $HEAD_SHA, which fails safe under the same slip — an empty $HEAD_SHA reads as "HEAD moved" and exits. One-token fix inline.
draft_mode makes a prose line load-bearing. bot-review-state.sh now decides whether a forced pass may replace an earlier review by startswith("Reviewing as a draft —"), but the place that line is authored — the Draft mode bullet, Open the review body with one line framing it: — reads as guidance, not a fixed key. A session that paraphrases it ("Reviewing this as a draft — …", or an en dash) gets draft_mode: false, and the ready_for_review pass is then blocked by ALREADY_POSTED and silently drops the full review. That line sits outside the diff, so no inline suggestion — happy to push a commit marking the prefix as fixed (CLAUDE.md's authoring rules already carve out "mandatory exact wording for fragile mechanics: dedup keys"), or you can fold it in.
Two smaller things, both take-or-leave:
test_review_queues_pushes_without_an_examined_statuspins twelve prose fragments fromreview/SKILL.mdinside a test about workflow generation.test_notification_queue_contract.pyis the existing home for skill-contract assertions, and a few of these carry no mechanism ("preserving that override","5 (COMMENT path), 7, and 9 still apply") — they'll break on any reword with nothing to tell the next reader why they mattered.- The transcript is the only thing
verdict()writes to the job summary, so the default flip removes it entirely, failures included. Failure signal survives as the error annotation plus_quote_stderr, so this may be exactly what you want; if not,if show_full_output == "true" or claude_exit:keeps it where visibility earns its keep.
Everything else checks out: restore_local_actions' remaining callers both pass no condition, importlib.resources is still used by the mention and notifications scripts, the docs/ and install-tend/references/ copies of tend.example.yaml moved together, no stale tend-review/<pr> or steps.gate references survive in plugins/, and uv run pytest is green locally at 728 passed.
tend-agent
left a comment
There was a problem hiding this comment.
Both defects from the last pass are fixed. ${FORCE_FULL_REVIEW:-false} fails safe now, and the draft framing line is pinned as exact wording with DRAFT_REVIEW_LINE shared between the skill assertion and the bot-review-state.sh prefix test — a paraphrase breaks a test instead of silently flipping draft_mode. Deleting step 9 is a better answer than bounding its re-entry, and it holds: step 1 reads HEAD_SHA live rather than from the event payload, so a ready_for_review run that waits behind a session still forces a full non-draft pass against whatever the head has become by the time it starts.
I checked queue: max against real GitHub rather than the docs, since actionlint's pin rejects the key and no workflow under .github/workflows/ carries it yet — nothing in this repo's CI actually exercises the syntax. A job-level concurrency with group + queue: max + cancel-in-progress: false is accepted and the job runs, so the pin will hold at the next regen.
The same probe found the one new thing, inline on the template: with cancel-in-progress: true alongside queue: max, GitHub refuses to parse the file at all — the run comes back named by its file path, conclusion failure, no jobs. That pairing is now one adopter override away, and this change raises the incentive to write it: review runs used to collapse to a single pending replacement, and now they serialize up to 100 deep, which is exactly what makes someone reach for cancel-in-progress: true.
How the override reaches that state
Overrides merge per RFC 7396, so a mapping merges rather than replaces — an adopter writing only the one key keeps queue: max underneath it:
workflows:
review:
jobs:
review:
concurrency:
cancel-in-progress: trueGenerating with that config emits both keys:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
queue: max
cancel-in-progress: true
The inline suggestion is the cheapest fix — the comment renders into every adopter's tend-review.yaml, which is where someone reads the concurrency block before overriding it. If you'd rather catch it at init instead, the merge step already warns on unknown job names, so rejecting this pair there would sit in existing machinery rather than new machinery. Happy to push either.
Review found three problems in the section, which publishes verbatim as the GitHub Release notes. The #1078 bullet scoped the transcript change to review runs. What changed is `show_full_output`'s default on `claude/action.yaml` itself, and nothing sets that input per workflow — so every Claude workflow loses its rendered transcript, and an adopter looking for a triage or ci-fix one would find it gone while the notes said only review had changed. The same PR removed `tend-review`'s pre-boot pre-check, which the notes did not mention. It is adopter-visible twice over: `setup:` now runs on every review event, and a redundant queued run boots the agent rather than skipping. These notes are what an adopter reads to explain a change in their bill. Headings were bold paragraphs where every other release uses `###`, so the release page would have rendered them without anchors and at a different weight; bullets now open with a bold lede like the sections around them. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Release step 11: moves Tend's eight generated workflows and the hand-maintained `review-reviewers.yaml` onto the published `max-sixty/tend/[email protected]` action. `init` rewrites only the generated `tend-*.yaml` files, so the reviewer workflow is restamped by hand; every workflow in the repo now agrees on one ref. Two behavior changes ride along, both already merged into the generator and released: - **`tend-review`** drops its pre-boot gate and the `tend-review/<pr>` commit status the gate read, so reviewed commits no longer carry an extra check row. It gains `queue: max`, so a push cannot displace a pending `ready_for_review` run. ([#1078](#1078)) - **`tend-notifications`** replaces the three-layer inbox sweep with a paginated snapshot taken at a 10-minute cutoff, repairs repository watching on every poll, passes the cutoff through to the agent, and serializes on a `tend-notifications` concurrency group. ([#1074](#1074)) 0.1.20...0.1.21 ## Verification `uvx [email protected] init` reruns to an unchanged generated diff; pre-commit and `uv run pytest` (761 passed) are clean. One caveat, and it is the reason the diff is not purely mechanical: pre-commit's `trailing-whitespace` hook strips a 12-space line the generator emits inside the notifications prompt. `block_prompt` renders it with `indent(12, blank=True)`, which indents the blank line separating the slash command from the cutoff line. #1074 introduced the first multi-line prompt to go through that macro, so this is the first regeneration to hit it. Both forms parse identically inside a YAML block scalar, but the committed file can never match generator output until the macro changes. The generator fix lands separately. > _This was written by Claude Code on behalf of max-sixty_
Claude review runs currently render their transcript in the job summary and add a PR-scoped legacy commit status that points back to the workflow. That status exists only to skip a usually redundant queued agent boot, but it leaves another visible check row on every reviewed commit.
This makes rendered transcripts opt-in and removes the examined-status producer and gate. Reviews still serialize per PR, and
queue: maxpreserves pending PR events within GitHub's queue limit so a later push cannot replaceready_for_review. Before posting, the reviewer rechecks the live HEAD, PR state, and prior substantive reviews.Raw session artifacts remain available for deliberate diagnosis and expire after 30 days.
Tests:
wt test;pre-commit run --all-files.