Skip to content

fix: declare the tested minimum Pi version in peer dependencies - #15

Open
dajiaohuang wants to merge 1 commit into
NVlabs:mainfrom
dajiaohuang:fix/pi-peer-dependency-minimum
Open

fix: declare the tested minimum Pi version in peer dependencies#15
dajiaohuang wants to merge 1 commit into
NVlabs:mainfrom
dajiaohuang:fix/pi-peer-dependency-minimum

Conversation

@dajiaohuang

Copy link
Copy Markdown

Summary

Fixes #11.

The four Pi packages were declared as "*", so npm accepted Pi 0.79.10 even though SoL-Pi cannot load against it. That release predates the @earendil-works/pi-ai/compat export and the agent_settled and sessionEntryToContextMessages APIs SoL-Pi imports.

The declared floor is now 0.81.1, the lowest release docs/compatibility.md records as exercised, and the lockfile root mirrors it. typebox is unchanged, and no Pi package, dependency, or runtime behavior changes.

Regression coverage

Three assertions in tests/package.test.ts keep the declared contract aligned:

  • every Pi peer range is identical and not "*", and its floor equals the floor declared in docs/compatibility.md;
  • the lockfile root peers match the manifest;
  • the declared floor is above 0.79.10.

Each was checked against a deliberate regression. Reverting the manifest ranges to "*" fails all three; reverting only the lockfile entry fails the lockfile assertion, which is the drift this change also fixes.

Validation

  • Pi 0.79.10, isolated install: on the unmodified base, node scripts/check-pi-compat.mjs and import('./src/sol-pi/index.ts') both fail with ERR_PACKAGE_PATH_NOT_EXPORTED for @earendil-works/pi-ai/compat. Pi 0.81.1 passes both. * accepts 0.79.10; >=0.81.1 rejects it and still accepts 0.81.1 and 0.84.2.
  • npm run typecheck: passed.
  • npx vitest run tests/package.test.ts -t "declared Pi compatibility": passed, 3 tests.
  • Full suite: 132 passed, 5 failed. The same 5 fail on an unmodified base checkout — two npm pack cases that need a POSIX npm shim, two symlink cases, and one reducer case — so none are regressions. npm run check therefore does not complete on this Windows host; the pack cases are expected to pass in CI.
  • node scripts/check-pi-compat.mjs: passed.
  • npm ci --ignore-scripts --dry-run: passed.
  • npm audit --audit-level=high: passed; the two moderate Vitest advisories are unchanged.

Tested with Node 24.14.1 and Pi 0.84.2.

The four Pi packages were declared as "*", so npm treated Pi 0.79.10 as a
compatible install even though SoL-Pi cannot load against it: that release
predates the `@earendil-works/pi-ai/compat` export and the `agent_settled`
and `sessionEntryToContextMessages` APIs SoL-Pi imports.

Set the declared floor to 0.81.1, the lowest release `docs/compatibility.md`
already records as exercised, and mirror it in the lockfile root. Add
metadata assertions so the range cannot drift below the documented floor and
so the lockfile stays in step with the manifest.

@gaoanze888 gaoanze888 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Reviewed against the reproduction in #11. The metadata change is focused: the four shared-release Pi peers now use the documented, exercised 0.81.1 floor, with the lockfile and compatibility docs kept in sync. I ran npm run check locally: typecheck, 17 test files / 137 tests, and package dry-run all passed.

The added package-contract tests explain most of the diff and cover the important drift modes (wildcard ranges, package/lockfile mismatch, and the known-incompatible 0.79.10 boundary). I did not find a blocking correctness issue. Thanks for turning the issue into a well-scoped compatibility fix.

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.

Peer dependency range accepts Pi versions that cannot load SoL-Pi

2 participants