Add sfw aggregator gate to enforce required CI checks#89
Merged
Conversation
Add a single sfw-gate job (if: always(), needs the conditional inspect + free/enterprise smoke + workflow-notice jobs) that fails only when an upstream job failed or was cancelled -- success and skipped both pass. This is the check intended to become the required status check on main: the smoke jobs are conditional (deps-changed gates them, and exactly one of free/enterprise runs per PR), so none can be required directly -- a required check whose job is if-skipped is never created and blocks merge forever. The gate is green when no deps change and is satisfied by whichever smoke path actually ran. NOT yet wired into branch protection -- added during a soak period so the check is visible before it becomes blocking, and so requiring it doesn't strand other open PRs. Pattern adapted from SocketDev/socket-python-cli #224. Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
|
🚀 Preview package published! Install with: pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple socketdev==3.2.1.dev2 |
sfw aggregator gate to enforce required CI checks
Eric Hibbs (flowstate)
approved these changes
Jun 3, 2026
Review feedback: 'iff' read as a typo. It is the logic shorthand for 'if and only if', but the comment exists to communicate, so spell it out. Signed-off-by: lelia <2418071+lelia@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a single
sfw-gatejob todependency-review.yml— the check intended to eventually become the required status check onmain— and bumps the package version3.2.0→3.2.1.Also already done out-of-band: the
socket-firewallGitHub Environment'srequired_reviewersprotection rule was removed (it was self-approvable withprevent_self_review: falseand bypassable since it was never a required check). The environment is retained for narrow secret scoping purposes.Why
The Socket Firewall smoke jobs are conditional —
python_deps_changedgates them, and exactly one ofpython-sfw-smoke-free/python-sfw-smoke-enterpriseruns per PR (free for Dependabot/forks, enterprise for trusted maintainers). So neither can be marked required directly: a required status check whose job is skipped via a job-levelif:is never created, sits at "Expected — Waiting for status to be reported" forever, and permanently blocks merge. That would hit every Dependabot/fork PR and every PR that doesn't touch deps.The aggregator gate solves this:
if: always(),needs:the conditional jobs (inspect, both smoke jobs,workflow-notice)${{ toJSON(needs) }}and fails iff any result isfailureorcancelled—successandskippedboth passNot blocking yet (intentional)
This PR does not touch branch-protection required checks. The gate is added during a soak period so the check is visible and familiar before it becomes blocking — and per the sequencing rule, the gate must exist on
mainbefore it can be required, or requiring it would strand every other open PR on the same trap. Flipping it to required is a follow-up, after comms + sign-off.Pattern source
Adapted from SocketDev/socket-python-cli #224. The bypass-job pattern (#224's Pattern 1) is not needed here — the SDK has no e2e matrix, and the free/enterprise split is already mutually-exclusive-and-exhaustive at the job level.