Skip to content

fix(triage): search for CI causes by full test name and recheck before filing - #1673

Merged
max-sixty merged 3 commits into
mainfrom
fix/issue-1670
Nov 10, 2026
Merged

max-sixty merged 3 commits into
mainfrom
fix/issue-1670

Conversation

@tend-agent

@tend-agent tend-agent commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

CI report triage could file a duplicate tend-ci-cause issue when a sibling report's triage had already filed one. Step 3 of triage/references/ci-failures.md told the session to search by "a failing test or job name" without saying it had to be the whole name. GitHub issue search matches a snake_case identifier only as a whole word, so a shortened test name returns nothing. Step 4 then filed straight away, with no ownership recheck. Report triages for different lanes run at the same time, so a sibling can file or repair a cause between step 3 and step 4.

This change does two things:

  • Step 3: the search comment now says to use the complete test name, and why.
  • Step 4, "Nothing owns it": the last step before gh issue create is now a recheck. It lists the open tend-ci-cause issues and the open PRs and matches the name locally with jq, so the search index plays no part. Step 4 lets a sibling repair a cause directly with a PR that no cause issue tracks, which is why the PRs are checked too. A match is only a candidate: one test or job can fail for different causes, so the session reads each match and applies step 3's cause-evidence rule (Claims of recurrence). Only a match with the same cause becomes the owner and gets the new evidence. Any other match still leads to a new cause issue.

Verified against max-sixty/leaf:

Closes #1670 — automated triage

@tend-agent tend-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The recheck covers only open tend-ci-cause issues, yet step 4 says a sibling report's triage can repair the cause directly with a PR, and that PR owns it without any cause issue. When the sibling opens a repair PR during the gap, this recheck finds nothing and the session files a duplicate cause issue. The new issue then starts its own triage worker against a fix that is already in flight, which is the waste #1670 is about. Running the same local match over open PRs closes that gap. I'll push that change.

@max-sixty

Copy link
Copy Markdown
Owner

@tend-agent The final local jq match finds candidates, not necessarily the same cause: two failures of one test or job can have different causes. Please keep the index-independent recheck, then read each matching issue or PR and apply step 3’s existing cause-evidence rule before treating it as the owner. A match on the name alone must not prevent filing a distinct cause.

This was written by Codex on behalf of max-sixty

@tend-agent

Copy link
Copy Markdown
Collaborator Author

Done in e330519. The recheck itself hasn't changed: it still matches locally over the open tend-ci-cause issues and open PRs, so the search index plays no part. But a match now counts only as a candidate. The session reads each matching issue or PR and applies Claims of recurrence, as step 3 does. It treats a match as the owner only when the evidence shows the same cause, and files a new cause issue otherwise. I've updated the PR description to match.

@max-sixty
max-sixty merged commit bb282e6 into main Nov 10, 2026
12 checks passed
@max-sixty
max-sixty deleted the fix/issue-1670 branch November 10, 2026 08:41
max-sixty pushed a commit to max-sixty/worktrunk that referenced this pull request Nov 15, 2026
Regenerates the Tend workflows for tend 0.3.24 → 0.3.25
([compare](max-sixty/tend@0.3.24...0.3.25)).
The diff only bumps the action pins and the generated-by header, plus a
reworded `tend-ci-failures` header comment. The behavior changes come
with the new action version.

What changes for this repo:

- **CI failure reports follow the lane's state.** Triage now closes a CI
failure report once it has diagnosed the failure and every failure has
an owner. The lane's next failure reopens the report, which starts a new
triage session instead of only adding a "Failed again" comment
(max-sixty/tend#1677). Before filing, triage also searches for an
existing cause by the full test name (max-sixty/tend#1673).
- **CI polling handles more cases.** A failed external check, such as
`codecov/patch`, now returns red once it fails on two reads 30 seconds
apart, without waiting for hung Actions jobs (max-sixty/tend#1584).
Cancelled matrix checks are superseded by a later run of the same
workflow (max-sixty/tend#1526). The poll now ends before the Claude
session's own timeout, so a session that approved and then polled CI can
still act on the result (max-sixty/tend#1683).
- **`tend check` can accept a reviewed failure.** A maintainer can list
a failing check under `checks.accepted` in `.config/tend.yaml` with a
reason. It then prints as `ACCEPTED`, no longer fails `tend check`, and
the nightly drift step treats it as a non-failure (max-sixty/tend#1662).
This is relevant to #4797 if the `release` environment's
`workflow_dispatch` exposure is judged acceptable rather than gated.
- **Setup is more robust.** `setup-runtime` retries the uv download
(max-sixty/tend#1666), and Claude Code moves to 2.1.322
(max-sixty/tend#1665).

Co-authored-by: worktrunk-bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI report triage: a dedup search on a shortened test name misses a sibling's cause issue and files a duplicate

2 participants