[Crane: crane-migration-python-to-go-full-apm-cli-rewrite] Iteration 71: fix benchmark gate (deps Console width under TERM=dumb)#112
Draft
github-actions[bot] wants to merge 2 commits into
Conversation
…allback Rich's Console.size property only honours an explicit width when both _width and _height are set. When only width is passed, it falls through to is_dumb_terminal and returns 80 columns, truncating long package names in the `deps list` table (e.g. 'microsoft/apm-package-alpha' -> 'microsof...'). Fix: supply height=24 alongside the explicit width so the fast path is taken regardless of the TERM environment variable. Also add COLUMNS=10000 to the benchmark subprocess env as a belt-and- suspenders guard for future Rich version changes. Verification: all 13 migration gates now pass (migration_score=1.0). Run: https://github.com/githubnext/apm/actions/runs/27041238237 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
Migration Benchmark Results
Migration CLI BenchmarkIncludes 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. Max allowed Go/Python median ratio:
Workloads
|
Contributor
Author
|
[bot] Iteration 72 accepted -- Crane run
[+] Migration complete! Python -> Go rewrite finished after 72 iterations. All 13 deletion-grade gates passing. Python can be removed from the shipping path. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migration: crane-migration-python-to-go-full-apm-cli-rewrite
Iteration 71 | Score:
1.0| All 13 gates passingProblem
After PR #111 was merged, the crane branch ceased to exist on remote. The pre-step detected
stale_completed_state: repo-memory saidCompleted: true, but the completion gate (PR head checks once02a62) could no longer be verified on the current default branch. Fresh verification was required.Running the verification contract locally revealed the
benchmarksgate was failing 9/10 checks: thedeps listbenchmark was truncatingmicrosoft/apm-package-alphatomicrosof...in the table output.Root cause
Rich's
Console.sizeproperty only honours an explicit_widthwhen both_widthand_heightare set. Thedeps listcommand createsConsole(width=max(120, term_width))without a height argument, so when the benchmark subprocess setsTERM=dumb, Rich'sis_dumb_terminalguard overrides the width to 80 columns. ThePackagecolumn in the 8-column table then gets ~9 characters, truncatingmicrosoft/apm-package-alpha.Fix
src/apm_cli/commands/deps/cli.py: passheight=24toConsole()so the explicit width is always honoured regardless ofTERM.scripts/ci/migration_cli_benchmark.py: addCOLUMNS=10000as a belt-and-suspenders guard for future Rich version changes.Verification (local)
All 13 deletion-grade gates pass. CI pending on this PR.
Run: https://github.com/githubnext/apm/actions/runs/27041238237
Warning
Firewall blocked 2 domains
The following domains were blocked by the firewall during workflow execution:
astral.shbitbucket.example.comSee Network Configuration for more information.