Skip to content

test(e2e): add local-only Docker and desktop harness E2E suite - #122

Merged
futuregerald merged 2 commits into
mainfrom
feat/docker-e2e-harness-suite
Nov 14, 2026
Merged

futuregerald merged 2 commits into
mainfrom
feat/docker-e2e-harness-suite

Conversation

@futuregerald

@futuregerald futuregerald commented Nov 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds a local-only Docker and desktop-harness E2E test suite (make test-e2e) that builds skill-installer inside a clean Debian Bookworm + Go 1.27 + Node 22 container image with the real @anthropic-ai/claude-code (claude) and opencode-ai (opencode) CLIs installed, and verifies end-to-end behavior across all 4 harnesses (claude, antigravity, zed, and opencode) — including Claude Desktop, Antigravity Desktop, and real PTY-driven interactive Bubble Tea TUI journeys — while remaining completely excluded from GitHub Actions CI.

Also fixes a bug uncovered by the zero-flag PTY E2E test in main.go (buildRootCommand()), where guideCmd registered --track with default "opinionated" on the shared trackName variable and caused isInteractiveSession(cmd) to see trackName != "" before flag parsing.

Background & Context

  • Unit and integration tests in main_test.go and internal/installer/installer_test.go exercise in-process Go functions, but we also wanted a real containerized E2E harness (make test-e2e) that invokes the compiled skill-installer binary against real installed harness CLIs, desktop configuration layouts, and a real OS pseudo-terminal (PTY).
  • Per requirement, the E2E suite must never run in GitHub Actions CI (e2e/e2e_test.go is guarded by //go:build e2e so go test ./... and .github/workflows/test.yaml do not compile or run it unless -tags=e2e is explicitly passed).

Key Changes

  • e2e/Dockerfile & .dockerignore:
    • Multi-stage container combining golang:1.27-bookworm and node:22-bookworm, installing python3, python3-pytest, python3-yaml, @anthropic-ai/claude-code (claude), and opencode-ai (opencode), compiling /usr/local/bin/skill-installer, and running go test -v -count=1 -tags=e2e ./e2e as an unprivileged e2euser.
  • e2e/e2e_test.go (//go:build e2e):
    • Strict Host Isolation: sandboxEnv + assertIsolatedSandboxHome strip host variables and bind HOME, USERPROFILE, XDG_CONFIG_HOME, APPDATA, BREAKER_STATE_DIR, and BREAKER_LOG_PATH inside t.TempDir().
    • PTY Interactive Bubble Tea TUI Journeys (verifyInteractivePTYTUIJourneys):
      • Drives the compiled skill-installer binary with zero CLI flags over a real OS pseudo-terminal (pty.openpty() with 80x140 TIOCSWINSZ) across:
        1. Global Antigravity opinionated install + skill preview (p / d / Esc) + 3-tab post-install interactive guide tour (1 / 2 / 3 / q).
        2. Claude Code custom project directory inline editor (e + Ctrl+U + path) + custom track Space skill toggle (start + plugin-updater) + existing CLAUDE.md merge.
    • Claude Code CLI & Claude Desktop (Claude.app): Verifies claude --version, tests --global and --project installs across tracks, and verifies non-destructive coexistence with ~/Library/Application Support/Claude/claude_desktop_config.json, ~/.config/Claude/claude_desktop_config.json, and ~/.claude/settings.json.
    • Antigravity Desktop (Antigravity.app): Pre-seeds ~/.gemini/config/ (config.json, mcp_config.json, skills.json, rules/org.local.md, and a co-tenant hook in hooks.json), verifies GEMINI.md, antigravity-subagents/plugin.json, and all 21 PreToolUse tool matchers, and executes the installed autonomous-breaker.sh (autonomous_breaker.py) live against synthetic transcripts across low-token allow (20000), first-call Baton Warn (210000) + repeat pass-through, Baton Block (245000), and ACTIVE_CONTEXT.md +50k handoff unlock.
    • Zed Desktop (Zed.app) & OpenCode CLI (opencode): Verifies opencode --version, all 5 tracks, .agents/skills / .config/zed/AGENTS.md, settings.json / keymap.json preservation, and agents-only rejection on Zed.
    • Full CLI Flag & Single-File Restore Coverage (verifyRemainingCLIFlagsAndSingleFileRestore): Exercises --dry-run, --mode config-only, --skip-agents, --skip-commands, --skip-claude-md, and restore --file <path>.
  • main.go & main_test.go:
    • Fixes guideCmd --track registration default so buildRootCommand() does not clobber trackName before flag parsing (TestBuildRootCommandDoesNotClobberTrackName).

Test Plan

  • test -z "$(gofmt -l .)"
  • go vet ./... && go vet -tags=e2e ./...
  • HOME=$(mktemp -d) go test -race ./... (verified e2e is excluded when -tags=e2e is omitted)
  • PYTHONDONTWRITEBYTECODE=1 pytest -p no:cacheprovider -q ... (741 passed)
  • make test-e2e (Docker build + TestContainerHarnessesE2E + TestHostDesktopAppsCompatibilitySandbox in container and on macOS host)

Rollback Plan

Revert commits bee073e and f2e0c52 via git revert f2e0c52 bee073e.

@futuregerald
futuregerald merged commit 8c51bba into main Nov 14, 2026
1 check passed
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.

1 participant