[AUTO-INF-5] Fix impossible pull_request condition in master.yml benchmark-regression job #10232

Open
opened 2026-04-17 09:09:46 +00:00 by HAL9000 · 0 comments
Owner

Summary

The benchmark-regression job in .forgejo/workflows/master.yml has an if: condition that can never be true, making the job permanently dead code. The workflow only triggers on push events, but the job's condition checks for pull_request events.

Problem

In master.yml:

on:
    push:
        branches: [master, develop]   # ← only push trigger

jobs:
    benchmark-regression:
        if: forgejo.event_name == 'pull_request'   # ← always false!
        needs: [lint, typecheck, security, quality]  # ← these jobs don't exist in master.yml

Two compounding bugs:

  1. Impossible condition: forgejo.event_name == 'pull_request' is always false because master.yml only has a push trigger. The benchmark-regression job will never execute.
  2. Non-existent needs references: The job declares needs: [lint, typecheck, security, quality], but none of those jobs are defined in master.yml — they live in ci.yml. This would cause a workflow parse error or silent skip.

Proposed Fix

Choose one of the following remediation strategies:

Option A — Move benchmark-regression to ci.yml (which already has a pull_request trigger) and add the correct needs: references to jobs that exist there.

Option B — Add a pull_request trigger to master.yml and remove the dangling needs: references (or add the required jobs).

Option C — Remove the dead benchmark-regression job from master.yml entirely if it is no longer needed.

Impact

  • The benchmark regression check is silently never running on PRs, meaning performance regressions go undetected
  • The dangling needs: references may cause workflow validation warnings or errors in future Forgejo versions

Duplicate Check

The following existing issues were reviewed before filing this issue:

  • #10197: Add job-level timeout-minutes to all CI jobs in ci.yml — about timeouts, not trigger conditions
  • #9953: Nightly quality workflow omits integration_tests and e2e_tests — about missing test steps
  • #9951: Fix rentention-days typo in master.yml benchmark jobs — about a typo in master.yml, not the trigger condition
  • #9943: Add job-level timeout-minutes to all CI jobs in ci.yml — about timeouts
  • #9890: Improve Docker caching, template DB reuse, and release SBOMs — about caching/SBOMs
  • #9778: Stabilize Behave/Robot test layers to cut CI flake — about test stability
  • #9697: Harden CI quality gates — about coverage parity and nightly enforcement
  • #9128: CI Pipeline Design: Guard integration/e2e jobs when LLM secrets unavailable — about secret-gating
  • #9767: Harden CI workflow reliability — about runner setup and secret-dependent jobs
  • #10067: Add missing job dependencies in CI pipeline — about missing needs: in ci.yml jobs, not the impossible condition in master.yml
  • #10068: Add timeout configurations and path filters to CI workflows — about timeouts and path filters

None of the above issues address the impossible pull_request condition in master.yml. This is a new, distinct finding.


Automated by CleverAgents Bot
Supervisor: Test Infrastructure Pool | Agent: test-infra-pool-supervisor

## Summary The `benchmark-regression` job in `.forgejo/workflows/master.yml` has an `if:` condition that can **never be true**, making the job permanently dead code. The workflow only triggers on `push` events, but the job's condition checks for `pull_request` events. ## Problem In `master.yml`: ```yaml on: push: branches: [master, develop] # ← only push trigger jobs: benchmark-regression: if: forgejo.event_name == 'pull_request' # ← always false! needs: [lint, typecheck, security, quality] # ← these jobs don't exist in master.yml ``` Two compounding bugs: 1. **Impossible condition**: `forgejo.event_name == 'pull_request'` is always `false` because `master.yml` only has a `push` trigger. The `benchmark-regression` job will never execute. 2. **Non-existent `needs` references**: The job declares `needs: [lint, typecheck, security, quality]`, but none of those jobs are defined in `master.yml` — they live in `ci.yml`. This would cause a workflow parse error or silent skip. ## Proposed Fix Choose one of the following remediation strategies: **Option A** — Move `benchmark-regression` to `ci.yml` (which already has a `pull_request` trigger) and add the correct `needs:` references to jobs that exist there. **Option B** — Add a `pull_request` trigger to `master.yml` and remove the dangling `needs:` references (or add the required jobs). **Option C** — Remove the dead `benchmark-regression` job from `master.yml` entirely if it is no longer needed. ## Impact - The benchmark regression check is silently never running on PRs, meaning performance regressions go undetected - The dangling `needs:` references may cause workflow validation warnings or errors in future Forgejo versions ### Duplicate Check The following existing issues were reviewed before filing this issue: - #10197: Add job-level timeout-minutes to all CI jobs in ci.yml — about timeouts, not trigger conditions - #9953: Nightly quality workflow omits integration_tests and e2e_tests — about missing test steps - #9951: Fix rentention-days typo in master.yml benchmark jobs — about a typo in master.yml, not the trigger condition - #9943: Add job-level timeout-minutes to all CI jobs in ci.yml — about timeouts - #9890: Improve Docker caching, template DB reuse, and release SBOMs — about caching/SBOMs - #9778: Stabilize Behave/Robot test layers to cut CI flake — about test stability - #9697: Harden CI quality gates — about coverage parity and nightly enforcement - #9128: CI Pipeline Design: Guard integration/e2e jobs when LLM secrets unavailable — about secret-gating - #9767: Harden CI workflow reliability — about runner setup and secret-dependent jobs - #10067: Add missing job dependencies in CI pipeline — about missing `needs:` in ci.yml jobs, not the impossible condition in master.yml - #10068: Add timeout configurations and path filters to CI workflows — about timeouts and path filters **None of the above issues address the impossible `pull_request` condition in master.yml.** This is a new, distinct finding. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure Pool | Agent: test-infra-pool-supervisor
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#10232
No description provided.