Repository navigation
skills(review): echo approve confirmation to prevent silent-retry duplicates - #395
Merged
Merged
Conversation
…licates `gh pr review --approve` is silent on success. When combined with a guarded prelude (head-match, OPEN-state, ALREADY_POSTED checks) in one bash invocation, the only stdout in the tool-result is the prelude's echo — the approve itself leaves no positive signal. Past tend-review runs have re-issued the verb on seeing a silent tool-result and posted a duplicate APPROVED on the same commit. Append `&& echo "✓ approved"` to the recipe so the tool-result shows explicit confirmation, and add one sentence explaining why future maintainers should not strip the echo as cosmetic noise. Three cumulative occurrences across May/April on max-sixty/worktrunk: - 2026-04-29 run 25089599666 / PR #2454 (Dependabot): 2 × APPROVED, empty-body - 2026-05-06 run 25454510442 / PR #1320: 2 × COMMENTED, byte-identical bodies - 2026-05-07 run 25499066953 / PR #2641: 2 × APPROVED, empty-body The April 29 evidence entry already proposed this exact fix and put the recipe on a watch-list pending a second `--approve` occurrence; today's run on PR #2641 is that occurrence.
tend-agent
commented
May 7, 2026
tend-agent
left a comment
Collaborator
Author
There was a problem hiding this comment.
The fix to the recipe itself looks right — verified gh pr review --approve is TTY-gated for its success line (review.go:186-199), so the tool-result is genuinely empty in CI.
One concern with the surrounding explanation, inline.
gh api writes the response body to stdout by default, so dismissal PUTs already produce a visible success signal — the silent-success-retry mechanism this rule guards against doesn't apply there. Co-Authored-By: Claude Opus 4.7 <[email protected]>
max-sixty
reviewed
May 8, 2026
| gh pr review <number> --approve -b "" && echo "✓ approved" | ||
| ``` | ||
|
|
||
| The trailing `&& echo` is intentional: `gh pr review --approve` produces no stdout on success, and prior runs that omitted the echo have re-issued the verb on seeing a silent tool-result and posted a duplicate APPROVED on the same commit. The visible success signal prevents the retry. |
Collaborator
Author
There was a problem hiding this comment.
Done in ac99ca0 — paragraph removed, recipe stands on its own.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Outcome evidence
tend-reviewrun 25499066953 on worktrunk PR #2641 posted twoAPPROVEDreviews 4 seconds apart from a single completed session — review 4244431335 at 13:35:57Z and 4244431873 at 13:36:01Z, both empty-body, both on the same head SHA55ef4fba. Only onetend-reviewrun touched this SHA, so this is not the documented concurrency-cancelNon-issue(no SIGTERM'd siblings here).Decision chain in session log
bcfcce99-ae59-4201-a411-fe82f2b074bc.jsonl:read CURRENT_HEAD/PR_STATE, HEAD-match check, OPEN-state check,ALREADY_POSTEDcheck, thengh pr review 2641 --approve -b ""as the script's last command. The firstAPPROVEDposted at 13:35:57Z. Tool-result showed only the prelude'secholines (CURRENT_HEAD=… PR_STATE=OPEN ALREADY_POSTED=); the approve itself produces no stdout on success.gh pr review 2641 --approve -b ""with no preceding text. The secondAPPROVEDposted at 13:36:01Z.reviews[-1], saw the latest entry wasAPPROVED, and wrote "Approval posted on HEAD" (singular) to the conversation log, never noticing the duplicate.The prelude's silence was indistinguishable from "approve didn't fire", so the model retried "to be sure".
Root cause
The
### 5. Submitrecipe inplugins/tend-ci-runner/skills/review/SKILL.mdshowsgh pr review --approve -b ""with no positive confirmation.gh pr review --approveis silent on success, so combining it into a guarded script (where the only stdout is the prelude'secho) leaves the model with no visible success signal. The retry follows.Fix
Append
&& echo "✓ approved"to the recipe so the tool-result shows explicit confirmation, and add one sentence explaining why future maintainers should not strip the echo as cosmetic noise. One-line code change, one sentence of explanation.Gate assessment
Evidence: https://gist.github.com/9675d1510da32c68a68c1d45137b21e0 (current month) plus prior month's gist
44ab1483b29406255dd36141650c894d.Three cumulative occurrences of single-session duplicate-review-POST across the past two months, all from
tend-reviewsessions, all onworktrunk:APPROVED, empty-body&& echoas the fixCOMMENTED, byte-identical 2476-byte bodiesgh api .../reviews POST) but same single-session-duplicate-POST signatureAPPROVED, empty-body--approveshape, identical to the April 29 case--approveshape: 2 cumulative occurrences (April 29, today). Across the broader single-session-duplicate-POST family: 3 occurrences.--approve-only shape, 2 occurrences also meets the High threshold.Why now
The April 29 entry recorded the exact same root cause and the exact same fix this PR applies, and put the bot on a watch-list pending a second occurrence. Today's run on PR #2641 is that second
--approveoccurrence (third cumulative across all single-session duplicate review shapes). The watch-list has tripped.Why not broader
Scope is constrained to the
--approverecipe because that is where the evidence concentrates and where the call site is unambiguous. The COMMENTED API path (gh api .../reviews POST) returns JSON on success, so the silent-success-retry mechanism does not apply directly there; if its single occurrence recurs, a follow-up PR can address that path. Same forgh api .../dismissals -X PUT— referenced in the new explanatory sentence as guidance, not modified directly. Smallest change that addresses the observed pattern.