Skip to content

fix(agents): pin pi-coding-agent to 0.80.7 for AuthStorage - #366

Open
rome-xi wants to merge 1 commit into
Waishnav:mainfrom
rome-xi:fix/360-pi-authstorage-pin
Open

rome-xi wants to merge 1 commit into
Waishnav:mainfrom
rome-xi:fix/360-pi-authstorage-pin

Conversation

@rome-xi

@rome-xi rome-xi commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Fresh installs of @waishnav/devspace resolve @earendil-works/pi-coding-agent via ^0.80.3 to 0.80.10, which dropped the AuthStorage export. defaultPiSessionFactory still calls AuthStorage.create(...), so every devspace agents run pi ... fails immediately with TypeError: Cannot read properties of undefined (reading 'create') (AGENT_INTERNAL_ERROR, ~2ms).

The lockfile hid this in CI by freezing 0.80.3. This PR pins pi-coding-agent (and the sibling pi-agent-core / pi-ai / pi-tui overrides that pnpm 11 otherwise floats to 0.80.10) to 0.80.7, the last release that still exports AuthStorage.

Fixes #360

Verification

pnpm exec tsx --test --test-concurrency=1 src/local-agent-pi-authstorage-pin.test.ts

4/4 pass (range cannot satisfy 0.80.8–0.80.10; npm + pnpm overrides pinned; lockfile frozen; source still constructs AuthStorage).

Notes

  • Real-world use case: a teammate installs DevSpace globally on a clean laptop to drive the pi subagent from ChatGPT/Claude MCP; without the pin the first agents run pi dies before any model turn.
  • ModelRuntime migration is left for a follow-up if you prefer tracking latest pi; this keeps the published package working with the smallest change.

Summary by CodeRabbit

  • Bug Fixes

    • Pinned the coding-agent package family to version 0.80.7 to maintain authentication compatibility.
    • Prevented incompatible transitive package versions from being selected during installation.
  • Tests

    • Added coverage to verify dependency pins, workspace overrides, lockfile resolution, and authentication storage initialization.

Fresh npm installs of ^0.80.3 resolve to 0.80.10 which dropped AuthStorage,
so the pi subagent crashes on AuthStorage.create. Pin the package (and
sibling overrides for pnpm 11) to 0.80.7 and lock the regression.

Fixes Waishnav#360
@coderabbitai

coderabbitai Bot commented Sep 22, 2026

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 4b2e4d43-1fda-49df-a2fb-85a958c5fc61

📥 Commits

Reviewing files that changed from the base of the PR and between 531d3f9 and 4370cc6.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • package.json
  • pnpm-workspace.yaml
  • src/local-agent-pi-authstorage-pin.test.ts

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The Pi package family is pinned to 0.80.7. Workspace overrides keep sibling packages on the same version. New tests verify manifest, workspace, lockfile, and source consistency for AuthStorage and ModelRegistry.

Changes

Pi AuthStorage compatibility

Layer / File(s) Summary
Dependency version pins
package.json, pnpm-workspace.yaml
Pins @earendil-works/pi-coding-agent and its sibling packages to 0.80.7.
Pin and integration validation
src/local-agent-pi-authstorage-pin.test.ts
Adds tests for dependency declarations, workspace overrides, lockfile versions, and continued AuthStorage and ModelRegistry usage.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Suggested reviewers: waishnav

Merge Risk: 🔵 Low · up to 4370c

The dependency pin addresses the known Pi failure, but fresh-install runtime compatibility is not directly exercised, so merge is reasonable with bounded owner awareness.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (2 skipped: 2 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: pinning pi-coding-agent to version 0.80.7 to preserve AuthStorage compatibility.
Linked Issues check ✅ Passed The changes address issue #360. @earendil-works/pi-coding-agent is pinned to 0.80.7, and pi-agent-core, pi-ai, and pi-tui receive matching exact overrides in package.json and `pnpm-workspa…
Out of Scope Changes check ✅ Passed The changed files support issue #360. Dependency pins and workspace overrides constrain the Pi package family. The regression test verifies the failure boundary and package-resolution rules. No unrela…
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (2 skipped: 2 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
🧪 Generate unit tests (beta)
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

A rabbit reads each line,
The patch grows clear beneath the moon,
Small changes hop in place,
Tests guard the garden path,
Reviews bloom before the dawn.

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

Safe to merge, with a non-blocking test-coverage gap that can allow consumer dependency-resolution regressions to go undetected.

Findings

  1. P2 Consumer resolution untested

Summary

This change pins the Pi package family and adds AuthStorage regression coverage. One non-blocking coverage gap remains: the new test checks manifest values but does not verify the dependency tree a separate consumer resolves.

Reviews (1) · Last reviewed commit: "fix(agents): pin pi-coding-agent to 0.80..."

Comment on lines +55 to +73
test("pi sibling packages stay on the AuthStorage pin", () => {
const npmOverrides = packageJson.overrides ?? {};
const workspace = parseYaml(
readFileSync(new URL("../pnpm-workspace.yaml", import.meta.url), "utf8"),
) as { overrides?: Record<string, string> };
const pnpmOverrides = workspace.overrides ?? {};
for (const name of PI_SIBLINGS) {
assert.equal(
npmOverrides[name],
AUTOSTORAGE_PIN,
`${name} must be overridden in package.json to exact ${AUTOSTORAGE_PIN} so a fresh npm install cannot float onto an AuthStorage-less release`,
);
assert.equal(
pnpmOverrides[name],
AUTOSTORAGE_PIN,
`${name} must be overridden in pnpm-workspace.yaml to exact ${AUTOSTORAGE_PIN}; pnpm 11 does not apply package.json overrides`,
);
}
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P2 Consumer Resolution Is Untested

These assertions only compare override text in repository manifests; they never install DevSpace from a separate consumer project or inspect the resolved Pi dependency tree. A fresh consumer installation can resolve the Pi siblings to 0.80.10 while this predicate still passes, so the test provides false confidence that published dependency resolution remains pinned. This is non-blocking, but it leaves consumer dependency-resolution regressions undetected.

Artifacts

Evidence from the check

  • The executable script checks the exact focused manifest predicate and performs a fresh override-free pnpm consumer installation; it is the executed source for the result.

Command output from the check

  • Captured output from executing the validation script in `/home/user/repo`; it shows the text-only predicate passes while the real consumer resolves incompatible 0.80.10 siblings, confirming the gap.

View artifacts

T-Rex Ran code and verified through T-Rex

@greptile-apps

greptile-apps Bot commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Comments Outside Diff

These findings sit on lines the diff does not cover, so they could not be posted inline. Each one leaves this list once its file changes.

  • P2 Pi sibling pin test does not validate consumer dependency resolution

    • Bug
      • The test at lines 55-73 passes by checking repository manifest fields equal 0.80.7, but does not install a consumer or inspect the resolved dependency tree. An executed fresh pnpm consumer install with only @earendil-works/pi-coding-agent@0.80.7 installed resolved all three Pi siblings to 0.80.10 despite the source manifest assertions passing.
    • Cause
      • The focused test exclusively uses parsed package.json and pnpm-workspace.yaml override values. It has no install command, package-manager invocation, or installed-package resolution assertion, so it cannot detect ignored/unavailable overrides in a consuming project.
    • Fix
      • Add or replace this coverage with a consumer-style install smoke test that packs/installs the package into a temporary project without root overrides and asserts the resolved Pi sibling package versions (and, ideally, imports the AuthStorage-dependent path).

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.

pi subagent fails with TypeError on a fresh npm install (^0.80.3 resolves to 0.80.10, which dropped the AuthStorage export)

1 participant