@@ -6,32 +6,35 @@ framework in issue #78).
66
77## Current State
88
9- ** Deletion-grade ready.** All 13 completion gates pass as of iteration 77.
9+ ** Gate hardened; deletion-grade readiness is blocked.** The previous 13-gate
10+ score accepted representative behavior and help-only coverage mappings. The
11+ completion gate now requires strict option parity, behavior-backed Python test
12+ conversion mappings, and real Go-only command fixtures before the Go binary can
13+ be declared equivalent.
1014
11- The Go binary (` cmd/apm ` ) has full functional parity with the Python CLI.
12- The Python CLI remains as the reference oracle until the explicit cutover
13- steps below are executed, but it is no longer required for correctness.
15+ The Go binary (` cmd/apm ` ) is still evaluated against the Python CLI. It must not
16+ be treated as the shipped ` apm ` command until the strict gates below pass.
1417
15- Gate summary (all passing) :
18+ Gate summary:
1619
1720| Gate | Status |
1821| ------| --------|
19- | python_reference_required | pass |
20- | surface_parity | 100% (855/855) |
21- | help_parity | 100% |
22- | functional_contracts | 100% |
23- | state_diff_contracts | 100% |
24- | python_behavior_contracts | 100% |
25- | golden_fixture_corpus | pass |
26- | all_go_golden_tests | pass |
27- | no_python_runtime_dependency | pass |
28- | known_exceptions | 0 |
29- | go_tests | pass (900 tests) |
30- | python_tests | pass (247 tests) |
31- | benchmarks | pass |
32-
33- The Go binary is ready to replace Python as the shipped ` apm ` command once
34- the cutover steps below are executed .
22+ | python_reference_required | required |
23+ | surface_parity | required |
24+ | help_parity | required |
25+ | option_parity | required; every Python CLI option must appear in Go help |
26+ | functional_contracts | required |
27+ | state_diff_contracts | required |
28+ | python_behavior_contracts | required; no obsolete or help-only mappings |
29+ | golden_fixture_corpus | required |
30+ | all_go_golden_tests | required |
31+ | no_python_runtime_dependency | required |
32+ | known_exceptions | must be 0 |
33+ | go_tests | required |
34+ | python_tests | required, or superseded by the all-Go replay |
35+ | benchmarks | required |
36+
37+ The Go binary is ready to replace Python only when all rows above pass in CI .
3538
3639### Pre-Cutover Verification
3740
@@ -48,9 +51,9 @@ The output must show `"migration_score": 1` and `"cutover_ready": true`.
4851## Real Criteria
4952
5053Every completion criterion must be backed by real command execution. The scorer
51- does not infer completion from test names for ` surface ` , ` help ` , ` functional ` ,
52- ` state_diff ` , ` python_behavior_contracts ` , or ` benchmarks ` ; each one must emit an
53- explicit ratio gate.
54+ does not infer completion from test names for ` surface ` , ` help ` ,
55+ ` option_parity ` , ` functional ` , ` state_diff ` , ` python_behavior_contracts ` , or
56+ ` benchmarks ` ; each one must emit an explicit ratio gate.
5457
5558Crane must run ` APM_PYTHON_BIN= go test ./cmd/apm -run TestGoCutover -json ` .
5659These fixture-backed tests execute the built Go ` apm ` binary in temporary
@@ -66,12 +69,20 @@ directly:
6669{"crane" :" gate" ,"name" :" no_python_runtime_dependency" ,"passed" :true }
6770```
6871
72+ The Python-vs-Go inventory tests must also emit:
73+
74+ ``` json
75+ {"crane" :" gate" ,"name" :" option_parity" ,"passing" :N,"total":N }
76+ ```
77+
6978` python_behavior_contracts ` is not allowed to mean "the Python CLI was
70- available." In the final gate it means every checked-in legacy Python pytest
71- node under ` tests/ ` (except the migration-specific ` tests/parity/ ` harness) is
72- listed in ` cmd/apm/testdata/go_cutover/python_test_coverage.json ` with one or
73- more Go test names that replace it. An empty or partial manifest is a hard
74- failure.
79+ available" or "the test was declared obsolete." In the final gate it means every
80+ checked-in legacy Python pytest node under ` tests/ ` (except the
81+ migration-specific ` tests/parity/ ` harness) is listed in
82+ ` cmd/apm/testdata/go_cutover/python_test_coverage.json ` with one or more
83+ existing real Go-only cutover behavior tests that replace it. Empty mappings,
84+ partial mappings, stale Go test names, ` python_tests.obsolete ` , Python-vs-Go
85+ completion tests, and help-only/surface-only mappings are hard failures.
7586
7687Crane must also run the migration benchmark test. It executes fixture-backed
7788Python-vs-Go benchmark workloads and emits:
@@ -111,7 +122,7 @@ completion.
111122The Go binary becomes the shipped ` apm ` command when ALL of the following
112123are true:
113124
114- 1 . All 26 commands respond correctly to ` -- help` (done)
125+ 1 . All public Python commands and options are present in Go help output
1151262 . The representative command matrix passes functional tests:
116127 ` init ` , ` install ` , ` update ` , ` compile ` , ` pack ` , ` run ` , ` audit ` ,
117128 ` policy ` , ` mcp ` , ` runtime ` , ` targets ` , ` list ` , ` view ` , ` cache ` ,
@@ -120,9 +131,11 @@ are true:
120131 fixture-backed real-command scenario and emits passing ` functional ` and
121132 ` state_diff ` gates
1221334 . ` TestGoCutoverPythonTestConversionCoverage ` proves every legacy Python test
123- has an explicit Go replacement in the cutover coverage manifest
124- 5 . Python-vs-Go parity tests pass for all commands in the matrix while the
125- Python reference is still available
134+ has an explicit existing Go-only behavior replacement in the cutover
135+ coverage manifest; help-only, surface-only, coverage-only, obsolete, stale,
136+ or Python-vs-Go completion mappings do not count
137+ 5 . Python-vs-Go parity tests pass for all commands, options, and unknown-option
138+ paths while the Python reference is still available
1261396 . Migration benchmarks pass real fixture-backed command workloads and emit a
127140 passing counted ` benchmarks ` gate
1281417 . The final Python-reference parity run has been frozen into a committed,
0 commit comments