Repository navigation
Load pi-tui only on upstream Pi so Oh My Pi 19.2 loads the extension - #340
Merged
Merged
Conversation
Oh My Pi 19.2.0 jobs started failing at ~15:52 UTC with dozens of 'offered tools: []' panics and no trace rows, but the logs omit both Pi's own output and the raw request, so the cause is not visible.
Oh My Pi 19.2.0 throws PiTuiImportError for any extension that imports @earendil-works/pi-tui, including literal dynamic imports, so it dropped the Braintrust extension entirely and no traces were captured. pi-tui is only used for the clickable status-bar trace link, which Oh My Pi never supported. The extension now skips it on Oh My Pi and loads it on other hosts through a computed specifier; validate.sh rejects a literal upstream pi-tui reference in the built entrypoint.
Abhijeet Prasad (AbhiPrasad)
marked this pull request as ready for review
November 25, 2026 16:44
Codex Review Summary: ✅ CompletedThis 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. |
Abhijeet Prasad (AbhiPrasad)
deleted the
abhi/oh-my-pi-ci-diagnostics
branch
November 25, 2026 16:47
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the
Oh My Pi package (19.2.0)CI failure, which also means the Braintrust extension doesn't load for real Oh My Pi 19.2.0 users.Cause
Oh My Pi 19.2.0 (published 2026-11-25 09:13 UTC) moved extension UI onto its own
@oh-my-pi/pi-tui. It now throwsPiTuiImportErrorfor any extension source that references@earendil-works/pi-tuior@mariozechner/pi-tui, whether in a static import or a literal dynamicimport()(legacy-pi-compat.ts,assertNoPiTuiImport). The changelog says: "Extensions that import bundled or alternate pi-tui packages no longer load."Our extension did
import * as piTui from "@earendil-works/pi-tui"at the top level. Oh My Pi therefore dropped it (Failed to load extension …, visible thanks to this PR's diagnostics), and the daemon received no events. The tool-less requests in the CI logs were harmless side requests that carry notoolskey.One thing I couldn't explain: the job passed on PRs at 15:28 UTC even though 19.2.0 had already been out for 6 hours. It failed on every run from 15:52 on, including
mainplus diagnostics only.Fix
Braintrust: connectedstatus as before.["@earendil-works", "pi-tui"].join("/")), so Oh My Pi's source scan never sees it. The helpers are cached per extension instance.src/plugins/pi/validate.shfails if the builtdist/index.mjsnames upstream pi-tui literally. That guards against a bundler folding the specifier back into a literal. Today's build keeps it computed.toolsfield, and the Pi test prints the agent's output. That's how the cause showed up.Tests
never loads upstream pi-tui under Oh My Pitest. The test mock's host name is now controllable and defaults to upstream Pi, so the existing clickable-link tests run on the upstream path.pnpm run checkand all 37 Pi package tests pass.pi_session_emits_traceslocally against upstream Pi 1.5.2 with the built extension: it passed in 1.4 s.