Skip to content

ci: consolidate slow checks onto the nightly workflow - #2636

Merged
max-sixty merged 6 commits into
mainfrom
nightly-ideas
May 7, 2026
Merged

max-sixty merged 6 commits into
mainfrom
nightly-ideas

Conversation

@max-sixty

@max-sixty max-sixty commented May 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

Move slow / advisory CI work onto nightly.yaml and add two new nightly jobs to close release-time gaps.

Moved from ci.yaml → nightly.yaml:

  • benchmarks (full cargo bench, ~80 min) — was already advisory non-required (CLAUDE.md: "Don't wait for CI benchmarks before merging")
  • check-unused-dependencies (cargo udeps) — needs nightly toolchain, rarely flips between cargo-touching PRs

Folded in:

  • nightly-benchmark.yaml deleted; its time-series gist-append step is now the tail of the consolidated benchmarks job, gated on event_name == 'schedule' so PR/push runs don't pollute the gist

New nightly jobs:

  • release-target matrix (x86_64-unknown-linux-musl, aarch64-unknown-linux-musl, x86_64-apple-darwin) — dist-workspace.toml ships these triples but the existing test matrix doesn't cover any of them. Today the first build of those targets is at release-tag time, which blocks releases instead of PRs. Runs the integration suite at default features (no shell-integration-tests — those PTY tests read $SHELL from the runner env, which resolves differently on ubuntu-24.04-arm and would mask musl/arm signal with environment noise).
  • minimal-versions — cargo update -Z minimal-versions && cargo check. Catches under-specified Cargo.toml constraints that downstream library consumers (lib/CLI cleave is real; see feature-check) can resolve through.

Triggers:
nightly.yaml now runs on cron (existing), workflow_dispatch (existing), and on push/PR when Cargo-touching files change. Catching cargo-affecting regressions at PR time avoids a 24-hour bisect window. Cron still catches drift that's not commit-correlated (registry updates, transitive resolution).

concurrency group cancels in-flight nightly runs on PR pushes, matching ci.yaml.

This direction was anticipated by the existing TODO in ci.yaml's cargo-affected comment block: "The full suite could fold into the existing nightly workflow, which already hosts slower integration-time checks."

Bugs caught (and fixed) by the new jobs on first run

The new jobs surfaced three real gaps on their first run, all addressed in follow-up commits on this branch:

  • minimal-versions caught color-print = "0.3" resolving to 0.3.0 under minimum-version resolution, which doesn't expose ceprintln (added in 0.3.7). Bumped the floor to "0.3.7".
  • release-target caught a snapshot path-redaction gap: the add_snapshot_path_prelude_filters chain normalized target/llvm-cov-target/ and target/affected/build/ to target/ but didn't handle target/<triple>/ from cross-target builds. Added a vendor-anchored normalization (/target/[a-z0-9_]+-(?:unknown|apple|pc|wasi)-[a-z0-9_-]+/ → /target/) alongside the existing two.
  • release-target also flagged the PTY snapshot redaction in add_pty_binary_path_filters was hardcoded to target/(debug|release)/wt. Broadened the regex to allow any path segments between target/ and (debug|release)/wt — defensive in case shell-integration-tests is ever run on a cross-target.

Test plan

  • actionlint clean on both ci.yaml and nightly.yaml
  • feature-powerset runs on PR (Cargo files changed) and passes
  • release-target matrix builds and tests on all three triples
  • benchmarks runs on this PR; gist append step skips on PR/push (cron-only)
  • check-unused-dependencies and minimal-versions run successfully on nightly toolchain
  • nix-flake runs (note: the nix-flake failure on this PR is pre-existing on main — same test_current_or_recover_returns_repo_when_cwd_exists panic in the latest main nightly run; not introduced here)
  • All three required test (linux/macos/windows) checks pass
  • codecov/patch passes
  • Documentation in .claude/skills/running-tend/SKILL.md updated to reflect the moved call sites (cargo-install pin list and setup-nu locations)

🤖 Generated with Claude Code

max-sixty and others added 2 commits May 7, 2026 00:16
Moves three classes of work onto nightly.yaml and adds two new jobs:

- benchmarks (~80 min full cargo bench): moved from ci.yaml. Was already
  advisory non-required ("Don't wait for CI benchmarks before merging").
  Folds in nightly-benchmark.yaml's gist-append step (cron-only so PR/push
  runs don't pollute the time-series gist).
- check-unused-dependencies (cargo udeps): moved from ci.yaml. Needs
  nightly toolchain anyway and rarely flips between PRs touching deps.
- release-target matrix (new): builds and runs the
  --features shell-integration-tests suite on x86_64-musl, aarch64-musl,
  and x86_64-darwin. dist-workspace.toml ships these triples but the
  test matrix didn't cover them — first build was at release-tag time,
  which blocked releases instead of PRs.
- minimal-versions (new): cargo update -Z minimal-versions && cargo check
  on nightly toolchain to catch under-specified Cargo.toml constraints.

nightly.yaml now triggers on Cargo-touching PRs/pushes in addition to
cron, so cargo-affecting regressions surface at PR time instead of in a
24-hour window.

nightly-benchmark.yaml deleted (its work folded into nightly.yaml).

Co-Authored-By: Claude <[email protected]>
# Conflicts:
#	.github/workflows/nightly.yaml

@worktrunk-bot worktrunk-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One observation outside the diff — the running-tend skill at .claude/skills/running-tend/SKILL.md:215 documents the setup-nu call sites as "ci.yaml (benchmarks, code-coverage) and actions/test-setup/action.yaml". After this PR, benchmarks moves to nightly.yaml, so the line should read something like ci.yaml (code-coverage), nightly.yaml (benchmarks), and actions/test-setup/action.yaml — otherwise next weekly nu-version-bump run will look at the wrong file. Happy to push a fix commit if you'd like, or you can fold it in.

Otherwise this looks correct: the three new release-target triples line up exactly with dist-workspace.toml minus the two already covered by the test matrix (aarch64-apple-darwin via macos-15, x86_64-pc-windows-msvc via windows-2022). Workflow-level path gating cleanly replaces the per-job needs: changes pattern. The cron-only if: github.event_name == 'schedule' correctly keeps the gist pristine on PR runs.

max-sixty and others added 4 commits May 7, 2026 00:29
The release-target and minimal-versions jobs added in the previous
commit each surfaced a real gap on their first run.

PTY snapshot redaction (release-target):
  add_pty_binary_path_filters() hardcoded the cargo target dir layout
  to `target/(llvm-cov-target/|affected/build/)?(debug|release)/wt`,
  which doesn't match the cross-target layout
  `target/x86_64-unknown-linux-musl/debug/wt` produced by
  `cargo nextest run --target X`. Broaden to allow any path segments
  between `target/` and `(debug|release)/wt` — covers all four cases.

color-print minimum version (minimal-versions):
  `color-print = "0.3"` resolved to 0.3.0 under -Z minimal-versions,
  which doesn't expose `ceprintln` (added in 0.3.7) and whose paired
  proc-macro doesn't enable the `syn` features cformat! needs. Bump
  the floor to 0.3.7. Verified `cargo +nightly check --workspace
  --all-targets` clean at minimums after the bump.

Co-Authored-By: Claude <[email protected]>
…tests on cross-targets

Two follow-ups to the previous fix commit:

Broaden the "Binary invoked as:" redaction in
setup_snapshot_settings_for_paths_with_home (tests/common/mod.rs:988)
to allow path segments between target/ and (debug|release)/wt — same
shape as the PTY filter fix, just for the non-PTY snapshot chain that
config_show tests use. Caught by the x86_64-unknown-linux-musl run.

Drop --features shell-integration-tests from the release-target nightly
matrix. The PTY/shell tests behind that flag read $SHELL from the
runner env, which resolves differently on ubuntu-24.04-arm than on the
test (linux) job's ubuntu-24.04 — so they failed on aarch64-musl with
"Shell integration not yet supported for sh" instead of the snapshot's
"$SHELL not set" hint. That's environment noise on a cross-arch
runner, not target-specific signal. The remaining suite (default
features) still covers file IO, command spawning, and output rendering
on the cross triple, which is where musl-vs-glibc and intel-vs-arm
divergence actually shows up.

Also picks up cargo-fmt's single-line collapse of the PTY filter from
the previous commit (was the lint failure on the previous run).

Co-Authored-By: Claude <[email protected]>
Move the cross-target path fix to where it actually belongs:
add_snapshot_path_prelude_filters, alongside the existing
target/llvm-cov-target/ and target/affected/build/ normalizations
(`/target/X/` → `/target/`). The triple-anchored regex —
`-(unknown|apple|pc|wasi)-` — can't match unrelated subdirs.

This catches all four release-target snapshot failures rather than the
one I sampled locally:
- test_config_show_bash_matched_exe_emits_alias_hint
- test_config_show_claude_available_plugin_not_installed
- test_config_show_displays_deprecation_details
- test_config_show_displays_no_cd_deprecation

The previous attempt broadened a `Binary invoked as:` filter that —
on inspection — never matched anything in the codebase (the actual
emission is `Invoked as:`, no `Binary` prefix). The dead-code
broadening is reverted.

The PTY filter broadening from the first fix commit stays — it's a
real (PTY) chain that doesn't run through this prelude, defensive
against future shell-integration-tests-on-cross-target work.

Co-Authored-By: Claude <[email protected]>
`benchmarks` and `check-unused-dependencies` moved from ci.yaml to
nightly.yaml in this branch, so the running-tend skill's weekly
maintenance checklist now points at the wrong file for those pins.
Fix the two affected call-site lists:

- `cargo-install` blocks: add `.github/workflows/nightly.yaml` (now
  also hosts cargo-udeps).
- `setup-nu` call sites: `ci.yaml` (`code-coverage`),
  `nightly.yaml` (`benchmarks`), `actions/test-setup/action.yaml`.

Caught by worktrunk-bot review on #2636.

Co-Authored-By: Claude <[email protected]>
@worktrunk-bot

Copy link
Copy Markdown
Collaborator

CI note: the nix-flake failure on this PR is pre-existing on main — same test_current_or_recover_returns_repo_when_cwd_exists panic at src/git/recover.rs:288:54, identical to today's scheduled nightly on main (run 25479839097) and tracked by #2632. The test is unchanged between branches and this PR doesn't touch src/git/recover.rs or flake.nix. Surfaces on this PR because the new on-PR nightly trigger fires for Cargo-touching changes — which is the intended behavior. Leaving the approval in place; not merge-blocking.

@max-sixty
max-sixty merged commit 2f8807e into main May 7, 2026
33 of 34 checks passed
@max-sixty
max-sixty deleted the nightly-ideas branch May 7, 2026 16:58
worktrunk-bot added a commit that referenced this pull request Aug 23, 2026
The MSRV bump to 1.97 in this PR fails both nightly jobs that pin their own
toolchain: `rustup override set nightly-2026-03-01` resolves to
1.96.0-nightly, and cargo refuses a workspace whose `rust-version` exceeds the
toolchain, so `minimal-versions` and `check-unused-dependencies` both die with
"rustc 1.96.0-nightly is not supported" before running their checks. It would
follow the merge onto main too -- nightly's push trigger lists `**/Cargo.toml`.

The pin was set in #2636 and never moved; 1.96 was the last MSRV it could
satisfy. Move both to nightly-2026-08-01 (1.99.0-nightly), which clears the
new MSRV with two release cycles of headroom instead of landing on it, and
say so on the line so the constraint isn't rediscovered.

Add the pins to the weekly MSRV file table, which listed only the three
manifests -- the reason nothing caught this before the bump landed.

Also fixes two things in the statusline cache-check the previous commit
touched: `command_count` includes the -vv collector's three calls, against a
baseline measured in #2211 before the recipe used -vv (#3825 switched it
without re-measuring), so it reads ~3 high against a threshold only 3 wide;
and `.git/wt/logs/trace.log` is the gitdir-file path shape this same skill
warns about, since the recipe says to run from any worktree.
worktrunk-bot added a commit that referenced this pull request Nov 10, 2026
…3 note

benchmarks.yaml runs only on schedule and workflow_dispatch (since #2636),
so it never shares a workflow run with a PR's ci jobs.
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.

2 participants