Skip to content

fix(aztec-up): Aztec installer does not shadow user installed binaries on PATH#22902

Merged
vezenovm merged 16 commits into
merge-train/fairiesfrom
mv/f-613-aztec-installer-shadows-user-forge-nargo-on-path
May 6, 2026
Merged

fix(aztec-up): Aztec installer does not shadow user installed binaries on PATH#22902
vezenovm merged 16 commits into
merge-train/fairiesfrom
mv/f-613-aztec-installer-shadows-user-forge-nargo-on-path

Conversation

@vezenovm

@vezenovm vezenovm commented May 1, 2026

Copy link
Copy Markdown
Contributor

Resolves F-613.

The installer used to drop forge, nargo, anvil, bb, pxe, txe, etc. directly into ~/.aztec/current/bin under bare names, silently shadowing user-installed tools in unrelated projects.

Native binaries now live in ~/.aztec/current/internal-bin (off PATH) and are exposed only via aztec-<tool> symlinks in ~/.aztec/current/bin. The aztec entrypoint is a small wrapper that prepends internal-bin to its subprocess PATH, so aztec test and aztec start --local-network continue to resolve bundled nargo / anvil by basename without leaking them to the user's shell.

aztec-up/test/no_shadow_user_bins.sh is a new regression test that plants user shims for every bare name, asserts the shims win on PATH, and asserts every entry in current/bin is aztec or aztec-*.

Migration notes and the affected tutorials are updated to the new aztec-* names.

The issue mentions appropriately handling binaries calling other binaries by name. I felt that was overly defensive and we should rely on tools cross-calling bins with an absolute path. Rather than defending against this with extra scaffolding in our wrappers, the correct fix is for the tools to use an absolute bundled path for internal tool calls.

@vezenovm vezenovm requested review from dbanks12 and nchamo May 1, 2026 18:06
@vezenovm vezenovm requested a review from charlielye as a code owner May 1, 2026 18:06
@vezenovm vezenovm added the claudebox Owned by claudebox. it can push to this PR. label May 1, 2026
@vezenovm vezenovm removed the claudebox Owned by claudebox. it can push to this PR. label May 1, 2026
@vezenovm vezenovm marked this pull request as draft May 1, 2026 19:07
@vezenovm

vezenovm commented May 1, 2026

Copy link
Copy Markdown
Contributor Author

I need to still handle re-installs. This just applies to fresh installs at the moment.

vezenovm added 2 commits May 1, 2026 17:02
…-user-forge-nargo-on-path' into mv/f-613-aztec-installer-shadows-user-forge-nargo-on-path
@vezenovm vezenovm marked this pull request as ready for review May 1, 2026 21:07

@nchamo nchamo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing work!

Left some comments and questions about things I quite don't follow

Comment thread docs/docs-developers/getting_started_on_local_network.md Outdated
Comment thread aztec-up/bin/0.0.1/install Outdated
Comment thread aztec-up/bin/0.0.1/install
Comment thread aztec-up/bin/0.0.1/install Outdated
Comment thread aztec-up/bin/0.0.1/install Outdated
Comment thread aztec-up/bin/0.0.1/install Outdated
Comment thread aztec-up/bin/0.0.1/install
Comment thread aztec-up/test/no_shadow_user_bins.sh Outdated
vezenovm and others added 4 commits May 4, 2026 14:53
Co-authored-by: Nicolas Chamo <nicolas@chamo.com.ar>
Co-authored-by: Nicolas Chamo <nicolas@chamo.com.ar>
…-user-forge-nargo-on-path' into mv/f-613-aztec-installer-shadows-user-forge-nargo-on-path
@vezenovm vezenovm requested a review from nchamo May 4, 2026 20:46

@nchamo nchamo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

Would it be possible to run this locally and then run the acceptance test on it? Just to make sure the entire workflow continues to work

Comment thread aztec-up/bin/0.0.1/install Outdated
Comment thread aztec-up/bin/0.0.1/install Outdated
Comment thread docs/docs-developers/docs/aztec-nr/installation.md Outdated
@vezenovm

vezenovm commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

default_scaffold and the aztec-cli-acceptance-test both pass locally

@vezenovm vezenovm merged commit 0aaf27c into merge-train/fairies May 6, 2026
14 checks passed
@vezenovm vezenovm deleted the mv/f-613-aztec-installer-shadows-user-forge-nargo-on-path branch May 6, 2026 17:39
@AztecBot

AztecBot commented May 7, 2026

Copy link
Copy Markdown
Collaborator

❌ Failed to cherry-pick to v4-next due to conflicts. (🤖) View backport run.

vezenovm added a commit that referenced this pull request May 8, 2026
…es on PATH (#22902) (#23060)

Backport of #22902 to `backport-to-v4-next-staging`.

## Original change
Native binaries (`forge`, `nargo`, `anvil`, `bb`, …) now live in
`~/.aztec/current/internal-bin` (off `PATH`) and are exposed only via
`aztec-<tool>` symlinks in `~/.aztec/current/bin`. The `aztec`
entrypoint prepends `internal-bin` to its child `PATH` so workflows that
cross-call by basename keep working without leaking those names to the
user's shell.

## Cherry-pick conflict

One conflict during cherry-pick:

- `docs/docs-developers/docs/tutorials/js_tutorials/aave_bridge.md` —
*deleted by us, modified by them.* The file no longer exists on
`backport-to-v4-next-staging`, so the upstream modification has nothing
to apply against.

**Resolution:** dropped the file (matches v4-next state). The first
commit preserves the original cherry-pick result (file restored as
upstream had it) so reviewers can see what would have landed; the second
commit removes it.

No build fixes were needed — the change touches only shell installer
scripts, a standalone TS acceptance test, and docs. Shell syntax checked
with `bash -n` for all modified scripts.

## Commits
1. `fix(aztec-up): ...` — original cherry-pick result, including the
unresolvable file.
2. `fix: resolve cherry-pick conflicts` — drop `aave_bridge.md` to match
the target branch.

ClaudeBox log: https://claudebox.work/s/a57acc5286aef8a6?run=1
AztecBot added a commit that referenced this pull request May 9, 2026
BEGIN_COMMIT_OVERRIDE
fix(aztec-up): Aztec installer does not shadow user installed binaries
on PATH (#22902)
fix: include sqlite binary in its npm package (#23039)
chore: backport #23041 (add sendMessagesAs to wallet api schemas) to
v4-next (#23081)
chore: backport DeployMethod refactor (#22985) to v4-next (#23029)
refactor(pxe): deduplicate tx hash lookups in MessageContextService
(#23075)
refactor(pxe): batch tagged private log queries across all secrets
(#23048)
refactor(pxe): batch log RPC calls in LogService.fetchLogsByTag (#23088)
feat(aztec-nr): Initial handshake registry contract with non interactive
handshake function (#22854)
fix: add Tag.random() helper required by backported #23088 tests
(#23094)
chore: backport: fix(aztec-up): installer does not shadow user binaries
on PATH (#22902) (#23060)
chore: backport handshake registry contract (#22854) to v4-next (#23063)
feat: deploy method refactor 2 (#23033)
refactor(pxe): skip redundant getBlock RPC when querying at anchor block
(#23100)
port(v4-next): feat(docs): autogenerate node JSON-RPC API reference
(#22543) (#23046)
chore: backport feat: deploy method refactor 2 (#23033) to v4-next
(#23103)
port(v4-next): feat(ci): Snapshots for aztec-nr contract compilation
failures and nargo expand (#23061) (#23104)
feat(txe): allow authorizing cross-contract utility calls in nr tests
(#23064)
END_COMMIT_OVERRIDE
rangozd pushed a commit to rangozd/aztec-packages that referenced this pull request May 16, 2026
BEGIN_COMMIT_OVERRIDE
refactor: `getPackageVersion` fn cleanup (AztecProtocol#22941)
fix(ci): skip acceptance test for canary -commit. tags (AztecProtocol#22951)
fix: closing db, correct stub side effects (AztecProtocol#22939)
feat: wallet-sdk heartbeat (AztecProtocol#22948)
chore: pxe db schema compatibility test (AztecProtocol#22872)
feat: stamping aztec version into contract artifacts (AztecProtocol#22550)
fix: add aztecVersion to PXE schema_tests fixture (AztecProtocol#22960)
feat(pxe): deduplicate class ID verification per contract (AztecProtocol#22966)
chore: add noirfmt.toml to noir-contracts and run nargo fmt (AztecProtocol#22971)
feat(aztec-nr): Initial handshake registry contract with non interactive
handshake function (AztecProtocol#22854)
chore: merge next into merge-train/fairies (AztecProtocol#22991)
fix(aztec-up): Aztec installer does not shadow user installed binaries
on PATH (AztecProtocol#22902)
test(ci): drop e2e_kernelless_simulation from backwards-compat e2e
(AztecProtocol#23005)
feat(ci): notify #team-fairies when backwards-compat e2e fails on
nightly (AztecProtocol#23006)
chore: merge next into merge-train/fairies (AztecProtocol#23021)
fix: better DeployMethod (AztecProtocol#22985)
refactor(pxe): batch RPC calls for note and event validation (AztecProtocol#22988)
END_COMMIT_OVERRIDE
critesjosh added a commit that referenced this pull request May 18, 2026
Covers operator-facing changes in v4.3.0:
- Bundled binaries renamed under aztec- prefix on PATH (#22902, #22709)
- --pxe flag removed from aztec start (#22867)
- aztec-up pins manifest Node version (#23201)
- aztec-up pins FOUNDRY_DIR (#22886)

Added to both source docs-operate/ and the v4.3.0 versioned snapshot,
and linked from the operator changelog sidebar in both places.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants