ci: pin local @sockethub packages during test install#1105
ci: pin local @sockethub packages during test install#1105silverbucket merged 1 commit intomastersockethub/sockethub:masterfrom fix/local-install-bun-overrides-26b0sockethub/sockethub:fix/local-install-bun-overrides-26b0Copy head branch name to clipboard
Conversation
Local installs were resolving transitive @sockethub/* dependencies from npm instead of the packed workspace tarballs. Bun then loaded stale registry source and failed to start sockethub while node used dist/ successfully. Co-authored-by: Nick Jennings <silverbucket@users.noreply.github.com>
📝 WalkthroughWalkthroughLocal-mode testing in the test-installed-version script now exposes and threads locally built package artifacts through the installation pipeline. The build process returns a mapping of package names to tarball paths, which the install manager uses to configure npm dependency overrides for scoped packages, enabling the test runner to validate multiple local packages together. ChangesLocal package artifacts in test flow
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Security review complete: no high-confidence medium, high, or critical vulnerabilities found in the modified install-test scripts.
Notes: I checked the local tarball/package override flow for supply-chain bypass, package/path injection, command injection, and secret/logging exposure. The new overrides entries are derived from locally packed workspace packages and only applied to @sockethub/* package names; install commands continue to use argv-based process execution rather than shell interpolation.
Sent by Cursor Automation: Find vulnerabilities
There was a problem hiding this comment.
🧹 Nitpick comments (1)
scripts/test-installed-version/install.js (1)
19-19: ⚡ Quick winRefine JSDoc type to include
null.The parameter accepts
nullas well asRecord<string, string>(default isnullon line 21, andtest-installed-version.jsline 208 types it as| null). Update the JSDoc for precision.📝 Suggested JSDoc fix
- * `@param` {Record<string, string>} [localPackages] - Map of package name to local tarball path + * `@param` {Record<string, string> | null} [localPackages] - Map of package name to local tarball path🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/test-installed-version/install.js` at line 19, Update the JSDoc for the parameter named localPackages to include null in its type (e.g., change Record<string, string> to Record<string, string> | null) so the documented type matches the default and usages (see the localPackages parameter in this file and the reference in test-installed-version.js); ensure the JSDoc line that currently reads "`@param` {Record<string, string>} [localPackages]" is replaced with the union type that allows null.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@scripts/test-installed-version/install.js`:
- Line 19: Update the JSDoc for the parameter named localPackages to include
null in its type (e.g., change Record<string, string> to Record<string, string>
| null) so the documented type matches the default and usages (see the
localPackages parameter in this file and the reference in
test-installed-version.js); ensure the JSDoc line that currently reads "`@param`
{Record<string, string>} [localPackages]" is replaced with the union type that
allows null.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: d49ff2e6-2a50-48c4-9a2e-581748ac35ea
📒 Files selected for processing (3)
scripts/test-installed-version.jsscripts/test-installed-version/install.jsscripts/test-installed-version/local-build.js
Summary
Fixes bun runtime failure in Test NPM Package when
source=local.Root cause
Local installs only pinned the top-level
sockethubtarball. Transitive@sockethub/*dependencies (e.g.@sockethub/data-layer) were still resolved from the npm registry."import": "./dist/index.js"export condition → worked"bun": "./src/index.ts"export condition → loaded stale registry source missingCredentialsNotShareableError→ sockethub crashed on startupFrom run https://github.com/sockethub/sockethub/actions/runs/27102125560:
Fix
Return the full tarball map from
buildAndPackLocally()and add npm/bunoverridesfor all@sockethub/*packages during local test installs.Test plan
sockethub --infoexit 1)bun node_modules/.bin/sockethub --infosucceeds)bun run lintSummary by CodeRabbit