fix(ci): repair the lint job, make the test job actually run tests#76
Merged
Conversation
Follow-up polish on the P2/P3 test-improvement work (#62) that landed in ffe76d8 and 1c22370: - Spelling: "behaviour" -> "behavior" in CLI help, doc comments, and the README, matching the en-us locale declared in _typos.toml. - Clippy idioms: map(..).unwrap_or(false) -> is_ok_and, map(to_string) -> map(clone) on an owned String. - rustfmt over the test files touched by the P3 work. - _typos.toml: recognize the HTML comment form of the spellchecker:off/on fence, and exclude the generated CHANGELOG.md. - hk.pkl: drop the redundant --config flag from the typos step; typos already discovers _typos.toml from the workspace indicator. Refs #62 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XocU6NjgZricrRWMLyLXDn
CI has been red on main, and the green jobs were not testing anything.
**lint** died before running a single step: hk.pkl targets the hk v1.2.0
pkl schema while the workflow installs hk 1.48, which fails to evaluate it
("field not found: staticcheck"). Retarget hk.pkl at the 1.48 schema and
pin mise.toml to hk 1.48 so local and CI agree — the drift is what let this
break unnoticed. The 1.48 schema also rejects the `.toMap().filter()
.toMapping()` expression in the `test` hook, so select the step directly.
The workflow's fallback, `hk check || cd ../ && hk check`, parses as
`(hk check || cd ../) && hk check`: the second invocation always ran, in the
parent directory when the first failed. Replaced with a single
`hk check --all --skip-step cargo_test` — `--all` because hk defaults to
changed files, which on a fresh CI checkout leaves most steps with nothing
to do, and `--skip-step` because the test job now owns running the suite.
**Test Suite** checked out the repo, installed Rust, warmed three caches,
and stopped — there was no test step, so it reported success across all
three toolchains while running zero tests. Added cargo-nextest, a git
identity for the integration harness, and the actual run. beta/nightly are
marked continue-on-error so an upstream toolchain regression reports
without gating merges.
**Security Audit** was failing on live advisories, and once lint could run,
cargo-deny surfaced the same ones. Two fixes by upgrade: anyhow 1.0.102 ->
1.0.104 (RUSTSEC-2026-0190) and crossbeam-epoch 0.9.18 -> 0.9.20
(RUSTSEC-2026-0204). The two aws-lc-sys advisories are unreachable by
upgrade — aws-lc-rs pins aws-lc-sys exactly and it arrives transitively
through gix's curl-rustls transport — so they are ignored in deny.toml with
the reasoning and the upstream blocker recorded, and mirrored into the
audit-check ignore list.
Also repaired the cargo_deny step itself, which could not have passed: it
still passed --exclude-dev to the `check` subcommand (now a top-level flag)
and piped `-f json` output through `jq -e '.[].vulnerabilities | length ==
0'`, but cargo-deny streams one object per diagnostic rather than an array,
so jq exited 5 every run. It now gates on cargo-deny's own exit code,
allowing the informational classes to preserve the original intent of
failing on vulnerabilities only.
Verified locally: `hk check --all --skip-step cargo_test` passes end to end
under hk 1.48, `cargo audit` reports no vulnerabilities, and the full suite
is 569/569.
Refs #62
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XocU6NjgZricrRWMLyLXDn
Codecov Report❌ Patch coverage is
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
…nt failures With the config finally loading, the lint job got far enough to reveal that mise installs the Rust toolchain without optional components, so cargo_fmt and cargo_clippy had no binary to call. Add them explicitly. Also pass --no-fail-fast so a run reports every lint problem at once. The previous run aborted the remaining six steps the instant cargo_fmt failed, which made an aborted cargo_deny look like a second, independent failure. Refs #62 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XocU6NjgZricrRWMLyLXDn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
CI has been red on
main, and the jobs that were green weren't testing anything.lintnever ran a step.hk.pkltargets the hk v1.2.0 pkl schema while the workflow installs hk 1.48, which can't evaluate it (Eval error: field not found: staticcheck). Everything downstream — fmt, clippy, typos, cargo-deny — has been silently skipped.Test Suitereported success on stable, beta, and nightly while running zero tests. It checked out the repo, installed Rust, warmed three caches, and stopped. There was no test step.Security Auditwas failing on live advisories.This is the same class of problem #62 is about — a check that narrates success without performing it — one layer up, in the harness.
What changed
hk / lint
hk.pklat the hk 1.48 pkl schema; pinmise.tomltohk = "1.48"so local and CI agree. Thelatest-vs-pinned drift is what let this break unnoticed. Verified both hk 1.41.1 and 1.48 accept the new schema..toMap().filter(...).toMapping()in thetesthook (unknown method 'filter' on Object); select the step directly instead.hk check || cd ../ && hk check— which parses as(hk check || cd ../) && hk check, so the second invocation always ran, in the parent directory when the first failed — withhk check --all --skip-step cargo_test.--allbecause hk defaults to changed files, which on a fresh CI checkout leaves most steps with nothing to do;--skip-stepbecause the test job now owns the suite.typos: excludeCHANGELOG.mdat the step level. It's generated by git-cliff and abbreviated commit hashes trip the spellchecker;_typos.toml'sextend-excludecan't help because it only applies when typos walks a directory, and hk passes explicit file paths.Test Suite
cargo nextest run --all-features --no-fail-fast.continue-on-errorso an upstream toolchain regression is visible without gating merges.cargo-deny / advisories
cargo_denystep could not have passed even with a loadable config: it passed--exclude-devto thechecksubcommand (it's been a top-level flag since 0.18) and piped-f jsonthroughjq -e '.[].vulnerabilities | length == 0', but cargo-deny streams one object per diagnostic rather than an array, so jq exited 5 every run. It now gates on cargo-deny's own exit code with the informational classes allowed, preserving the original intent of failing on vulnerabilities only.anyhow1.0.102 → 1.0.104 (RUSTSEC-2026-0190, unsoundError::downcast_mut) andcrossbeam-epoch0.9.18 → 0.9.20 (RUSTSEC-2026-0204).aws-lc-rspinsaws-lc-sysexactly, and it arrives transitively viagix[blocking-http-transport-curl-rustls] → curl-sys → rustls-ffi → rustls → aws-lc-rs. Added todeny.toml's ignore list with the reasoning and the upstream blocker recorded, mirrored into theaudit-checkignore list. Worth revisiting: switching gix toblocking-http-transport-curldrops rustls and aws-lc-sys entirely (TLS would come from OpenSSL, whichgit2/libgit2-sysalready links), but that changes the TLS backend and would complicate musl builds, so it's left as a deliberate follow-up.First commit (
58613a6) is the polish that was sitting uncommitted in the working tree from the P2/P3 work:behaviour→behaviorper the declared en-us locale, two clippy idioms, and rustfmt over the test files.Verification
hk check --all --skip-step cargo_testpasses end to end under hk 1.48 locally (pkl, typos, cargo_fmt, cargo_deny, cargo_check, cargo_clippy all green).cargo auditwith the ignore list reports no vulnerabilities.Refs #62 — see #62 (comment) for the audit of what that issue still has open.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XocU6NjgZricrRWMLyLXDn