Conversation
Tracks the phased import of pnpm's CLI-driven test suite into aube's bats coverage. Phase 0 is fixture mirroring + an add_dist_tag helper; phase 1 ports the four highest-signal install files (~88 tests). Lets parallel agents pick items off the list without stepping on each other. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 813f9e2. Configure here.
Greptile SummaryDocs-only PR adding Confidence Score: 5/5Safe to merge — docs-only addition with no production code changes. No P0 or P1 findings; changes are limited to a planning markdown and a single bats test file, both of which are well-structured and logically correct. No files require special attention. Important Files Changed
Reviews (2): Last reviewed commit: "docs(test): use pnpm/pnpm slug instead o..." | Re-trigger Greptile |
Benchmark changesVersions:
Public ratios: warm installs vs Bun 3x -> 4x; warm installs vs pnpm 9x -> 8x.
4d996a5 vs 135fe79 | aube/bun/pnpm | 3 scenarios | 3 runs | 500mbit/50ms | generated by Codex. |
Establishes the file naming, citation, and package-substitution conventions for the pnpm test import (tracked in test/PNPM_TEST_IMPORT.md). One ported test as a worked example so parallel agents have a concrete pattern to follow. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Bots flagged the link text `/private/tmp/pnpm` as a leaked local filesystem path. Replace with the GitHub slug. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
## Summary Ports 5 active hook tests + 2 skipped divergences from [`pnpm/test/install/hooks.ts`](https://github.com/pnpm/pnpm/blob/main/pnpm/test/install/hooks.ts) into the new [test/pnpm_install_hooks.bats](https://github.com/endevco/aube/blob/claude/pnpm-import-hooks/test/pnpm_install_hooks.bats), following the pattern established by [#416](#416) (tracked in `test/PNPM_TEST_IMPORT.md`). **Active tests (all passing):** - async `readPackage` mutates a transitive's deps — pnpm hooks.ts:43 - async `afterAllResolved` runs and is awaited — hooks.ts:498 - syntax error in `.pnpmfile.cjs` fails the install — hooks.ts:292 - `require()` of a missing module fails the install — hooks.ts:303 - `readPackage` setting optional/peer/dev fields on a transitive — hooks.ts:528 **Skipped — surfaced aube divergences (worth filing as Discussions before un-skipping):** - `readPackage` returning `undefined` should fail the install (hooks.ts:68); aube continues with the original manifest - `readPackage` mutating the root project's `.dependencies` should install those deps (hooks.ts:551); aube does not run the hook on the root manifest The remaining 15 tests in hooks.ts depend on `@pnpm.e2e/*` fixtures (Phase 0) or `addDistTag` helper (Phase 2) and are tracked in the TODO doc. ## Test plan - [x] `mise run test:bats test/pnpm_install_hooks.bats` — 5 ok, 2 skip, 0 fail. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: changes are limited to test suite additions and a tracking doc update, with no production code impact. Main risk is potential test flakiness due to lockfile/path assertions and pnpmfile error-message matching. > > **Overview** > Ports a first batch of `pnpm/test/install/hooks.ts` coverage into aube’s bats suite by adding `test/pnpm_install_hooks.bats`. > > The new tests exercise `.pnpmfile.cjs` hook behavior (async `readPackage` mutation of transitives, async `afterAllResolved` being awaited) and failure paths when the pnpmfile has a syntax error or `require()`s a missing module; two additional cases are added but marked `skip` to document current aube divergences. > > Updates `test/PNPM_TEST_IMPORT.md` to track the hooks port progress, list completed/skipped cases, and note divergences/fixture-dependent tests still pending. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 10406fa. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
## Summary Ports 5 active hook tests + 2 skipped divergences from [`pnpm/test/install/hooks.ts`](https://github.com/pnpm/pnpm/blob/main/pnpm/test/install/hooks.ts) into the new [test/pnpm_install_hooks.bats](https://github.com/endevco/aube/blob/claude/pnpm-import-hooks/test/pnpm_install_hooks.bats), following the pattern established by [#416](#416) (tracked in `test/PNPM_TEST_IMPORT.md`). **Active tests (all passing):** - async `readPackage` mutates a transitive's deps — pnpm hooks.ts:43 - async `afterAllResolved` runs and is awaited — hooks.ts:498 - syntax error in `.pnpmfile.cjs` fails the install — hooks.ts:292 - `require()` of a missing module fails the install — hooks.ts:303 - `readPackage` setting optional/peer/dev fields on a transitive — hooks.ts:528 **Skipped — surfaced aube divergences (worth filing as Discussions before un-skipping):** - `readPackage` returning `undefined` should fail the install (hooks.ts:68); aube continues with the original manifest - `readPackage` mutating the root project's `.dependencies` should install those deps (hooks.ts:551); aube does not run the hook on the root manifest The remaining 15 tests in hooks.ts depend on `@pnpm.e2e/*` fixtures (Phase 0) or `addDistTag` helper (Phase 2) and are tracked in the TODO doc. ## Test plan - [x] `mise run test:bats test/pnpm_install_hooks.bats` — 5 ok, 2 skip, 0 fail. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Low risk: changes are limited to test suite additions and a tracking doc update, with no production code impact. Main risk is potential test flakiness due to lockfile/path assertions and pnpmfile error-message matching. > > **Overview** > Ports a first batch of `pnpm/test/install/hooks.ts` coverage into aube’s bats suite by adding `test/pnpm_install_hooks.bats`. > > The new tests exercise `.pnpmfile.cjs` hook behavior (async `readPackage` mutation of transitives, async `afterAllResolved` being awaited) and failure paths when the pnpmfile has a syntax error or `require()`s a missing module; two additional cases are added but marked `skip` to document current aube divergences. > > Updates `test/PNPM_TEST_IMPORT.md` to track the hooks port progress, list completed/skipped cases, and note divergences/fixture-dependent tests still pending. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 10406fa. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
## Summary Ports the relevant tests from [pnpm/test/install/lifecycleScripts.ts](https://github.com/pnpm/pnpm/blob/main/pnpm/test/install/lifecycleScripts.ts) into [test/lifecycle_scripts.bats](https://github.com/endevco/aube/blob/claude/lifecycle-scripts-port/test/lifecycle_scripts.bats), per the plan in [test/PNPM_TEST_IMPORT.md](https://github.com/endevco/aube/blob/claude/elated-tharp-beb760/test/PNPM_TEST_IMPORT.md) (#416), and closes the parity gaps surfaced by the port. ## Test ports **3 green ports** — orthogonal stdout-visibility checks that complement aube's existing filesystem-marker tests by proving the script's echoed output reaches the user through aube's progress UI: - preinstall echo (pnpm L43) - postinstall echo (pnpm L56) - prepare echo on argumentless install (pnpm L95) **3 ports that previously documented parity gaps**, now green: - `npm_config_user_agent` exported to lifecycle scripts (pnpm L29) - root `postinstall` is NOT triggered when adding a named dep (pnpm L69) - root `prepare` is NOT triggered when adding a named dep (pnpm L82) **2 extra coverage tests for `aube remove` / `aube update`** — the same pnpm contract extended to all chained-call commands (added in response to PR review). ## Gap fixes ### 1. `npm_config_user_agent` exported `crates/aube-scripts/src/lib.rs` — adds `aube_user_agent()` returning `"aube/<version> <os> <arch>"` (mirrors pnpm's format) and sets it via `apply_script_settings_env`, which covers root + dep, jailed + non-jailed paths. Dep build scripts that sniff this env var to detect the running PM (husky, unrs-resolver, node-pre-gyp) now recognize aube instead of falling back to npm-mode. ### 2. Root hooks gated to argumentless `aube install` only pnpm's contract: root lifecycle hooks fire only on the literal `pnpm install` invocation (no package args). Every other entry point — `add`, `remove`, `update`, `dedupe`, `dlx`, patch tooling, the `ensure_installed` auto-install before `run`/`test`, nested git-prepare installs — must skip them. - `crates/aube/src/commands/install/mod.rs` — adds `InstallOptions.skip_root_lifecycle: bool` and gates both `run_root_lifecycle` blocks on it. The chained-call constructor `with_mode()` defaults to `true` so every chained site (every command except argumentless `install`) inherits the correct behavior automatically. Argumentless `aube install` (via `InstallArgs::into_options`) and `ci.rs` / `deploy.rs` (literal struct) keep `false`. ## Test plan - [x] `mise run test:bats test/lifecycle_scripts.bats` — 21 ok, no skips - [x] `cargo test -p aube-scripts` — 29 ok - [x] Combined run across install, add, remove, update, lifecycle_scripts, dedupe, patch, ci suites — 141 ok, 0 failures - [x] Pre-commit hooks (cargo-fmt, cargo-clippy, shfmt, shellcheck) — green 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Changes when root lifecycle hooks run across multiple commands and adds a new env var for all lifecycle scripts, which may affect projects relying on prior hook behavior or script environment. > > **Overview** > Improves pnpm parity for lifecycle scripts by exporting `npm_config_user_agent` (Node-style platform/arch) to all spawned scripts so dependency postinstalls can correctly detect aube. > > Updates the install pipeline to *skip root* `preinstall`/`install`/`postinstall`/`prepare` hooks for chained installs (e.g. `add`/`remove`/`update`), while keeping them enabled for argumentless `aube install`, `ci`, `deploy`, and nested git-dep `prepare` installs. > > Ports/extends pnpm lifecycle tests in `test/lifecycle_scripts.bats` and adds a unit test for the new user-agent formatting. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 3a16e90. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

Summary
@pnpm.e2e/*fixtures + addadd_dist_taghelper, (1) port the four highest-signal install files (~88 tests), (2-3) update.ts + workspace tests.The doc is structured so multiple agents can claim individual checkboxes (one fixture package, one test file) and work in parallel without conflicts.
Test plan
🤖 Generated with Claude Code
Note
Low Risk
Low risk because changes only add documentation and a new Bats test, with no production code or dependency changes. Main impact is potential CI/test behavior changes if the new test is included in the test suite.
Overview
Adds
test/PNPM_TEST_IMPORT.mddescribing a phased plan and conventions for porting pnpm’s CLI-driven tests into aube’s Bats suite (including fixture package mirroring and a futureadd_dist_taghelper).Introduces
test/pnpm_install_misc.batsas a worked example port: a single test that exercisesaube add -E -Dand asserts the resultingpackage.jsondevDependency is saved exactly (no^/~).Reviewed by Cursor Bugbot for commit 4d996a5. Bugbot is set up for automated code reviews on this repo. Configure here.