Skip to content

[Crane: crane-migration-python-to-go-full-apm-cli-rewrite]#83

Open
github-actions[bot] wants to merge 10 commits into
mainfrom
crane/crane-migration-python-to-go-full-apm-cli-rewrite
Open

[Crane: crane-migration-python-to-go-full-apm-cli-rewrite]#83
github-actions[bot] wants to merge 10 commits into
mainfrom
crane/crane-migration-python-to-go-full-apm-cli-rewrite

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

APM CLI: Python -> Go Full Rewrite

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

Migration: Python 3.10+ (CPython/Click/Rich) -> Go (native binary)
Strategy: greenfield
Migration Issue: #78
State File: crane-migration-python-to-go-full-apm-cli-rewrite.md


Current Status

Best Score 0.0033 (1/302 parity tests passing)
Progress 1/302 (0.3%)
Milestone 1 -- Build scaffolding (done)
Next Milestone 2 -- Go test/parity harness

Iteration 2 Summary

Established the Go module and build scaffolding:

  • go.mod for github.com/githubnext/apm (Go 1.24)
  • cmd/apm/main.go -- stub entry point
  • cmd/apm/main_test.go -- smoke test (first parity point: build compiles)
  • .crane/scripts/score.go -- parity scoring script

go build ./... and go test ./... both pass. migration_score improved from 0.0 to 0.0033.

Generated by Crane · ● 18.4M ·

…2: Milestone 1 -- Go build scaffolding

- Add go.mod (module github.com/githubnext/apm, go 1.24)
- Add cmd/apm/main.go stub entry point
- Add cmd/apm/main_test.go smoke test (parity_passing: 1/302)
- Add .crane/scripts/score.go parity scoring script

go build ./... passes. migration_score: 0.0033 (prev best: 0.0, delta: +0.0033)

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

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@mrjf mrjf marked this pull request as ready for review May 21, 2026 21:08
@mrjf
Copy link
Copy Markdown
Contributor

mrjf commented May 21, 2026

@copilot resolve the merge conflicts in this pull request

Copilot AI and others added 2 commits May 21, 2026 21:10
…led renames and plan.md

Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI commented May 21, 2026

@copilot resolve the merge conflicts in this pull request

Resolved. The only conflict was an add/add in .crane/scripts/score.go — I kept the origin/main version, which has more complete parity-test detection logic and the "must NOT be modified after milestone 1" note. All other changes (workflow renames, plan.md, test_crane_score.py) merged cleanly. go build ./... and go test ./... both pass on the merged result (fd3a3f9).

Copilot finished work on behalf of mrjf May 21, 2026 21:11
Copilot AI requested a review from mrjf May 21, 2026 21:11
…4: Milestone 3 -- utils + constants

Port internal/constants, internal/utils/normalization, internal/utils/sha,
internal/utils/paths with parity tests.

- internal/constants: APM file/dir name constants, InstallMode, DefaultSkipDirs
- internal/utils/normalization: BOM strip, CRLF norm, Build ID strip, Normalize
- internal/utils/sha: FormatShortSHA (8-char hex validation, sentinel handling)
- internal/utils/paths: PortableRelpath (cross-platform forward-slash paths)

49 parity tests passing (was 0 on current branch, best was 0.0430).
migration_score: 0.1622 (prev best: 0.0430, delta: +0.1192)

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

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

Commit pushed: f88cb50

Generated by Crane · ● 34.4M

github-actions Bot and others added 2 commits May 22, 2026 01:30
…5: Milestone 4 -- models + primitives

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

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

Commit pushed: d6047cd

Generated by Crane · ● 22.3M

github-actions Bot and others added 2 commits May 22, 2026 07:46
…6: Port internal/deps -- dependency graph and lockfile types

Ported core data structures from src/apm_cli/deps/dependency_graph.py and
src/apm_cli/deps/lockfile.py into internal/deps/:
- DependencyNode, CircularRef, ConflictInfo, FlatDependencyMap, DependencyTree, DependencyGraph
- LockedDependency (with to_dict/from_dict parity, port validation, sorted fields)
- InstalledPackage

15 new TestParity* tests added. parity_passing: 75 -> 90, score 0.2483 -> 0.2980.

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

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

Commit pushed: e1c924b

Generated by Crane · ● 28.8M

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.

2 participants