Skip to content

ci: format / lint / test gates + tool pins#264

Closed
watwea-nominal wants to merge 5 commits into
mainfrom
awatwe/port-htp-ci-rigor-20260520
Closed

ci: format / lint / test gates + tool pins#264
watwea-nominal wants to merge 5 commits into
mainfrom
awatwe/port-htp-ci-rigor-20260520

Conversation

@watwea-nominal
Copy link
Copy Markdown

@watwea-nominal watwea-nominal commented May 20, 2026

Summary

Adds the format / lint / test CI gates that this crate didn't have, modeled on patterns already in use elsewhere in the org.

  • clippy.toml, taplo.toml, rust-toolchain.toml — pin tool versions and behavior.
  • scripts/{tooling,fmt,lint,test}.sh — local + CI use the same pinned tools.
  • .github/workflows/ci.yml — replaces the prior single build-and-test-rust.yml with parallel format / lint / test jobs feeding a build-gate.
  • Composite actions for sccache and pinned-tool caching.
  • rust.just gains wrappers so just rust::lint matches CI.

Follow-on adjustments to make the new pipeline green

  • taplo fmt reformatted top-level TOMLs (no semantic change).
  • cargo machete flagged derive_more / openssl / once_cell / tracing-subscriber as currently unused; intentionally retained (link-time deps + staged for upcoming work), added to per-crate package.metadata.cargo-machete.ignored.

Deferred

clippy.toml includes a commented-out disallowed-methods rule (no unwrap / expect on non-test code). The crate carries ~100 such call sites today; a dedicated cleanup PR will replace those with ? error handling and then uncomment the rule.

Intentionally not added

  • WASM build job (no WASM target here).
  • Release-binary matrix (this is a library + python bindings, not a CLI).

Test plan

  • bash scripts/fmt.sh --check clean
  • bash scripts/lint.sh clean
  • bash scripts/test.sh clean (15 unit tests + 2 doctests)

…chain)

Adds the per-tool configuration files that pin tool versions and behavior
to match the rigor used in a sibling Rust workspace:

- rust-toolchain.toml pins the stable channel for cargo invocations
- taplo.toml drives deterministic TOML formatting / linting
- clippy.toml is staged with the the sibling repo disallowed-methods rule commented
  out as a TODO; current source contains ~100 unwrap/expect call sites
  that need a dedicated cleanup PR before that rule can be enforced.
Ports the script-based gates that a sibling Rust workspace uses:

- scripts/tooling.sh: pinned tool versions (nightly toolchain, taplo,
  cargo-machete) and helpers (ensure_*, check_ascii_files) so CI and
  local runs use the same versions.
- scripts/fmt.sh: nightly rustfmt + taplo fmt + non-ASCII char check
- scripts/lint.sh: cargo clippy --all-targets --all-features -D warnings
  + taplo lint + cargo machete (the sibling repo's check-assert-messages step is
  omitted; it's an sibling-repo-internal crate).
- scripts/test.sh: cargo test --all --all-features (with optional
  --release passthrough).
Replaces the prior single-job rust workflow with a multi-job CI that
mirrors a sibling Rust workspace' rigor:

- format job: runs scripts/fmt.sh --check
- lint job:   runs scripts/lint.sh (clippy -D warnings + taplo + machete)
- test job:   runs scripts/test.sh
- build-gate: fan-in that fails if any upstream job failed/skipped

Also brings over the composite actions for sccache (setup-rust-cache)
and cargo tool caching (cache-cargo-tools). Uses ubuntu-latest runners
since depot runners are not configured in this repo. WASM + release-
binary jobs from the sibling repo are intentionally omitted; nominal-streaming is a
library crate plus python bindings.
Three small follow-on changes required to make the new ci.yml green
locally:

- taplo fmt reformats top-level TOML files (Cargo.toml, pyproject.toml,
  release-plz.toml, and the py-nominal-streaming variants). Pure
  reformat; no semantic change.
- cargo-machete flags derive_more (nominal-streaming) and openssl,
  once_cell, tracing-subscriber (py-nominal-streaming) as unused.
  These are intentionally retained (vendored link-time deps and crates
  staged for upcoming work), so they're added to the per-crate
  package.metadata.cargo-machete.ignored lists.
- rust.just gains lint/fmt wrappers and rewires check/fix/test to call
  the new scripts so `just rust::lint` etc. work locally.
@watwea-nominal watwea-nominal marked this pull request as draft May 20, 2026 18:15
@watwea-nominal watwea-nominal force-pushed the awatwe/port-htp-ci-rigor-20260520 branch from a3005f9 to ceaf6bb Compare May 20, 2026 20:46
@watwea-nominal watwea-nominal changed the title ci: port HTP-style format/lint/test rigor to nominal-streaming ci: format / lint / test gates + tool pins May 20, 2026
@watwea-nominal watwea-nominal deleted the awatwe/port-htp-ci-rigor-20260520 branch May 20, 2026 20:47
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.

1 participant