Repository navigation
Description
Client or integration
Other: OpenCodex CLI
Area
Installation or packaging
Summary
ocx update rejects a working pnpm global installation before it reaches the update. The verifier reports missing Bun and Zod even though both are linked in the package's pnpm global virtual-store dependency directory and the CLI and proxy start successfully. The proxy is left running.
Reproduction
- Install
@bitkyc08/opencodexglobally with pnpm 12 using a global virtual store. In the affected installation, the active package is a symlink intostore/v11/links/.../node_modules/@bitkyc08/opencodex; its siblingnode_modules/bunandnode_modules/zodare valid links. - Start the proxy and run
ocx update --tag latest. - The updater reports that the active package failed verification and exits before stopping the proxy. This occurs with both 2.96.0 and 2.97.0. A direct call to
verifyPnpmInstallTreereports the two missing sentinel dependencies.
Expected: the verifier recognises the package's pnpm-owned dependency links and allows a valid installation to proceed, while retaining its ownership and integrity checks.
The verifier treats an enclosing node_modules as pnpm-owned only if it contains .pnpm or .modules.yaml, or is beneath .pnpm. The affected global-store link directory has neither marker. This looks like a layout not covered by the fix in #4235. The same checks are present on main at cab7eb7d0332ae0ebb4289d7c6bac1de666b6e40; the live reproduction was on the published package, not a clean source checkout.
Version
2.96.0 and 2.97.0
Operating system
Ubuntu 24.04.5 LTS, Linux arm64, pnpm 12.16.1
Provider and model
Not applicable.
Logs or error output
opencodex: the active pnpm package failed verification; aborting before stopping the proxy.
The verifier's failure list is sentinel dependency missing: bun and sentinel dependency missing: zod.
Screenshots and supporting files
None.
Redacted configuration
pnpm global virtual-store layout as described above.
Checks
- I searched existing issues and documentation.
- I removed secrets, tokens, account details, request credentials, and personal data.
Activity
github-actions commentedon Nov 5, 2026
Automated translation bookkeeping — detected language: English.
Ingwannu commentedon Nov 7, 2026
Confirmed on
dev(aaa3c20f3f). The update path recognizes the pnpm global virtual-store layout.install-detection.mjs:255matchesstore/v<N>/links/, andtests/update/update-pnpm.test.ts:45covers.../store/v11/links/@bitkyc08/opencodex/<version>/node_modules/@bitkyc08/opencodex. The verifier does not:ownedDependencyRootsadds the realpath's enclosingnode_modulesonly whenisPnpmManagedRootaccepts it (src/update/transactional-install.mjs:78-90, line 88).isPnpmManagedRootaccepts only a path below.pnpm, or a directory that contains.pnpmor.modules.yaml(transactional-install.mjs:65-69).A
store/v<N>/links/.../node_modulesgroup has none of these markers. The siblingbunandzodlinks are never probed, soverifyPnpmInstallTreereports both sentinels as missing. Its own docstring (transactional-install.mjs:156-160) says it supports global virtual-store links.A narrow fix is to treat an enclosing
node_modulesinside a pnpmstore/v<N>/links/tree as pnpm-owned. It should apply to the realpath group only, so an unrelated ancestor install stays excluded. It also needs a verifier regression for this layout. To make sure the fixture matches your tree, please post the redacted output ofrealpath "$(pnpm root -g)/@bitkyc08/opencodex"(replace the home directory with~). In particular, show whether a hash segment appears between the version andnode_modules.Ingwannu commentedon Nov 7, 2026
Fix proposed in #8298: the pnpm verifier now treats the package's realpath
node_modulesgroup as pnpm-owned when it sits inside astore/v<N>/links/tree, with regression tests for this layout and its boundaries. The redactedrealpathoutput requested above is still welcome to confirm the fixture matches your tree; the fix does not depend on whether a hash segment is present.oliver-mee commentedon Nov 10, 2026
Here is the realpath output from the affected install (pnpm 12.16.1,
@bitkyc08/opencodex2.99.0, Linux arm64). This is the same tree whereocx updatecurrently aborts with "the active pnpm package failed verification".A 64 character hash segment does sit between the version and
node_modules, so the fixture with a hash matches this tree. Small correction to the command in the request:pnpm root -greturns~/.local/share/pnpm/global/v11, and the package lives one group directory below it, so I took the exposed path frompnpm list -g --depth=0 --json.The dependency group beside the package holds the sentinels as sibling links and has neither pnpm marker file:
.pnpmand.modules.yamlare both absent from that group. The verifier reports:One detail that may matter for #8298's coverage. In the real CLI the module path is already the store path, because the launcher resolves the shim, so
realpath(packageDir) === packageDirand the group is reached throughrealGrouprather than thereal !== packageDirbranch. I applied the head of #8298 (5df4611) over a 2.99.0 tree and checked both shapes, the exposed symlink and the store path passed directly. Both now return{"ok":true,"failures":[]}where the unpatched tree failed as shown above. Pinning the no-symlink shape as a regression case would keep that branch covered.lidge-jun commentedon Nov 13, 2026
Fixed by #8331 (merged as
6788d42242).ocx updatenow accepts a pnpm 11/12 global install whose package lives in pnpm's global virtual store (<pnpm home>/store/v11/links/...). The acceptance is bound to the store pnpm itself reports: pnpm 11 or 12,pnpm store path --dir=<pnpm home>without--store-dir, cross-checked withpnpm list -g, and the package's realpath inside that store. Every link must stay inside the global group or that store.Evidence: the regression in
tests/update/update-pnpm-global-store.test.tsfails on dev with this issue's symptom and passes after the change. With real pnpm 12.16.1 and 11.20.0 on macOS arm64, a default global install is accepted after one store query, and a symlinked pnpm home or an outside relay is refused.Not verified on real hardware: pnpm 12 on Linux arm64 (the reported platform) and Windows. If the update still refuses there, please share the full
ocx updatemessage; it now names the cause and the fallback (pnpm add -g @bitkyc08/opencodex@latest).fix(update): verify pnpm global-store installs against the store pnpm…