Why this matters
The npm wrapper has a dedicated codewhaleBinaryVersion field so packaging-only npm releases can point at the intended CodeWhale binary version. run.js and verify-release-assets.js already honor that field, but the installer path skips it. That means install-time asset resolution can disagree with runtime/version-fallback and release-asset verification.
Current behavior
npm/codewhale/scripts/install.js resolves the package binary version from legacy env vars and deepseekBinaryVersion, then falls back to pkg.version:
npm/codewhale/scripts/install.js:81-87
const configuredVersion =
process.env.DEEPSEEK_TUI_VERSION ||
process.env.DEEPSEEK_VERSION ||
pkg.deepseekBinaryVersion ||
pkg.version;
The sibling npm wrapper surfaces already include pkg.codewhaleBinaryVersion:
npm/codewhale/scripts/run.js:12
npm/codewhale/scripts/verify-release-assets.js:14-18
npm/codewhale/scripts/verify-release-assets.js:49-50
Desired behavior
install.js should resolve pkg.codewhaleBinaryVersion before pkg.deepseekBinaryVersion and pkg.version.
run.js, install.js, and verify-release-assets.js should agree on binary-version precedence.
- Packaging-only npm releases should be able to change wrapper version and binary version intentionally without install-time asset drift.
Repro or evidence
Inspect the current version-resolution code:
nl -ba npm/codewhale/scripts/install.js | sed -n '81,87p'
nl -ba npm/codewhale/scripts/run.js | rg -n "codewhaleBinaryVersion|deepseekBinaryVersion" -C 2
nl -ba npm/codewhale/scripts/verify-release-assets.js | rg -n "codewhaleBinaryVersion|deepseekBinaryVersion" -C 2
install.js is the only npm wrapper path that skips pkg.codewhaleBinaryVersion.
Acceptance criteria
Related
Why this matters
The npm wrapper has a dedicated
codewhaleBinaryVersionfield so packaging-only npm releases can point at the intended CodeWhale binary version.run.jsandverify-release-assets.jsalready honor that field, but the installer path skips it. That means install-time asset resolution can disagree with runtime/version-fallback and release-asset verification.Current behavior
npm/codewhale/scripts/install.jsresolves the package binary version from legacy env vars anddeepseekBinaryVersion, then falls back topkg.version:npm/codewhale/scripts/install.js:81-87The sibling npm wrapper surfaces already include
pkg.codewhaleBinaryVersion:npm/codewhale/scripts/run.js:12npm/codewhale/scripts/verify-release-assets.js:14-18npm/codewhale/scripts/verify-release-assets.js:49-50Desired behavior
install.jsshould resolvepkg.codewhaleBinaryVersionbeforepkg.deepseekBinaryVersionandpkg.version.run.js,install.js, andverify-release-assets.jsshould agree on binary-version precedence.Repro or evidence
Inspect the current version-resolution code:
install.jsis the only npm wrapper path that skipspkg.codewhaleBinaryVersion.Acceptance criteria
install.jshonorspkg.codewhaleBinaryVersionbefore legacydeepseekBinaryVersionandpkg.version.codewhaleBinaryVersionprecedence.run.js,install.js, andverify-release-assets.jsuse consistent binary-version precedence.Related