Skip to content

🐛 fix(ai): harden Pi compatibility loader - #69

Merged
zrr1999 merged 1 commit into
mainfrom
feat/pi-ai-loader-hardening
Jul 31, 2026
Merged

🐛 fix(ai): harden Pi compatibility loader#69
zrr1999 merged 1 commit into
mainfrom
feat/pi-ai-loader-hardening

Conversation

@zrr1999

@zrr1999 zrr1999 commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • route the Baidu OneAPI compatibility extension through @earendil-works/pi-ai/compat factories so Pi's Jiti root alias cannot rewrite lazy API subpaths to dist/compat.js/api/*
  • keep OpenAI SDK log suppression active across lazy setup and concurrent stream lifetimes without overwriting external log-level changes
  • replace the handcrafted Jiti alias fixture with a fast regression test using the real Pi production loader and a local mocked Responses SSE transport
  • reject unsupported Pi runtime imports across compatibility entrypoint graphs, including relative modules and workspace exports

Validation

  • pnpm test test/pi-compatibility-loader.test.ts test/architecture-ratchets.test.ts test/spark-cli.test.ts (48 passed)
  • pnpm --filter @zendev-lab/spark-ai run check (29 files type-clean, 6 tests passed)
  • pnpm run check:static
  • pnpm install --frozen-lockfile
  • full root suite before publication: 1,543 passed, 2 skipped

Notes

  • @earendil-works/pi-coding-agent is a root test-only dependency declared as ^0.82.1; Spark runtime packages retain the existing Pi AI kernel.
  • no network requests are made by the loader regression test.
  • this is a Spark-side compatibility fix; no upstream Pi changes are included.

@zrr1999
zrr1999 merged commit d38216d into main Jul 31, 2026
7 checks passed
@zrr1999
zrr1999 deleted the feat/pi-ai-loader-hardening branch July 31, 2026 01:48
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