microsoft / microsoft/hve-core

feat: add pr-validation-success aggregator job and gate-completeness validator

Open
#2,218 0 comments 0 reactions 0 assignees View on GitHub
feature infrastructure needs-triage
Dominant language
Python
Stars
1.5k
Forks
301
Avg merge
3d 3h
Merged PRs (30d)
92

Description

## Summary

Add the `pr-validation-success` aggregator job and gate-completeness validator to enforce that all CI jobs block merges.

Broken out from parent issue #2214.

## Changes

- Add `pr-validation-success` aggregator job to `.github/workflows/pr-validation.yml` with `if: always()` depending on every non-gate job. The job fails when any required job fails, is cancelled, or is skipped, giving branch protection a single stable status context (`PR Validation / PR Validation Success`) to require.
- Add `scripts/security/Test-PrValidationGate.ps1` gate-completeness validator, wired as `npm run lint:pr-gate` and included in `lint:all`. Fails CI when a new job is added to `pr-validation.yml` without being wired into the aggregator's `needs:`.

## Acceptance Criteria

- [ ] `pr-validation-success` job exists in `pr-validation.yml` with `if: always()` and depends on all non-gate jobs.
- [ ] `npm run lint:pr-gate` exits 0 on a correctly configured workflow and non-zero when a job is missing from `needs:`.
- [ ] `Test-PrValidationGate.Tests.ps1` passes all tests against complete, missing-job, and stale-needs fixtures.
- [ ] A maintainer adds `PR Validation / PR Validation Success` to the branch-protection ruleset to make the gate enforcing.
Related to #2214

> Generated by [Issue Triage](https://github.com/microsoft/hve-core/actions/runs/28314978133) for issue #2214 · 79.7 AIC · ⌖ 13.1 AIC · ⊞ 28.5K · [◷](https://github.com/search?q=repo%3Amicrosoft%2Fhve-core+is%3Aissue+%22gh-aw-workflow-call-id%3A+microsoft%2Fhve-core%2Fissue-triage%22&type=issues)

Contributor guide

Open the contributing guide

Research direction

Start with .github/workflows/pr-validation.yml to inventory the non-gate jobs and the proposed aggregator, then read scripts/security/Test-PrValidationGate.ps1 and Test-PrValidationGate.Tests.ps1. Run the validator and its tests against the complete, missing-job, and stale-needs fixtures; done means the workflow is fully gated and the validator detects configuration drift.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, powershell
Domain
ci-cd, devops, testing-qa
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.