fix(pi): standardize on name when installing/updating - #86
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b866976fc4
ℹ️ 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 (@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 (@codex) address that feedback".
| let expected = pi_plugin_spec(); | ||
| installed.lines().any(|line| { | ||
| let plugin = line.trim(); | ||
| plugin.starts_with("npm:@braintrust/pi-extension") | ||
| && Some(plugin) != pi_plugin_spec().ok().as_deref() | ||
| plugin.starts_with(&expected) && plugin != expected |
There was a problem hiding this comment.
Compare the installed Pi version instead of its source
For every installation created by the new setup_pi, pi list reports the same unversioned source npm:@braintrust/pi-extension, so this predicate remains false even after a newer extension is published and the locally resolved package is stale. Consequently update_warning("pi") can no longer prompt these users to run bt trace update pi; inspect Pi's installed/resolved version rather than comparing the configured source string.
Useful? React with 👍 / 👎.
b866976 to
fbb1e54
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fbb1e54fe6
ℹ️ 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 (@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 (@codex) address that feedback".
| let plugin = pi_plugin_spec(); | ||
| runner.run("pi", &["uninstall", &plugin]) |
There was a problem hiding this comment.
Preserve uninstall support for existing versioned Pi installs
Users who enabled Pi with any prior release have the configured source npm:@braintrust/pi-extension@^<major>, because that is what the previous setup_pi installed. Passing the newly unversioned source to pi uninstall no longer identifies that saved package source, so bt trace disable pi fails and leaves the extension installed for the existing user base. Reconcile the legacy versioned source during migration or uninstall the source reported by pi list rather than assuming the new source.
Useful? React with 👍 / 👎.
bt trace update piwas broken, this was because we weren't using the name here properly.