Skip to content

[Autoloop: python-to-go-migration]#43

Merged
mrjf merged 28 commits into
mainfrom
autoloop/python-to-go-migration
May 14, 2026
Merged

[Autoloop: python-to-go-migration]#43
mrjf merged 28 commits into
mainfrom
autoloop/python-to-go-migration

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Python-to-Go Migration Progress

This PR accumulates all accepted iterations of the incremental Python-to-Go migration of the APM CLI.

Program goal: Rewrite the APM CLI from Python to Go, one module at a time, tracking migration progress as a percentage of original Python source lines replaced by working Go code.

Current best metric: 25.62% of original Python lines migrated

Program issue: #3


Latest iteration (38)

Migrated 4 modules (+893 Python lines):

  • src/apm_cli/update_policy.py (50 lines) -> internal/updatepolicy/
  • src/apm_cli/output/models.py (136 lines) -> internal/output/models/
  • src/apm_cli/integration/prompt_integrator.py (228 lines) -> internal/integration/promptintegrator/
  • src/apm_cli/integration/instruction_integrator.py (479 lines) -> internal/integration/instructionintegrator/

All packages use stdlib-only Go. The instruction integrator includes a test suite covering cursor/claude/windsurf format transforms.


[!] This PR is maintained by Autoloop. Each accepted iteration adds a commit to this branch.

Generated by Autoloop · ● 66.5M ·

github-actions Bot and others added 4 commits May 14, 2026 06:17
…targets, deps/lockfile, install/local_bundle_handler

Run: https://github.com/githubnext/apm/actions/runs/25844894761

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…late, runtime/factory, marketplace/registry, marketplace/git_stderr (+588 lines, 24.38%)

Run: https://github.com/githubnext/apm/actions/runs/25847876982

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…pdate_policy, output/models, prompt_integrator, instruction_integrator) +893 lines

Run: https://github.com/githubnext/apm/actions/runs/25851449671

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…tor, agent_integrator, utils

Migrated 3 modules:
- integration/base_integrator.py (562 lines) -> internal/integration/baseintegrator/
- integration/agent_integrator.py (606 lines) -> internal/integration/agentintegrator/
- integration/utils.py (46 lines) -> already in intutils (counted)

Total: +1214 Python lines migrated. Metric: 27.32 (was 25.62, delta: +1.70)

Run: https://github.com/githubnext/apm/actions/runs/25854672963

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

Commit pushed: 05d41e2

Generated by Autoloop

@github-actions github-actions Bot mentioned this pull request May 14, 2026
… command integrators (+3359 Python lines)

Run: https://github.com/githubnext/apm/actions/runs/25857101991

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

Commit pushed: 2e52f0d

Generated by Autoloop

github-actions Bot and others added 2 commits May 14, 2026 11:30
…er and models/validation

Migrate 2 Python modules to Go:
- src/apm_cli/core/command_logger.py (751 lines) -> internal/core/commandlogger
- src/apm_cli/models/validation.py (800 lines) -> internal/models/validation

Total new lines: +1551 Python lines migrated.
Metric: 34.17% (previous: 32.00%, delta: +2.17%)

commandlogger: CommandLogger and InstallLogger with full lifecycle
  methods (start, progress, success, error, warning, verbose, policy
  violation logging, install summary). Delegates to console package.

validation: PackageType/PackageContentType enums, ValidationResult,
  DetectionEvidence, GatherDetectionEvidence, DetectPackageType,
  and ValidateAPMPackage with all 7 detection-cascade cases.
  Includes test suite (6 tests pass).

Run: https://github.com/githubnext/apm/actions/runs/25859136824

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

Commit pushed: f6c870d

Generated by Autoloop

github-actions Bot and others added 2 commits May 14, 2026 12:24
…tion, apm_package, marketplace/ymlschema (+1953 lines)

Run: https://github.com/githubnext/apm/actions/runs/25861743202

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

Commit pushed: 6b3adfc

Generated by Autoloop

github-actions Bot and others added 2 commits May 14, 2026 13:20
…ext, policy/outcomerouting, primitives/primparser, output/scriptformatters

Run: https://github.com/githubnext/apm/actions/runs/25865196805

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

Commit pushed: 7782163

Generated by Autoloop

github-actions Bot and others added 2 commits May 14, 2026 14:29
…io, windsurf, securityscan, gitauthenv, codexruntime, llmruntime (+608 lines)

Run: https://github.com/githubnext/apm/actions/runs/25868342116

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

Commit pushed: c2f710d

Generated by Autoloop

github-actions Bot and others added 2 commits May 14, 2026 15:31
…anager (+497), primitives/discovery (+612)

Migrated 2 modules, +1109 Python lines. Metric: 38.91 -> 40.45 (+1.54).

- core/token_manager: GitHubTokenManager with credential-fill subprocess, gh CLI fallback,
  per-(host,port) cache, and setup/validate helpers for Copilot/Codex/LLM runtimes.
- primitives/discovery: PrimitiveCollection with conflict detection, local/dependency
  primitive scanning, globMatch with ** support, FindPrimitiveFiles with exclude pruning.

Run: https://github.com/githubnext/apm/actions/runs/25871294987

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

Commit pushed: 631b5c5

Generated by Autoloop

github-actions Bot and others added 2 commits May 14, 2026 16:28
…dency/reference (+1559), deps/plugin_parser (+677)

Run: https://github.com/githubnext/apm/actions/runs/25874088970

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

Commit pushed: 3fd8773

Generated by Autoloop

github-actions Bot and others added 2 commits May 14, 2026 17:30
…runner (1138) and output/formatters (999) to Go

Run: https://github.com/githubnext/apm/actions/runs/25876945928

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

Commit pushed: 157b028

Generated by Autoloop

github-actions Bot and others added 2 commits May 14, 2026 18:23
…arketplace/refresolver, marketplace/builder (+2409 lines)

Run: https://github.com/githubnext/apm/actions/runs/25879951640

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

Commit pushed: d9b387f

Generated by Autoloop

github-actions Bot and others added 2 commits May 14, 2026 19:23
…, download_strategies, core/operations (+2185 lines)

Run: https://github.com/githubnext/apm/actions/runs/25882786853

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

Commit pushed: 8f7ba3b

Generated by Autoloop

github-actions Bot and others added 2 commits May 14, 2026 20:21
…d Go modules + migrate audit_report, experimental, drift (+8822 lines)

Run: https://github.com/githubnext/apm/actions/runs/25885268645

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

Commit pushed: a10f2b0

Generated by Autoloop

… modules + migrate host_backends + policy/discovery

Registered 6 previously untracked Go modules (+5033 lines):
- deps/download_strategies (1122) -> internal/deps/downloadstrategies
- deps/apm_resolver (918) -> internal/deps/apmresolver
- core/operations (145) -> internal/core/operations
- models/dependency/reference (1559) -> internal/models/depreference
- primitives/discovery (612) -> internal/primitives/discovery
- deps/plugin_parser (677) -> internal/deps/pluginparser

New Go migrations (+1988 lines):
- deps/host_backends (623) -> internal/deps/hostbackends: HostBackend interface +
  GitHubBackend/GHECloudBackend/GHESBackend sharing gitHubFamilyBase; ADOBackend/
  GitLabBackend/GenericGitBackend; BackendFor/BackendForHost dispatch
- policy/discovery (1365) -> internal/policy/discovery: DiscoverPolicy/
  DiscoverPolicyWithChain; GitHub Contents API fetch; URL fetch; file load;
  hash-pin verification (sha256); JSON-based cache with TTL + stale fallback;
  minimal YAML policy parser; atomic cache writes via os.Rename

Metric: 65.26 -> 75.06 (+9.80)

Run: https://github.com/githubnext/apm/actions/runs/25886940959

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

Commit pushed: 445385d

Generated by Autoloop

@mrjf mrjf marked this pull request as ready for review May 14, 2026 22:58
@mrjf mrjf merged commit 4338c93 into main May 14, 2026
github-actions Bot added a commit that referenced this pull request May 14, 2026
- Update latest status: iteration 51, PR #43, best metric 75.06%
- Migrated lines: 53,813 of 71,696 (was 15,116)
- Migrated modules: 141 (was 89)
- Extend migration progress table with iters 36-51
- Replace migrated modules table with full current list from migration-status.json
- Update benchmark signals and Go build/test validation (iters 49-51)
- Update next-up section: github_downloader, mcp_integrator, agents_compiler
- Timestamp: 2026-05-14 23:03 UTC

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot deleted the autoloop/python-to-go-migration branch May 15, 2026 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant