feat: forward build args to TSX recipes - #55
Conversation
zeke-ricon
left a comment
There was a problem hiding this comment.
Looks good. I verified the build task now parses actual argv instead of inherited usage_* env, forwards recipe args after -- into the TSX runtime, and rewrites Bun.argv/process.argv so recipes can consume Bun.argv.slice(2).\n\nVerified locally:\n- mise run test (29/29)\n- mise run readme && git diff --exit-code README.md README.tsx\n- bash -n .mise/tasks/build test/build.bats
brownie-ricon
left a comment
There was a problem hiding this comment.
Approved. I checked the actual diff around the wp build boundary and the TSX runtime argv handoff.
What I verified:
.mise/tasks/buildnow derives--source,--out, and--checkfrom the task argv instead of inheritedusage_*, and forwards only leftover recipe args after a--sentinel to the runtime.tsx-runtime/build.tsrewritesBun.argv/process.argvbefore importing the recipe, so recipe code seesBun.argv.slice(2)as its own args rather than the build wrapper args.- Regression coverage includes inherited
usage_*leakage and recipe arg forwarding.
Local verification:
mise run test(29/29)bash -n .mise/tasks/build test/build.batsshellcheck -x .mise/tasks/buildgit diff --check origin/main...HEADmise run readmeleft README clean, but rewrotemise.lockformatting locally; I reverted that generated lockfile churn before review.
Degraded checks: swift test still fails on this Linux runner because CoreGraphics is unavailable, and my installed codebase shim is stale (0.1.0) and lacks the newer lint tasks listed in the PR. GitHub CI is green, including Quick's full verification path.
Summary
wp buildarguments toWALLPAPERS.tsxviaBun.argv.slice(2), matching theemails composeTSX patternbuild's own flags from the actual argv instead of inheritedusage_*env varswp build --set quickas recipe-owned argument handlingThis means the tool only forwards args; each TSX file defines what flags like
--set quickmean.Verification
mise run test(29/29)swift test(5/5)codebase lint:mise-settings "$PWD"codebase lint:bats-test-task "$PWD"codebase lint:bats-test-helper "$PWD"codebase lint:mcr-scope "$PWD"codebase lint:or-true "$PWD"codebase lint:shellcheck "$PWD"bash -n .mise/tasks/build test/build.batsshellcheck -x .mise/tasks/buildgit diff --checkmise run readme