Skip to content

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

Open
github-actions[bot] wants to merge 6 commits into
mainfrom
autoloop/python-to-go-migration
Open

[Autoloop: python-to-go-migration]#39
github-actions[bot] wants to merge 6 commits into
mainfrom
autoloop/python-to-go-migration

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

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

Python-to-Go Migration

Goal: Incrementally rewrite the APM CLI from Python to Go, one module at a time.

Program Issue: #3

Current Best Metric: 16.68% Python lines migrated


Iteration 32 (latest)

Migrated 16 modules (+4024 Python lines):

Install phases:

  • install/plan.py (425) — UpdatePlan diff, RenderPlanText, LockfileSatisfiesManifest
  • install/insecure_policy.py (229) — HTTP dep policy helpers
  • install/phases/cleanup.py (158) — orphan + stale-file cleanup
  • install/phases/finalize.py (92) — verbose stats + install result
  • install/phases/heal.py (90) — heal-chain dispatcher
  • install/phases/lockfile.py (260) — LockfileBuilder, compute deployed hashes
  • install/phases/post_deps_local.py (117) — local content stale cleanup
  • install/phases/download.py (135) — parallel pre-download

MCP modules:

  • install/mcp/warnings.py (123) — F5 SSRF + F7 shell metachar warnings
  • install/mcp/conflicts.py (122) — E1-E15 flag conflict matrix
  • install/mcp/entry.py (106) — pure MCP entry builder
  • install/mcp/writer.py (132) — apm.yml MCP persistence
  • install/mcp/command.py (160) — MCP install orchestrator
  • install/mcp/registry.py (277) — registry URL validation

Policy checks:

  • policy/policy_checks.py (1010) — allowlist, denylist, required packages
  • policy/ci_checks.py (588) — baseline CI checks (lockfile-exists, sync, drift)

All modules use stdlib-only Go. go build ./... and go test ./... pass.

Generated by Autoloop · ● 59.6M ·

github-actions Bot and others added 4 commits May 13, 2026 16:40
…o Go (+3691 Python lines, 11.07%)

Rebuild 30 modules from iter-24 baseline and add 5 new modules:
- compilation: buildid, constants, output_writer, constitution (iter-24 rebuild)
- compilation: claude_formatter, gemini_formatter (agentformatter), injector, template_builder (new)
- models: results, dependency/types
- policy: schema, matcher, inheritance
- install: request, summary, mcp/args
- runtime: base
- marketplace: validator, errors, semver, tag_pattern, shadow_detector
- cache: url_normalize, paths, integrity
- integration: utils, coverage
- workflow: parser (iter-24 rebuild), discovery (new)
- core: null_logger, docker_args
- deps: git_remote_ops, aggregator, installed_package
- primitives: models

New metric: 11.07% (7936/71696 Python lines migrated)
Previous best: 9.89%
Delta: +1.18%

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

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…+4024 Python lines)

Migrated install/plan.py, insecure_policy.py, 6 install phases (cleanup,
finalize, heal, lockfile, post_deps_local, download), 6 MCP modules
(warnings, conflicts, entry, writer, command, registry), and 2 policy
check modules (policy_checks, ci_checks). All use stdlib-only Go.
go build ./... and go test ./... pass. Metric: 16.68% (prev 15.16, +1.52).

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

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…1103 Python lines)

Migrated modules:
- integration/skill_transformer.py (113) -> skilltransformer: ToHyphenCase, SkillTransformer.TransformToAgent
- integration/dispatch.py (91) -> dispatch: PrimitiveDispatch struct, DefaultDispatchTable
- install/heals/base.py (122) -> heals: HealContext, Heal interface, RunHealChain
- install/heals/branch_ref_drift.py (66) -> heals: BranchRefDriftHeal
- install/heals/buggy_lockfile_recovery.py (99) -> heals: BuggyLockfileRecoveryHeal
- compilation/constitution_block.py (104) -> constitutionblock: RenderBlock, InjectOrUpdate
- install/phases/local_content.py (191) -> localcontent: ProjectHasRootPrimitives, HasLocalApmContent
- install/phases/policy_target_check.py (113) -> policytargetcheck: TargetCheckIDs, ShouldRunCheck
- install/phases/policy_gate.py (204) -> policygate: PolicyViolationError, EnforcementResult

Metric: 16.68 -> 18.22 (+1.54)
Run: https://github.com/githubnext/apm/actions/runs/25836695236

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

Commit pushed: 1c70c74

Generated by Autoloop

@github-actions github-actions Bot mentioned this pull request May 14, 2026
@mrjf mrjf marked this pull request as ready for review May 14, 2026 02:44
…dels, coworkpaths, mcpdep, sharedclonecache

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

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

Commit pushed: f0e57d6

Generated by Autoloop

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.

0 participants