Skip to content

fix(infra): build the remote web image from the apps context - #513

Merged
ixjosemi merged 7 commits into
mainfrom
fix/deploy-remote-web-build
Oct 30, 2026
Merged

ixjosemi merged 7 commits into
mainfrom
fix/deploy-remote-web-build

Conversation

@ixjosemi

@ixjosemi ixjosemi commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

WEB_IMAGE=arche-web:latest ./infra/deploy/deploy.sh ... (build the web image on the VPS) has been broken since #488:

  1. prepare_remote_web_image shipped only apps/web and built it as the context, but apps/web/Containerfile expects the apps/ context (COPY desktop-runtime /desktop-runtime, COPY web/...), like CI (context: apps) and scripts/check-podman-images.sh. The build failed with COPY desktop-runtime ... no such file or directory.
  2. From macOS, bsdtar adds AppleDouble ._* files; the Next build then parsed ._ads-scripts.json and failed with Invalid JSON in kickstart agent definition / Failed to collect page data for /api/internal/desktop/kickstart/catalog.

Fix

  • Ship apps/web, apps/desktop-runtime and apps/.dockerignore, extract them as the apps/ context and build with podman build -f web/Containerfile. Shipping .dockerignore keeps a dirty local checkout's node_modules/.next out of the image.
  • COPYFILE_DISABLE=1 tar --no-xattrs for both remote archives (web and workspace image), so no ._* files or macOS xattr headers reach the remote host. Both are harmless with GNU tar.
  • Regression test in apps/web/tests/dev-scripts.test.ts (fails before the fix), including the --strip-components=1 layout.

Not changed: the remote build still runs as the SSH user (rootless podman store), and the upload still includes node_modules before .dockerignore filters it on the host.

Verification

pnpm test tests/dev-scripts.test.ts 9/9, bash -n infra/deploy/deploy.sh, scripts/check-podman-images.sh passed. A real remote deploy from macOS built the web image on the host and completed (failed=0). Reviewed by an independent adversarial review.

🤖 Generated with Claude Code

ixjosemi and others added 2 commits October 23, 2026 11:19
The remote deployer shipped only apps/web and built from it, but the web
Containerfile expects the apps/ context (desktop-runtime and web/ paths),
as CI and check-podman-images.sh use. Ship apps/web, apps/desktop-runtime
and apps/.dockerignore, and build with -f web/Containerfile.

Set COPYFILE_DISABLE=1 on both remote tar invocations so macOS tar does
not add AppleDouble ._* files that break the kickstart JSON parsing.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Without --no-xattrs, bsdtar still writes LIBARCHIVE/SCHILY xattr headers
for every file, which GNU tar on the remote host reports as unknown
extended header keywords. The test now also pins the apps/ extraction
layout (--strip-components=1) the -f web/Containerfile build relies on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018KZHH5VXxZa7mcidXRJdYE
@ixjosemi
ixjosemi requested a review from Inakitajes October 23, 2026 10:36
@ixjosemi

Copy link
Copy Markdown
Contributor Author

cc @albertoperdomo2

@albertoperdomo2 albertoperdomo2 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.

Approving. The remote build now uses the apps/ context that apps/web/Containerfile needs: desktop-runtime, web/ and .dockerignore sit at the context root, the same layout CI (build-push.yml) and scripts/check-podman-images.sh use. COPYFILE_DISABLE=1 tar --no-xattrs keeps macOS ._* files and xattrs out of both remote archives.

albertoperdomo2 and others added 5 commits October 30, 2026 08:16
FocusScope dispatches its unmount event from a setTimeout(0). When the shell test file is the last one in its worker, that timer fired after Vitest restored Node's CustomEvent, raising an unhandled dispatchEvent error that failed the run.
@ixjosemi
ixjosemi merged commit ccb1c62 into main Oct 30, 2026
11 checks passed
@ixjosemi
ixjosemi deleted the fix/deploy-remote-web-build branch October 30, 2026 09:47
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.

2 participants