Skip to content

fix(update): keep member updates on workspace lockfile#732

Merged
jdx merged 2 commits into
mainfrom
codex/fix-update-workspace-lockfile
May 17, 2026
Merged

fix(update): keep member updates on workspace lockfile#732
jdx merged 2 commits into
mainfrom
codex/fix-update-workspace-lockfile

Conversation

@jdx

@jdx jdx commented May 17, 2026

Copy link
Copy Markdown
Owner

Summary

  • write plain workspace-member aube update results back into the shared workspace root lockfile
  • share the workspace lockfile merge helper with filtered update
  • add a regression for running aube install and aube up from a workspace member

Root Cause

aube update started from the nearest project root, so running it inside a workspace member resolved that member as importer . and wrote sub/aube-lock.yaml. aube install already targets the workspace root, so the two commands disagreed.

Validation

  • cargo fmt --check
  • cargo test -p aube update:: --no-fail-fast
  • test/bats/bin/bats --filter 'aube up from a workspace member writes the shared root lockfile' test/pnpm_update.bats
  • cargo clippy --all-targets -- -D warnings

Note

Medium Risk
Changes how aube update persists lockfiles in workspaces by merging member results into the shared root lockfile, which could affect workspace lockfile contents and importer metadata. Logic is localized and covered by a new regression test, but touches dependency graph merge behavior.

Overview
Fixes aube update run from a workspace member to write back into the shared workspace-root aube-lock.yaml (when sharedWorkspaceLockfile is enabled) instead of creating/updating a per-member lockfile.

Refactors lockfile handling by introducing write_update_lockfile and a shared merge_update_graph_into_workspace_lockfile helper (also used by filtered/recursive updates), expanding the merge to carry per-importer workspace_extra_fields alongside existing importer deps and skipped-optional metadata.

Adds a Bats regression test ensuring aube install + aube up from a workspace member updates the root lockfile and does not create a member lockfile.

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

@greptile-apps

greptile-apps Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes plain aube update run from a workspace member so it merges results into the shared workspace-root aube-lock.yaml rather than creating a per-member lockfile, and shares that merge logic with the existing filtered-update path by extracting merge_update_graph_into_workspace_lockfile.

  • write_update_lockfile is called instead of write_and_log_lockfile on the hot path; it detects whether cwd is a workspace member with shared-lockfile enabled and, if so, reads the root lockfile and delegates to the shared merge helper.
  • merge_update_graph_into_workspace_lockfile now carries workspace_extra_fields with a symmetric insert/remove pair, correctly pruning stale entries when a member no longer produces that field.
  • A new Bats regression test validates that aube install followed by aube up from a workspace member leaves only the root aube-lock.yaml and that the member's importer entry appears in it.

Confidence Score: 5/5

Safe to merge — the fix is well-scoped, the extraction is mechanical, and the regression test directly exercises the broken scenario.

The refactor correctly routes plain workspace-member updates to the shared root lockfile, the workspace_extra_fields pruning is symmetric (insert/remove), and the merge_filtered_update_lockfile lockfile-removal ordering is preserved. No wrong-data or stale-state paths were introduced.

No files require special attention.

Important Files Changed

Filename Overview
crates/aube/src/commands/update.rs Extracts merge_update_graph_into_workspace_lockfile helper, adds write_update_lockfile to route plain-update results to the shared root lockfile, and correctly prunes workspace_extra_fields with an else-remove branch.
test/pnpm_update.bats Adds a regression test covering the root cause: running aube install then aube up from a workspace member should write only the shared root lockfile.

Reviews (2): Last reviewed commit: "fix(update): prune stale workspace extra..." | Re-trigger Greptile

Comment thread crates/aube/src/commands/update.rs

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit f887f6c. Configure here.

Comment thread crates/aube/src/commands/update.rs
@jdx jdx merged commit 70f4ade into main May 17, 2026
18 checks passed
@jdx jdx deleted the codex/fix-update-workspace-lockfile branch May 17, 2026 15:40
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