[AUTO-INF-5] Coverage job missing dependencies on test jobs — reports coverage even when tests fail #10330

Open
opened 2026-04-18 08:48:17 +00:00 by HAL9000 · 0 comments
Owner

Metadata

  • Commit message: fix(ci): add test job dependencies to coverage job in ci.yml
  • Branch name: fix/auto-inf-5-coverage-missing-test-deps

Background and Context

In .forgejo/workflows/ci.yml, the coverage job has needs: [lint, typecheck, security, quality] but is missing dependencies on unit_tests, integration_tests, and e2e_tests. This means coverage reports can be generated even when test suites fail.

Current state in ci.yml:

coverage:
    needs: [lint, typecheck, security, quality]
    runs-on: docker
    # Missing: unit_tests, integration_tests, e2e_tests

This creates a quality gate gap:

  • If unit_tests fails, coverage is still reported (but based on incomplete test execution)
  • If integration_tests fails, coverage is still reported
  • If e2e_tests fails, coverage is still reported
  • Coverage metrics may be misleading if tests don't complete successfully
  • The coverage threshold check (currently 50%, should be 97%) is not meaningful if tests fail

Expected Behavior

The coverage job should only run after all test jobs have passed successfully:

coverage:
    needs: [lint, typecheck, security, quality, unit_tests, integration_tests, e2e_tests]
    runs-on: docker
    # ... existing steps unchanged

This ensures:

  • Coverage is only reported when all tests pass
  • Coverage metrics are meaningful and based on complete test execution
  • The quality gate chain is complete and unbroken
  • Coverage threshold enforcement is meaningful

Acceptance Criteria

  • The coverage job in .forgejo/workflows/ci.yml has needs: [lint, typecheck, security, quality, unit_tests, integration_tests, e2e_tests]
  • A CI run where unit_tests fails causes coverage to be skipped/not started
  • A CI run where integration_tests fails causes coverage to be skipped/not started
  • A CI run where e2e_tests fails causes coverage to be skipped/not started
  • No circular dependencies are introduced in the job graph
  • The status-check aggregator job still correctly aggregates all job results
  • All existing CI jobs continue to function correctly after the dependency update

Subtasks

  • Audit .forgejo/workflows/ci.yml for the coverage job definition
  • Add unit_tests, integration_tests, and e2e_tests to the needs list
  • Verify the updated dependency graph does not create circular dependencies
  • Confirm status-check still correctly depends on coverage
  • Test the fix by triggering a CI run with a deliberate test failure to confirm coverage is skipped

Definition of Done

This issue should be closed when:

  1. The coverage job has all test jobs in its needs declaration in .forgejo/workflows/ci.yml
  2. A failing test job provably prevents coverage from starting
  3. The fix is merged to the main branch via a PR that passes all required CI checks
  4. No regression in the CI pipeline's ability to detect and report failures

Duplicate Check

Check Query / Source Result
Check 1 Open issues searched for coverage job, coverage needs, coverage dependencies No existing issue specifically addresses coverage job missing test dependencies
Check 2 Closed issues searched for same keywords No matches found
Check 3 Cross-area: #10240 "build and helm CI jobs have no needs dependencies" Covers build and helm jobs only — does NOT mention coverage job
Check 4 Cross-area: #10067 "Add missing job dependencies in CI pipeline" Does not mention coverage job
Check 5 Cross-area: #9783 "Reduce CI execution time" Does not specifically address coverage job test dependencies

Conclusion: No duplicate found. This is a genuinely new, specific, actionable finding.


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

## Metadata - **Commit message:** `fix(ci): add test job dependencies to coverage job in ci.yml` - **Branch name:** `fix/auto-inf-5-coverage-missing-test-deps` ## Background and Context In `.forgejo/workflows/ci.yml`, the `coverage` job has `needs: [lint, typecheck, security, quality]` but is missing dependencies on `unit_tests`, `integration_tests`, and `e2e_tests`. This means coverage reports can be generated even when test suites fail. **Current state in ci.yml:** ```yaml coverage: needs: [lint, typecheck, security, quality] runs-on: docker # Missing: unit_tests, integration_tests, e2e_tests ``` This creates a quality gate gap: - If `unit_tests` fails, coverage is still reported (but based on incomplete test execution) - If `integration_tests` fails, coverage is still reported - If `e2e_tests` fails, coverage is still reported - Coverage metrics may be misleading if tests don't complete successfully - The coverage threshold check (currently 50%, should be 97%) is not meaningful if tests fail ## Expected Behavior The `coverage` job should only run after all test jobs have passed successfully: ```yaml coverage: needs: [lint, typecheck, security, quality, unit_tests, integration_tests, e2e_tests] runs-on: docker # ... existing steps unchanged ``` This ensures: - Coverage is only reported when all tests pass - Coverage metrics are meaningful and based on complete test execution - The quality gate chain is complete and unbroken - Coverage threshold enforcement is meaningful ## Acceptance Criteria - [ ] The `coverage` job in `.forgejo/workflows/ci.yml` has `needs: [lint, typecheck, security, quality, unit_tests, integration_tests, e2e_tests]` - [ ] A CI run where `unit_tests` fails causes `coverage` to be skipped/not started - [ ] A CI run where `integration_tests` fails causes `coverage` to be skipped/not started - [ ] A CI run where `e2e_tests` fails causes `coverage` to be skipped/not started - [ ] No circular dependencies are introduced in the job graph - [ ] The `status-check` aggregator job still correctly aggregates all job results - [ ] All existing CI jobs continue to function correctly after the dependency update ## Subtasks - [ ] Audit `.forgejo/workflows/ci.yml` for the `coverage` job definition - [ ] Add `unit_tests`, `integration_tests`, and `e2e_tests` to the `needs` list - [ ] Verify the updated dependency graph does not create circular dependencies - [ ] Confirm `status-check` still correctly depends on `coverage` - [ ] Test the fix by triggering a CI run with a deliberate test failure to confirm `coverage` is skipped ## Definition of Done This issue should be closed when: 1. The `coverage` job has all test jobs in its `needs` declaration in `.forgejo/workflows/ci.yml` 2. A failing test job provably prevents `coverage` from starting 3. The fix is merged to the main branch via a PR that passes all required CI checks 4. No regression in the CI pipeline's ability to detect and report failures ### Duplicate Check | Check | Query / Source | Result | |-------|---------------|--------| | Check 1 | Open issues searched for `coverage job`, `coverage needs`, `coverage dependencies` | No existing issue specifically addresses `coverage` job missing test dependencies | | Check 2 | Closed issues searched for same keywords | No matches found | | Check 3 | Cross-area: #10240 "build and helm CI jobs have no needs dependencies" | Covers `build` and `helm` jobs only — does NOT mention `coverage` job | | Check 4 | Cross-area: #10067 "Add missing job dependencies in CI pipeline" | Does not mention `coverage` job | | Check 5 | Cross-area: #9783 "Reduce CI execution time" | Does not specifically address `coverage` job test dependencies | **Conclusion:** No duplicate found. This is a genuinely new, specific, actionable finding. --- **Automated by CleverAgents Bot** Supervisor: Test Infra 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#10330
No description provided.