ci: restore basic and migration checks#92
Merged
Conversation
0cbab3e to
cfe9db1
Compare
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.
TL;DR
Restores an active PR CI surface and adds a migration-specific parity and benchmark workflow. This gives PRs like #91 actual checks plus a manual workflow_dispatch path when maintainers need a "run CI" button.
Problem
Approach
CIworkflow for Ruff, Python unit tests, and Go tests.Migration Parity and Benchmarksworkflow for Go parity score and benchmark evidence.scripts/ci/migration_cli_benchmark.pyto compare Python and Go CLI latency on smoke commands.main.Implementation
.github/workflows/ci.ymlruns onpull_request,merge_group, andworkflow_dispatch. It restores lint, Python unit tests, and Go tests withAPM_PYTHON_BINset to the checked-out Python CLI..github/workflows/migration-ci.ymlruns on migration-relevant paths and manual dispatch. A lightweight detection job skips the heavy parity/benchmark jobs when a PR only changes workflow wiring. When migration paths change, it installs the Python reference CLI, runsgo test ./..., computes.crane/scripts/score.go, uploads parity evidence, runs benchmark tests, and uploads benchmark evidence.scripts/ci/migration_cli_benchmark.pybenchmarks Python and Go CLI smoke commands, compares return codes, enforces a configurable Go/Python median latency ratio, and emits JSON plus Markdown summaries.tests/unit/test_crane_workflow_prompt.pygets a formatter-only trailing blank-line cleanup so restoredruff format --checkstarts green.Diagram
The migration workflow now produces both correctness evidence and benchmark evidence from the same PR head.
flowchart LR A["Migration PR"] --> B["Python-vs-Go Parity Gate"] B --> C["Migration Score Artifact"] B --> D["Migration Benchmarks"] D --> E["Benchmark Artifact"]Trade-offs
migration_score == 1.0; this is intentionally strict for completion-oriented migration PRs.CIworkflow is intentionally basic rather than resurrecting every disabled workflow at once.Benefits
workflow_dispatchentry points for CI and migration checks.Validation
Go tests were not run locally because the local workspace does not have a Go toolchain installed.
How to test
CIworkflow runs.cmd/**,internal/**,go.mod, or.crane/**: confirmMigration Parity and Benchmarksruns.workflow_dispatch.