Skip to content

fix(workspace): default-write aube-workspace.yaml instead of pnpm-workspace.yaml#382

Merged
jdx merged 2 commits intomainfrom
fix/workspace-yaml-default-name
Apr 29, 2026
Merged

fix(workspace): default-write aube-workspace.yaml instead of pnpm-workspace.yaml#382
jdx merged 2 commits intomainfrom
fix/workspace-yaml-default-name

Conversation

@jdx
Copy link
Copy Markdown
Contributor

@jdx jdx commented Apr 29, 2026

Summary

When aube approve-builds (or the install-time auto-seed of unreviewed build scripts) needs to create a workspace yaml from scratch, aube was writing pnpm-workspace.yaml. The lockfile companion is aube-lock.yaml — having the workspace yaml stay pnpm-prefixed is an asymmetry: a fresh aube install on a solo project produces a filesystem layout with both names sitting next to each other, mixing vendor namespaces.

Switches the default write filename to aube-workspace.yaml so the two aube-generated files share a naming scheme.

Backward compat

Unchanged. The read path already prefers aube-workspace.yaml and falls back to pnpm-workspace.yaml (constant WORKSPACE_YAML_NAMES = ["aube-workspace.yaml", "pnpm-workspace.yaml"] in crates/aube-manifest/src/workspace.rs:6). The write path's existing-file precedence is unchanged too: a project that already ships pnpm-workspace.yaml keeps mutating that file in place. The only behavior change is the fallback when neither file exists — that branch now creates the aube-prefixed name.

State Before this PR After this PR
aube-workspace.yaml present mutate it mutate it (unchanged)
pnpm-workspace.yaml present mutate it mutate it (unchanged)
Both present mutate aube-workspace.yaml mutate aube-workspace.yaml (unchanged)
Neither present create pnpm-workspace.yaml create aube-workspace.yaml ← change

Test coverage

  • Renames the existing add_to_allow_builds_creates_pnpm_workspace_when_no_yaml test to its new behavior (add_to_allow_builds_creates_aube_workspace_when_no_yaml).
  • Adds a companion add_to_allow_builds_writes_to_existing_pnpm_workspace that pins the backward-compat branch — a project with an existing pnpm-workspace.yaml keeps using it; no aube-workspace.yaml is created alongside.

Test plan

  • cargo test -p aube-manifest workspace — 24 pass (including the 2 covered above)
  • cargo test --workspace --all-targets — all green (~1500 tests)
  • cargo clippy --workspace --all-targets -- -D warnings — clean
  • cargo fmt --check — clean

🤖 Generated with Claude Code


Note

Low Risk
Behavior change is limited to the fallback filename used when creating a new workspace YAML; existing files and build-policy logic remain unchanged.

Overview
Changes the default workspace YAML write target for allowBuilds updates: when neither aube-workspace.yaml nor pnpm-workspace.yaml exists, aube now creates aube-workspace.yaml instead of pnpm-workspace.yaml (while still mutating an existing pnpm-workspace.yaml in place for backward compatibility).

Updates approve-builds/lifecycle-script documentation, CLI help text, and bats/unit tests to reflect the new filename and to add coverage that existing pnpm-workspace.yaml files are not “forked” into a new aube-workspace.yaml.

Reviewed by Cursor Bugbot for commit f353258. Bugbot is set up for automated code reviews on this repo. Configure here.

…kspace.yaml

When `aube approve-builds` (or the install-time auto-seed of
unreviewed build scripts) needs to create a workspace yaml from
scratch, it was writing `pnpm-workspace.yaml`. The lockfile
companion is `aube-lock.yaml` — having the workspace yaml stay
pnpm-prefixed is an asymmetry: a fresh `aube install` on a
solo project produces a filesystem layout with both names
sitting next to each other, mixing vendor namespaces.

Switches the default-write filename to `aube-workspace.yaml` so
the two aube-generated files share a naming scheme. Backward
compat is unchanged: aube already reads both names (with
`aube-workspace.yaml` taking precedence), and projects that
already ship `pnpm-workspace.yaml` keep mutating that file in
place — no silent fork into two parallel configs.

## Test coverage

Renames the existing
`add_to_allow_builds_creates_pnpm_workspace_when_no_yaml` test
to its new behavior, and adds a companion
`add_to_allow_builds_writes_to_existing_pnpm_workspace` that
pins the backward-compat branch (a project with an existing
pnpm-workspace.yaml keeps using it; no `aube-workspace.yaml` is
created alongside).

24 workspace tests pass; full workspace suite green.
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Apr 29, 2026

Greptile Summary

This PR switches the default write target for workspace YAML creation from pnpm-workspace.yaml to aube-workspace.yaml, aligning it with aube-lock.yaml for a consistent naming scheme on fresh projects. The read path and in-place mutation of existing pnpm-workspace.yaml files are unchanged, making this a backward-compatible fallback-only change.

Confidence Score: 5/5

Safe to merge — isolated one-line fallback change with thorough test and documentation coverage.

Single-line logic change in workspace_yaml_target, no behavioral change for existing projects, new unit and integration tests cover both the new default and the backward-compat branch. Only finding is a P2 style suggestion on the new test's assertion completeness.

No files require special attention.

Important Files Changed

Filename Overview
crates/aube-manifest/src/workspace.rs Core logic change: workspace_yaml_target fallback updated from pnpm-workspace.yaml to aube-workspace.yaml; new backward-compat test added but doesn't assert written content
test/approve_builds.bats Integration tests updated to assert aube-workspace.yaml instead of pnpm-workspace.yaml throughout; test name and comment updated to match new behavior
test/global_install.bats Global install test updated to assert aube-workspace.yaml as the generated file
test/lifecycle_scripts.bats Lifecycle-scripts test updated to check aube-workspace.yaml for seeded dep-with-build: false entry
docs/pnpm-users.md pnpm migration docs updated to correctly describe new default-create behavior and in-place mutation guarantee
docs/security.md Security doc examples updated to use aube-workspace.yaml as the canonical filename

Fix All in Claude Code

Reviews (2): Last reviewed commit: "fix(workspace): align bats tests + docs ..." | Re-trigger Greptile

The previous commit flipped `add_to_allow_builds`'s create-from-scratch
default to `aube-workspace.yaml`, but four bats tests still asserted
`pnpm-workspace.yaml` was created and several doc/help strings still
described the old write target. CI hit this on the bats matrix.

- Update bats: approve_builds.bats (install-writes-false +
  npm-style monorepo), global_install.bats (-g approve-builds),
  lifecycle_scripts.bats (strictDepBuilds=true).
- Sync user-facing prose: approve-builds command help (main.rs +
  aube.usage.kdl + generated docs/cli/), pnpm-users.md migration
  matrix, security.md recommended-baseline example header,
  bun-users.md, lifecycle-scripts.md, and the module doc comments
  in aube/src/commands/approve_builds.rs +
  aube-scripts/src/lib.rs.
- Drop the CHANGELOG Unreleased entry; release-plz cuts that from
  the conventional-commit subject.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jdx jdx merged commit d6f9a4d into main Apr 29, 2026
17 checks passed
@jdx jdx deleted the fix/workspace-yaml-default-name branch April 29, 2026 14:45
@greptile-apps greptile-apps Bot mentioned this pull request Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant