Skip to content

Enable CI, disable CD - #1099

Merged
palinatolmach merged 15 commits into
runtimeverification:masterfrom
yiyi-wang-rv:enable-ci-disable-cd
Nov 12, 2026
Merged

palinatolmach merged 15 commits into
runtimeverification:masterfrom
yiyi-wang-rv:enable-ci-disable-cd

Conversation

@yiyi-wang-rv

@yiyi-wang-rv yiyi-wang-rv commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Why

CI on this repository should run without any repository secrets, and CD is removed. This
does for mir-semantics what runtimeverification/k#4974, runtimeverification/llvm-backend#1223
and runtimeverification/haskell-backend#4166 did.

It supersedes #1094 and keeps its commits. #1094 removed CD and every secret, but its
self-hosted jobs failed in Set up Docker with exit code 125. The commit on top fixes that
and adds the same hardening as the other repositories.

What changes

From #1094: CD and every secret removed

  • release.yml, p-token-release.yml and master-push.yml: the release pipeline (version bump,
    GitHub releases, Docker Hub images, Cachix).
  • update-dependencies.yml: dependency-bump automation.
  • test-cachix-pin.yml and .github/scripts/check-cachix-pin.sh.
  • JENKINS_GITHUB_PAT removed from the checkouts. The only submodule, stable-mir-json, is public.
  • cachix-action removed from the Nix Tests job.
  • Actions bumped to their latest releases.

Self-hosted jobs on rootless Podman

  • The CI image's base is now fully qualified, as docker.io/runtimeverificationinc/kframework-k.
    Rootless Podman refuses the short name when no unqualified-search registry is configured, and
    that was the exit code 125 in Restore CI, Disable CD #1094.
  • with-docker no longer overrides USER. USER is exported, and rootless Podman looks up the
    runner user's subordinate UIDs by $USER. With USER=github-user it found none and fell back to
    a single mapping, where only root exists in the container. The image build then failed at its
    first apt-get. The container user is now CONTAINER_USER.
  • The checkout is copied with docker cp ./. instead of docker cp .. On the runners' Podman,
    a bare . landed in a subdirectory, and make found no Makefile. K and llvm-backend use ./..
  • Each job and matrix entry gets its own container name. All six Integration Tests entries
    used mir-semantics-ci-<sha>, so two of them on one runner removed each other's container.
  • Containers are cleaned up reliably. Each container is force-removed before it starts and torn
    down with docker rm -f || true. A container left over from a canceled run of the same commit
    no longer blocks the next run.
  • Nix Tests no longer runs install-nix-action on the self-hosted runners, which already have
    Nix. On those runners it only printed Aborting: Nix is already installed.

Hardening

  • permissions: contents: read on every workflow, and persist-credentials: false on every
    checkout.

    • In test-stable-mir-ui.yml this also covers the rust-lang/rust checkout. Before, it was copied
      into the container with the token still in its git config.
  • Every action is pinned to the commit SHA of its latest release: checkout v7.0.1, setup-uv v10.3.3,
    install-nix-action v31.11.3, setup-buildx-action v4.4.1, build-push-action v7.4.0,
    upload-artifact v7.0.2, zizmor-action v0.8.1.

  • No ${{ }} expressions are left in run: blocks. They go through env: instead.

  • New lint-workflows.yml and .github/zizmor.yml, identical to K's:

    • actionlint: pinned to 1.7.12, with the download's checksum verified.
    • zizmor: reports findings as annotations and fails the check.

    Neither is a required check yet.

Fixes

  • smir-parse-tests ran no tests in CI. It looked for the tests under $(PWD), which
    docker exec does not set, so Integration with stable-mir-json passed without parsing anything.
    It now uses $(CURDIR), and fails if it finds no tests. Its 35 tests pass.
  • Test Kmir Image appended its summary to a file literally named GITHUB_STEP_SUMMARY. Its job
    outputs are gone too, since only the release pipeline used them.
  • test-stable-mir-ui.yml copied the rust-lang/rust checkout into the container twice: once with
    the workspace, and again into rust/rust. Runs of the same commit, which share a container name,
    no longer overlap.
  • nix/README.md no longer says CI uploads to the binary cache.

Tested

CI on this PR passed: all 14 checks, including all 8 self-hosted jobs. The Docker jobs ran on
github-runner-01, -02 and -03.

  • The integration test suites all pass:
    • LLVM Concrete Tests: 60 passed
    • Haskell Exec SMIR: 40 passed
    • Haskell Termination: 20 passed
    • Haskell Proofs: 106 passed
    • Verify Rust Std: 16 passed
    • Remainder: 129 passed, 7 skipped
  • Unit Tests: 40 passed.
  • Integration with stable-mir-json parses all 35 smir-parse-tests programs, instead of none.
  • Nix Tests (normal) and Nix Tests (MacM1) pass on the runners' own Nix, with no Cachix step.
  • Every job's GITHUB_TOKEN was read-only (Contents: read). No job used a secret, and no token
    value appears in any log.

Notes for reviewers

  • Releases stop. Merging to master no longer bumps the version, tags, publishes a GitHub
    release, pushes runtimeverificationinc/kmir to Docker Hub, or pushes to Cachix.
    package/version.sh is kept for manual use.
  • The CI images are frozen at K 7.1.337. .github/workflows/Dockerfile and Dockerfile.kmir
    build FROM runtimeverificationinc/kframework-k:ubuntu-jammy-<deps/k_release>. Only K's release
    pipeline published that image, and that pipeline is gone, so bumping deps/k_release past 7.1.337
    will break Set up Docker and Test Kmir Image until the image is published some other way.
  • Nix Tests (normal) relies on the runner's own Nix configuration for the k-framework cache.
    The workflow cannot add it: the runner user is not a trusted Nix user, so cachix use was already
    refused there. If the job times out, the runner admins can add
    extra-substituters = https://k-framework.cachix.org and its public key to /etc/nix/nix.conf.
    It is a public cache, so no token is needed.
  • The only token CI still uses is the automatic, per-run GITHUB_TOKEN, read-only.
  • PR code runs on persistent self-hosted runners. zizmor's auditor persona flags those jobs; that
    is by design. Keep "require approval" for outside contributors on.
  • Required checks: all 12 required checks on master keep their names.

Follow-ups

  • Decide what replaces release/CD: version bump, tags, GitHub releases, Docker images, Cachix.
  • Publish kframework-k images somewhere other than K's removed release pipeline, or build the CI
    image from a public base plus the K release .deb.
  • Dependency bumps (K, stable-mir-json, uv, rust toolchain) are manual for now.

🤖 Generated with Claude Code

ehildenb and others added 15 commits July 27, 2026 16:24
Upgrade all actions/checkout uses from v4 to v6 (Node 24 runtime, fixed
tag/fetch-tags handling, credentials persisted to a separate file). No
behavioral change for our usage; prerequisite for dropping the explicit
JENKINS_GITHUB_PAT from read-only checkout steps.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…PAT from checkout

These checkout steps only read the repo and its (public) stable-mir-json
submodule, so the automatic GITHUB_TOKEN suffices. Removing the explicit
token: line falls back to that default token, eliminating the PAT from
these read-only jobs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
v7 is the current major. Its only breaking change tightens the default for
pull_request_target / workflow_run (no longer checks out fork-PR head code
unless allow-unsafe-pr-checkout is set) — a security hardening. None of our
workflows use those triggers, so behavior is unchanged, and the safer
default aligns with the CI-secret-hardening goal.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…tral-sh/setup-uv v6 → v9

Update setup-uv to the current major. The uv binary version installed is
still pinned via deps/uv_release, so only the action wrapper changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…t v4 → v7

Update to the current major. v7 requires a self-hosted runner version of at
least 2.327.1; this workflow runs on the self-hosted normal runner.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ctions to latest

setup-buildx-action v3.10.0 → v4.2.0, build-push-action v6 → v7,
login-action v3.4.0 → v4.5.1. Current majors; no change to build/push args.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ions to latest

install-nix-action v31.5.1 → v31.11.0 (same major, bugfixes),
cachix-action v16 → v17.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…elease/CD pipeline

Delete the release-and-publish workflows from the public repo. These carried
all the privileged deploy secrets (DOCKERHUB_PASSWORD, CACHIX_PUBLIC_TOKEN,
CACHIX_PRIVATE_KFB_TOKEN, JENKINS_GITHUB_PAT) and pushed images / release
tags / cross-repo dispatches. CD will be reconstituted in a locked-down
private repository so that no secret is reachable from CI on the public repo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…omation

Delete the dependency-update workflow: it pushed commits back to the repo
using JENKINS_GITHUB_PAT and is not a testing workflow. Dependency automation
moves to the locked-down automation repo, keeping the public CI secret-free.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…in.sh: remove cachix-pin verification

Delete the release-artifact Cachix pin verification workflow (it carried
CACHIX_PRIVATE_KFB_TOKEN) and its now-orphaned helper script, whose only
other referencer was the removed release pipeline. This is release tooling,
not testing, and belongs with CD in the locked-down repo.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
setup-uv does not publish a floating major tag from v7 onward (v6 had one,
which is why @v6 resolved), so @v9 fails to resolve on the runner. Pin to
the full v9.0.0 tag, which exists. Verified the remaining action refs in the
kept workflows all resolve.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…cachix-action

The nix smoke-test job used cachix/cachix-action, which authenticated with a
Cachix token configured on the self-hosted runner (surfacing as the revoked
CACHIX_WEB_PRIVATE_TOKEN), keeping a secret in scope for CI. k-framework is a
public cache, so pull it as a plain anonymous substituter via extra_nix_config
(URL + public signing key) and remove the cachix-action step entirely. No
token is used, and no push is attempted.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
On top of the removal of CD and secrets:

- Set `permissions: contents: read`, pin every action to the commit SHA
  of its latest release, and set `persist-credentials: false` on every
  checkout. In test-stable-mir-ui.yml that also keeps the token out of
  the rust checkout that is copied into the container.
- Pass expressions to shell through `env:` instead of inlining them.
- Fully qualify the CI image's base, docker.io/runtimeverificationinc/
  kframework-k: rootless Podman refuses the short name (exit 125).
- Give each job and matrix entry its own container name, so that the six
  integration-test entries cannot collide on one runner, remove a
  leftover container before starting, and tear down with
  `docker rm -f || true`.
- Drop install-nix-action from the self-hosted Nix job: both runners
  have Nix installed.
- Fix the Test Kmir Image summary, which was appended to a file named
  GITHUB_STEP_SUMMARY, and drop its unused job outputs.
- smir-parse-tests: find the tests under $(CURDIR) instead of $(PWD),
  which `docker exec` does not set, so the target ran no tests in CI;
  and fail if it finds none.
- test-stable-mir-ui.yml: runs of the same commit no longer overlap, and
  the rust checkout is no longer copied into the container twice.
- Add actionlint and zizmor checks for the workflows, as in K.
- nix/README.md: CI no longer uploads to the binary cache.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The action assigned USER=github-user for the container user. USER is
exported, so docker build/run saw it too, and rootless Podman looks up
the runner user's subordinate UIDs by $USER. With no entry for
github-user it fell back to a single mapping, where only root exists in
the container, and the image build failed at its first apt-get.

Use CONTAINER_USER and friends instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the runners, `docker cp . ctr:/home/github-user/workspace` left the
workspace without a Makefile (`make: *** No rule to make target`): a bare
'.' can be copied as a subdirectory. './.' always copies the contents,
and is what K's and llvm-backend's with-docker use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@palinatolmach
palinatolmach self-requested a review November 11, 2026 17:39
@palinatolmach
palinatolmach merged commit b8dede6 into runtimeverification:master Nov 12, 2026
14 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