Skip to content

feat: implement secret caching for "bp dev" command#14884

Merged
JustinBordage merged 12 commits intomasterfrom
jbord_cli-remember-bp-dev-secrets
Feb 2, 2026
Merged

feat: implement secret caching for "bp dev" command#14884
JustinBordage merged 12 commits intomasterfrom
jbord_cli-remember-bp-dev-secrets

Conversation

@JustinBordage
Copy link
Contributor

@JustinBordage JustinBordage commented Jan 27, 2026

Resolves SH-387

@JustinBordage JustinBordage requested review from a team as code owners January 27, 2026 17:44
@linear
Copy link

linear bot commented Jan 27, 2026

davidvitora
davidvitora previously approved these changes Jan 27, 2026
Copy link
Contributor

@davidvitora davidvitora left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@franklevasseur franklevasseur left a comment

Choose a reason for hiding this comment

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

I think secrets should remain scoped to the project

type: 'string',
description: 'The tunnel ID to use. The ID will be generated if not specified',
},
noSecretsSaved: {
Copy link
Member

Choose a reason for hiding this comment

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

nitpick: I don't really like this name, but I don't have a suggestion and I have no strong opinion

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would have to agree, though I had a hard time thinking of a name that wasn't too verbose.

An alternative name I thought of was "noSecretCaching", though, I didn't use it initially since it could imply that it wouldn't save secrets nor would it read secrets that were already written.

I'll try to brainstorm some other names and then perhaps we can revisit this when you do the follow up review to fix the fixes I make for the issues you raised.

Copy link
Member

Choose a reason for hiding this comment

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

I prefer noSecretCaching

type: 'string',
description: 'The tunnel ID to use. The ID will be generated if not specified',
},
noSecretsSaved: {
Copy link
Member

Choose a reason for hiding this comment

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

I prefer noSecretCaching

@JustinBordage
Copy link
Contributor Author

Just finished QA testing it following the changes made in commit 5a48527

franklevasseur
franklevasseur previously approved these changes Jan 28, 2026
Copy link
Member

@franklevasseur franklevasseur left a comment

Choose a reason for hiding this comment

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

1 comment left

franklevasseur
franklevasseur previously approved these changes Jan 28, 2026
Math-Fauch
Math-Fauch previously approved these changes Jan 28, 2026
@JustinBordage JustinBordage requested a review from Copilot January 29, 2026 16:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements secret caching for the "bp dev" command to avoid prompting users for integration secrets on every invocation. It stores secrets in the project cache and allows users to opt-out via a new --noSecretCaching flag.

Changes:

  • Added a noSecretCaching configuration option to the dev command schema
  • Extended ProjectCache type to include a secrets field for storing secret key-value pairs
  • Implemented cache read/write operations for secrets with prefix handling

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/cli/src/config.ts Adds noSecretCaching boolean flag to dev command schema
packages/cli/src/command-implementations/project-command.ts Extends ProjectCache type with secrets field
packages/cli/src/command-implementations/dev-command.ts Implements secret caching logic with read/write methods and prefix handling
packages/cli/src/code-generation/integration-implementation/integration-secret.ts Adds stripSecretEnvVariablePrefix helper function
packages/cli/package.json Bumps version from 5.4.2 to 5.5.0
packages/cli/e2e/tests/dev-bot.ts Updates test to use noSecretCaching: true flag

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@JustinBordage JustinBordage enabled auto-merge (squash) February 2, 2026 14:51
@JustinBordage JustinBordage merged commit d7ca10d into master Feb 2, 2026
8 checks passed
@JustinBordage JustinBordage deleted the jbord_cli-remember-bp-dev-secrets branch February 2, 2026 14:52
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.

4 participants