Skip to content

The credential manager says what it decides instead of calling it a pin - #201

Merged
wmadden-electric merged 3 commits into
mainfrom
claude/rename-repin
Aug 18, 2026
Merged

The credential manager says what it decides instead of calling it a pin#201
wmadden-electric merged 3 commits into
mainfrom
claude/rename-repin

Conversation

@wmadden-electric

@wmadden-electric wmadden-electric commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

The operator's ask, twice over: first the banned word #repin, then the whole "pin" vocabulary — nobody knows what a pin is. The concept is which credential this process acts as, decided once at the first activeCredential() read. The private surface now says that: type ActingAs, field #actingAs, resolver #resolveActingAs, and #actAs for the mutation-time change that also discards storage built for the previous credential. Test descriptions use the same words. No behaviour change; all 978 CLI tests pass.

🤖 Generated with Claude Code

The word is banned; the method moves the active-workspace pin after a
mutation and discards storage built for the previous credential. A
mechanical rename of a private method — no behaviour change.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@coderabbitai

coderabbitai Bot commented Aug 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4e0ef64d-83d6-407f-8cc5-23aa52047ed3

📥 Commits

Reviewing files that changed from the base of the PR and between fef263e and 3d668a4.

📒 Files selected for processing (3)
  • packages/cli/src/auth/credential-manager.ts
  • packages/cli/tests/credential-manager-processes.test.ts
  • packages/cli/tests/credential-manager.test.ts

Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.


Summary by CodeRabbit

  • Refactor
    • Improved credential selection so the process consistently retains the credential it is acting as.
    • Credential changes made by the process are applied immediately while external changes are handled predictably.
    • Environment-provided credentials remain available during credential updates.
    • Session and activity messages now use clearer acting-as terminology.

Walkthrough

The credential manager replaces Pin state with ActingAs state. Resolution caches the environment, session, or none state directly. Session mutations update acting-as state and clear cached active storage. Active credentials and file-backed storage use the acting session. Tests and process descriptions now use acting-as terminology.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the terminology change from “pin” to acting as a credential.
Description check ✅ Passed The description directly explains the terminology changes, intended behavior, implementation details, and test results.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/rename-repin
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch claude/rename-repin

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Aug 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

npx https://pkg.pr.new/@prisma/cli@201
npx https://pkg.pr.new/@prisma/cli-engine@201

commit: 6d51f3d

The concept is which credential this process acts as, decided at the
first activeCredential() read. The type is now ActingAs, the field
#actingAs, the resolver #resolveActingAs, and the mutation-time change
#actAs — no reader has to learn what a pin was. Test descriptions move
to the same words. No behaviour change; 978 tests pass.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@wmadden-electric wmadden-electric changed the title Rename the credential manager's private #repin method to #movePin The credential manager says what it decides instead of calling it a pin Aug 18, 2026
@wmadden-electric
wmadden-electric merged commit 16e963d into main Aug 18, 2026
14 checks passed
@wmadden-electric
wmadden-electric deleted the claude/rename-repin branch August 18, 2026 08:58
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