Skip to content

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

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

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

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Jun 3, 2026

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

Python -> Go Migration (greenfield)

Source: src/apm_cli/ (Python 3.10+)
Target: cmd/apm/, internal/ (Go)
Strategy: greenfield
Migration Issue: #78


Iteration 35 -- Register PR #103 tests in coverage manifest

PR #103 ("Fix Crane completion gating") added 5 new Python unit tests that were not registered in tests/parity/python_contract_coverage.yml. This caused the python_behavior_contracts deletion-grade gate to fail, blocking migration_score=1.0.

Fix: Register all 5 tests as obsolete entries in the coverage manifest:

  • test_crane_scheduler.py::test_issue_label_detection_accepts_github_label_payloads
  • test_crane_scheduler.py::test_pr_head_gate_fails_when_any_check_is_not_success
  • test_crane_scheduler.py::test_pr_head_gate_passes_only_when_all_checks_succeed
  • test_crane_workflow_prompt.py::test_crane_completion_is_two_phase_and_pr_head_gated
  • test_crane_workflow_prompt.py::test_crane_state_template_tracks_completion_candidate_gate

Verification result: All 10/10 deletion-grade gates pass, migration_score=1.0.

Gate Status
python_reference_required [+] pass
go_tests_pass [+] pass
surface_parity [+] pass
help_parity [+] pass
functional_contracts [+] pass
state_diff_contracts [+] pass
python_behavior_contracts [+] pass
python_tests_pass [+] pass
benchmarks_pass [+] pass
no_known_exceptions [+] pass

Score: 1.0 | Progress: 476/476 parity tests | Go tests: 498 passing | Python tests: 247 passing

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • bitbucket.example.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "bitbucket.example.com"

See Network Configuration for more information.

Generated by Crane · ● 41.3M ·

…35: Register PR #103 tests in coverage manifest

Changes:
- Add 5 new tests from PR #103 (crane completion gating) to python_contract_coverage.yml
- Fixes python_behavior_contracts gate failing (unknown tests not mapped as obsolete)
- All 10/10 deletion-grade gates now pass, migration_score=1.0

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

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

github-actions Bot commented Jun 3, 2026

Migration Benchmark Results

Migration CLI Benchmark

Max allowed Go/Python median ratio: 5.00

Command Python median Go median Go/Python Result Return codes
--help 0.4902s 0.0013s 0.00x 387.41x faster {'python': [0], 'go': [0]}
--version 0.4866s 0.0012s 0.00x 391.16x faster {'python': [0], 'go': [0]}
compile --help 0.4990s 0.0012s 0.00x 402.65x faster {'python': [0], 'go': [0]}
install --help 0.4394s 0.0012s 0.00x 354.42x faster {'python': [0], 'go': [0]}
pack --help 0.4397s 0.0013s 0.00x 347.65x faster {'python': [0], 'go': [0]}
audit --help 0.4445s 0.0012s 0.00x 357.81x faster {'python': [0], 'go': [0]}
init --yes 0.4468s 0.0013s 0.00x 346.85x faster {'python': [0], 'go': [0]}

@mrjf mrjf marked this pull request as ready for review June 3, 2026 22:05
@mrjf
Copy link
Copy Markdown
Contributor

mrjf commented Jun 3, 2026

This PR should not be treated as final completion for #78 yet.

The reported Python-vs-Go parity pass is useful, but the migration's completion gate now requires:

  1. a committed golden fixture corpus captured from the final Python-reference parity run, and
  2. an all-Go replay test proving cmd/apm against those fixtures with no Python runtime dependency available.

Until that Go-vs-golden/no-Python gate exists and passes, #78 should remain active and should not carry crane-completed.

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