Skip to content

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

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

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

Conversation

@github-actions

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

Copy link
Copy Markdown
Contributor

[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


Iteration 77 -- Completion Candidate

Status: All 13 deletion-grade gates pass; migration_score=1.0 re-established after stale-completion reset. Completion Candidate set; waiting for PR head CI to finalize.

Changes in this iteration:

  • cmd/apm/CUTOVER.md: Updated Current State section from partial implementation to deletion-grade ready; added gate summary table (all 13 gates passing); added pre-cutover verification command; updated Timeline.
Metric Value
Score 1.0 (best: 1.0, delta: +1.0 from reset)
Parity 855/855 (100%)
Go tests 900 passing
Python tests 247 passing
Commit 4ba58f5
Run 27166284809

Gate summary: all 13 passing (python_reference_required, surface_parity, help_parity, functional_contracts, state_diff_contracts, python_behavior_contracts, golden_fixture_corpus, all_go_golden_tests, no_python_runtime_dependency, known_exceptions=0, go_tests, python_tests, benchmarks).

Warning

Firewall blocked 1 domain

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

  • aka.ms

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

network:
  allowed:
    - defaults
    - "aka.ms"

See Network Configuration for more information.

Generated by Crane · ● 57.1M ·

…75: validate config keys; add parity tests; map new Python scheduler tests

Changes:
- cmd_config.go: validate keys in config get/set/unset; exit 1 for unknown keys
- parity_harness_test.go: 6 new TestParityHarness* tests for config subcommands
- real_behavior_test.go: use auto-integrate instead of invalid install.parallel_downloads key
- python_test_coverage.json: map 2 new crane_scheduler Python tests

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

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Migration Benchmark Results

Migration CLI Benchmark

Includes fixture-backed commands that must read, write, execute, or fail against real project state. The installed-project fixture contains apm.yml, apm.lock.yaml, apm_modules packages, local .apm primitives, target directories, deployed prompt files, and sample source files.
The harness checks return-code parity for each command. Detailed stdout/stderr byte counts are kept in the JSON samples, but this is not an output-parity test.

Max allowed Go/Python median ratio: 5.00

Benchmark Command Fixture Python median Go median Go/Python Result Return codes
init scaffold init --yes empty-project 0.4549s 0.0013s 0.00x 340.79x faster {'python': [0], 'go': [0]}
targets json targets --json installed-project 0.4317s 0.0013s 0.00x 328.95x faster {'python': [0], 'go': [0]}
script list list installed-project 0.4379s 0.0014s 0.00x 322.62x faster {'python': [0], 'go': [0]}
deps list deps list installed-project 0.4513s 0.0014s 0.00x 333.66x faster {'python': [0], 'go': [0]}
deps tree deps tree installed-project 0.4460s 0.0014s 0.00x 326.42x faster {'python': [0], 'go': [0]}
install local package install --no-policy ./packages/local-tools local-install-project 0.5006s 0.0017s 0.00x 302.91x faster {'python': [0], 'go': [0]}
compile copilot target compile --target copilot compilation-project 0.4597s 0.0014s 0.00x 331.76x faster {'python': [0], 'go': [0]}
pack output pack --output dist installed-project 0.4626s 0.0015s 0.00x 316.07x faster {'python': [0], 'go': [0]}
run script run stamp runnable-project 0.4459s 0.0022s 0.00x 201.13x faster {'python': [0], 'go': [0]}
audit hidden unicode audit --ci audit-finding-project 0.4550s 0.0016s 0.00x 288.02x faster {'python': [1], 'go': [1]}

Workloads

  • init scaffold: Creates a new apm.yml in an otherwise empty project directory.
  • targets json: Reads configured project targets from apm.yml and emits machine output.
  • script list: Reads apm.yml scripts and renders the runnable script inventory.
  • deps list: Scans apm_modules package directories and apm.lock.yaml metadata.
  • deps tree: Builds a dependency tree from apm.lock.yaml and installed package metadata.
  • install local package: Installs a local package and materializes lock/module state.
  • compile copilot target: Discovers local primitives and writes the Copilot target artifact.
  • pack output: Resolves local package contents and writes a distributable artifact.
  • run script: Executes a project script and writes the script's side-effect file.
  • audit hidden unicode: Scans a real installed file and fails on planted hidden Unicode.

…76: fix missing Python test coverage mappings

Changes:
- tests/parity/python_contract_coverage.yml: add 2 missing crane_scheduler
  tests to obsolete list (test_main_exits_zero_and_outputs_no_work_when_no_migrations_are_due,
  test_main_outputs_has_work_when_migration_is_due) to fix
  TestParityCompletionPythonBehaviorContracts CI failure

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

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Commit pushed: 010e9e0

Generated by Crane · ● 79.5M

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

[bot] Iteration 76 accepted (CI pending) -- Crane run

  • Commit: 577f0ec
  • Change: Fix iter 75 CI failure -- add 2 missing Python test coverage entries to tests/parity/python_contract_coverage.yml
  • Milestone: CI fix for stale-completion reset iteration
  • Score: Pending CI (previous best reset to --)
  • Root cause: Iter 75 mapped the new crane_scheduler tests to cmd/apm/testdata/go_cutover/python_test_coverage.json (used by TestGoCutoverPythonTestConversionCoverage), but TestParityCompletionPythonBehaviorContracts reads tests/parity/python_contract_coverage.yml.obsolete. Both files must be updated when new Python tests land on main.
  • CI fix attempts: 1

Generated by Crane · ● 79.5M ·

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Migration Benchmark Results

Migration CLI Benchmark

Includes fixture-backed commands that must read, write, execute, or fail against real project state. The installed-project fixture contains apm.yml, apm.lock.yaml, apm_modules packages, local .apm primitives, target directories, deployed prompt files, and sample source files.
The harness checks return-code parity for each command. Detailed stdout/stderr byte counts are kept in the JSON samples, but this is not an output-parity test.

Max allowed Go/Python median ratio: 5.00

Benchmark Command Fixture Python median Go median Go/Python Result Return codes
init scaffold init --yes empty-project 0.4413s 0.0013s 0.00x 329.48x faster {'python': [0], 'go': [0]}
targets json targets --json installed-project 0.4222s 0.0014s 0.00x 311.50x faster {'python': [0], 'go': [0]}
script list list installed-project 0.4235s 0.0013s 0.00x 319.97x faster {'python': [0], 'go': [0]}
deps list deps list installed-project 0.4318s 0.0014s 0.00x 319.12x faster {'python': [0], 'go': [0]}
deps tree deps tree installed-project 0.4262s 0.0013s 0.00x 326.62x faster {'python': [0], 'go': [0]}
install local package install --no-policy ./packages/local-tools local-install-project 0.4773s 0.0017s 0.00x 275.42x faster {'python': [0], 'go': [0]}
compile copilot target compile --target copilot compilation-project 0.4504s 0.0015s 0.00x 305.80x faster {'python': [0], 'go': [0]}
pack output pack --output dist installed-project 0.4512s 0.0015s 0.00x 309.40x faster {'python': [0], 'go': [0]}
run script run stamp runnable-project 0.4378s 0.0022s 0.01x 196.44x faster {'python': [0], 'go': [0]}
audit hidden unicode audit --ci audit-finding-project 0.4475s 0.0016s 0.00x 285.08x faster {'python': [1], 'go': [1]}

Workloads

  • init scaffold: Creates a new apm.yml in an otherwise empty project directory.
  • targets json: Reads configured project targets from apm.yml and emits machine output.
  • script list: Reads apm.yml scripts and renders the runnable script inventory.
  • deps list: Scans apm_modules package directories and apm.lock.yaml metadata.
  • deps tree: Builds a dependency tree from apm.lock.yaml and installed package metadata.
  • install local package: Installs a local package and materializes lock/module state.
  • compile copilot target: Discovers local primitives and writes the Copilot target artifact.
  • pack output: Resolves local package contents and writes a distributable artifact.
  • run script: Executes a project script and writes the script's side-effect file.
  • audit hidden unicode: Scans a real installed file and fails on planted hidden Unicode.

…77: update CUTOVER.md to deletion-grade ready state

Changes:
- cmd/apm/CUTOVER.md: Update Current State section from "partial implementation"
  to deletion-grade ready; add gate summary table (all 13 gates passing);
  add pre-cutover verification command; update Timeline to reflect completion
- All 13 deletion-grade gates confirmed: migration_score=1.0, parity 855/855,
  Go 900 tests, Python 247 tests, no known exceptions, all golden/no-Python gates pass

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

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Commit pushed: e020c7a

Generated by Crane · ● 57.1M

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

[bot] Iteration 77 accepted -- Crane run

  • Commit: 4ba58f5
  • Change: cmd/apm/CUTOVER.md updated to deletion-grade ready state; all 13 gates confirmed passing locally
  • Milestone: 23 -- Completion Candidate (score=1.0 re-established after stale reset)
  • Score: 1.0 (best: 1.0 [new best after stale reset], delta: +1.0)
  • Progress: 855/855 parity (100%), Go 900 tests, Python 247 tests
  • Completion Candidate: true -- waiting for PR head CI checks to pass for final completion

Warning

Firewall blocked 1 domain

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

  • aka.ms

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

network:
  allowed:
    - defaults
    - "aka.ms"

See Network Configuration for more information.

Generated by Crane · ● 57.1M ·

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Migration Benchmark Results

Migration CLI Benchmark

Includes fixture-backed commands that must read, write, execute, or fail against real project state. The installed-project fixture contains apm.yml, apm.lock.yaml, apm_modules packages, local .apm primitives, target directories, deployed prompt files, and sample source files.
The harness checks return-code parity for each command. Detailed stdout/stderr byte counts are kept in the JSON samples, but this is not an output-parity test.

Max allowed Go/Python median ratio: 5.00

Benchmark Command Fixture Python median Go median Go/Python Result Return codes
init scaffold init --yes empty-project 0.4393s 0.0014s 0.00x 309.70x faster {'python': [0], 'go': [0]}
targets json targets --json installed-project 0.4217s 0.0013s 0.00x 316.12x faster {'python': [0], 'go': [0]}
script list list installed-project 0.4251s 0.0014s 0.00x 305.54x faster {'python': [0], 'go': [0]}
deps list deps list installed-project 0.4337s 0.0014s 0.00x 310.21x faster {'python': [0], 'go': [0]}
deps tree deps tree installed-project 0.4303s 0.0014s 0.00x 305.79x faster {'python': [0], 'go': [0]}
install local package install --no-policy ./packages/local-tools local-install-project 0.4720s 0.0017s 0.00x 277.03x faster {'python': [0], 'go': [0]}
compile copilot target compile --target copilot compilation-project 0.4474s 0.0015s 0.00x 300.44x faster {'python': [0], 'go': [0]}
pack output pack --output dist installed-project 0.4470s 0.0014s 0.00x 310.32x faster {'python': [0], 'go': [0]}
run script run stamp runnable-project 0.4299s 0.0022s 0.01x 194.85x faster {'python': [0], 'go': [0]}
audit hidden unicode audit --ci audit-finding-project 0.4373s 0.0017s 0.00x 262.91x faster {'python': [1], 'go': [1]}

Workloads

  • init scaffold: Creates a new apm.yml in an otherwise empty project directory.
  • targets json: Reads configured project targets from apm.yml and emits machine output.
  • script list: Reads apm.yml scripts and renders the runnable script inventory.
  • deps list: Scans apm_modules package directories and apm.lock.yaml metadata.
  • deps tree: Builds a dependency tree from apm.lock.yaml and installed package metadata.
  • install local package: Installs a local package and materializes lock/module state.
  • compile copilot target: Discovers local primitives and writes the Copilot target artifact.
  • pack output: Resolves local package contents and writes a distributable artifact.
  • run script: Executes a project script and writes the script's side-effect file.
  • audit hidden unicode: Scans a real installed file and fails on planted hidden Unicode.

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