November 20, 2026
2 pull requests merged across 1 repo
bahdotsh/wrkflw
Polish before 0.9.0, from the pre-release review.
What's in it
wrkflw doctor checks, without starting or pulling anything: which engine auto picks (and warns when Docker is down and Podman quietly takes over), the engine VM's memory, whether a first run pulls the published runner base or builds here, where a GitHub token comes from (never the token itself), git, and the workflows in the directory. --format json gives the same checks, documented in AGENTS.md. It exits 1 only when a check fails.
--macos-on-host (WRKFLW_MACOS_ON_HOST=1) runs macos-* jobs, and the macOS legs of a matrix, on the Mac under emulation while the other jobs keep their containers. Their pass then checks macOS instead of being reported unverified. It's off by default because those steps run with no container around them. How it works:
- The switch is made per job and per matrix leg, using the env emulation would seed, held in a task-local scoped around each job batch (
host_jobs.rs). - A host leg is never folded into a container leg as a twin, and no image is built ahead for it.
- The hint in
run/gatenow names this flag instead of--runtime emulation.
compare: token hint. When a job fails and its output shows gh asking for a token, or a 401, the note says the step needed the token GitHub gives every job, and that WRKFLW_JOB_GITHUB_TOKEN=1 gives it yours. This is the itoa attestation case.
Held-out sweep. scripts/conformance/held_out_runs.txt lists 14 repositories no wrkflw change was made against: markupsafe, requests, httpx, hyperfine, fd, express, execa, urfave/cli, memchr, chi, lib/pq, go-sql-driver/mysql, django-redis and anyhow. They cover services, wide OS matrices, a known failure and a schedule run. Each run list now keeps its own <name>_expected.tsv, so recording one sweep can't overwrite the other's.
Prebuilt installs.
cargo binstallmetadata matching the release archives.scripts/install.sh, which checks the download againstSHA256SUMSand refuses an unverified one unlessWRKFLW_NO_VERIFY=1is set.- A release step that writes
SHA256SUMS.
README and demo.
- The README now opens with the claim, the agreement table and a quick start (doctor, gate, install-hook), and adds a "Check every push before it leaves" recipe and the new install paths.
demo.taperecords doctor, a caught failure with its digest, the fix, apartialpass naming the macOS job, and averifiedpass with--macos-on-host, all on the newexamples/gate-demo. The GIF is 0.7 MB (was 6.5 MB).
Items 3 from the review (setup-go ranges, pairing a called workflow's jobs in compare) turned out to be fixed already in #173/#174, so there's nothing for them here.
Testing
cargo test --workspace: 1,999 passed and 2 failed on the first run. Both failures were expected-text changes from this PR: the itoa-shaped compare test now also gets the token note, and the gate test checks the reworded hint. After updating them, the CLI crate's 143 tests and the executor's 1,067 unit tests pass.cargo fmt --checkandcargo clippy --workspace --all-targets -D warningsare clean.- By hand on a Mac with Docker: in a mixed matrix (
ubuntu-latest,macos-15) with--macos-on-host, the Linux leg ran in a container (uname=Linux), the macOS leg ran on the host (RUNNER_OS=macOS,uname=Darwin), and the verdict wasverified. Without the flag the verdict waspartial. scripts/install.shinstalled v0.8.0. Because v0.8.0 has noSHA256SUMS, it refused by default and installed withWRKFLW_NO_VERIFY=1. The checksum path itself is first exercised by this release.
Before tagging
- Run the held-out sweep and record its expectations; I didn't run third-party CI here:
WRKFLW_SWEEP_RECORD=1 scripts/conformance/compare_sweep.sh scripts/conformance/held_out_runs.txt target/release/wrkflw
Its numbers belong in the README and the release post, which make no claim about it yet.
- Consider re-recording the demo after the release. In this recording, doctor warns that the runner base image couldn't be pulled, because it isn't published until the release runs.
Closes the gaps left before the next release, so that a local pass stands for GitHub's on more real workflows and a first run is faster. One commit per item.
What changes
1. JavaScript actions run (fd16db9)
An action with runs.using: node12|16|20|24, remote or local, used to pass without running and made the run partial. It now runs as GitHub's runner runs it: node <main> through the run: path, so in the job's container as the runner user, with INPUT_<NAME> from with: or the input's evaluated default (hyphens kept) and GITHUB_ACTION_PATH/_REPOSITORY/_REF set. pre runs first when pre-if holds. post runs at the end of the job, last action first, when post-if holds (always() by default), and reads what main saved through $GITHUB_STATE or ::save-state as STATE_<name>. A remote action is cloned once per run. An image with no node leaves the action unrun and the step unverified. Setup and Rust toolchain actions keep wrkflw's own versions. WRKFLW_JS_ACTIONS=0 restores the old behaviour.
2. Private repositories for remote uses: (f2d7dbe)
Every clone is tried anonymously first. For github.com it is then retried with a token: the job's GITHUB_TOKEN from a secret provider, else GITHUB_TOKEN/GH_TOKEN, else gh auth token, found once per run. The token reaches git as an http.extraheader through GIT_CONFIG_* env vars, so it never appears in the URL, argv or .git/config. GIT_TERMINAL_PROMPT=0 makes a missing token fail instead of hang.
3. Prebuilt runner base image (9114711)
The packages, runner tools, Node.js, GitHub CLI and runner user (about 75 s of every cold build) are published as ghcr.io/bahdotsh/wrkflw-runner:<hash of docker/runner.Dockerfile>. A test keeps docker/runner.Dockerfile and docker/runner-image.txt in step with the code, and the runner_dockerfile example rewrites them. The release workflow's new runner-image job builds amd64 and arm64 and pushes unless the tag exists.
- When it's used: a built-in image on
ubuntu:latestwith no Node.js to set up, on Docker or Podman. Kubernetes and jobs that set up Node.js still build the whole image here. - How it's pulled: a
FROM-only build, which gets a build's 10-minute limit rather than a pull's 30 s. - What's added on top: the job's runtimes; on Linux, a layer giving
runnerthe host's uid; and aRUNnaming the week for floating versions. - Fallback: if the base can't be pulled, the image is built here as before, and the pull isn't tried again for a day when the registry refused it, or for an hour when it couldn't be reached.
- Opt-outs:
WRKFLW_PREBUILT_IMAGES=0always builds here, andWRKFLW_RUNNER_IMAGEnames another base.
4. Windows/macOS stand-ins (79c481c)
gate used to print one sentence for both causes of partial. A child run in text mode now hands its unverified entries to the gate through WRKFLW_GATE_UNVERIFIED_FILE, and the gate prints one line per cause, naming the jobs and actions. On a Mac running containers, gate and run add that --runtime emulation runs a macos-* job on the Mac itself. compare now counts a macOS job that ran as Linux and agreed under unverified_agreements; only Windows jobs were treated as stand-ins before.
5. Evidence (a4ce879)
compare's report carries the local duration_ms. The sweep adds local_s and github_s (the GitHub run from start to last update). The README gains a "How close to GitHub" table with the recorded agreement counts.
6. Docs (7d43e1a)
BREAKING_CHANGES.md covers JavaScript actions running and the runner-user default from #174, which it was missing. The README covers each change, and RELEASE_POST_0.9.0.md is the release announcement.
Verified
cargo fmt --check,cargo clippy --workspace --all-targets -D warnings, andcargo test --workspaceon the final tree: 1950 passed, 0 failed. The full run found a stack overflow inreusable_workflow_jobs_skip_after_failed_need. Bisecting traced it to the JavaScript action commit: its inlined futures grew every step's future, and called workflows nest those. Fixed inc92984aby boxing them.- JavaScript actions:
actions/github-script@v7ran in a scratch repo with the release build. It ran on Node 22 in the job container, itscore.setOutputreached the next step, and the verdict wasverified.- New CLI test under emulation (inputs, defaults, outputs, env, state, post) and a Docker test (runs as
runner,$GITHUB_ENVreaches the next step, post reads state) both pass. - Private repos: a header-only clone of a private repo (with git's credential helper turned off) succeeded and left nothing in
.git/config. - Runner base:
- Building its layers with
--no-cachetakes 74 s. - A Python 3.13 job on the base, pulled from a local registry, finished in 11 s end to end:
runneruser,gh, Node 22 andsudoall present. - On the base, the uid 1000 layer gives
runneruid 1000 and leaves no files owned by 1001; npm and writes to/usr/local/binwork asrunner. - Gate: a scratch repo with a Windows and a macOS job prints the split lines and the emulation hint.
Before merging or releasing
- Run the sweep: done on this branch (
cad6166). All nine runs agree exactly as recorded, so running JavaScript actions moved no verdict. The README table has warm times, andcompare_expected.tsvgains itsunverifiedcolumn (every unverified agreement is a macOS job run as Linux). - Make the image public: after the first release tag pushes
ghcr.io/bahdotsh/wrkflw-runner, set the package to public in its GitHub settings. GHCR creates new packages as private, and anonymous pulls fail until then (wrkflw falls back to building locally). - Pull time: a real pull from ghcr.io wasn't measured, since the test used a local registry.
Review fixes
e583361ci(release): pinactions/checkoutby commit in the jobs that push packages, pass the release tag to the refresh script throughenv:, and havepublish/releasewait forrunner-image.caebda4refactor(executor): passJobServiceswhole instead of rebuilding it; one parser for default-on switches.edd15f9fix(executor): the uid remap builds as its own image, and a failed remap falls back to a local build instead of failing the job. Only a registry's refusal marks the base unavailable (a local "permission denied" no longer does). The README now says the weekly rebuild serves first pulls only, and how to refresh.bcb3a00fix(executor): each step runs a composite or JavaScript action from its own copy of the run's clone (no.git, as GitHub's tarball). The token header is appended after the user's ownGIT_CONFIG_*entries. A 404 retry no longer blames only the token.82df49ffix(executor): a JavaScript action's post is queued beforemain, so a timed-outmainstill gets its post. A post is withdrawn whennodeis missing. The step warns when the image's Node is older thanruns.usingasks for.db0ee43test(executor): run the Node-warning test's shell half on Unix only.
Known and out of scope: the emulation runtime waits on its child with a blocking std::process call inside an async fn, so step timeouts never fire under emulation (run: steps too). That predates this PR.