Repository navigation
test(e2e): add local-only Docker and desktop harness E2E suite - #122
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a local-only Docker and desktop-harness E2E test suite (
make test-e2e) that buildsskill-installerinside a clean Debian Bookworm + Go 1.27 + Node 22 container image with the real@anthropic-ai/claude-code(claude) andopencode-ai(opencode) CLIs installed, and verifies end-to-end behavior across all 4 harnesses (claude,antigravity,zed, andopencode) — 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()), whereguideCmdregistered--trackwith default"opinionated"on the sharedtrackNamevariable and causedisInteractiveSession(cmd)to seetrackName != ""before flag parsing.Background & Context
main_test.goandinternal/installer/installer_test.goexercise in-process Go functions, but we also wanted a real containerized E2E harness (make test-e2e) that invokes the compiledskill-installerbinary against real installed harness CLIs, desktop configuration layouts, and a real OS pseudo-terminal (PTY).e2e/e2e_test.gois guarded by//go:build e2esogo test ./...and.github/workflows/test.yamldo not compile or run it unless-tags=e2eis explicitly passed).Key Changes
e2e/Dockerfile&.dockerignore:golang:1.27-bookwormandnode:22-bookworm, installingpython3,python3-pytest,python3-yaml,@anthropic-ai/claude-code(claude), andopencode-ai(opencode), compiling/usr/local/bin/skill-installer, and runninggo test -v -count=1 -tags=e2e ./e2eas an unprivilegede2euser.e2e/e2e_test.go(//go:build e2e):sandboxEnv+assertIsolatedSandboxHomestrip host variables and bindHOME,USERPROFILE,XDG_CONFIG_HOME,APPDATA,BREAKER_STATE_DIR, andBREAKER_LOG_PATHinsidet.TempDir().verifyInteractivePTYTUIJourneys):skill-installerbinary with zero CLI flags over a real OS pseudo-terminal (pty.openpty()with80x140TIOCSWINSZ) across:opinionatedinstall + skill preview (p/d/Esc) + 3-tab post-install interactive guide tour (1/2/3/q).e+Ctrl+U+ path) +customtrackSpaceskill toggle (start+plugin-updater) + existingCLAUDE.mdmerge.Claude.app): Verifiesclaude --version, tests--globaland--projectinstalls 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.app): Pre-seeds~/.gemini/config/(config.json,mcp_config.json,skills.json,rules/org.local.md, and a co-tenant hook inhooks.json), verifiesGEMINI.md,antigravity-subagents/plugin.json, and all 21PreToolUsetool matchers, and executes the installedautonomous-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), andACTIVE_CONTEXT.md+50khandoff unlock.Zed.app) & OpenCode CLI (opencode): Verifiesopencode --version, all 5 tracks,.agents/skills/.config/zed/AGENTS.md,settings.json/keymap.jsonpreservation, andagents-onlyrejection on Zed.verifyRemainingCLIFlagsAndSingleFileRestore): Exercises--dry-run,--mode config-only,--skip-agents,--skip-commands,--skip-claude-md, andrestore --file <path>.main.go&main_test.go:guideCmd--trackregistration default sobuildRootCommand()does not clobbertrackNamebefore flag parsing (TestBuildRootCommandDoesNotClobberTrackName).Test Plan
test -z "$(gofmt -l .)"go vet ./...&&go vet -tags=e2e ./...HOME=$(mktemp -d) go test -race ./...(verifiede2eis excluded when-tags=e2eis omitted)PYTHONDONTWRITEBYTECODE=1 pytest -p no:cacheprovider -q ...(741 passed)make test-e2e(Docker build +TestContainerHarnessesE2E+TestHostDesktopAppsCompatibilitySandboxin container and on macOS host)Rollback Plan
Revert commits
bee073eandf2e0c52viagit revert f2e0c52 bee073e.