Repository navigation
build(tasks): rewrite scripted mise tasks in nu - #65
Conversation
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| Rust | Oct 28, 2026 5:01p.m. | Review ↗ | |
| JavaScript | Oct 28, 2026 5:01p.m. | Review ↗ | |
| Shell | Oct 28, 2026 5:01p.m. | Review ↗ | |
| Secrets | Oct 28, 2026 5:01p.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
|
Docs7 for sweepies/count-patchula
Commit |
586c3ae to
408a389
Compare
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
count-patchula | e2d34a2 | Commit Preview URL Branch Preview URL |
Oct 28 2026, 05:01 PM |
|
[Medium impact] The PR appears safe to merge; no new actionable issue was established. Reviews (3) · Last reviewed commit: "build(tasks): rewrite scripted mise task..." · Reviewed by Greptile |
408a389 to
6294f4c
Compare
6294f4c to
2723a28
Compare
Tasks that run a command or two in order are now plain mise.toml entries: test:unit, test:tools, docs:cli, benchmarks:summary and cache:usage. Every task with real logic is a nu file task that works on structured data instead of jq and bash string handling: ci, ci:changes, cache:prune, test:stress, corpus:report, release:package, conformance:inspect, conformance:logs, registry:update and server:replay. nu 0.116.1 is pinned in mise.toml and mise.lock. The jobs that ran a script without mise (Changed paths, prune and the pull request cache cleanup) install only nu. server:replay computes HMAC-SHA256 in nu, so the secret never appears in a command line. The conformance harness installs Renovate with aube instead of bun, so bun leaves the base tools; it stays a task-scoped engine for the real lockfile tool tests. mise-tasks/cc now passes -mcpu=baseline. When rustc links a host binary it names no target, so Zig built its runtime for the build runner's CPU, and the corpus job died with SIGILL running a binary linked on an AVX-512 runner.
2723a28 to
e2d34a2
Compare
Replaces #63 (xtask, which Sweepy rejected). Every task with real logic is now a nu file task that works on nu's structured data. The trivial ones, and every other inline task, now live in a root
tasks.tomlthatmise.tomlincludes through[task_config] includes = ["tasks.toml", "mise-tasks"], somise.tomlholds only tools, env and that include. nu 0.116.1 is pinned inmise.tomlandmise.lock.Where each task went
Line counts are the old script, then the new file or
tasks.tomlentry (plus itstoolstable).test:unittasks.tomlentry, 8 (usagechoices plus a Teraiffor--part)test:toolstasks.tomlentry, 3 + 13 toolsdocs:clibenchmarks:summarytasks.tomlentry, 4cache:usagetasks.tomlentry, 4cici:changescache:prune(also used by the PR cache cleanup)test:stresscorpus:reportrelease:packageconformance:inspectconformance:logsregistry:updateserver:replaycc,arccgains-mcpu=baseline, see below)No task was renamed. jq is gone:
corpus:reportandrelease:packageread JSON withfrom json, andci:changesusesgh api --paginate --slurp | from jsoninstead of gh's--jq. External failures stop a nu script, so there's noset -euo pipefailto forget. Where a failure should only warn (a failedgh cache delete), the script says so withtry.HMAC for
server:replay. The signature is HMAC-SHA256 written in nu, usinghash sha256 --binaryandbits xorover the 64-byte pads, about ten lines. I chose this over openssl because the secret never appears on a command line (openssl dgst -hmactakes the key as an argument) and there's nothing extra to install. It matches Python'shmacfor a 100-byte key, which exercises the key-hashing path. A signature-verifying listener accepted it from both a secret value and a secret file, and rejected a wrong secret with 401.Checked against the old scripts
ci:changes: identicalGITHUB_OUTPUTto the bash script on the last 50 PRs, and on a push.registry:update: byte-identicalregistry.jsonto the bun script.conformance:logsandconformance:inspect: byte-identical output to the bun scripts on the conformance fixtures, across every mode (buckets,warnings, a manager, a manager with a limit).corpus:report: identical Markdown summary to the bash and jq script, using a stubPATCHULA_BINthat covers warnings, a non-string warning, null reasons and an error branch. It exits 1 on an error branch, and on a failingcorpus:check.ci: checked with a stubmise. It keeps each stage's log and stops at the first failure with the sametest result: FAILED; stage=…; failing-tests=a::c,d,; full-log=…line.release:package x86_64-unknown-linux-musl: produced the same archive layout.cache:prune: listed the same entries as the bash script on a PR ref.ccandarstay bashnu's startup is what makes the difference.
zigstubbed outzig cc -cof a small file (direct: 15–20 ms)cargo test --workspace --no-run(126 cc calls), two roundsThat's about 5 ms more per compile or link, and 2 to 12 s more per clean build, for wrappers that only rewrite two arguments. So they stay bash.
ccfix:-mcpu=baselineThe first CI run failed in Corpus: lookup with
Illegal instruction (core dumped), twice. rustc passes no target when it links a host binary, so Zig built its own runtime (sort.block,debug.writeCurrentStackTrace,chacha20) for the build runner's CPU. The debug binary from that run had about 4,000 AVX-512 instructions in Zig's code. The corpus job runs that binary on another runner, which lacked AVX-512.This bug is already on
main; whether it hits depends on which CPU each job lands on. With-mcpu=baseline, only the code that picks AVX-512 at run time keeps it (aws-lc's AES-GCM, crc32fast), and the corpus job passed. Release builds were never affected, because they link with an explicit-target.CI timing
The baseline is a no-op control PR on current
main(#64, two runs), plus #61's PR runs where #64 skipped a job. "After" is this PR's two runs; the first had the corpus failure above.A third run, at the final head
408a389, took: Changed paths 10 s, Lint 85 s, Build 133 s, unit (update) 178 s, unit (others) 253 s, real tools 117 s, Docs 34 s, Corpus 101 s.Installing nu costs Changed paths, prune and cleanup about 4 to 8 s each, because those jobs used to install nothing. Changed paths gates every pull request, so that's about 5 s added to every run's critical path. The other jobs are within run-to-run noise.
Tests: unit (others): the slowdown seen on #63 comes from
main. On unchangedmain(#64) it took 272 s and 253 s, with compile at 2m18s and the same 275 hits and 55 misses, which matches #63 and this PR.Bun
The conformance harness installs Renovate with
mise exec -- aube --dir <tmp> install --ignore-scripts. bun leaves[tools]. It stays inmise.lockas a task-scoped engine oftest:toolsandtest:stress, because the real lockfile tests regeneratebun.lock, and the pin test now checks it too.Still Sweepy's call: aube's trust policy rejects
@yarnpkg/[email protected], which has no provenance while 3.2.0 did, and was published 2025-09-18. The harness exempts exactly that version in a generatedaube-workspace.yaml.Docs
AGENTS.mdnow says: trivial tasks are entries intasks.toml, whichmise.tomlincludes, anything longer is a nu file task, andccandarstay shell. The branch sits on top of 2c2661e, so the CI cache and site search pages stay removed.tasks.toml
Every TOML task moved from
[tasks.*]inmise.tomlto a top-level table intasks.toml, unchanged. Theincludeslist replaces mise's default task directories, so it namesmise-taskstoo, or the file tasks (includingccandar, whichCCandARpoint at) would disappear.mise taskslists the same 53 tasks.ci:changestreatstasks.tomllikemise.toml(everything runs), and the engine pin test readstest:tools' tools fromtasks.toml.Task caching
docs:clianddocs:builddeclaresourcesandoutputs, so mise skips them when every output is newer than every source.docs:cliwatchesCargo.toml,crates/cli/(the only crate with clap definitions) and the.usagetemplates.docs:buildwatches the site'ssrc/,public/, config and lockfile, and writes todist/.release:packagerunsmise run --force docs:cliso a release always regenerates the pages from the binary it ships, whatever the checkout's mtimes say. CI's docs job starts with nodist/, so it always builds.