Skip to content

fix(ci_failure_triage): a rollup naming a cancelled job is runner_cancelled - #1092

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/triage-rollup-cancelled
Nov 14, 2026
Merged

hyperpolymath merged 1 commit into
mainfrom
claude/triage-rollup-cancelled

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

What

On a head that a newer push has superseded, the CI Status rollup can go red with:

##[error]kyaml-conformance did not succeed (result: cancelled)

The newer push cancelled the job the rollup waits on. That is noise, not a defect (SQ-NOI-01). No triage rule matched it, so the classifier returned no primary rule.

runner_cancelled (action none) now has one more pattern for this wording. It only covers result: cancelled; result: failure is still a real failure, and a negative test checks that.

Evidence

hypatia#1091, CI Status job 132467767442 (run 43601615541), on old head 9f374f2. The replay fixture real-43601615541-rollup-cancelled.txt is an excerpt of the real job log.

Tests

  • The new replay case fails on main and passes here.
  • A new negative test checks that result: failure is not read as a cancellation.
  • All 869 rule tests pass, and gen-rules-praxis.sh --check passes.

Generated by Claude Code

…celled

The CI Status rollup on a superseded head goes red with
"kyaml-conformance did not succeed (result: cancelled)" when a newer push
cancels the job it waits on (hypatia#1091, run 43601615541). No rule matched
it. runner_cancelled (action none) now does; "result: failure" stays a real
failure. Replay fixture is the real job log excerpt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_0136P7ZkGCWGEyedTtdEHAPT
@coderabbitai

coderabbitai Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 22 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: ecb5ebfb-15a4-4a92-ac1f-434a14130bcb
Commits

Reviewing files that changed from the base of the PR and between 4d7f059 and 09e9abf.

Files selected for processing: 3

  • lib/rules/ci_failure_triage.ex
  • test/fixtures/ci_failure_triage/real-43601615541-rollup-cancelled.txt
  • test/rules/ci_failure_triage_test.exs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sonarqubecloud

Copy link
Copy Markdown

@hyperpolymath
hyperpolymath marked this pull request as ready for review November 14, 2026 14:24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 14, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T14:26:55.928692Z 09e9abf Draft marked ready
🔒 Security Review ❌ Failed 2026-11-14T14:24:05.357801Z
We couldn’t complete this review. Comment @codex security review to try again.
09e9abf Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 09e9abfdec

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# (hypatia#1091, run 43601615541): a newer push cancelled the older
# run, so the superseded head's rollup goes red. Only `cancelled`;
# `result: failure` is a real failure and stays the rollup's.
~r/did not succeed \(result: cancelled\)/

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Require rollup context before suppressing the failure

Because classify/2 scans every log line, this unanchored pattern also fires when an application or failing test merely emits the same phrase, such as worker did not succeed (result: cancelled). The platform-layer runner_cancelled match then outranks any real test failure or exception elsewhere in the log and produces the :none action, incorrectly hiding a code failure. Require the runner annotation or other CI-status rollup context before treating this message as cancellation noise.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Good catch. This merged before the fix landed, so the anchoring is in follow-up #1093. The pattern now requires the runner's ##[error] annotation, with a fail-before test.


Generated by Claude Code

@hyperpolymath
hyperpolymath merged commit f925cef into main Nov 14, 2026
98 checks passed
@hyperpolymath
hyperpolymath deleted the claude/triage-rollup-cancelled branch November 14, 2026 14:34
hyperpolymath added a commit that referenced this pull request Nov 14, 2026
…real failure (#1093)

Follow-up to #1092. The `runner_cancelled` rule reads a CI rollup as
noise when a newer push cancelled the run. Three ways it could hide a
real failure are fixed here.

## What
1. **Anchored to the runner annotation** (Codex on #1092). The rollup
pattern only matches a runner `##[error]` line at the start of the line,
after the optional timestamp. A program that prints the phrase, or a
test that quotes the annotation partway along a line, no longer matches
(CodeRabbit on this PR).
2. **Mixed rollups are not noise.** If a rollup reports one job
cancelled and another failed, it was read as `runner_cancelled` and the
failure was hidden. Rules can now carry `unless:` patterns;
`runner_cancelled` stands down when the log also has a rollup failure
line, and `rollup_cascade` now matches that failed-job line, so the log
routes `:upstream` and not to nil (Codex, P2).
3. **Security rollup wording.** `did not complete successfully
(result=cancelled)` (run 43611131531, on this PR's own superseded head)
is now recognised. `result=failure` stays a failure.
4. `rules/0` drops `:unless` with the other matcher fields, so `mix
hypatia.ci_triage rules` still encodes to JSON (Codex, P1).

## Tests
- Tests cover a quoted marker plus a test failure (gives
`test_failure`), the timestamped real line, mixed cancelled+failed
rollups in both wordings (`rollup_cascade` primary), the security
cancelled wording, and JSON encoding of `rules/0`. Each behaviour change
fails without the lib change.
- `mix test test/rules`: 880 tests, 0 failures. `mix hypatia.ci_triage
rules` prints all 44 rules.
- `gen-rules-praxis.sh --check`, `check-readme-claims.sh` and
`rules-praxis-test.sh` (22/22) are clean, and the self-scan reports no
findings.

## Note on red "Integration Status" / "Security Status" on older heads
These went red on superseded heads only. Each later push cancelled jobs
in the earlier run, and both rollups deliberately treat missing evidence
as not a pass. This PR teaches triage to read that as a cancellation,
and never as one when a real failure sits beside it.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_0136P7ZkGCWGEyedTtdEHAPT

---------

Co-authored-by: Claude <[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.

3 participants