Skip to content

Commit 37d17e4

Browse files
authored
Merge pull request #26 from githubnext/autoloop-progress/go-migration-iter24-7b126167538465d9
[autoloop-progress] docs: update Go migration progress page to iteration 24
2 parents 56c6622 + 006a327 commit 37d17e4

1 file changed

Lines changed: 61 additions & 26 deletions

File tree

docs/src/content/docs/progress/autoloop-go-migration.mdx

Lines changed: 61 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,34 @@ The `Autoloop Go Migration Progress Site` agentic workflow refreshes this page a
1818
| Autoloop branch | [`autoloop/python-to-go-migration`](https://github.com/githubnext/apm/tree/autoloop/python-to-go-migration) |
1919
| Tracking issue | [#3 Python-to-Go Migration](https://github.com/githubnext/apm/issues/3) |
2020
| Accumulating PR | [#17 Autoloop: python-to-go-migration](https://github.com/githubnext/apm/pull/17) |
21-
| Last accepted iteration | Iteration 4, 2026-05-12 16:30 UTC |
22-
| Best metric | 1.15% migrated |
23-
| Migrated lines | 827 of 71,696 original Python lines |
24-
| Migrated modules | 11 |
21+
| Last accepted iteration | Iteration 24, 2026-05-13 14:22 UTC |
22+
| Best metric | 9.89% migrated (`python_lines_migrated_pct`) |
23+
| Migrated lines (best) | ~7,092 of 71,696 original Python lines |
24+
| Migrated modules (status.json) | 24 (iter-13 baseline; see note below) |
25+
26+
:::caution[Branch reset caveat]
27+
The migration branch periodically fast-forward-resets when main merges. Each Autoloop iteration rebuilds lost modules before adding new ones. `benchmarks/migration-status.json` reflects the iter-13 stable baseline (24 modules, 4,245 lines). Iteration 24 committed an additional 30 Go packages on top of that baseline; those modules are not yet captured in the JSON. The machine-state `best_metric` of 9.89 corresponds to ~7,092 migrated lines and is the authoritative progress signal.
28+
:::
2529

2630
## Migration progress
2731

2832
| Iteration | Run | Change | Metric |
2933
|---:|---|---|---:|
30-
| 1 | [25717987972](https://github.com/githubnext/apm/actions/runs/25717987972) | Initialized the Go module and migrated `constants.py`, `version.py`, `utils/short_sha.py`, `utils/paths.py`, and `utils/normalization.py`. | 0.40% |
31-
| 2 | [25736801433](https://github.com/githubnext/apm/actions/runs/25736801433) | Migrated `utils/yaml_io.py`, `utils/atomic_io.py`, and `utils/git_env.py`. | 0.68% |
32-
| 3 | [25744614816](https://github.com/githubnext/apm/actions/runs/25744614816) | Migrated `utils/guards.py` as `internal/utils/guards`. | 0.85% |
33-
| 4 | [25747630390](https://github.com/githubnext/apm/actions/runs/25747630390) | Migrated `utils/subprocess_env.py` and `utils/helpers.py`. | 1.15% |
34+
| 1 | [25717987972](https://github.com/githubnext/apm/actions/runs/25717987972) | Initialized Go module; migrated `constants.py`, `version.py`, `utils/short_sha.py`, `utils/paths.py`, `utils/normalization.py`. | 0.40% |
35+
| 2 | [25736801433](https://github.com/githubnext/apm/actions/runs/25736801433) | Migrated `utils/yaml_io.py`, `utils/atomic_io.py`, `utils/git_env.py`. | 0.68% |
36+
| 3 | [25744614816](https://github.com/githubnext/apm/actions/runs/25744614816) | Migrated `utils/guards.py`. | 0.85% |
37+
| 4 | [25747630390](https://github.com/githubnext/apm/actions/runs/25747630390) | Migrated `utils/subprocess_env.py`, `utils/helpers.py`. | 1.15% |
38+
| 5-12 || Migrated `utils/content_hash.py`, `utils/exclude.py`, `utils/path_security.py`, `utils/version_checker.py`, `utils/file_ops.py`, `utils/console.py`, `utils/diagnostics.py`, `utils/install_tui.py`, `utils/github_host.py`, `utils/reflink.py`; branch resets caused repeated rebuilds. | 0.0%–5.41% |
39+
| 13 | [25771166584](https://github.com/githubnext/apm/actions/runs/25771166584) | Migrated 13 modules including `install/errors.py`, `install/cache_pin.py`, `install/context.py`; 4,245 total lines — stable baseline now recorded in `benchmarks/migration-status.json`. | 5.92% |
40+
| 14-21 || Repeatedly rebuilt modules lost to branch resets; added `compilation/*`, `models/*`, `policy/*`, `marketplace/*`, `cache/*`, `integration/*`, `workflow/*`, `primitives/*`; metrics oscillated with each reset. | 6.39%–8.66% |
41+
| 22 | [25798457534](https://github.com/githubnext/apm/actions/runs/25798457534) | Migrated 26 modules: `compilation/buildid+outputwriter+constitution`, `models/results+dependency/types`, `policy/schema+matcher+inheritance`, `install/request+summary+mcpargs`, `runtime/base`, `marketplace/validator+errors+tagpattern`, `cache/urlnormalize+paths+integrity`, `integration/utils+coverage`, `workflow/discovery+parser`, `core/nulllogger`, `deps/gitremoteops+aggregator`, `primitives/models`. | 9.37% |
42+
| 23 | [25801585559](https://github.com/githubnext/apm/actions/runs/25801585559) | Rebuilt 28 modules after another branch reset to iter-13 state. | 6.99% |
43+
| 24 | [25805061357](https://github.com/githubnext/apm/actions/runs/25805061357) | Rebuilt 27 modules and added 3 new ones (`marketplace/shadowdetector`, `core/dockerargs`, `deps/installedpackage`); +2,847 lines over iter-13 baseline. | **9.89%** |
3444

3545
## Migrated modules
3646

47+
The table below lists the 24 modules recorded in `benchmarks/migration-status.json` on the migration branch (iter-13 stable baseline). Iteration 24 also includes 30 additional Go packages on the branch that are not yet captured in the JSON.
48+
3749
| Python module | Go package | Python lines |
3850
|---|---|---:|
3951
| `src/apm_cli/constants.py` | `internal/constants` | 55 |
@@ -47,38 +59,61 @@ The `Autoloop Go Migration Progress Site` agentic workflow refreshes this page a
4759
| `src/apm_cli/utils/guards.py` | `internal/utils/guards` | 123 |
4860
| `src/apm_cli/utils/subprocess_env.py` | `internal/utils/subprocenv` | 84 |
4961
| `src/apm_cli/utils/helpers.py` | `internal/utils/helpers` | 131 |
62+
| `src/apm_cli/utils/content_hash.py` | `internal/utils/contenthash` | 108 |
63+
| `src/apm_cli/utils/exclude.py` | `internal/utils/exclude` | 169 |
64+
| `src/apm_cli/utils/path_security.py` | `internal/utils/pathsecurity` | 130 |
65+
| `src/apm_cli/utils/version_checker.py` | `internal/utils/versionchecker` | 193 |
66+
| `src/apm_cli/utils/file_ops.py` | `internal/utils/fileops` | 326 |
67+
| `src/apm_cli/utils/console.py` | `internal/utils/console` | 224 |
68+
| `src/apm_cli/utils/diagnostics.py` | `internal/utils/diagnostics` | 486 |
69+
| `src/apm_cli/utils/install_tui.py` | `internal/utils/installtui` | 365 |
70+
| `src/apm_cli/utils/github_host.py` | `internal/utils/githubhost` | 624 |
71+
| `src/apm_cli/utils/reflink.py` | `internal/utils/reflink` | 281 |
72+
| `src/apm_cli/install/errors.py` | `internal/install/errors` | 113 |
73+
| `src/apm_cli/install/cache_pin.py` | `internal/install/cachepin` | 233 |
74+
| `src/apm_cli/install/context.py` | `internal/install/installctx` | 166 |
5075

51-
## Benchmark snapshot
76+
## Benchmark signals
5277

53-
Autoloop's current migration metric is `python_lines_migrated_pct`: `(migrated_python_lines / original_python_lines) * 100`. The latest recorded status file on the migration branch reports 827 migrated lines out of 71,696 total, or 1.15%.
78+
### Migration metric
5479

55-
### Manifest operations benchmark
80+
Autoloop tracks `python_lines_migrated_pct = (migrated_python_lines / original_python_lines) * 100`. The best recorded value is **9.89%** (iteration 24, ~7,092 of 71,696 lines). `go build ./...` and `go test ./...` pass on all accepted iterations. Module-specific Python-vs-Go timing data is not yet present in `benchmarks/migration-status.json`.
5681

57-
The existing `scripts/benchmark_manifest_ops.py` benchmark measures Python manifest operation optimizations that remain relevant while Go parity work advances.
82+
### Manifest operations benchmark (`scripts/benchmark_manifest_ops.py`)
83+
84+
Run locally on 2026-05-13 with `python3 scripts/benchmark_manifest_ops.py`. Results are nondeterministic micro-benchmarks; order-of-magnitude values are stable across runs.
5885

5986
| Scale | `check_collision` speedup | `sync_remove_files` speedup | `cleanup_empty_parents` speedup | Scoped uninstall speedup |
6087
|---|---:|---:|---:|---:|
61-
| Current: 10 packages, 50 paths | 21.6x | 1.9x | 1.0x | 1.7x |
62-
| Growing: 50 packages, 250 paths | 85.4x | 1.7x | 0.6x | 9.7x |
63-
| Large monorepo: 100 packages, 2,000 paths | 519.8x | 1.7x | 0.5x | 20.5x |
88+
| Current: 10 pkgs, 50 paths | 24.9x | 1.8x | 0.9x | 2.0x |
89+
| Growing: 50 pkgs, 250 paths | 117.6x | 1.7x | 0.6x | 9.6x |
90+
| Large monorepo: 100 pkgs, 2,000 paths | 923.3x | 1.7x | 0.5x | 24.2x |
91+
92+
`cleanup_empty_parents` shows a small regression at scale (0.5x–0.9x) because the batch bottom-up algorithm has higher constant overhead than the legacy per-file walk-up at low deleted-file counts. This is expected and acceptable given the gains on the other three operations.
6493

65-
### Go validation signals
94+
### Go build/test validation
6695

67-
The Autoloop memory records that the Go module builds cleanly and `go test ./...` passes on accepted iterations. Module-specific Python-vs-Go timing data is not yet present in `benchmarks/migration-status.json`; the progress workflow should publish those timings here once Autoloop starts recording them.
96+
| Signal | Status | Notes |
97+
|---|---|---|
98+
| `go build ./...` | Pass (all accepted iters) | Confirmed in iter-13, iter-22, iter-23, iter-24 notes |
99+
| `go test ./...` | Pass (all accepted iters) | Confirmed in iter-13, iter-22, iter-23, iter-24 notes |
100+
| External deps | Unavailable in sandbox | `gopkg.in/yaml.v3` blocked; stdlib-only YAML scanner used for `workflow/parser` and `deps/aggregator` |
68101

69102
## Next up
70103

71-
The Autoloop memory identifies these likely next targets:
104+
From the Autoloop memory `Future Directions`:
72105

73-
- `utils/content_hash.py`: SHA-256 tree hashing.
74-
- `utils/exclude.py`: gitignore-style file exclusion.
75-
- `utils/console.py`: CLI output helpers.
76-
- Eventually wire Go packages into the Python CLI via subprocess or replace the entry point.
106+
- `install/pipeline.py` (741 lines), `install/sources.py` (734 lines), `install/services.py` (734 lines) -- larger install modules, clear patterns.
107+
- `policy/discovery.py` (1,365 lines) -- highest-impact policy module.
108+
- `deps/github_downloader.py` (1,686 lines) -- requires HTTP client work.
109+
- `install/phases/finalize.py` (92), `install/template.py` (140), `install/service.py` (146) -- smaller fill-in modules.
110+
- Wire Go packages into the Python CLI via subprocess or subprocess-replacement.
111+
- Address recurring branch-reset issue: consider a stable upstream merge strategy so `benchmarks/migration-status.json` stays current.
77112

78113
## Operating notes
79114

80-
- Prefer leaf modules first; they have fewer internal APM dependencies and lower integration risk.
81-
- Keep Go implementations stdlib-only when sandbox networking blocks external module fetches.
82-
- Continue recording every accepted iteration in `benchmarks/migration-status.json` so this page can report real migration and benchmark data instead of estimates.
115+
- Prefer leaf modules first; fewer internal APM dependencies and lower integration risk.
116+
- Keep Go implementations stdlib-only when sandbox networking blocks external module fetches (e.g., use a line-scanner for YAML frontmatter instead of `gopkg.in/yaml.v3`).
117+
- Record every accepted iteration in `benchmarks/migration-status.json` so this page can report complete module data.
83118

84-
Last seeded: 2026-05-12 17:11 UTC.
119+
Last updated: 2026-05-13 15:14 UTC.

0 commit comments

Comments
 (0)