fix(add): forward --allow-build to global installs#620
Conversation
`aube add --global` built a synthetic `AddArgs` with `allow_build: Vec::new()`, silently dropping the outer flag. Under `strictDepBuilds=true` the install then errored with "must be reviewed before install" even when the user explicitly approved the dep on the CLI. Plumb `allow_build` through `run_global` / `run_global_inner` so the inner `run()` writes approvals into the throwaway install dir's `package.json#aube.allowBuilds` before lifecycle scripts run. Closes #617. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Greptile SummaryFixes a silent parameter drop in
Confidence Score: 5/5Safe to merge — the change is a minimal, targeted plumbing fix with no side effects on non-global install paths. The only code touched is the parameter-forwarding path for No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "fix(add): forward --allow-build to globa..." | Re-trigger Greptile |
Summary
aube add --globalbuilt a syntheticAddArgswithallow_build: Vec::new(), silently dropping the outer flag. UnderstrictDepBuilds=truethe install then errored with "must be reviewed before install" even when the user explicitly approved the dep on the CLI.allow_buildthroughrun_global/run_global_innerso the innerrun()writes approvals into the throwaway install dir'spackage.json#aube.allowBuildsbefore lifecycle scripts run. No workspace yaml exists in that throwaway dir, so the writer falls through to theaube.allowBuildsnamespace inpackage.json— the same shapeaube approve-builds -galready produces (covered by the existingaube approve-builds -g --alltest).test/global_install.batsthat runs underAUBE_STRICT_DEP_BUILDS=trueand asserts the build actually fires (the marker dep'spostinstallwritesaube-builds-marker.txt).Closes https://github.com/endevco/aube/discussions/617.
Test plan
cargo build -p aubecargo clippy --all-targets -- -D warningscargo fmt --checkcargo test -p aube --bin aube(473 passed)mise run test:bats test/global_install.bats(14/14 passed, including the new regression)This PR was generated by Claude.
Note
Medium Risk
Changes global install argument plumbing for lifecycle-script approvals; a bug here could unintentionally allow/deny dependency build scripts during
aube add -gunderstrictDepBuilds.Overview
Fixes
aube add -gto preserve and forward any--allow-build=<pkg>flags into the inner syntheticAddArgs, so global installs correctly pre-approve dependency lifecycle scripts instead of dropping the approval.Adds a Bats regression test covering
AUBE_STRICT_DEP_BUILDS=trueto ensureaube add -g --allow-build=...both succeeds without review errors and actually runs the approved package’s build (marker file is created and approval is written to the global installpackage.json).Reviewed by Cursor Bugbot for commit d532e95. Bugbot is set up for automated code reviews on this repo. Configure here.