

Also from Kynth Studios


Also from Kynth Studios


Also from Kynth Studios
1# GitHub Actions Workflow Maintenance Guide23This document provides guidance for maintaining the GitHub Actions workflows in this repository.45## format.yml Workflow67### Overview89The `format.yml` workflow runs code formatters (Prettier, clang-format, and `cargo fmt`) on pull requests and pushes to main. It's optimized for speed by running all formatters in parallel. It also regenerates the checked-in `*.generated.rs` string maps (`bun run codegen:string-maps`) before the formatters start: everything the step leaves modified, formatting or codegen, is what the autofix.ci action at the end of the job pushes back to the PR (failing the run when it had anything to push), so nothing that produces fixes may run after it, and nothing that only verifies should run before it.1011### Key Components1213#### 1. Clang-format Script (`scripts/run-clang-format.sh`)1415- **Purpose**: Formats C++ source and header files16- **What it does**:17 - Globs C++ files via `bun scripts/glob-sources.ts cxx`18 - Finds all header files in `src/` and `packages/`19 - Excludes third-party directories (libuv, napi, deps, vendor, sqlite, etc.)20 - Requires specific clang-format version (no fallbacks)2122**Important exclusions**:2324- `src/runtime/napi/` - Node API headers (third-party)25- `src/jsc/bindings/libuv/` - libuv headers (third-party)26- `src/jsc/bindings/sqlite/` - SQLite headers (third-party)27- `src/runtime/ffi/ffi-*.h` - FFI headers (generated/third-party)28- `src/deps/` - Dependencies (third-party)29- Files in `vendor/`, `third_party/`, `generated/` directories3031#### 2. Parallel Execution3233The workflow runs all three formatters simultaneously:3435- Each formatter outputs with a prefix (`[prettier]`, `[clang-format]`, `[rustfmt]`)36- Output is streamed in real-time without blocking37- Uses GitHub Actions groups (`::group::`) for collapsible sections3839#### 3. Tool Installation4041##### Clang-format-214243- Installs ONLY `clang-format-21` package (not the entire LLVM toolchain)44- Uses `--no-install-recommends --no-install-suggests` to skip unnecessary packages45- Quiet installation with `-qq` and `-o=Dpkg::Use-Pty=0`4647##### Rustfmt4849- The pinned nightly is set via `RUSTUP_TOOLCHAIN` in the step `env:` (kept in sync with `channel` in `rust-toolchain.toml`); `cargo fmt --all` runs against the workspace at the repo root.50- `RUSTUP_TOOLCHAIN` makes rustup ignore `rust-toolchain.toml` entirely, so the workflow installs only the host toolchain + `rustfmt` (`rustup toolchain install --profile minimal --component rustfmt`) rather than the file's full cross-target list.5152### Updating the Workflow5354#### To update the Rust toolchain:55561. Bump `channel` in `rust-toolchain.toml` (and `Dockerfile`/`bootstrap.sh` to match).572. Bump `RUSTUP_TOOLCHAIN` in the `Format Code` step's `env:` block in `format.yml` to the same value.583. Bump `RUSTUP_TOOLCHAIN` in the workflow-level `env:` block in `rust-lints.yml` to the same value.594. `cargo fmt` formatting can change between nightlies; run `cargo fmt --all` locally on the new toolchain and include the resulting diff in the same PR.6061#### To update clang-format version:62631. Update `LLVM_VERSION_MAJOR` environment variable at the top of format.yml642. Update the version check in `scripts/run-clang-format.sh`6566#### To add/remove file exclusions:67681. Edit the exclusion patterns in `scripts/run-clang-format.sh` (lines 34-39)692. Test locally to ensure the right files are being formatted7071### Performance Optimizations72731. **Parallel execution**: All formatters run simultaneously742. **Minimal installations**: Only required packages, no extras753. **Streaming output**: Real-time feedback without buffering764. **Early start**: Formatting begins immediately after each tool is ready7778### Troubleshooting7980**If formatters appear to run sequentially:**8182- Check if output is being buffered (should use `sed` for line prefixing)83- Ensure background processes use `&` and proper wait commands8485**If third-party files are being formatted:**8687- Review exclusion patterns in `scripts/run-clang-format.sh`88- Check if new third-party directories were added that need exclusion8990**If clang-format installation is slow:**9192- Ensure using minimal package installation flags93- Check if apt cache needs updating94- Consider caching the clang-format binary between runs9596### Testing Changes Locally9798```bash99# Test the clang-format script100export LLVM_VERSION_MAJOR=19101./scripts/run-clang-format.sh format102103# Test with check mode (no modifications)104./scripts/run-clang-format.sh check105106# Test specific file exclusions107./scripts/run-clang-format.sh format 2>&1 | grep -E "(libuv|napi|deps)"108# Should return nothing if exclusions work correctly109```110111### Important Notes112113- The script defaults to **format** mode (modifies files)114- Always test locally before pushing workflow changes115- Keep the exclusion list updated as new third-party code is added116117## rust-lints.yml Workflow118119Four independent jobs that each run one cargo command over the Rust workspace. They share `.github/actions/rust-lint-setup`, a composite action that installs LLVM from apt.llvm.org (configure resolves a clang even though nothing here compiles C++), Bun, optionally a pinned Rust toolchain plus components, runs `bun install`, then `bun scripts/build.ts --configure-only` and the ninja targets a job asks for: `clone-lolhtml` (cargo cannot resolve the workspace until the vendored `lol_html` path dependency exists) and, for jobs that check `bun_runtime`/`bun_jsc`/`bun_core`, `codegen` (their `include!()`d sources under `build/debug/codegen`).120121| Job | Check name | Runs | Blocking |122| --------- | --------------------- | -------------------------------------------- | ------------------------------ |123| `clippy` | `cargo clippy` | `bun run rust:clippy` | yes |124| `miri` | `cargo miri test` | `bun run rust:miri` (`scripts/rust-miri.ts`) | yes |125| `lolhtml` | `lol-html cargo test` | `cargo test` in `vendor/lolhtml` | yes |126| `mordant` | `mordant` | `cargo dylint --all --workspace` | advisory (`continue-on-error`) |127128- `clippy`, `miri` and `lolhtml` pin `RUSTUP_TOOLCHAIN` at the workflow level (kept in sync with `channel` in `rust-toolchain.toml`) so rustup does not install that file's cross-target list; the action installs the toolchain with `--profile minimal` plus the components the job names (`clippy`, `miri rust-src`, none).129- `lolhtml` exists because the vendored lol-html is a fork (oven-sh/lol-html, `bun` branch) whose own test suite is the only thing guarding the fork's invariants. It used to trigger only on `scripts/build/deps/lolhtml.ts`; it now shares the workflow's wider path filter.130- `mordant` runs the [mordant](https://github.com/scarletindustries/mordant) dylint pack. It sets `RUSTUP_TOOLCHAIN: stable` instead: mordant is built with, and lints us using, the nightly named in its own rust-toolchain file, which dylint fetches on demand, so the outer cargo only needs to exist. Because that nightly is older than ours, the job passes `-A unknown_lints` through `DYLINT_RUSTFLAGS`. Two caches cover the slow parts: `~/.cargo/bin/{cargo-dylint,dylint-link}` keyed on `DYLINT_VERSION`, and `~/.dylint_drivers` + `target/dylint/libraries` keyed on `DYLINT_VERSION` plus the pinned mordant rev read out of `Cargo.toml`. It is skipped on `merge_group`.131132### mordant: pin, baseline, disabled lints133134- The pack is pinned by commit in `Cargo.toml` under `[workspace.metadata.dylint]`. A bump can also fail if this workspace stops compiling on mordant's nightly.135- `dylint.toml`'s `[mordant]` table points `baseline` at `mordant-baseline.toml` (per-(lint, file) counts of the findings that predate the job) and lists the lints this repo has switched off under `disabled`, each with its reason.136- In baseline mode mordant prints findings over the baseline as warnings and writes them to `target/mordant/over-baseline.txt` (relative to the workspace root). The job deletes that file, runs dylint, and fails if the file is non-empty; absent or empty means clean. Fixing baselined findings needs no baseline update.137- Locally, `bun run rust:mordant` is the same dylint invocation and `bun run rust:mordant:baseline` regenerates the baseline (`MORDANT_BASELINE_WRITE=1`). Both need `cargo install cargo-dylint dylint-link` once, and expect `build/debug/codegen` and `vendor/lolhtml` to exist, which any normal `bun bd` leaves behind.138139To bump mordant: change the `rev` in `Cargo.toml`, run `bun run rust:mordant`, fix what the new revision reports or regenerate `mordant-baseline.toml` with `bun run rust:mordant:baseline`, and put the triage in the PR description.140
One repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| oven-sh/bunsrc/CLAUDE.md · 95k | CLAUDE.md | setupbuildlint-formatstyle+3 | 80/100 | 8 days ago | |
| oven-sh/bunCLAUDE.md · 95k | CLAUDE.md | buildteststylearch+3 | 96/100 | 14 days ago | |
| oven-sh/bunscripts/verify-baseline-static/CLAUDE.md · 95k | CLAUDE.md | buildtesting-strategy | 65/100 | 14 days ago | |
| oven-sh/bunsrc/js/CLAUDE.md · 95k | CLAUDE.md | buildarchdo-not | 85/100 | 14 days ago | |
| oven-sh/bunsrc/jsc/bindings/v8/AGENTS.md · 95k | AGENTS.md | buildtestarchtesting-strategy+4 | 81/100 | 14 days ago | |
| oven-sh/bunsrc/jsc/bindings/v8/CLAUDE.md · 95k | CLAUDE.md | buildtestarchtesting-strategy+4 | 81/100 | 14 days ago | |
| oven-sh/buntest/CLAUDE.md · 95k | CLAUDE.md | teststyletesting-strategydo-not | 97/100 | 14 days ago | |
| oven-sh/buntest/js/node/test/parallel/CLAUDE.md · 95k | CLAUDE.md | test | 43/100 | 14 days ago |
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| bagisto/bagistoCLAUDE.md · 28k | CLAUDE.md | setupbuildteststyle+5 | 100/100 | 7 days ago | |
| Adit-Jain-srm/NightmareNetCLAUDE.md · 46 | CLAUDE.md | buildtestlint-formatstyle+6 | 100/100 | 14 days ago | |
| tyrchen/geektime-bootcamp-aiw7/genslides/backend/CLAUDE.md · 230 | CLAUDE.md | testlint-formatstylearch+6 | 100/100 | 9 days ago | |
| nimbalyst/nimbalystpackages/android/CLAUDE.md · 1.5k | CLAUDE.md | setupbuildstylearch+2 | 100/100 | 14 days ago | |
| dotCMS/corecore-web/CLAUDE.md · 949 | CLAUDE.md | teststylearchtesting-strategy+3 | 100/100 | 14 days ago | |
| microsoft/playwrightCLAUDE.md · 95k | CLAUDE.md | buildtestlint-formatstyle+7 | 100/100 | 7 days ago | |
| tphakala/birdnet-goCLAUDE.md · 1.6k | CLAUDE.md | buildtestlint-formatstyle+8 | 100/100 | today | |
| livewire/livewireCLAUDE.md · 24k | CLAUDE.md | setupbuildteststyle+4 | 100/100 | 14 days ago |
A badge carrying the measured quality of the strongest agent config file in this repository, out of 100. It reads from this index every time somebody loads your page, so it changes when the measurement changes and there is nothing to keep up to date. Free, no account, and the value is not something you or we can set by hand.
[](https://rulestack.kynth.studio/configs/oven-sh-bun-github-workflows-claude)Would rather not hotlink us? Every badge is also served in shields.io’s endpoint schema, so shields renders the image and your readers never talk to our domain:
Published by Toolproof, the masthead over this index and eight others. The method behind the number is at toolproof.kynth.studio/methodology, and the whole thing is readable as JSON with no key at /api.