Skip to content

fix(env): report package manager pin targets and scope - #3103

Open
SaKaNa-Y wants to merge 3 commits into
voidzero-dev:mainfrom
SaKaNa-Y:fix/env-pin-scope-output
Open

SaKaNa-Y wants to merge 3 commits into
voidzero-dev:mainfrom
SaKaNa-Y:fix/env-pin-scope-output

Conversation

@SaKaNa-Y

@SaKaNa-Y SaKaNa-Y commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

From a workspace member such as /repo/packages/app, vp env pin yarn@4.12.0 --no-install --force updates the workspace root package.json. The help describes changes in the current directory, and the result omits the target file. Users can mistake a shared package-manager change for a change limited to that member.

Correct the help and guide to explain that Node.js pins use the current directory and package-manager pins use the workspace root. Show the actual manifest and field before existing overwrite prompts and after package-manager results. File paths are relative to the current working directory:

 ✓ Pinned package manager to yarn@4.12.0
+  File: ../../package.json
+  Field: packageManager

When no matching pin exists, report the searched fields and any explicit manager selector. Distinguish missing files from other read failures. --target continues to select the pin source within the existing project scope.

Evidence

  • Before: In the workspace-member reproduction, pin and unpin changed the root manifest and left the member manifest unchanged. Their results did not identify the file or field.
    After: The same operations identify the root manifest and actual field. Mixed Node/package-manager snapshots show separate member and root targets. Cancellation shows the target once before the question and preserves the manifest.

Validation of cd43b861 on macOS arm64:

  • just check, just test (2338 passed, 7 ignored), and just lint passed.
  • All 27 focused global snapshot comparisons passed: 13 package-manager cases, 11 .nvmrc cases, and 3 mismatch/confirmation cases. Generated snapshots were reviewed.
  • Seven isolated CLI calls passed, covering stdout target details, root writes, unchanged member files, and byte-for-byte preservation after cancellation and no-op results.
  • The read-error classification unit test, changed-file rustfmt --check, and git diff --check passed.

The snapshot wrapper stopped at missing Playwright dependencies. The same Rust runner passed directly against the freshly built global binary with local-flavor cases excluded. Linux and Windows were not tested locally. Read-error classification used synthetic I/O errors, without a filesystem-permission integration test.

Merge Danger

Door: two-way

Reverting this change restores the previous messages and documentation without a project-file migration.

Blast Radius: CLI

Human-readable pin/unpin output changes, so scripts that match exact messages need adjustment. Workspace resolution, declaration selection, Node.js behavior, confirmation points, --force, and exit statuses remain unchanged.

Clarify current-directory Node pins and workspace-root package-manager pins. Report the actual manifest and declaration around existing confirmations and results, and distinguish missing manifests from unmatched pins without changing selection or exit status.
@SaKaNa-Y
SaKaNa-Y marked this pull request as ready for review October 19, 2026 07:08
@SaKaNa-Y

Copy link
Copy Markdown
Contributor Author

The documentation did not clearly explain which files package-manager pin and unpin commands modify.

This change clarifies that scope in the documentation and command help. The command output also shows the actual file path and field, so users can see where changes occur.

@fengmk2

fengmk2 commented Oct 19, 2026

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T03:15:58.238920Z 27ef5d2 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 6a93ae909c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@fengmk2

fengmk2 commented Oct 19, 2026

Copy link
Copy Markdown
Member

File: /repo/package.json

Can it be changed to a relative path based on the cwd? Instead of displaying the absolute path by default.

@fengmk2

fengmk2 commented Oct 20, 2026

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 27ef5d2f9e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

This branch has not been deployed

No deployments
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.

2 participants