|
1 | 1 | # APM – Agent Package Manager |
2 | 2 |
|
3 | 3 | Experimental go migration of APM. |
| 4 | + |
| 5 | +## Go CLI migration status |
| 6 | + |
| 7 | +The Python-to-Go CLI migration is now landed but still intentionally keeps both |
| 8 | +implementations in the tree: |
| 9 | + |
| 10 | +- The Python CLI remains the reference implementation and parity oracle. |
| 11 | +- The Go CLI lives under `cmd/apm` and can be built as a local `apm-go` binary. |
| 12 | +- The Crane migration PR was merged in |
| 13 | + [githubnext/apm#91](https://github.com/githubnext/apm/pull/91), and the |
| 14 | + migration issue is marked `crane-completed` in |
| 15 | + [githubnext/apm#78](https://github.com/githubnext/apm/issues/78). |
| 16 | +- The restored migration workflow verifies Python-vs-Go parity with |
| 17 | + `APM_PYTHON_BIN` set. Latest verified parity evidence reports |
| 18 | + `migration_score=1`, `progress=1`, and `706/706` parity tests passing. |
| 19 | +- The benchmark workflow follow-up in |
| 20 | + [githubnext/apm#93](https://github.com/githubnext/apm/pull/93) uploads a |
| 21 | + `migration-benchmark-evidence` artifact with Python-vs-Go CLI timings. |
| 22 | + |
| 23 | +This means Python unit tests and Go parity tests pass for the migration gate. |
| 24 | +That gate is not the same thing as claiming all historical Python integration, |
| 25 | +live-service, and benchmark coverage is now green for every workflow. |
| 26 | + |
| 27 | +### Build and run the Go CLI locally |
| 28 | + |
| 29 | +From the repository root: |
| 30 | + |
| 31 | +```bash |
| 32 | +go build -o ./dist/apm-go ./cmd/apm |
| 33 | +``` |
| 34 | + |
| 35 | +Then try the local binary: |
| 36 | + |
| 37 | +```bash |
| 38 | +./dist/apm-go --help |
| 39 | +./dist/apm-go init --yes |
| 40 | +``` |
| 41 | + |
| 42 | +### Run the definitive parity check locally |
| 43 | + |
| 44 | +When the Python CLI is installed in the project virtual environment, run: |
| 45 | + |
| 46 | +```bash |
| 47 | +uv sync --extra dev |
| 48 | +export APM_PYTHON_BIN="$PWD/.venv/bin/apm" |
| 49 | +go test ./... |
| 50 | +go test -json ./... | go run .crane/scripts/score.go |
| 51 | +``` |
| 52 | + |
| 53 | +`APM_PYTHON_BIN` is required for the hard Python-vs-Go parity gate; without it, |
| 54 | +Go-only tests are not completion evidence. |
| 55 | + |
| 56 | +### Run the Actions parity and benchmark workflow |
| 57 | + |
| 58 | +Maintainers can dispatch the migration workflow manually: |
| 59 | + |
| 60 | +```bash |
| 61 | +gh workflow run migration-ci.yml --repo githubnext/apm --ref main |
| 62 | +``` |
| 63 | + |
| 64 | +After it runs, open the **Migration Benchmarks** job summary for the timing |
| 65 | +table. The same run uploads the `migration-benchmark-evidence` artifact with |
| 66 | +JSON and Markdown copies of the benchmark data. In the benchmark table, the |
| 67 | +`Go/Python` ratio is the Go median duration divided by the Python median |
| 68 | +duration: values below `1.00x` mean Go is faster. Recent smoke benchmark |
| 69 | +evidence for startup/help/init-style commands shows the Go CLI roughly |
| 70 | +`327x`-`370x` faster than the Python CLI. |
0 commit comments