Skip to content

fix(pack): add missing download and host packages to Linux INTERNAL_PACKAGES#2837

Merged
Siri-Ray merged 5 commits into
nexu-io:mainfrom
Echo9k:fix/linux-pack-missing-internal-packages
May 29, 2026
Merged

fix(pack): add missing download and host packages to Linux INTERNAL_PACKAGES#2837
Siri-Ray merged 5 commits into
nexu-io:mainfrom
Echo9k:fix/linux-pack-missing-internal-packages

Conversation

@Echo9k

@Echo9k Echo9k commented May 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add @open-design/download and @open-design/host to INTERNAL_PACKAGES in all three pack lanes (linux, mac, win)
  • Add their build steps to buildWorkspaceArtifacts so tarballs are produced before the assembled app npm install
  • Add internal-packages-coverage.test.ts regression test that derives required workspace deps from app manifests and asserts all pack lanes include them

Why

The native tools-pack linux build --to appimage fails with:

npm error 404 Not Found - GET https://registry.npmjs.org/@open-design%2fdownload - Not found

@open-design/desktop declares @open-design/download and @open-design/host as runtime dependencies, and @open-design/web also depends on @open-design/host. Since these packages are not published to npm (workspace-only), the assembled app npm install step needs local tarballs β€” but they were not being generated because both packages were absent from INTERNAL_PACKAGES.

The same omission existed in the mac and win lanes.

What users will see

pnpm tools-pack linux build --to appimage (without --containerized) now completes successfully and produces a working AppImage. Mac and win lanes are also corrected proactively.

Surface area

  • tools/pack/src/linux.ts β€” INTERNAL_PACKAGES + buildWorkspaceArtifacts
  • tools/pack/src/mac/constants.ts β€” INTERNAL_PACKAGES
  • tools/pack/src/mac/workspace.ts β€” buildWorkspaceArtifacts
  • tools/pack/src/win/constants.ts β€” INTERNAL_PACKAGES
  • tools/pack/src/win/app.ts β€” buildWorkspaceArtifacts
  • tools/pack/tests/internal-packages-coverage.test.ts β€” new regression test
  • tools/pack/tests/win-app.test.ts β€” updated mock dirs
  • tools/pack/tests/workspace-build.test.ts β€” updated mock dirs + output files

Validation

  • pnpm tools-pack linux build --to appimage on aarch64 Linux β€” produced 265MB AppImage
  • pnpm tools-pack linux install β€” installed to ~/.local/bin/ with desktop entry and icon
  • npx vitest run in tools/pack/ β€” 21 test files, 132 tests all pass
  • New internal-packages-coverage.test.ts passes for all three lanes (linux, mac, win)
  • CI build_linux job (when ENABLE_STABLE_LINUX is set) should pass

Bug fix verification

Red-spec test: tools/pack/tests/internal-packages-coverage.test.ts

This test reads the runtime dependencies from apps/desktop/package.json, apps/web/package.json, apps/daemon/package.json, and apps/packaged/package.json, collects every @open-design/* workspace dependency, then asserts that each pack lane (linux, mac, win) declares all of them in its INTERNAL_PACKAGES list.

  • Red on main: Removing @open-design/download or @open-design/host from any lane causes the test to fail with a message like linux INTERNAL_PACKAGES is missing: @open-design/download, @open-design/host. This matches the pre-fix state of all three lanes.
  • Green on this branch: All three lanes now include both packages β€” test passes across linux/mac/win.

The test also guards against future drift: the next time someone adds a workspace:* runtime dependency to any of the packaged apps without updating the pack lanes, this test will go red immediately.

…ACKAGES

The native (non-containerized) Linux AppImage build fails with npm 404
errors because @open-design/download and @open-design/host β€” runtime
dependencies of @open-design/desktop and @open-design/web β€” were not
included in the INTERNAL_PACKAGES list. Without tarballs for these two
packages, npm install in the assembled app directory tries to resolve
them from the public registry where they don't exist.

Add both packages to INTERNAL_PACKAGES and their build steps to
buildWorkspaceArtifacts.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lefarcen lefarcen requested a review from nettee May 24, 2026 13:54
@lefarcen lefarcen added size/XS PR changes <20 lines risk/medium Medium risk: regular code changes type/bugfix Bug fix labels May 24, 2026

@lefarcen lefarcen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @Echo9k! Thanks for writing up the Linux AppImage packaging failure so clearly β€” the npm 404 and workspace-only package context make the scope easy to understand.

One quick PR-template cleanup before pool review picks this up: could you add the Surface area checklist and a Validation section? You can move the existing Linux build/install checks into Validation; the important bit is making the packaging surface and verification path easy to scan during release review.

Appreciate the focused fix here. πŸ™Œ

@nettee nettee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the Linux AppImage 404 path. I found one follow-up that would make this packaging seam less likely to drift again.

πŸ” Powered by Looper Β· runner=reviewer Β· agent=opencode Β· An autonomous AI dev team for your GitHub repos.

Comment thread tools/pack/src/linux.ts
…ression test

1. Extend the INTERNAL_PACKAGES fix to mac/constants.ts, mac/workspace.ts, win/constants.ts, and win/app.ts so all three pack lanes produce tarballs for @open-design/download and @open-design/host.

2. Add internal-packages-coverage.test.ts that derives required workspace runtime deps from apps/desktop and apps/web package.json files and asserts every pack lane's INTERNAL_PACKAGES includes them. This prevents the same drift from recurring when a new workspace dependency is added.

3. Update win-app.test.ts and workspace-build.test.ts mock directory lists to include the two new packages.
@lefarcen lefarcen added size/S PR changes 20-100 lines and removed size/XS PR changes <20 lines labels May 24, 2026

@lefarcen lefarcen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Echo9k, thanks for the quick cleanup here β€” the updated Surface area and Validation sections make the cross-platform packaging scope much easier to scan.

One last body-detail ask for the bugfix template: could you add a short Bug fix verification note that calls out the red→green seam? For example, note that the new internal-packages coverage would fail when a runtime workspace:* dependency is missing from a pack lane, and now passes across linux/mac/win.

That should make the regression story clear for release review. πŸ™Œ

@Echo9k

Echo9k commented May 24, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review feedback!

@lefarcen β€” Added Surface area checklist and Validation section to the PR description.

@nettee β€” Great catch. I've extended the fix to all three pack lanes (mac/constants.ts, mac/workspace.ts, win/constants.ts, win/app.ts) and added a regression test (tools/pack/tests/internal-packages-coverage.test.ts) that derives the required workspace:* runtime deps from apps/desktop/package.json, apps/web/package.json, apps/daemon/package.json, and apps/packaged/package.json, then asserts each lane's INTERNAL_PACKAGES includes all of them. This prevents drift next time a workspace dependency is added.

All 132 tests in tools/pack/ pass including the new coverage test.

@nettee nettee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found one blocking follow-up in the mac/win cached workspace-build path; details inline.

πŸ” Powered by Looper Β· runner=reviewer Β· agent=opencode Β· An autonomous AI dev team for your GitHub repos.

Comment thread tools/pack/src/mac/workspace.ts
@lefarcen

Copy link
Copy Markdown
Contributor

Heads-up: PR #2845 is also open against this same Linux AppImage packaging blocker. Both PRs touch tools/pack/src/linux.ts and add @open-design/download / @open-design/host so the isolated Linux assembly stops resolving those local runtime packages from npm.

You and @youcefzemmar may want to compare approaches; the maintainer team will decide which path lands. Sharing this so neither effort gets wasted.

@github-actions

Copy link
Copy Markdown
Contributor

@Echo9k friendly reminder: this PR has been waiting on an author response for more than 3 days after reviewer or maintainer feedback.

When you have a chance, please reply here or push an update. To keep the queue manageable, PRs with no author activity for more than 5 days after feedback may be closed automatically, but they can be reopened when work resumes.

@Siri-Ray

Copy link
Copy Markdown
Contributor

Addressed the blocking workspace-build cache follow-up and pushed a52b74f12 to the contributor branch.

What changed:

  • Added @open-design/download, @open-design/host, and @open-design/diagnostics to tools/pack/src/workspace-build.ts cache package hashing, build commands, required output files, and materialized artifact dirs.
  • Bumped the workspace-build cache schema so existing stale cache entries cannot hide the new outputs.
  • Added a cache-hit regression that deletes packages/host/dist/index.mjs after the first build and verifies ensureWorkspaceBuildArtifacts() restores it from cache without rebuilding.

Validation run locally on Node 24:

  • corepack pnpm install
  • corepack pnpm --filter @open-design/tools-pack test -- tests/workspace-build.test.ts tests/internal-packages-coverage.test.ts (passed: 21 files / 133 tests)
  • corepack pnpm --filter @open-design/tools-pack build (passed)
  • git diff --check (passed)

GitHub still shows CHANGES_REQUESTED until the review is re-run/dismissed, and the fork approval workflow is queued.

@nettee nettee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Echo9k I verified the cross-platform packaging follow-up on this head: the missing @open-design/download / @open-design/host tarball coverage is now wired through the linux/mac/win internal package lists, the shared mac/win workspace-build cache manifest was expanded for the new package outputs, and the regression tests cover both lane inclusion and cache-hit restoration for the added artifacts. Thanks for closing the cache-path follow-up as well; this looks ready from the implementation side.

πŸ” Powered by Looper Β· runner=reviewer Β· agent=codex Β· An autonomous AI dev team for your GitHub repos.

@Siri-Ray

Copy link
Copy Markdown
Contributor

Fixed the CI failure from tools/pack/tests/internal-packages-closure.test.ts and pushed 1a93b9c6d.

Cause: after the earlier fix, mac/win standalone prebundle installs included @open-design/download, but their prebundle policy still excluded @open-design/platform. Since download has a runtime workspace dependency on platform, the closure test correctly failed for mac and win.

Fix:

  • mac/win standalone prebundle policy now installs @open-design/platform.
  • mac/win prebundle tests now pin that platform remains installed in standalone mode.

Validation run locally on Node 24:

  • corepack pnpm install
  • corepack pnpm --filter @open-design/tools-pack test -- tests/internal-packages-closure.test.ts tests/mac-prebundle.test.ts tests/win-prebundle.test.ts tests/workspace-build.test.ts tests/internal-packages-coverage.test.ts (passed)
  • corepack pnpm --filter @open-design/tools-pack test (passed: 24 files / 163 tests)
  • corepack pnpm --filter @open-design/tools-pack build (passed)
  • git diff --check (passed)

@nettee nettee left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found one non-blocking follow-up in the Linux workspace-build sequence; details inline.

πŸ” Powered by Looper Β· runner=reviewer Β· agent=codex Β· An autonomous AI dev team for your GitHub repos.

Comment thread tools/pack/src/linux.ts
@Siri-Ray Siri-Ray added this pull request to the merge queue May 29, 2026
Merged via the queue into nexu-io:main with commit 2ea2c91 May 29, 2026
12 checks passed
@open-design-bot

Copy link
Copy Markdown
Contributor

πŸŽ‰ πŸ“‘ You just leveled up to Giotto

Giotto card for @Echo9k

πŸ“‘ ✨ Sending steady signals.

πŸ™Œ Your contributions send a clear signal across the network: you care about making Open Design better.

πŸ’› Thanks for helping Open Design move forward. Keep building in the open. πŸš€


πŸ“Š Rank #198 among 198 contributors.

πŸ”— Share on X (English) Β· εˆ†δΊ«εˆ° XοΌˆδΈ­ζ–‡οΌ‰

@lefarcen

Copy link
Copy Markdown
Contributor

πŸŽ‰ Merged, @Echo9k! The Linux AppImage npm 404 is fixed and the coverage landed cleanly across all three pack lanes. The internal-packages-coverage regression test is a particularly nice addition β€” it ties the lane lists directly to the app manifests, so any future workspace:* dependency gap will fail fast rather than surface as a cryptic 404 at pack time. Appreciate you sticking with the review iterations to get this across the finish line!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk/medium Medium risk: regular code changes size/S PR changes 20-100 lines type/bugfix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants