Skip to content

pi update --extensions silently skips checkout for git-pinned packages #4869

@vieko

Description

@vieko

What happened?

pi update, pi update --extensions, and pi update --extension <source> all print "Updated" but the on-disk clone of a git-pinned extension stays at whatever tag was previously checked out. pi list reports the new pin from settings.json, but ~/.pi/agent/git/.../<repo> is still the old code.

Silent integration failure: Pi reports success, but the extension code that actually loads on next launch is the old version. The only signal I had was that my own extension's new exports weren't there when I tsx-imported the installed lib.ts.

Workaround that works: pi remove "<source>" && pi install "<source>@<new-tag>". The reinstall forces a fresh resolve and correctly checks out the new tag.

Steps to reproduce

# 1. Install a tagged extension
pi install "git:github.com/vieko/bonfire@v7.1.0"

# 2. Bump the pin in ~/.pi/agent/settings.json's packages array to:
#      "git:github.com/vieko/bonfire@v7.2.0"
#    (v7.2.0 exists on the remote)

pi list
# git:github.com/vieko/bonfire@v7.2.0
#   /Users/me/.pi/agent/git/github.com/vieko/bonfire

# 3. Update
pi update --extensions
# Updated packages

pi update --extension "git:github.com/vieko/bonfire@v7.2.0"
# Updated git:github.com/vieko/bonfire@v7.2.0

# 4. Check what actually landed on disk
cd ~/.pi/agent/git/github.com/vieko/bonfire
git describe --tags                       # v7.1.0   (stale)
node -e 'console.log(require("./package.json").version)'   # 7.1.0

# Even after a manual git fetch --tags (which pulls v7.2.0 into the local
# clone), pi update still won't checkout the new ref.

Expected behavior

After pi update --extensions, the on-disk clone matches the pin in settings.json. Either Pi fetches + checks out the pinned ref, or it explicitly reports "no change needed" / "could not fetch" — not a generic "Updated" when nothing changed.

Version

0.75.4 (macOS, darwin, bash)

Metadata

Metadata

Assignees

Labels

inprogressIssue is being worked on

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions