Repository navigation
skills(running-tend): fix the statusline cache-check recipe for Linux - #3825
Conversation
sed -i '' is BSD syntax; the weekly job runs on ubuntu-24.04, where GNU sed reads the '' as the script and errors out, leaving REPLACE_WITH_CWD in the input. Build the JSON with jq -n --arg instead, and use the canonical --format=claude-code rather than the deprecated --claude-code flag.
worktrunk-bot
left a comment
There was a problem hiding this comment.
The substance holds up: --claude-code does warn and map to --format=claude-code (src/main.rs, the "--claude-code is deprecated; use --format=claude-code instead" arm), the four JSON fields match the pointers StatuslineInput::parse reads (/workspace/current_dir, /model/display_name, /context_window/used_percentage), jq preserves 42.0 as a float rather than normalizing it to 42, and tend-weekly.yaml is indeed runs-on: ubuntu-24.04. No other --claude-code occurrence survives in docs or skills, so the swap is complete.
One thing the fix leaves standing: the recipe still won't realistically complete on the weekly job, and the sed failing early is what has been hiding that. Nothing in .github/actions/claude-setup installs worktrunk, and its Swatinem/rust-cache step is save-if: false restoring a cache no workflow populates with release artifacts — there is no cargo build --release anywhere under .github/workflows/. So cargo run --release there is a cold release build of the entire dependency graph before the first render.
Worth deciding explicitly rather than discovering it in a weekly run. The triage this section documents is entirely .cache duplicates and the ~29 git subprocesses count, both profile-independent, so dropping --release would make it runnable — and it matches how you verified it (the PR body's transcript is a debug build). If the reason to keep --release is that the profile's timing numbers go noisy in debug, a line saying so would stop a future session from "fixing" it.
The weekly job installs no wt and its rust-cache step never restores, so --release meant a cold optimized build of the whole dependency graph before the first render. The duplicates and subprocess count this check triages are profile-independent.
|
Dropped Your read is right, and the cache is worse than "no release artifacts": Nothing this section triages changes with the profile — the The VerificationSame two duplicates and the same Cache keys: |
|
Ran this week's cache-check with the recipe as it stands in this PR (
The trace makes the attribution unambiguous — the second call sits between With that one discounted, this week's render had no duplicates at all. The baseline number is also worth a second look. This section says ~29 subprocesses per render with >32 warranting investigation, but a warm run here came in at 15 — a fresh single-worktree checkout does far less work than whatever repo the 29 was measured on. Since the count scales with worktree count, an absolute threshold flags on repo shape rather than on a regression; the duplicate list is the part that actually transfers between environments. Might be worth stating the count as environment-dependent context rather than a trigger. Also: the first run of a fresh clone isn't the one to readThe cold run reported 33 commands, over the stated threshold, but the excess is all first-invocation bootstrap that never recurs: |
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.
The
running-tendskill's weekly statusline cache-check recipe can't run as written: itssed -i ''is BSD syntax, and the weekly job runs onubuntu-24.04. GNU sed reads the''as the script and the substitution expression as a filename, so the step exits 2 and the input file keeps itsREPLACE_WITH_CWDplaceholder — a session that pushed past the error would then profile a statusline render against a nonexistent working directory. Building the JSON withjq -n --argdrops the placeholder dance entirely and can't be corrupted by a path containing a quote.The same block also invoked
wt list statusline --claude-code, which has been deprecated in favour of--format=claude-codesince #2436 and warns on every use.Verification
GNU sed 4.9 on this runner, reproducing the failure:
The corrected recipe, run end to end against a debug build of this checkout:
The field names match what
StatuslineInputreads —/workspace/current_dir,/model/display_name,/context_window/used_percentageinsrc/commands/statusline.rs.Deprecation warning on the old flag:
No regression test: the change is to a skill markdown file, which has no test harness in this repo. The recipe itself was run end to end instead, as above.
Found by the nightly survey (
.claude/skills/is not on the rotation, but the statusline recipe surfaced while checkingwt list statuslinedoc accuracy inskills/worktrunk/reference/claude-code.md).