End-to-end lifecycle tests for external agents. This harness covers the behaviors that only make sense against the real Entire CLI and the real agent CLI: entire enable, prompt execution, hook installation, checkpoint creation, rewind, and interactive sessions.
Generic protocol compliance is no longer in this directory. Those checks run from entireio/external-agents-tests and are wired into this repo through GitHub Actions.
e2e/
├── agents/ # Agent interface + implementations (kiro, etc.)
│ ├── agent.go # Agent/Session interfaces, registry, concurrency gating
│ ├── tmux.go # TmuxSession for interactive PTY sessions
│ └── kiro.go # Kiro agent (kiro-cli-chat)
├── entire/ # `entire` CLI wrapper
│ └── entire.go # Enable, Disable, RewindList, Rewind
├── testutil/ # Shared test infrastructure
│ ├── metadata.go # Checkpoint/session metadata types
│ ├── artifacts.go # Artifact capture (git-log, pane, logs)
│ ├── repo.go # RepoState, SetupRepo, ForEachAgent, Git helpers
│ └── assertions.go # Test assertions (testify-based)
├── bootstrap/ # Pre-test agent bootstrap (CI auth setup)
│ └── main.go # go run ./e2e/bootstrap
├── build.go # Agent discovery + binary builds for lifecycle runs
├── setup_test.go # TestMain: build agents, artifact dir, preflight
└── lifecycle_test.go # Shared lifecycle scenarios (ForEachAgent pattern)
mise run test:e2emise run test:e2e:lifecyclecd e2e && go test -tags=e2e -v -count=1 -run TestLifecycle_SinglePromptManualCommit ./...| Variable | Description |
|---|---|
E2E_AGENT |
Filter to a single agent (e.g. kiro). Default: all registered agents. |
E2E_ENTIRE_BIN |
Path to entire binary. Falls back to $PATH lookup. |
E2E_ARTIFACT_DIR |
Override artifact output directory. |
E2E_KEEP_REPOS |
Set to any value to preserve temp repos after tests. |
E2E_CONCURRENT_TEST_LIMIT |
Override per-agent concurrency limit (default: 2 for kiro). |
QWEN_E2E |
Set to 1 with E2E_AGENT=qwen to include live Qwen Code tests. |
- Create
e2e/agents/<name>.goimplementing theAgentinterface. - In
init(), conditionally register based onE2E_AGENTenv var. - Call
RegisterGate("<name>", N)to set concurrency limit. - If it's an external agent, implement
ExternalAgentsoSetupRepocan pre-enable external agents in Entire settings. - Add
agents/entire-agent-<name>/mise.tomlwithbuildandtesttasks. Non-Go agents are discovered through this build contract. - Keep generic protocol validation out of this directory. Add any reusable black-box protocol coverage to
external-agents-testsinstead.
After a test run, check e2e/artifacts/<timestamp>/ for:
git-log.txt— full git history including checkpoint branchgit-tree.txt— file tree at HEAD and checkpoint branch tipconsole.log— all agent prompts, outputs, and git commandspane.txt— final tmux pane content (interactive tests)PASS/FAIL— test outcome markercheckpoint-metadata/— checkpoint and session metadata JSONentire-logs/— entire CLI debug logs
Set E2E_KEEP_REPOS=1 to preserve the temp git repo (symlinked from artifact dir).