Latest stable (1.98.0, released 2026-08-18). The pin lives in more places than
is obvious, and missing one means CI silently builds an older compiler than the
dev box:
- rust-toolchain.toml at the repo root
- eoc/eoc-rs/rust-toolchain.toml, a second toolchain file
- five CI workflows that hardcode a version instead of deferring to the file
(wai-conformance, wai-neural-e2e, wai-byte-equality,
joule-code-conformance, jouleclaw-public-surface-documented)
standards-build.yml needed no change, because it reads the toolchain file
rather than pinning inline. That is the pattern the other five should adopt.
MSRV raised to 1.98 across 26 manifests, following the earlier decision to have
the declared floor track the pin rather than drift behind it. Note this is a
support-policy change, not a mechanical one: it narrows which compilers can
consume these standards as libraries.
The pin stays exact, never `stable` — a pin that drifts is not a pin.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
71 lines
2.9 KiB
YAML
71 lines
2.9 KiB
YAML
name: jouleclaw public surface must stay documented
|
|
|
|
# Regression-prevention gate for jouleclaw-rs. The brownfield
|
|
# onramp (`cargo run -p jouleclaw-brownfield --example
|
|
# scan_self`) walks every crate, infers reasons for every
|
|
# public function (docs / name pattern / error-handling
|
|
# signal), and reports those whose best-available reason is
|
|
# Lost. After the 219 → 0 curation pass that closed the
|
|
# initial baseline, every new `pub fn` is expected to ship
|
|
# with the same minimal `///` doc, OR be downgraded to
|
|
# `pub(crate)` if it isn't part of the consumer-visible
|
|
# surface. The `--fail-on-lost` flag exits non-zero when any
|
|
# public-surface Lost reason remains, so this workflow is a
|
|
# permanent safety net against drift.
|
|
|
|
on:
|
|
# Manual re-run, so a transient runner/setup failure (which surfaces as a red
|
|
# "audit" even though the audit itself never ran) can be retried without a
|
|
# code change.
|
|
workflow_dispatch:
|
|
pull_request:
|
|
paths:
|
|
- 'jouleclaw/jouleclaw-rs/**'
|
|
- '.github/workflows/jouleclaw-public-surface-documented.yml'
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'jouleclaw/jouleclaw-rs/**'
|
|
- '.github/workflows/jouleclaw-public-surface-documented.yml'
|
|
|
|
jobs:
|
|
scan:
|
|
name: Public-surface audit (jouleclaw-rs)
|
|
runs-on: linux
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
# Bootstrap rustup: the docker runner image ships no Rust, and
|
|
# dtolnay/rust-toolchain cannot help — it calls `rustup`, which is absent.
|
|
- name: Install Rust 1.98.0
|
|
run: |
|
|
export PATH="$HOME/.cargo/bin:$PATH"
|
|
command -v rustup >/dev/null 2>&1 || \
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain 1.98.0
|
|
rustup toolchain install 1.98.0 --profile minimal
|
|
rustup default 1.98.0
|
|
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
|
|
|
- name: Cache cargo registry + target
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
jouleclaw/jouleclaw-rs/target
|
|
key: ${{ runner.os }}-cargo-brownfield-${{ hashFiles('jouleclaw/jouleclaw-rs/Cargo.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-cargo-brownfield-
|
|
|
|
- name: Run brownfield self-scan with --fail-on-lost
|
|
working-directory: jouleclaw/jouleclaw-rs
|
|
run: |
|
|
set -euo pipefail
|
|
if ! cargo run -q -p jouleclaw-brownfield --example scan_self -- --fail-on-lost; then
|
|
echo "::error::Public-surface Lost > 0 — jouleclaw-rs has undocumented public functions."
|
|
echo "::error::Fix by adding a `///` doc comment above each flagged `pub fn`, OR by downgrading to `pub(crate)` if it isn't consumer-visible."
|
|
echo "::error::Run locally with: cargo run -p jouleclaw-brownfield --example scan_self"
|
|
exit 1
|
|
fi
|