|
| 1 | +# install-integration |
| 2 | + |
| 3 | +End-to-end integration test for [`install.md`](../../install.md). Runs the |
| 4 | +install flow as a real coding agent (Copilot CLI) against a long-lived |
| 5 | +target repo (`mrjf/autoloop-test` by default), then exercises Phase 2 by |
| 6 | +running one iteration each of three programs across the program-source × |
| 7 | +strategy matrix. |
| 8 | + |
| 9 | +This test is **manual-dispatch only**. It is not part of CI. |
| 10 | + |
| 11 | +## Local mode |
| 12 | + |
| 13 | +```bash |
| 14 | +# from the autoloop repo root: |
| 15 | +./tests/install-integration/run.sh |
| 16 | +``` |
| 17 | + |
| 18 | +Requirements: |
| 19 | + |
| 20 | +- `gh` CLI authenticated as a user with write access to the target repo. |
| 21 | +- `copilot` CLI on PATH. |
| 22 | +- `python3` and `git` on PATH. |
| 23 | + |
| 24 | +Optional env / flags: |
| 25 | + |
| 26 | +- `INSTALL_TEST_REPO=<owner>/<repo>` -- override the target (default |
| 27 | + `mrjf/autoloop-test`). |
| 28 | +- `--keep` (or `KEEP_STATE_ON_FAILURE=1`) -- skip teardown on failure so |
| 29 | + the failure state can be inspected. Run `teardown.sh <repo> <base-sha>` |
| 30 | + manually afterwards. |
| 31 | + |
| 32 | +## Actions mode |
| 33 | + |
| 34 | +Trigger the **Install Integration Test** workflow from the Actions tab. It |
| 35 | +runs the same script on a GitHub-hosted runner. Requires the |
| 36 | +`INSTALL_TEST_TOKEN` repo secret -- a PAT with `repo` scope on the target |
| 37 | +repo (the default `GITHUB_TOKEN` has no access to repos outside the host). |
| 38 | + |
| 39 | +## What it tests |
| 40 | + |
| 41 | +See [the issue that introduced this harness](https://github.com/githubnext/autoloop/issues) |
| 42 | +for the full motivation. In short: |
| 43 | + |
| 44 | +- **Phase 1** (file presence + lock idempotency) -- catches regressions in |
| 45 | + `install.md` and in `gh aw compile`. |
| 46 | +- **Phase 2** (3 programs × 1 iteration each) -- catches regressions in |
| 47 | + the scheduler, in strategy discovery, and in the iteration loop. The |
| 48 | + three programs cover: |
| 49 | + |
| 50 | + | # | Source | Strategy | |
| 51 | + |---|------------|-----------------| |
| 52 | + | 1 | file-based | OpenEvolve | |
| 53 | + | 2 | issue-based| Test-Driven | |
| 54 | + | 3 | file-based | plain (default) | |
| 55 | + |
| 56 | +- **Phase 3** (teardown) -- resets the target repo to the captured base |
| 57 | + SHA, closes test issues/PRs, and deletes test branches. |
| 58 | + |
| 59 | +## Files |
| 60 | + |
| 61 | +| File | Purpose | |
| 62 | +|-----------------------|--------------------------------------------------| |
| 63 | +| `run.sh` | Driver. Orchestrates phases 1-3. | |
| 64 | +| `prompt.md` | Prompt fed to Copilot CLI (edit without touching the driver). | |
| 65 | +| `verify-phase1.sh` | File-presence + lock-idempotency assertions. | |
| 66 | +| `verify-phase2.sh` | Per-program assertions (one call per program). | |
| 67 | +| `teardown.sh` | Idempotent cleanup. Safe to re-run. | |
0 commit comments