Skip to content

fix(ci): stop sweep-cf-orphans noise — drop merge_group + soft-skip when secrets unset - #2098

Merged
HongmingWang-Rabbit merged 1 commit into
stagingfrom
fix/sweep-cf-orphans-noise
Apr 26, 2026
Merged

HongmingWang-Rabbit merged 1 commit into
stagingfrom
fix/sweep-cf-orphans-noise

Conversation

@HongmingWang-Rabbit

Copy link
Copy Markdown
Contributor

Summary

The `sweep-cf-orphans` workflow shipped in #2088 was noisier than intended in two ways. This PR fixes both — was filed under the Optional finding I left on the original review and now matters because the noise is observably hitting the merge queue (every recent PR through the merge queue generated a red `Sweep CF orphans (merge_group)` run, plus the hourly schedule fires red continuously while secrets are unset).

Two fixes

1) Drop `merge_group` trigger

Was firing the entire sweep job on every PR going through the merge queue:

  • `gh-readonly-queue/staging/pr-2091` → red
  • `gh-readonly-queue/staging/pr-2092` → red
  • `gh-readonly-queue/staging/pr-2093` → red
  • `gh-readonly-queue/staging/pr-2094` → red
  • `gh-readonly-queue/staging/pr-2095` → red
  • `gh-readonly-queue/staging/pr-2097` → red

Comment in the workflow explains the re-add path if/when this workflow IS wired as a required check (re-add the trigger AND gate the sweep step with `if: github.event_name != 'merge_group'`).

2) Soft-skip secret check

`Verify required secrets present` previously `exit 2`'d when secrets weren't configured yet (the PR body's post-merge step, still pending). That meant the hourly schedule was painting red continuously.

Convert to:

  • emit `::warning::` listing the missing secrets
  • set `skip=true` step output
  • gate the actual sweep step with `if: steps.verify.outputs.skip != 'true'`

Workflow reports green-with-warning while secrets stay unset; once they land, behavior is identical to today's (real sweep runs, hard-fails if a secret is later removed).

Test plan

  • YAML parses (`python3 yaml.safe_load`)
  • CI green on this PR (no Sweep CF orphans run on this PR specifically — the trigger drop is the whole point)
  • After merge: confirm next hourly schedule run reports green-with-warning instead of red
  • After merge: confirm subsequent merge-queue evals stop generating Sweep runs

🤖 Generated with Claude Code

…hen secrets unset

The sweep-cf-orphans workflow shipped in #2088 was noisier than
intended in two ways. This PR fixes both — was filed under the
Optional finding I left on the original review and now matters because
the noise is observably hitting the merge queue.

1) `merge_group: types: [checks_requested]` was firing the entire
   sweep job on every PR through the merge queue. The original intent
   ("future required-check support without a workflow edit") never
   materialized, and meanwhile every recent merge-queue eval (#2091,
   #2092, #2093, #2094, #2095, #2097) generated a red `Sweep CF
   orphans (merge_group)` run.

   Drop the trigger. Comment in the workflow explains the re-add path
   if/when the workflow IS wired as a required check (re-add the
   trigger AND gate the actual sweep step with
   `if: github.event_name != 'merge_group'` so merge-queue evals are
   no-op success).

2) The `Verify required secrets present` step exits 2 when the 6
   secrets aren't configured yet (the PR body's post-merge step,
   still pending). That turns the hourly schedule into an hourly red
   CI run for as long as the secrets stay unset.

   Convert to a soft skip: emit a `::warning::` listing the missing
   secrets and set a `skip=true` step output, then gate the sweep
   step with `if: steps.verify.outputs.skip != 'true'`. Workflow
   reports green and ops still sees the warning when they review
   recent runs.

Net effect:
- merge-queue evals stop generating spurious red runs
- the schedule reports green-with-warning until secrets land
- once secrets land, behavior is identical to today's (real sweep
  runs, hard-fails if a secret is later removed)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@HongmingWang-Rabbit
HongmingWang-Rabbit added this pull request to the merge queue Apr 26, 2026
Merged via the queue into staging with commit 7c8be5c Apr 26, 2026
14 checks passed
@molecule-ai
molecule-ai Bot deleted the fix/sweep-cf-orphans-noise branch May 20, 2026 06:22
HongmingWang-Rabbit pushed a commit that referenced this pull request Jun 12, 2026
…e SSOT' (#2098) from feat/minimax-m3-sync into main
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