Skip to content

fix(enrich-tend-outage-issues): batch into one comment per issue - #560

Merged
max-sixty merged 1 commit into
mainfrom
fix/enrich-tend-outage-batch-26021501392
May 18, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/enrich-tend-outage-batch-26021501392

Conversation

@tend-agent

Copy link
Copy Markdown
Collaborator

What

enrich-tend-outage-issues.sh now collapses all newly-enriched runs for a single tend-outage issue into one comment per nightly invocation, instead of one comment per run.

Why

Today's nightly run 26020294231 processed a 57-run backlog on #534 and posted 57 separate comments between 07:45:44Z and 07:47:10Z. Each comment fired an issue_comment event, which spun up a sibling tend-mention run (correctly skipped by the verify step, but still consuming a runner-minute for Set up job + Complete job). The flood also bumped the issue 57 times and notified watchers each time.

The script is structurally one-comment-per-run: for RUN in unenriched_runs; do gh issue comment ... done. The behavior is independent of how the bot reasons — when a backlog accumulates, it always produces N sibling comments. This is the documented behavior in the nightly skill, and PR #376 introduced the per-run shape; the cost only became visible at the 57-run scale.

Batching into one comment per issue:

  • Removes the visible spam (1 bump, 1 watcher notification).
  • Removes ~50 wasted sibling tend-mention runs per backlog burst.
  • Preserves the <!-- enriched-run:RUN_ID --> markers (multiple per comment is fine — the dedup jq scan(...) already extracts all matches per body).

Notes

  • Per-run sections become ### [Run N](url) instead of a leading paragraph. Job sections demoted to #### to keep the heading hierarchy.
  • One nightly invocation could in principle produce a very large comment if hundreds of runs accumulate, but the current rate ceiling (~7/hour observed during the worst stretch) makes a 100KB body unlikely between nightly ticks. If that becomes a real risk later, a per-comment cap can split the batch.

Evidence gist: https://gist.github.com/436c053100e5a44cdac646c9ebd3ebeb (see ## Run 26021501392).

When a backlog accumulates between nightly ticks (e.g. 57 unenriched runs
on #534 today), the previous per-run shape produced one comment each,
firing one sibling tend-mention run per comment plus 57 issue bumps and
watcher notifications. Collapse into one comment per issue per
invocation; markers stay intact (jq scan extracts multiple per body).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@tend-agent tend-agent added the claude-behavior Behavioral issues found by review-reviewers label May 18, 2026
@max-sixty
max-sixty merged commit 41f3f15 into main May 18, 2026
4 checks passed
@max-sixty
max-sixty deleted the fix/enrich-tend-outage-batch-26021501392 branch May 18, 2026 14:19
@max-sixty max-sixty mentioned this pull request May 19, 2026
3 tasks
max-sixty added a commit that referenced this pull request May 19, 2026
## Summary

Release 0.0.25. 8 PRs since 0.0.24:

- #566 review: push fixes to bot PRs by default, even when the fix needs
a judgment call
- #563 skills(running-tend): drop stale session-log count
- #562 skills: drop dollar-amount cost asides corrupted by arg
substitution
- #526 fix(list-recent-runs): anchor completion window to the intended
cron tick
- #559 fix(skills): hard-code /tmp instead of $TMPDIR in worktree
recipes
- #560 fix(enrich-tend-outage-issues): batch into one comment per issue
- #557 config: switch review-reviewers back to claude, demote
codex-auth-refresh to reference
- #556 config: switch tend's own harness back to claude

#566 is the reason for cutting now: it flips the bot-PR review default
from "push only mechanical fixes" to "push the fix whenever the review
can articulate it, defer only when no defensible default exists." The
behavior is release-gated, so it only reaches tend's own dogfooded
workflows (and adopters like PRQL) once 0.0.25 is published and the
nightly regen repins the action ref.

No new breaking changes since 0.0.24.

## Test plan

- [ ] CI green (test, test-worker, lint)
- [ ] After merge: tag `0.0.25`, PyPI publish (`pypi-release.yaml` on
the tag push), `uvx tend@0.0.25 --help` works
- [ ] Regenerate tend's own workflows to `@0.0.25` (separate `chore:
regenerate` PR, after the tag exists)

Co-authored-by: Claude <noreply@anthropic.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.

2 participants