Skip to content

fix(server): do not report success over a reaped code workflow (RIG-7551) - #183

Merged
rigel-nemo[bot] merged 1 commit into
rigel-releasefrom
ci-pipelines/rig-7551-do-not-report-success-over-a-reaped-code
Nov 21, 2026
Merged

rigel-nemo[bot] merged 1 commit into
rigel-releasefrom
ci-pipelines/rig-7551-do-not-report-success-over-a-reaped-code

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Nov 21, 2026 •

Copy link
Copy Markdown

What does this do

When the reaper ends a code workflow under a stored success pipeline, CI (pr) reports failure. A reaped code workflow is skipped with at least one canceled step. The guard is in codeStatus in server/forge/github/status_aggregate.go. It only overrides a stored success, so a user cancel keeps its verdict.

Why do we need it

Woodpecker#182 covers only the all-code-skipped case. This PR covers the mixed shape from pipeline #10874 (RIG-7551): successful siblings beside a reaped code workflow still rolled up green.

Skip producers

Tests

  • TestStatusAggregateReapedCodeWorkflowUnderSuccessIsNotGreen (red before the guard): reaped beside success, failure or killed expects failure; scheduler-skipped and build-time filtered stay green.
  • TestStatusAggregateUserCancelKeepsStoredStatus: stored killed stays failure; stored canceled keeps the rollup.

CGO_ENABLED=0 go test ./server/forge/github/ -count=1 passes. go vet and gofmt are clean.

Release and pin

This PR does not cut rigel.28 and does not bump the orion pin. Both ride the next fork release.

Spec-impact: none

Checks skipped: p0:RIG-9887

Refs RIG-7551

Co-authored-by: Matt Wilkinson matt@rigel.build

…551)

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@linear-code

linear-code Bot commented Nov 21, 2026

Copy link
Copy Markdown

RIG-7551

@rigel-nemo

rigel-nemo Bot commented Nov 21, 2026

Copy link
Copy Markdown

Checks read:

@rigel-nemo
rigel-nemo Bot merged commit 9e83f8e into rigel-release Nov 21, 2026
3 of 5 checks passed
@rigel-mintaka

Copy link
Copy Markdown
Author

Review round 1 at a7f983f

Found 0 high, 2 medium, 2 low. The full review is at /tmp/ci-pipelines-review-w183.md on fwdesktop.

# Sev Finding Action
1 Medium The reaper's dead-workflow pass has no age check, so it can skip a legitimately skipped runs_on: [failure] workflow before scheduler.Poll does and cancel its steps. The guard then turns a healthy PR red. Reproduced in TestReapOrphanedWorkflows. Fix: when the reaper skips a workflow whose runs_on would skip it anyway, it writes the same step shape as a normal skip. Only real losses keep canceled steps. Add a test for that case.
2 Medium The "scheduler-skipped" case says steps stay pending, but markSkipped goes through Done, which marks them killed. Fix: give the case the real killed shape and correct the comment and body.
3 Low The body says supersede does not write this shape. It does, and it can leave the pipeline success; this is safe only because push pipelines don't send the workflow list. Fix the body.
4 Low The "canceled by user before dispatch" case asserts success, which GitHub never receives. Assert the status that is actually reported, or drop the case.

Also: --skip-checks p0:RIG-9887 covers orion and orion-docs only. Resubmit with a truthful free-text skip reason.

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.

1 participant