mirror of
https://github.com/max-sixty/worktrunk.git
synced 2026-09-14 20:00:38 +08:00
4601a9301b
Adds a nightly workflow for feature-flag breakage, fixes the wt-perf
manifest leak that was masking the bug, and merges in the `features`
branch with the actual `src/progress.rs` fix that the new check exposes.
## Why
worktrunk v0.45.0 fails to build with `cargo install --locked
--no-default-features` because `src/progress.rs` used `crossterm`
unconditionally despite `crossterm` being gated behind the `cli`
feature. The lib code was broken on main but in-workspace `cargo check
--no-default-features --lib` passed silently.
The mask: `tests/helpers/wt-perf/Cargo.toml` had `worktrunk = { path =
"../../.." }` (default features on). Cargo's workspace resolver unifies
features across all members, so even when checking worktrunk with
`--no-default-features`, wt-perf's dep silently re-enabled `cli` in the
lib build, pulling `crossterm` back in. Setting `default-features =
false` plugs the leak — and with that change the existing
`feature-check` job in `ci.yaml` already catches this bug class on every
PR, before it can ship.
## What's added
- **`tests/helpers/wt-perf/Cargo.toml`** — `default-features = false` on
the worktrunk path dep, with a comment explaining the leak.
- **`.github/workflows/nightly.yaml`** — nightly `feature-powerset` job
(cargo-hack) plus `create-issue-on-nightly-failure`. Triggers:
`schedule: '37 5 * * *'` + `workflow_dispatch` only — no push/PR. Issue
creation is gated on `failure ∧ repo_owner == 'max-sixty' ∧ event_name
== 'schedule'` and uses `JasonEtco/create-an-issue@v2` with
`update_existing: true` for auto-dedup. Auth via `WORKTRUNK_BOT_TOKEN`
for consistent bot identity (per `.github/CLAUDE.md`) and so future
issue-triage automation can cascade. Coverage is partly redundant with
what `feature-check` in `ci.yaml` now catches, but the powerset is
broader (covers `git-wt` and `shell-integration-tests` combinations that
ci.yaml doesn't enumerate).
- **`.github/nightly-failure.md`** — minimal issue template (title, `ci`
label, link to failed run).
- **Merge of `origin/features`** — the `src/progress.rs` fix that this
PR's check would otherwise have flagged. Without it CI on this PR would
(correctly) fail.
## Verified locally
- `cargo check --lib --no-default-features` — passes
- `cargo hack check --feature-powerset --no-dev-deps` — all 20 subsets
pass
- `cargo test --lib --bins` — 1056 + 603 passing, no regressions
## Trade-off
The wt-perf fix relies on a convention — workspace members depending on
worktrunk must use `default-features = false` — that nothing enforces. A
future workspace member added without that flag would silently
re-introduce the leak. An out-of-workspace check (build a throwaway
crate that depends on the checkout) would be more defense-in-depth but
the brief opted for the simpler in-workspace job. A separate dispatched
investigation is looking at whether the helpers should be workspace
members at all.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude <noreply@anthropic.com>
122 B
122 B
title, labels
| title | labels |
|---|---|
| Nightly tests failed | ci |
Nightly tests [failed on {{ date | date('YYYY-MM-DD') }}]({{ env.LINK }})