Skip to content

ci: terminal 'all legs green' aggregate per platform — the branch-protection gate - #19

Merged
ronaldtse merged 2 commits into
mainfrom
ci/verify-gate
Sep 14, 2026
Merged

ronaldtse merged 2 commits into
mainfrom
ci/verify-gate

Conversation

@ronaldtse

@ronaldtse ronaldtse commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

What

Adds a terminal verify job ("all legs green") to _build-platform.yml, after the build matrix. Each platform caller surfaces it as a stable check name: windows / all legs green, linux-gnu / all legs green, linux-musl / all legs green, macos / all legs green.

Why

The build legs are a dynamic matrix — their check names shift with every catalog version bump, so branch protection cannot pin them. Without required checks, a PR with auto-merge armed merges the moment it is mergeable, while the build matrix is still running (observed on the v0.2.0 release PR). The aggregate gives protection one stable name per platform; green requires the contract/matrix computation plus every emitted leg. Audit-mode runs (publish.yml) skip it.

After merge

Enable branch protection on main requiring the four … / all legs green checks plus the lint job, so armed auto-merge waits for real green.

Also in this PR

A fix for the host-dependent signer spec that landed red on main: the "names the detected host id" example dropped TEBAKO_PKG_HOST_ID (so the signer detects the runner's host) while the canned tool listing ships the linux-gnu-x86_64 asset — on linux runners the gate finds its tool and never raises. The example now passes an empty tool listing, making the detection-path raise host-independent (bundle exec rspec: 20 examples, 0 failures).

Comment on lines +379 to +396
name: all legs green
needs: [compute, build]
if: ${{ always() && !cancelled() && !inputs.audit }}
runs-on: ubuntu-latest
steps:
- name: Gate on the legs
run: |
set -euo pipefail
echo "compute: ${{ needs.compute.result }} (run=${{ needs.compute.outputs.run }}, legs=${{ needs.compute.outputs.leg_count }})"
echo "build: ${{ needs.build.result }}"
if [ "${{ needs.compute.result }}" != "success" ]; then
echo "::error::the contract/matrix computation failed"
exit 1
fi
if [ "${{ needs.compute.outputs.run }}" = "true" ] && [ "${{ needs.build.result }}" != "success" ]; then
echo "::error::not every ${{ inputs.platform }} leg succeeded: ${{ needs.build.result }}"
exit 1
fi
…tool listing

The example drops TEBAKO_PKG_HOST_ID so the signer detects the runner's
host, but the canned tool listing ships the linux-gnu-x86_64 tebako-pkg
asset: on a linux runner the gate FINDS its tool and never raises. The
example now passes an empty listing, so the detection path raises with
the runner's own host id on every platform.
@ronaldtse
ronaldtse merged commit 90856fb into main Sep 14, 2026
46 checks passed
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.

3 participants