Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
b65d4b4
ci: open the spm checksum pin as a pull request
nullPointerEnjoyer Nov 13, 2026
c38a09f
ci: make the spm checksum pin pr idempotent and spoof-proof
nullPointerEnjoyer Nov 13, 2026
8548ce5
ci: verify the pin, checksum the linter, test the script
nullPointerEnjoyer Nov 13, 2026
5262365
ci: verify both pin substitutions and harden the pr guard
nullPointerEnjoyer Nov 13, 2026
c360033
ci: rebuild the manifest and validate inputs in the script
nullPointerEnjoyer Nov 13, 2026
532a0f1
ci: handle merged pins and strip the release job token
nullPointerEnjoyer Nov 13, 2026
9e8f002
ci: publish the release before opening the pin pr
nullPointerEnjoyer Nov 13, 2026
f3150d9
ci: guard the rewind path and lint every repo script
nullPointerEnjoyer Nov 13, 2026
c00bebf
ci: semver the rewind guard and make releases re-runnable
nullPointerEnjoyer Nov 13, 2026
b9c3a2e
ci: serialize releases and harden one-sided pin states
nullPointerEnjoyer Nov 13, 2026
9019953
ci: semver the rewind compare and guard release clobbering
nullPointerEnjoyer Nov 13, 2026
c54a85c
ci: testable clobber guard and full semver precedence
nullPointerEnjoyer Nov 13, 2026
2cb7c99
ci: shellcheck-quiet the fixture printf escapes
nullPointerEnjoyer Nov 13, 2026
7769016
ci: fail closed on decoys, overflow, and missing state
nullPointerEnjoyer Nov 13, 2026
b8e35d1
ci: anchored pin verification and merge-time pin ordering
nullPointerEnjoyer Nov 13, 2026
9ed804d
ci: one semver source, annotation-safe pin-order gate
nullPointerEnjoyer Nov 13, 2026
cbf0397
ci: shared pin helpers, block-comment strip, latest flag
nullPointerEnjoyer Nov 13, 2026
5622bb2
ci: indent-tolerant pin verification across the pipeline
nullPointerEnjoyer Nov 13, 2026
23dabe4
ci: shellcheck-quiet the pin-order fixture escapes
nullPointerEnjoyer Nov 13, 2026
9d049e9
ci: shared pin counting, supersede stale pins, gate hardening
nullPointerEnjoyer Nov 13, 2026
1ec0964
ci: shellcheck-quiet the swift interpolation fixture
nullPointerEnjoyer Nov 13, 2026
3a1d9d1
ci: fix supersede jq empty-array row and stub parity
nullPointerEnjoyer Nov 13, 2026
440fa32
ci: fix supersede jq scoping and list-failure handling
nullPointerEnjoyer Nov 13, 2026
5d6d734
ci: aligned pin-state model and decoy-proof extraction
nullPointerEnjoyer Nov 13, 2026
8cc6eea
ci: push-trigger pin-order gate and regex parity check
nullPointerEnjoyer Nov 13, 2026
d44553d
ci: trusted-base gate checkout and namespace push trigger
nullPointerEnjoyer Nov 13, 2026
67203c5
ci: fix stale case comment
nullPointerEnjoyer Nov 13, 2026
3e6412a
ci: pin setup node to a real release commit
nullPointerEnjoyer Nov 13, 2026
0401bac
ci: fetch the pr head for the pin gate and refresh guard origin
nullPointerEnjoyer Nov 13, 2026
7d3cb2d
ci: fail the pin diff closed and test the ref read path
nullPointerEnjoyer Nov 13, 2026
1081c41
ci: gate every package swift edit and verify the pinned release
nullPointerEnjoyer Nov 13, 2026
ceefb15
ci: test the pin gate as a script and order checks by applicability
nullPointerEnjoyer Nov 13, 2026
e427602
ci: keep the pin gate reachable and harden the release staging
nullPointerEnjoyer Nov 14, 2026
6607c4a
ci: tolerate the legacy pin branch and correct release finality
nullPointerEnjoyer Nov 14, 2026
5f65a5f
ci: align gate wording with the trigger surface
nullPointerEnjoyer Nov 14, 2026
8189700
ci: guard the deactivated pin compare and test both supersede paths
nullPointerEnjoyer Nov 14, 2026
96789b5
ci: escape the staged tag annotation and cover deactivated refusals
nullPointerEnjoyer Nov 14, 2026
ab24861
ci: cover base pin states and the gate push path
nullPointerEnjoyer Nov 14, 2026
317c277
ci: refuse broken-prefix base pins and scope release finality
nullPointerEnjoyer Nov 14, 2026
bc24c00
ci: make the pin gate refuse every mangled base shape
nullPointerEnjoyer Nov 14, 2026
0c1aef2
ci: correct the pin count rationale in the gate
nullPointerEnjoyer Nov 14, 2026
b9b43f4
ci: recheck open pin prs after the release branch push
nullPointerEnjoyer Nov 14, 2026
a617829
ci: document trigger assumptions and pin state preflight
nullPointerEnjoyer Nov 14, 2026
c9bb324
ci: align release base checks with the merge gate
nullPointerEnjoyer Nov 14, 2026
0a32ba4
ci: use whole line anchors in the release base counts
nullPointerEnjoyer Nov 14, 2026
83c812e
ci: exercise the guard against real deactivated states
nullPointerEnjoyer Nov 14, 2026
5fe4eb3
ci: sharpen pin diagnostics and document trigger assumptions
nullPointerEnjoyer Nov 14, 2026
33391f1
ci: anchor base checksum shapes across the release scripts
nullPointerEnjoyer Nov 14, 2026
fa68175
ci: triage mangled base checksums at the counts guard
nullPointerEnjoyer Nov 14, 2026
f483929
ci: one canonical branch input validation for release scripts
nullPointerEnjoyer Nov 14, 2026
104a96d
ci: cover the gate base version validation
nullPointerEnjoyer Nov 14, 2026
33a2670
ci: check pin diff applicability without a pipe
nullPointerEnjoyer Nov 14, 2026
bfc3a3a
ci: skip the pin gate on its own bootstrap pr
nullPointerEnjoyer Nov 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 80 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: CI

# Workflow triggers cannot use expressions: these branch filters
# hardcode "main" as the default branch. The gate and the release
# scripts derive the default branch dynamically, but a default-branch
# RENAME must also update these two filter lines or PR-side gating
# silently stops running.
on:
push:
branches: [main]
paths-ignore: [".github/**"]
branches: [main, 'pin-spm-checksum-**']
Comment thread
nullPointerEnjoyer marked this conversation as resolved.
Resolved
pull_request:
branches: [main]
Comment thread
nullPointerEnjoyer marked this conversation as resolved.
Resolved
paths-ignore: [".github/**"]

# The crate jobs never need more than read access.
permissions:
Expand All @@ -16,12 +19,66 @@ env:
CARGO_TERM_COLOR: always

jobs:
# Merge-time pin-order enforcement: a checksum-pin PR must not
# downgrade the release pinned on the default branch. Runs on PRs
# touching Package.swift; branch protection can require it.
pin-order:
name: Pin ordering
# Covers human-opened pin PRs (pull_request) and manual/re-run pushes
# to the reserved namespace (push). Bot pin PRs opened with
# GITHUB_TOKEN do not emit either event; they are enforced at
# creation time by the release workflow's rewind guard, which also
# supersedes older open pin PRs.
Comment thread
nullPointerEnjoyer marked this conversation as resolved.
Resolved
if: github.event_name == 'pull_request' || startsWith(github.ref, 'refs/heads/pin-spm-checksum-')
Comment thread
nullPointerEnjoyer marked this conversation as resolved.
Resolved
runs-on: ubuntu-latest
timeout-minutes: 15
Comment thread
nullPointerEnjoyer marked this conversation as resolved.
Resolved
env:
LC_ALL: C
steps:
# On pull_request events the gate code and the current pin state
# come from the trusted base branch; PR content is only ever read
# as data. On push events the pushed branch's code runs, which is
# ordinary branch-CI privilege (read-only, no secrets) under the
# documented force-push risk of the reserved namespace.
Comment thread
nullPointerEnjoyer marked this conversation as resolved.
Resolved
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
ref: ${{ github.event_name == 'pull_request' && github.base_ref || github.ref }}
Comment thread
nullPointerEnjoyer marked this conversation as resolved.
Resolved
fetch-depth: 0
persist-credentials: false
- name: Refuse a downgrading pin
Comment thread
nullPointerEnjoyer marked this conversation as resolved.
Resolved
env:
EVENT_NAME: ${{ github.event_name }}
PR_NUMBER: ${{ github.event.pull_request.number }}
Comment thread
nullPointerEnjoyer marked this conversation as resolved.
Resolved
BASE_REF: ${{ github.event_name == 'pull_request' && github.base_ref || github.event.repository.default_branch }}
HEAD_REF: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }}
HEAD_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
Comment thread
nullPointerEnjoyer marked this conversation as resolved.
Resolved
GH_TOKEN: ${{ github.token }}
Comment thread
nullPointerEnjoyer marked this conversation as resolved.
Resolved
run: |
Comment thread
nullPointerEnjoyer marked this conversation as resolved.
Resolved
# Diff-gated applicability, checksum-to-release binding, and
# ordering enforcement all live in one tested script (the
# stub harness covers it); reserved-namespace heads get
# strict tag equality, every other Package.swift edit gets
# ordering-only enforcement.
#
# Bootstrap: the script ships with the PR that introduces the
# gate, so the trusted-base checkout cannot contain it until
# that PR lands. Absence on the base is impossible post-merge
# (deleting the script from main would itself be a reviewed
# change), so this branch only ever fires for the bootstrap.
if [ ! -f scripts/release/pin-order-gate.sh ]; then
echo "::warning::pin-order gate not present on the base branch (bootstrap PR); enforcement begins once the gate PR merges"
exit 0
fi
scripts/release/pin-order-gate.sh
Comment thread
nullPointerEnjoyer marked this conversation as resolved.
Resolved

fmt:
name: Format
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
# Pinned to the MSRV so rustfmt matches the version clippy/test use.
- uses: dtolnay/rust-toolchain@ffaa7fb73f2b6e3c49bc425913220fa3d71c3ee5 # 1.92.0
with:
Expand All @@ -37,7 +94,9 @@ jobs:
matrix:
features: ["--no-default-features", "--no-default-features --features node", "--no-default-features --features indexer", "--no-default-features --features wallet", "--no-default-features --features crypto", "--all-features"]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@ffaa7fb73f2b6e3c49bc425913220fa3d71c3ee5 # 1.92.0
with:
components: clippy
Expand All @@ -55,7 +114,9 @@ jobs:
matrix:
features: ["--no-default-features", "--no-default-features --features node", "--no-default-features --features indexer", "--no-default-features --features wallet", "--no-default-features --features crypto", "--all-features"]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@ffaa7fb73f2b6e3c49bc425913220fa3d71c3ee5 # 1.92.0
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
with:
Expand All @@ -80,7 +141,9 @@ jobs:
# mintlayer-core git checkouts (same reason mintlayer-core's own
# build.yml does this).
run: echo "CARGO_HOME=C:\crg" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@ffaa7fb73f2b6e3c49bc425913220fa3d71c3ee5 # 1.92.0
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
with:
Expand All @@ -93,7 +156,9 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@ffaa7fb73f2b6e3c49bc425913220fa3d71c3ee5 # 1.92.0
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
- run: cargo doc --all-features --locked --no-deps
Expand All @@ -107,10 +172,12 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@ffaa7fb73f2b6e3c49bc425913220fa3d71c3ee5 # 1.92.0
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2
- uses: actions/setup-node@v4
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: 20
cache: npm
Expand All @@ -127,5 +194,7 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- run: ./scripts/check-license.sh
42 changes: 42 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Lint workflows and scripts

# Like ci.yml, these branch filters hardcode "main"; workflow triggers
# cannot use expressions, so a default-branch rename must update them.
on:
push:
branches: [main]
paths: [".github/workflows/**", "scripts/**"]
pull_request:
branches: [main]
paths: [".github/workflows/**", "scripts/**"]
Comment thread
nullPointerEnjoyer marked this conversation as resolved.
Resolved

permissions:
contents: read

jobs:
lint:
name: actionlint + shellcheck
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
# The job downloads and runs a third-party binary; keep the
# token off disk like the release build jobs do.
persist-credentials: false
- name: shellcheck repo scripts
run: git ls-files -z 'scripts/*.sh' | xargs -0 shellcheck
Comment thread
nullPointerEnjoyer marked this conversation as resolved.
Resolved
Comment thread
nullPointerEnjoyer marked this conversation as resolved.
Resolved
- name: actionlint
env:
# SHA-256 of actionlint_1.7.7_linux_amd64.tar.gz, cross-checked
# against the release's actionlint_1.7.7_checksums.txt.
ACTIONLINT_SHA256: "023070a287cd8cccd71515fedc843f1985bf96c436b7effaecce67290e7e0757"
run: |
curl --proto '=https' --tlsv1.2 -fsSL -o actionlint.tar.gz \
https://github.com/rhysd/actionlint/releases/download/v1.7.7/actionlint_1.7.7_linux_amd64.tar.gz
echo "${ACTIONLINT_SHA256} actionlint.tar.gz" | sha256sum --check --strict
tar xzf actionlint.tar.gz actionlint
./actionlint
rm -f actionlint actionlint.tar.gz
- name: Unit-test the release scripts
run: scripts/release/test-open-spm-pr.sh
Loading
Loading