Skip to content

fix: add backward-compat aliases for pre-0.0.2 skill names - #54

Closed
tend-agent wants to merge 1 commit into
mainfrom
hourly/review-23559223392
Closed

tend-agent wants to merge 1 commit into
mainfrom
hourly/review-23559223392

Conversation

@tend-agent

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a tend-compat plugin registered as tend in the marketplace, containing symlinks from old skill names (tend-review, tend-triage, etc.) to the real tend-ci-runner skills
  • Updates action.yaml to install the compat plugin alongside tend-ci-runner

Root cause

The plugin rename from tend → tend-ci-runner in #39 changed both the plugin name and skill names (e.g. tend-review → review). Adopter workflows generated before v0.0.2 reference /tend:tend-review — a plugin called tend with a skill called tend-review.

When the v1 tag auto-moved (#49), adopter runs started failing silently: the workflow reports success but Claude receives "Unknown skill: tend:tend-review" and performs no review.

Evidence

All 4 tend-review runs on max-sixty/worktrunk in the past hour failed identically:

Run PR Error
23558948684 #1713 Unknown skill: tend:tend-review
23558265657 #1667 Unknown skill: tend:tend-review
23558140064 #1713 Unknown skill: tend:tend-review
23558023083 #1667 Unknown skill: tend:tend-review

Session logs confirm zero assistant messages — Claude never ran. The earlier run at 17:12 UTC (23554107050) still worked because the v1 tag hadn't moved yet.

Gate assessment: Critical evidence (clearly wrong outcome — PRs going completely unreviewed), 4 occurrences. Targeted fix (new compat plugin with symlinks).

Adopter action

Adopter repos should still regenerate workflows with uvx tend init to use the canonical /tend-ci-runner:review names. This compat layer prevents silent failures in the interim.

Test plan

  • Verify symlinks resolve correctly when the plugin is installed via claude plugin install tend@tend
  • Confirm /tend:tend-review resolves to the review skill content
  • Run a test review on worktrunk after merge

🤖 Generated with Claude Code

The plugin rename from `tend` to `tend-ci-runner` (#39) broke all
adopter repos whose workflows still reference old skill names like
`/tend:tend-review`. When the v1 tag auto-moved (#49), the old
`skills/` directory was gone and skill resolution started failing
silently — the workflow reports success but no review happens.

Adds a thin `tend-compat` plugin registered as `tend` in the
marketplace. It contains symlinks mapping old skill names
(tend-review, tend-triage, etc.) to the real tend-ci-runner skills.
The action installs this compat plugin alongside tend-ci-runner.

Adopter repos should still regenerate workflows with `uvx tend init`
to use the canonical `/tend-ci-runner:review` names. This compat
layer prevents silent failures in the interim.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tend-agent tend-agent added the claude-behavior Behavioral issues found by review-reviewers label Mar 25, 2026
tend-agent pushed a commit that referenced this pull request Mar 25, 2026
The shallow clone (default fetch-depth: 1) causes git push to fail with
"remote contains work that you do not have locally" because the local
repo can't prove the fast-forward to the remote without full history.

This broke the v1 auto-update after PR #55 merged, keeping v1 stuck at
fbf397e while main advanced. As a result, the compat fix in PR #54
cannot reach adopters even after merge.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@max-sixty max-sixty closed this Mar 25, 2026
@max-sixty
max-sixty deleted the hourly/review-23559223392 branch March 25, 2026 23:57
max-sixty pushed a commit that referenced this pull request Aug 5, 2026
…cord guards (#835)

## Problem

`review` derives three separate signals from the bot's own review
records, and all three counted any record the bot owns. GitHub creates
the *same* record shape for something that is not a review: replying to
a review thread via `POST /pulls/{n}/comments/{id}/replies` wraps the
reply in a synthetic zero-body `COMMENTED` review anchored at whatever
HEAD was when the reply posted. So after any `tend-mention` run answers
review threads inline — its normal response path — containers sit on the
current HEAD, and every guard that asks "did the bot review this
commit?" answers yes:

- **`LAST_REVIEW_SHA`** (step 1) advances to a commit nothing reviewed,
so the next `tend-review` run computes its incremental against code it
never read and skips everything before it under the trivial-change
heuristic. This is #828.
- **`ALREADY_POSTED`** (step 5, *Posting mechanics*) becomes a false
positive and the run exits at `Already reviewed — skipping`. Same
lost-review-signal symptom, relocated to the close-out — and it costs
more, because the run has already read the diff and formed the verdict
before throwing it away. Fixing the derivation doesn't cover it: that
routes the run *into* a full review, and this guard then discards the
result.
- **`ORPHAN_ID`** (*Recovering from inline comment 422 errors*) resolves
to the container, so the case-(a) recovery would `PUT` the review body
over an unrelated inline reply.

Nothing goes red in any of the three; the run reports a well-reasoned
decision to stay silent. On a repo where the bot both authors and
reviews its own PRs, that removes the PR's only review signal. It is
deterministic — no decision point — so it recurs on every
reply-then-push flow.

## Solution

Count a review record only when it carries a body, owns at least one
*top-level* (non-reply) inline comment, or is `APPROVED`. Reply
containers have none of the three; an empty-body review carrying real
inline findings still anchors, and so does an empty-body approval.
`LAST_REVIEW_SHA` and `ALREADY_POSTED` use the full predicate (the
latter re-derives `SUBSTANTIVE`, since shell state doesn't carry between
tool calls); `ORPHAN_ID` needs only the body test, because a case-(a)
orphan always persisted a body and a container never has one. The review
and comment calls are `--paginate`d — container churn is exactly what
pushes a PR past one page of reviews — and each reduction runs over the
merged array via `jq -rs 'add | …'`, not inside `--jq`: `gh` applies
`--jq` per page, so a `| last` there yields one record *per page* rather
than one overall.

Where the two shapes are genuinely indistinguishable (a UI review whose
only content is thread replies), the filter skips it — that moves
`LAST_REVIEW_SHA` *earlier*, widening the incremental. The failure
direction is more review, not less.

## Testing

No test file covers skill prompt text, so the reproduction is a live API
comparison rather than a committed test.

**Step 1, against `max-sixty/cargo-affected` PR #54** — the case in
#828:

| review | `commit_id` | body | comments |
|---|---|---|---|
| 4851810736 | `1ffcde2` | 2441 chars | 2 top-level |
| 4851851883 | `551e059` | 0 | 1 reply (`in_reply_to_id` 3710403279) |
| 4851852052 | `551e059` | 0 | 1 reply (`in_reply_to_id` 3710403291) |

The old recipe returns `551e059` — a commit with no review, and the one
whose refactor got skipped. The new recipe returns `1ffcde2`, the real
review.

**Steps 5 and the 422 recovery, against this PR's own records.**
`tend-mention` answered both threads from the first review after the
`8699228` push, so the containers landed on the then-current HEAD:

| record | `commit_id` | body | inline comments |
|---|---|---|---|
| 4860021420 | `b75b165` | 2286 | 2 top-level |
| 4860032792 | `8699228` | 0 | 1 reply (`in_reply_to_id` 3717103568) |
| 4860032847 | `8699228` | 0 | 1 reply (`in_reply_to_id` 3717103574) |
| 4860059883 | `8699228` | 2812 | 0 |

Evaluated against `8699228` as the reviewing run saw it — that is,
before its own record 4860059883 existed — the old `ALREADY_POSTED`
returns `2026-08-05T00:32:19Z` and the old `ORPHAN_ID` returns
`4860032847`. Neither is a review; following the skill literally, that
review would not have been posted at all. The new guards discard both
containers: at `8699228` they return `2026-08-05T00:39:33Z` and
`4860059883`, the one real review at that SHA, and at `7a11332` and
`cdbf065` both return empty, where no review exists yet. The zero-body
`APPROVED` records on #812 (`02f8dce`) and #820 (`3a5621c`, alongside
two containers) both still anchor, which is what the `APPROVED` clause
is for.

Other consumers of the same records were checked and left alone:
`weekly` filters on `state == "APPROVED"` (reply containers are always
`COMMENTED`), and `notifications` counts recent bot reviews for dedup,
where a reply container legitimately means the bot responded.

---

Closes #828 — automated triage

---------

Co-authored-by: tend-agent <270458913+tend-agent@users.noreply.github.com>
max-sixty pushed a commit that referenced this pull request Aug 11, 2026
…g output accepted (#864)

## Problem

Step 2 asks the survey subagent whether each run's output was "accepted
or rejected" but never says who has to do the accepting. Nothing in the
prompt distinguishes a human merging a PR from the bot replying to its
own review thread, so the subagent fills the gap with the most natural
reading — a reply arrived, therefore someone accepted it — and reports a
self-conversation as human acceptance.

That is the worst-shaped failure this skill has: it produces a **false
all-clear**. A survey that credits the bot's own reply to a human
doesn't add noise a later gate can filter, it removes the signal that
would have sent the leg to Step 3.

## Evidence

This leg ([run
31081926964](https://github.com/max-sixty/tend/actions/runs/31081926964),
target `max-sixty/cargo-affected`). The survey subagent reported PR
[#77](max-sixty/cargo-affected#77) twice under
"Runs with accepted output":

> Outcome: ACCEPTED - human developer responded positively to feedback
> Outcome: ACCEPTED - human developer incorporated feedback

and concluded `PR 77: Developer accepted and incorporated bot feedback
(2 cycles of acceptance)`. There is no developer. The PR is bot-authored
and every actor on it is the bot:

```
$ gh api "repos/max-sixty/cargo-affected/pulls/77/comments?per_page=100" --jq '[.[].user.login] | unique'
["cargo-affected-bot"]
```

The same report also listed the PR author as `cargo-affected-bot`, so
the contradiction was internal to the summary — the acceptance claim was
reached without ever comparing the replying login against the bot's.

This is the fourth cheap-subagent mis-attribution recorded in the
[evidence
gist](https://gist.github.com/dca23a6e6a0d8cae2665944ba31676fb), and the
second of this specific sub-class (bot activity attributed to a human):

| Occurrence | Shape |
| --- | --- |
| gist "Analysis-side", leg ending 07:5x | inline replies + commit
`551e059` credited to "human applied suggested changes" |
| gist "Analysis-side", following leg | PR #54 bodies credited to a run
that had not yet started |
| gist "Analysis-side", streak-break leg | fabricated no-op causes;
window boundary ignored |
| **this leg** | **bot's own reply chain on PR #77 reported as human
acceptance** |

Prior legs' response was to stop delegating — ten consecutive legs
record "this leg used **no** survey subagent". That is a per-leg
workaround for a defect in the shared prompt, and it leaves the skill's
stated default (`Delegate all broad exploration to a cheap subagent`)
pointing at a step that mis-reports actors.

## Fix

Three small changes to Step 2, all inside the prompt template:

- Require the subagent to **name the login** behind every
acceptance/rejection signal, sourced from a single `gh pr view --json
number,state,author,mergedBy,reviews,comments,commits` that covers all
five actor surfaces — merge actor, reviews (with state), inline
comments, conversation comments, and commits. A comments-only check
can't source it: neither comments endpoint carries review records or the
merge actor, so a maintainer merging a bot PR without commenting would
come back as bot-only. Inline commenters need no separate call — every
inline comment, including a standalone reply, belongs to a review record
that `reviews` returns. The block notes that `commits` truncates at 100
(oldest-first) while `comments` and `reviews` paginate in full.
- Give bot-only threads their own report bucket (`bot-only — no human
signal`) so they can't be silently filed under "accepted".
- Tell the main agent to verify actor attribution before it enters a
finding, and to judge bot-only threads on content rather than treating
the bucket as either outcome.

The rule is stated so it stays correct when the bot legitimately works
on its own PR: bot-only is *not* a defect (a self-review followed by the
author's fix is designed behavior), it just isn't **acceptance**.
Nothing here discourages delegation — it fixes the instruction the
delegation was missing.

## Gate assessment

- **Evidence level**: High — consistent pattern across multiple
sessions. 4 occurrences total, 2 in the human/bot sub-class this change
addresses. High needs 2–3.
- **Structural or stochastic**: structural in the prompt. The subagent
is never asked for actor identity, so no wording of the reply can be
relied on to supply it; which specific claim it invents is stochastic,
the omission is not.
- **Change type**: targeted fix — a missing requirement in an existing
prompt, plus a report bucket. Normal bar, met.
- **Passes both gates.**

Second finding this leg did **not** pass and is recorded in the gist
instead: the three-hop `tend-mention` chain on the same PR #77. That one
is already fixed by open PR #849, and I've added this window's evidence
there rather than opening a duplicate.

---------

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

3 participants