Skip to content

fix(triage): skip bot's own monthly bookkeeping tracking issues - #800

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

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

Conversation

@tend-agent

Copy link
Copy Markdown
Collaborator

Problem

tend-triage fires a full agent run on the bot's own monthly bookkeeping issues and exits silently — pure wasted compute, recurring every month.

The review-reviewers and review-runs workflows auto-open a tracking issue on the 1st of each month (review-reviewers-tracking: YYYY-MM, review-runs-tracking: YYYY-MM). The issues: opened event then triggers tend-triage, whose if: only skips tend-outage-labeled issues. So triage checks out, sets up, spins up the Claude agent, reads the bot's own tracking issue, and exits via the self-conversation guard without posting anything.

Observed this hour: run 30674799487 on issue #799 (review-reviewers-tracking: 2026-08) — the max-sixty/tend/[email protected] step ran to completion, no comment posted.

This is structural (the tracking issue is created deterministically with a fixed label; the trigger always fires and always no-ops) and recurring across every month:

Month Triage runs on tracking-issue creation
2026-06 4× (review-reviewers-tracking dup race) + 1× (review-runs-tracking)
2026-07 review-reviewers-tracking + review-runs-tracking (2×)
2026-08 review-reviewers-tracking (1× so far)

Fix

Extend the triage if: label skip — already applied to tend-outage in the base template — to also skip the two tend-specific tracking labels. Since no adopter has the review-* workflows or their labels, the skip lives in tend's .config/tend.yaml rather than the generic generator default (which would leak tend-internal label names into every adopter's generated workflow).

This is the accepted loop/no-op-prevention shape per the review-reviewers skill: a label-based skip mirroring the existing tend-outage precedent, not an authorship-keyed sender filter.

The .github/workflows/tend-triage.yaml change is the rendered output of uvx tend@latest init (0.1.12, matching the pinned action ref) — regenerating touched only this one file.

Gate assessment

  • Evidence level: High — consistent structural pattern across ≥3 months (7 wasted triage runs total). Clears the High bar (2–3 occurrences).
  • Structural vs stochastic: structural — no decision point; the trigger fires and no-ops every time.
  • Change type: targeted fix (extends an existing label skip; one config stanza).
  • Passes both gates: yes.

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

review-reviewers/review-runs auto-open tracking issues on the 1st of each
month; the issues:opened event fired a full tend-triage agent run that read
the bot's own issue and silently no-op'd via the self-conversation guard —
recurring wasted compute every month.

Extend the triage `if:` label skip (already covering `tend-outage`) to the
two tend-specific tracking labels. Kept in tend's config, not the generic
generator default, since no adopter has these workflows/labels.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@tend-agent tend-agent added the claude-behavior Behavioral issues found by review-reviewers label Aug 1, 2026
@max-sixty

Copy link
Copy Markdown
Owner

Not worth the complication.

The wasted runs are real, but each one no-ops through the existing self-conversation guard, so the cost is a few CI minutes a month. Against that, the skip permanently puts tend-internal label names in .config/tend.yaml plus a regenerated workflow to keep in sync. The guard already covers this case.

This was written by Claude Code on behalf of max-sixty

@max-sixty max-sixty closed this Aug 1, 2026
max-sixty pushed a commit that referenced this pull request Aug 11, 2026
… dispositions (#833)

## Problem

`review-runs` **Step 4: Cross-check outcomes** is the only place a run
discovers that a maintainer disagreed with tend's output, and
`running-in-ci` → **Learning from Feedback** depends on that discovery.
But Step 4's single recipe was `gh pr list --author "$BOT_LOGIN"` — a
PR-disposition query — and its prose asked only about merges, closures,
and relabels. Every question it posed was answerable from state changes.

That misses the most common correction shape on an issue-heavy repo: a
maintainer replying in-thread that a bot claim was wrong, leaving the
issue's labels and state untouched. Nothing in the section asks for it,
so a run following Step 4 as written reports "0 maintainer corrective
comments" while one sits in its window.

The miss compounds: the all-clear gets written into the monthly tracking
issue, and future runs read it as ground truth when counting occurrences
under Gate 1 — so a recurring correction never accumulates the
occurrences its own gate requires. Structural, not stochastic; there is
no decision point.

## Solution

Adds the mirror-image query next to the existing disposition one — same
repo-wide `since` endpoints, inverted login filter — plus a sentence
naming in-thread contradiction as a correction class, and a note that
"no maintainer corrections" should only be written after the query ran.

`issues/comments` covers issue and PR conversation comments;
`pulls/comments` covers inline review replies, where corrections to
`tend-review` output land. Both are repo-wide, so it's two calls
regardless of how many threads the bot touched.

The query is `--paginate`d. That is load-bearing rather than cosmetic:
the response is ascending by `created_at`, so a single 100-item page
drops the *newest* comments — precisely where a fresh correction sits —
and the bot's own comments consume that budget before the login filter
runs. A silently truncated result would reintroduce the miss this PR
exists to close.

The projection reports `updated_at` alongside `created_at`, because
`since` filters on `updated_at`: a comment created before the window
appears on the strength of an in-window edit. That is worth keeping — an
edited claim is still a correction — but without both timestamps it
reads as a broken filter.

## Testing

Ran the recipe verbatim against this repo. It surfaces exactly the class
of comment the disposition query cannot see — e.g.
[#800](#800 (comment))
("Not worth the complication.") and
[#817](#817 (comment)),
neither reachable from a closed/merged/relabeled signal. Both endpoints
accept `since`; the `for endpoint in issues pulls` form and the
nested-quoting in the `jq` filter were executed as written, not just
composed.

Measured the truncation the `--paginate` guards against, over a 7-day
window on this repo: the unpaginated call returns 100 rows, `--paginate`
returns 142, and the 42 dropped are the newest — the boundary landed at
`2026-08-04T16:28:43Z`. In this particular window all 42 were the bot's
own comments, so no human comment was actually lost; the mechanism is
what's demonstrated, not an observed loss.

Confirmed the ordering claim directly: `created_at` is monotonic across
the response and `updated_at` is not. Confirmed the `since` semantics
the same way — a comment created `2026-08-01T08:39:05Z` appears in a 24h
window because it was updated `2026-08-04T08:50:03Z`.

Also verified the reported miss reproduces from the skill text alone:
Step 4 before this change contained no query filtering for non-bot
comments.

---
Closes #827 — automated triage

---------

Co-authored-by: tend-agent <[email protected]>
tend-agent added a commit that referenced this pull request Sep 18, 2026
The exception's trailing clause banned proposing a workflow-level skip
for the boot the tracker costs. That is tend's own answer to what compute
is worth, shipped into every consumer's triage session — #1268 removed
the same stance from `review-gates.md` on the ground that the bundled
skills carry no view on it.

It also sat where the proposals never came from: #800 was a `review-runs`
sweep, and a triage session that obeys the preceding sentence ends at
Step 2 before any cost judgment. The sentence that identifies the tracker
and ends the run is the whole fix.
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