Repository navigation
docs: document workflow override mechanism with skip-review-label example - #278
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
…mple The `workflow_extra` / `jobs.<name>` override mechanism existed in the generator (and DESIGN.md) but was undocumented in the install-tend skill and in tend.example.toml — the two places setup-stage users actually read. Add a concrete "skip review on a tend:dismissed label" example to both, plus a regression test. Refs #276 Co-Authored-By: Claude Opus 4.6 <[email protected]>
Collaborator
Author
|
Closing — #277 landed first (merged at 2026-04-15T05:43:22Z) covering the same scope (docs in |
tend-agent
added a commit
that referenced
this pull request
Apr 15, 2026
…ssue The dedup check only looked at issue comments, so when tend-mention handled an @-mention by opening a PR with `Refs #N` in the body (no issue comment), the next tend-notifications run saw no bot response on the issue and opened a duplicate PR. Observed in run 24438580801 — `tend-notifications` opened PR #278 ~45min after tend-mention had already opened PR #277 for the same request. Both branches collided on `docs/workflow-override-example` and #278 was closed as a duplicate after ~$4 of wasted work. Add a third dedup check: for issue notifications, look at the timeline for `cross-referenced` events from bot-authored PRs created after the notification's `updated_at`. Co-Authored-By: Claude Opus 4.6 <[email protected]>
This was referenced Apr 15, 2026
max-sixty
pushed a commit
that referenced
this pull request
Apr 15, 2026
…ssue (#279) ## Summary The notifications skill's dedup check only looks at issue comments and PR reviews. When `tend-mention` handles an `@`-mention by opening a PR with `Refs #N` in the body (and no issue comment), the next `tend-notifications` run misses that signal and opens a duplicate PR. ## Evidence Observed today in issue [#276](#276): | Time (UTC) | Event | |---|---| | 04:54:15 | `@max-sixty` commented on #276 with `@tend-agent` mention asking for a PR | | 04:54:19 | [`tend-mention` run 24437112906](https://github.com/max-sixty/tend/actions/runs/24437112906) fires | | 04:58:58 | tend-mention opens [PR #277](#277) with `Refs #276` in body — **no issue comment** | | 05:40:46 | [`tend-notifications` run 24438413763](https://github.com/max-sixty/tend/actions/runs/24438413763) starts — past the 10-min freshness gate | | 05:40:xx | Dedup check: `gh api repos/.../issues/276/comments --jq '[.[] \| select(bot login and created_at > 04:54:37)] \| length'` returns `0` | | 05:46:11 | Opens duplicate [PR #278](#278) on the same branch name `docs/workflow-override-example` | | 05:59:16 | Closes #278 as duplicate after discovering #277 merged at 05:43:22 | Direct cost: ~$4 of wasted API tokens on the second run, a confused issue timeline, and a correction comment the maintainer had to read. Classification: **structural** — the failure is deterministic. For any `@tend-agent` mention that tend-mention handles by opening a PR with `Refs #N` (no issue comment), the notifications skill will always miss the dedup and produce a duplicate. ## Fix Add a third dedup check for issue notifications: search the issue timeline for `cross-referenced` events from bot-authored PRs created after `NOTIF_UPDATED_AT`. GitHub emits these events when a PR body references the issue (via `Refs #N`, `#N`, etc.), so this reliably catches the tend-mention→PR path. Verified against the real timeline for issue #276: ``` $ gh api "repos//issues/276/timeline" --jq '[.[] | select(.event == "cross-referenced") | {pr: .source.issue.number, author: .source.issue.user.login, created_at}]' [{"pr":277,"author":"tend-agent","created_at":"2026-04-15T04:58:59Z"}, ...] ``` A dedup run at 05:40 with `NOTIF_UPDATED_AT=2026-04-15T04:54:37Z` would have returned `length > 0` and correctly skipped. ## Gate assessment - **Gate 1 (confidence)**: 1 occurrence today, classified **structural** — one occurrence is sufficient per review-gates.md. - **Gate 2 (magnitude)**: Targeted fix (one extra dedup query) — normal evidence bar, met. ## Test plan - [ ] Next `tend-notifications` run that processes an issue already handled by `tend-mention` (via `Refs #N` PR) should skip and mark read instead of opening a duplicate PR. - [ ] Existing dedup on bot comments and PR reviews still works — the new check is additive. Co-authored-by: tend-agent <[email protected]> Co-authored-by: Claude Opus 4.6 <[email protected]>
max-sixty
pushed a commit
that referenced
this pull request
May 2, 2026
…-check rationale (#364) Surfaced by the rolling survey in `tend-nightly`. CLAUDE.md skill-authoring guidance is explicit: "No specific past-run references. Don't link GitHub Actions runs, cite session IDs, or quote durations from individual incidents. They age into trivia and aren't useful when the skill is reused." The cross-reference timeline check rationale read `(observed in run 24438413763 which opened PR #278 duplicating PR #277)`. The structural rule — the comments-only check misses bot-authored PRs that touch the issue only via `Refs #N` in the body — survives without the run/PR numbers. ## Test plan Pure documentation; pytest suite green locally (`164 passed`). No behavioral test feasible — the change is removing trivia from prose. Co-authored-by: tend-agent <[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
workflow_extra/jobs.<name>override mechanism in both the install-tend skill (where setup-stage users look for guidance) anddocs/tend.example.toml(whereREADME.mdalready points for advanced options).test_skip_review_on_label_overrideto pin the exact override documented in both places (scalar replace of the review job'sif:), so the example can't silently break.The mechanism already exists in the generator and is spec'd in
DESIGN.md § Extending generated workflows— #276 notes that it's just not surfaced where adopters see it during setup. A dedicatedskip_review_labelconfig option could still be added on top of this; intentionally leaving that call to a maintainer since the generic mechanism already covers the need without maintaining a second knob.Closes #276 once merged (or leave open if a dedicated option is preferred).
Test plan
cd generator && uv run pytest— 159 passedpre-commiton changed files — ruff/typos/format/trailing-ws cleantend.example.tomlreads well alongside the existing### review-runsblock