Repository navigation
feat(notifications): drop cross-repo CheckSuite notifications in pre-check - #392
Closed
tend-agent wants to merge 1 commit into
Closed
tend-agent wants to merge 1 commit into
tend-agent wants to merge 1 commit into
Conversation
…check Cross-repo `ci_activity` notifications (typically forks whose own tend-* workflows fail and notify the canonical bot) are categorically unactionable per the notifications skill's scope rules — Claude reads them, classifies them as cross-repo, and marks them read. Layer A's `count > 0` early-exit gate doesn't catch this, so each one forces a paid Claude invocation for a no-op mark-read. Adds a Layer C that drops cross-repo `subject.type == "CheckSuite"` notifications by marking them read in YAML, mirroring the shape of the existing same-repo PullRequest filter (now Layer D). Same-repo CheckSuite notifications stay in scope: tend-ci-fix is the event-driven handler, and the notifications skill's "stale unanswered items" path covers the case where a dedicated handler failed. Observed pattern: three consecutive `tend-notifications` runs on max-sixty/worktrunk in one hour each invoked Claude solely to silent-mark the same `lucaspimentel/worktrunk` CI-failure notification.
Owner
|
Closing — superseded by the upstream fix in 0.0.17 (#375 fork guard). Once consumer repos run their nightly regen, their canonical workflows gate scheduled jobs on
|
2 tasks
tend-agent
added a commit
that referenced
this pull request
May 10, 2026
Remove links to specific past PRs (#154, #212, #263, #203, #268, #392, #375, #305, #318) from review-reviewers and running-in-ci, restating each as a structural rule (what shape is accepted, what shape is not). Extend "Authoring skills" in the root CLAUDE.md with a parallel "No specific past-case references" bullet so future skill edits don't re-introduce them. Co-Authored-By: Claude Opus 4.7 <[email protected]>
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.
Summary
Adds a pre-check layer to
tend-notificationsthat drops cross-repoCheckSuitenotifications (reason: ci_activityfrom forks) before counting unread items. Without this filter, a forked repo whose owntend-*workflows fail keeps generatingci_activitynotifications to the canonical bot, each of which forces a Claude invocation that loads the notifications skill, classifies the item as "cross-repo, not actionable", and marks it read — work that can be done in YAML for cents-on-the-dollar.The notifications skill is the sole handler for: fork PR inline comments, cross-repo
@-mentions, and stale same-repo items. Cross-repoCheckSuiteitems aren't in any of those categories — the bundled skill explicitly tells Claude to mark them read without action. Filtering at the pre-check makes the YAML do what Claude was already doing.Evidence
In one hour on
max-sixty/worktrunk(runs 25461250978, 25462624978, 25463750952), three consecutive scheduledtend-notificationsruns each:ci_activityCheckSuitefromlucaspimentel/worktrunkreporting that fork's owntend-notificationsfailed on itsmain.count > 0; Layers B/C/D don't filter cross-repo CheckSuite).running-in-ciandrunning-tend, classified the item as cross-repo CI activity, marked it read, exited.Cumulative occurrences of the same shape across the bot's evidence gists (this month + last): 80+. Pattern is structural: same input → same paid-but-no-op outcome every time.
Linked evidence gist: https://gist.github.com/9675d1510da32c68a68c1d45137b21e0
Gate assessment
count > 0, so any cross-repo CheckSuite always reaches Claude.Why filter
subject.type == "CheckSuite"rather thanreason == "ci_activity"CheckSuiteis the typed subject GitHub assigns to all CI-related notifications and matches the same set in practice. Filtering by subject type keeps the predicate close in spirit to existing Layer C (subject.type == "PullRequest") and avoids depending on thereasonenum.Why drop only cross-repo, not same-repo
Same-repo CI failures are handled by
tend-ci-fixon theworkflow_runevent (immediate, deterministic). The notifications-skill "stale unanswered items" path explicitly carries the case where a dedicated workflow failed or was skipped. Same-repoci_activitytherefore stays in scope; only cross-repo (which has no dedicated handler and is out-of-scope per the skill's scope rules) is filtered.Test plan
uv run pytest— 188 passedtend-notificationsruns no longer trigger Claude onlucaspimentel-style fork CI failures (verifiable next hour after this lands and a release ships)