Skip to content

fix(pi): report the running host package instead of an installed peer - #234

Open
Wolfie (wolfiesch) wants to merge 3 commits into
braintrustdata:mainfrom
wolfiesch:fix/pi-running-host-identity
Open

Wolfie (wolfiesch) wants to merge 3 commits into
braintrustdata:mainfrom
wolfiesch:fix/pi-running-host-identity

Conversation

@wolfiesch

@wolfiesch Wolfie (wolfiesch) commented Oct 27, 2026 •

Copy link
Copy Markdown

The Pi extension resolves Pi's package metadata from the running CLI, but accepts a host only when its manifest name is one of the two upstream Pi packages or it declares piConfig. Oh My Pi (@oh-my-pi/pi-coding-agent) matches neither, so the lookup falls through to the @earendil-works/pi-coding-agent copy installed as the extension's peer dependency, and traces report that peer's version as pi_version.

Changes:

  • pi-package.ts adds @oh-my-pi/pi-coding-agent to the known package names and returns the matched package name. The config directory is unchanged, so existing .pi/braintrust.json settings, including project opt-outs, still apply.
  • The extension sends the host package name as payload.host_name, and the translator records it as metadata.host_name. The transport source stays pi, and the session root keeps the Pi label.
  • protocol.md and the Pi README describe the field.

Limitation: Oh My Pi's standalone binary does not ship a package.json, so the extension cannot identify it from the filesystem. Those sessions keep reporting the peer dependency's version, as they do today.

Validation:

  • src/plugins/pi/content: vp check, vitest run
  • bt-daemon (Rust 1.99.1): cargo fmt --check, cargo clippy --all-targets -- -D warnings, cargo test --all-features
  • Ran loadPiPackageMetadata against an Oh My Pi 18.12.6 source checkout's CLI entry with the upstream peer installed. It returns @oh-my-pi/pi-coding-agent, 18.12.6, .pi.

@chatgpt-codex-connector

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 🔄 Running since 2026-10-27T09:00:21.977251Z 589ff0e PR opened
ℹ️ About Codex in GitHub

Your 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.

@wolfiesch

Wolfie (wolfiesch) commented Oct 27, 2026 •

Copy link
Copy Markdown
Author

CI passed on my fork at this PR's head (e70e990): https://github.com/wolfiesch/braintrust-coding-agent-plugins/actions/runs/40484176253

Keep Oh My Pi sessions on the extension's existing .pi settings path and the
Pi session-root label. Only the reported host name and version change. Drop
the explicit-manifest rule so a stale PI_PACKAGE_DIR cannot select an
unrelated parent package.

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.

1 participant