Skip to content

ci(blacksmith): add blacksmith-testbox workflow for codex-rs#407

Merged
andrei-hasna merged 3 commits into
mainfrom
chore/blacksmith-testbox-workflow
Jul 24, 2026
Merged

ci(blacksmith): add blacksmith-testbox workflow for codex-rs#407
andrei-hasna merged 3 commits into
mainfrom
chore/blacksmith-testbox-workflow

Conversation

@andrei-hasna

@andrei-hasna andrei-hasna commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds .github/workflows/blacksmith-testbox.yml so Blacksmith Testboxes can be warmed for this repo.

Today blacksmith testbox warmup fails on codewith with "does not contain a testbox step" — no workflow here declares the useblacksmith/*-testbox actions. This adds one, modelled on the working pattern in hasnastudio/platform-alumia-legacy-3.

What it does

  • workflow_dispatch with a testbox_id input (how warmup attaches to the run)
  • useblacksmith/checkoutuseblacksmith/begin-testbox → setup → useblacksmith/run-testbox last (holds the box open)
  • blacksmith-16vcpu-ubuntu-2404 (60 GB) — codex-rs needs the RAM/disk
  • Pinned Rust 1.95.0 toolchain matching rust-ci.yml, plus just + cargo-nextest
  • Persists the toolchain env to ~/.bashrc / ~/.profile / /usr/local/bin — testbox login shells do not inherit job env, so without this cargo/just are not on PATH
  • Prefetches the cargo registry and optionally pre-cargo checks the workspace, so an attached box is usable immediately instead of cold-compiling for 10+ minutes

Verification

  • YAML parses; 1 job (light-checks-testbox), 9 steps, runs-on: blacksmith-16vcpu-ubuntu-2404
  • Action SHAs copied verbatim from the known-good alumia workflow; dtolnay/rust-toolchain + taiki-e/install-action SHAs copied from this repo's rust-ci.yml
  • Secrets scan on the staged diff: 0 findings
  • Not yet executed end-to-end: warming a box requires the Blacksmith app on the hasna org and an API token scoped to that org (current CLI token is hasnastudio-bound). Once both exist:
    blacksmith testbox warmup .github/workflows/blacksmith-testbox.yml --job light-checks-testbox --idle-timeout 30
    blacksmith testbox run --id <id> "just clippy"

Notes

  • Workflow-only change; no product code, no effect on existing CI (dispatch-only trigger).
  • just check-fast / just test-fast-target referenced in some older docs do not exist in this repo's justfile — the real recipes are just clippy, just test, just fmt-check.

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

andrei-hasna and others added 3 commits July 24, 2026 20:45
Adds .github/workflows/blacksmith-testbox.yml so `blacksmith testbox warmup`
can dispatch a warm Blacksmith box for this repo.

Mirrors the working pattern from hasnastudio/platform-alumia-legacy-3:
workflow_dispatch with a testbox_id input, useblacksmith/checkout ->
useblacksmith/begin-testbox -> setup -> useblacksmith/run-testbox last.

Rust-specific: 16 vCPU / 60 GB runner, pinned 1.95.0 toolchain matching
rust-ci.yml, just + cargo-nextest preinstalled, and the toolchain env
persisted to ~/.bashrc / ~/.profile / /usr/local/bin so testbox login
shells (which do not inherit job env) can run cargo/just directly.
Registry is prefetched and the workspace optionally pre-checked so an
attached box is usable immediately instead of cold-compiling.

Usage:
  blacksmith testbox warmup .github/workflows/blacksmith-testbox.yml \
    --job light-checks-testbox --idle-timeout 30
  blacksmith testbox run --id <id> "just clippy"
Run the prime/fetch/check steps from `codex-rs` so rustup picks up the
repo's rust-toolchain.toml override (rustup resolves overrides from the
current directory, not from --manifest-path). Warming from the repo root
used the bootstrap toolchain, so every testbox command — which runs under
codex-rs — would have recompiled the workspace anyway.

Also drop the job-level `RUSTFLAGS: -D warnings`: it is not part of the
persisted testbox env, so it changed the cargo fingerprint between the
warm-up build and an interactive shell (another full rebuild), and repo
CI does not set it either.
`rustup show active-toolchain` does not install a missing toolchain on
rustup >= 1.28, so probe rustc/cargo first — the proxies install the
version named by codex-rs/rust-toolchain.toml, which is the same path
rust-ci.yml already depends on.
@andrei-hasna
andrei-hasna merged commit e83aeac into main Jul 24, 2026
24 checks passed
@andrei-hasna
andrei-hasna deleted the chore/blacksmith-testbox-workflow branch July 24, 2026 18:29
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant