Skip to content

Fix npm install startup failure without ioredis - #3

Merged
tt-a1i merged 5 commits into
mainfrom
fix/pi-install-without-ioredis
Aug 12, 2026
Merged

Fix npm install startup failure without ioredis#3
tt-a1i merged 5 commits into
mainfrom
fix/pi-install-without-ioredis

Conversation

@zhengkezhou1

@zhengkezhou1 zhengkezhou1 commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • import Effect Node services through their focused subpath exports
  • avoid evaluating the root platform barrel and its Redis integration during extension startup

Verification

  • npm run format:check
  • npm run check
  • npm test (591 Node tests and 29 Vitest tests)
  • packed and installed the package with --legacy-peer-deps; confirmed ioredis is absent
  • installed that isolated package with pi install --local and launched Pi 0.82.1; all OpenPI extensions, including file-search and git-info, loaded successfully

Closes #2

@zhengkezhou1
zhengkezhou1 requested a review from tt-a1i August 12, 2026 02:37
@tt-a1i

tt-a1i commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Review

P0 — correctness / architecture

No actionable findings. The focused NodeServices / NodeHttpClient subpath imports fix the root cause without adding the unused optional Redis peer.

P1 — tests / package contract

No actionable findings. CI passes on Node 22.19 and 24, and the runtime import guard prevents the root barrel from returning.

Independent clean-install verification:

  • packed this branch and installed it with --legacy-peer-deps; ioredis remained absent
  • pi --offline --mode rpc --no-extensions --extension <file-search> --extension <git-info> exits 0
  • the published 0.1.1 tarball under the same conditions exits 1 with the reported Cannot find module 'ioredis' errors for both extensions\n- local gates: format check, typecheck, 592 Node tests, 29 Vitest tests, git diff --check, and package allowlist inspection all passed\n\nThis is ready to merge. I did not approve because final approval remains a maintainer decision.

@tt-a1i

tt-a1i commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Follow-up review correction

The runtime fix remains correct and the independent clean-install E2E passed. One P1 test gap remains: extensions/setup/package-contract.test.ts only scans source with a regex, so CI does not itself prove startup in an installation where ioredis is absent; it can also false-match comments/strings and miss alternate root loads.

Recommended before merge: add an isolated packed-install subprocess smoke that installs with optional peers omitted and starts both file-search and git-info. The source guard may remain as a fast supplemental check. This does not block correctness of the current fix, but it would lock down the exact published-package regression.

@tt-a1i
tt-a1i merged commit d67e642 into main Aug 12, 2026
4 checks passed
@tt-a1i
tt-a1i deleted the fix/pi-install-without-ioredis branch August 12, 2026 03:30
agnitum2009 pushed a commit to agnitum2009/openpi that referenced this pull request Aug 13, 2026
- claude: drop forced permissionMode/allowDangerouslySkipPermissions.
  With settingSources omitted the SDK loads the user's Claude Code
  settings (CLI-default behavior), so subagents keep exactly the
  permission mode the user runs with in their terminal.
- codex: drop forced approvalPolicy/sandbox from thread/start so the
  thread inherits the user's config.toml; the decline handler remains
  as the headless answer if that config still asks for approvals.
- codex: cap the optional model/list effort-clamp probe at 5s so a
  slow/unsupported server cannot hold a spawn (and its concurrency
  reservation) for the full 30s request timeout (Greptile P2).

Addresses PR openpi-dev#3 review: permission behavior is now inherit-by-design
rather than override; pi already inherited via its child-session trust
gating.
agnitum2009 pushed a commit to agnitum2009/openpi that referenced this pull request Aug 13, 2026
subagents-v2: Effect v4 multi-harness subagent system (pi, Claude Code, Codex)
agnitum2009 pushed a commit to agnitum2009/openpi that referenced this pull request Aug 13, 2026
…redis

Fix npm install startup failure without ioredis
agnitum2009 pushed a commit to agnitum2009/openpi that referenced this pull request Aug 14, 2026
两条不相交历史(lazyload 开发库独立根)。分支 296 提交为演化主线,
内容取代 origin/main 的 PR openpi-dev#3/openpi-dev#5/openpi-dev#7/openpi-dev#9(Redis 可选依赖、Biome/Bun
对齐、任务对账、批量通知——分支已含演化版:shared/task-reconcile、
result-delivery、biome/bun 工具链)。

- 冲突与内容一律取分支侧;合并树 == 分支树(read-tree 落地后
  diff 为空校验通过;merge 自动解析曾引入 main 侧旧位置
  subagents/src/agent-types.ts 残留,已随精确落地清除——该模块
  在分支 c7017af DDD 收敛时迁至 shared/)
- 本地 main 未推送的 2 个提交(commit-task-sync v2 + obsidian KB)
  存档于 archive/local-main-unpushed;vault 内容按 d0e64d4 决策不并入
- 分支关键内容:工具载荷 40.6k→~36.0k tok(端到端 -10.5%)、加载组
  预设、B 方案第三方描述补丁、显示残留根治(model-info tok/s、
  session-liveness busy 闸门 + 子会话守卫)、总线漂移守卫、
  agent-types 诊断分级
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.

README npm installation fails to load extensions due to missing ioredis

2 participants