Skip to content

chore: manual integration tests for remote devcontainer features #243

Closed

Description

@gerchowl

Context

PR #166 consolidates all remote devcontainer features into feature/70-remote-devc-orchestration. Unit tests pass but manual integration testing on a real remote host is needed before merge.

Parent: #70

Test Matrix

All tests require a real remote host with podman/docker installed (e.g. ksb-meatgrinder).

1. Core orchestration (devc-remote.sh)

  • devc-remote.sh myserver:~/Projects/fd5 — SSH, preflight, compose up (tested via gh: target, IDE open tested separately)
  • Re-run with container already running — skips compose up, opens editor
  • Re-run with container stopped — restarts and opens
  • --open none — infra only, no IDE launch
  • --open ssh — waits for Tailscale, prints hostname
  • --open code — opens VS Code instead of Cursor
  • --yes flag — auto-accepts prompts (reuse running container)

2. Tailscale SSH integration (#208, #230)

  • With TS_CLIENT_ID + TS_CLIENT_SECRET set — generates ephemeral key, injects into remote compose
  • Container joins tailnet after compose up
  • --open ssh mode — polls tailscale status, prints hostname when ready
  • Without TS env vars — silently skips (no error)

3. Claude Code CLI (#70)

  • With CLAUDE_CODE_OAUTH_TOKEN set — injects token into remote compose
  • setup-claude.sh install inside container — installs CLI, creates claude user
  • claude wrapper auto-switches to non-root user when run as root
  • setup-claude.sh start — refreshes workspace permissions
  • Without token — silently skips (no error)

4. Container lifecycle execution (#70)

  • Fresh container — runs post-create.sh then post-start.sh inside container
  • Existing running container — runs only post-start.sh (skips post-create)
  • Lifecycle scripts not present — skips gracefully with log message

5. --bootstrap (#235)

  • First run on clean host — prompts for projects_dir, creates config, forwards GHCR auth, clones devcontainer repo, builds image (build fails without uv — see bugs)
  • --bootstrap --yes — uses defaults without prompting
  • Re-run — reads existing config, skips prompts, pulls latest, rebuilds
  • GHCR auth forwarding — podman credentials or GHCR_TOKEN copied to remote

Note: Bootstrap will likely be simplified or removed post-release. GHCR auth forwarding should move into the normal deploy flow. See #246.

6. gh:org/repo[:branch] (#236)

  • devc-remote.sh myserver gh:vig-os/fd5 — clones to ~/Projects/fd5, starts devcontainer
  • devc-remote.sh myserver gh:vig-os/fd5:feature/my-branch — clones and checks out branch
  • Re-run with repo already cloned — fetches, doesn't re-clone
  • devc-remote.sh myserver:~/custom/path gh:vig-os/fd5 — overrides clone location
  • Branch switch on existing clone — checks out new branch

7. Compose file parsing (#70)

  • read_compose_files() correctly reads dockerComposeFile array from devcontainer.json
  • compose_cmd_with_files() builds correct -f flags
  • Works with single file string and multi-file array

8. Edge cases

  • Low disk space warning (<2GB) shown
  • Remote host without compose — clear error message
  • Remote host without container runtime — clear error message
  • SSH connection failure — clear error message
  • macOS remote host — warning shown

Summary: 36/39 passed

Remaining 3 items (8.1–8.3, 8.5) require special host conditions that are already covered by unit tests.

Bugs Found

  1. SSH drops empty args / expands ~ — Fixed with sentinel values _NONE_ / _DEFAULT_.
  2. Stopped container runs post-create — CONTAINER_FRESH=1 set on restart, not just creation. Idempotent but wasteful.
  3. Bootstrap build.sh fails without uv in PATH — prepare-build.sh requires uv which isn't in default PATH on remote.
  4. Bootstrap registry config field is unused — Stored but never passed to build.sh. Likely should be removed entirely (see feat: seamless local-to-remote handoff with just remote-devc #246).

Design Decisions (from testing session)

Refs: #70

Activity

  1. gerchowl commented on Mar 9, 2026

    @gerchowl
    ContributorAuthor

    Integration testing complete — 36/39 items verified on ksb-meatgrinder. Remaining 3 edge cases (low disk, no compose, no runtime) are covered by unit tests. Two bugs found and fixed in feature/70-remote-devc-orchestration (commits 17ca79f, 9280224). GHCR auth forwarding moved into normal deploy flow. See #246 for follow-up (simplify bootstrap, just remote-devc recipe).

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions