Tighten parity gate and retire CLI language leaks#1637
Conversation
WalkthroughThe PR removes the legacy ChangesRemove legacy link subcommand
Emit artifact path normalization
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
implementations/rust/provekit-cli/src/cmd_emit.rs (1)
600-605: ⚡ Quick winConsider adding test coverage for the extension parameter.
The current test verifies that the go+testing special-casing is removed when no extension is provided in the JSON. Consider also testing that when an
extensionfield is present in the result JSON, it is correctly used in the output path.✅ Suggested additional test case
#[test] fn default_artifact_path_is_not_language_framework_special_cased() { let path = default_artifact_path("go", "testing", &json!({})); assert_eq!(path, PathBuf::from("provekit_emitted.go")); } + +#[test] +fn default_artifact_path_uses_extension_from_result() { + let path = default_artifact_path("go", "testing", &json!({"extension": "test.go"})); + + assert_eq!(path, PathBuf::from("provekit_emitted.test.go")); +}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@implementations/rust/provekit-cli/src/cmd_emit.rs` around lines 600 - 605, Add a test that verifies default_artifact_path uses an explicit "extension" from the result JSON: create a JSON value with an "extension" field (e.g., ".mod" or ".custom"), call default_artifact_path("go","testing",&json!(...)) and assert the returned PathBuf ends with the provided extension (e.g., "provekit_emitted.mod"); locate the test near default_artifact_path tests (e.g., alongside default_artifact_path_is_not_language_framework_special_cased) and name it something like default_artifact_path_respects_extension to make intent clear.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@implementations/rust/provekit-cli/src/cmd_emit.rs`:
- Around line 600-605: Add a test that verifies default_artifact_path uses an
explicit "extension" from the result JSON: create a JSON value with an
"extension" field (e.g., ".mod" or ".custom"), call
default_artifact_path("go","testing",&json!(...)) and assert the returned
PathBuf ends with the provided extension (e.g., "provekit_emitted.mod"); locate
the test near default_artifact_path tests (e.g., alongside
default_artifact_path_is_not_language_framework_special_cased) and name it
something like default_artifact_path_respects_extension to make intent clear.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 9675ece1-cceb-4460-893e-ab696ebdf804
📒 Files selected for processing (5)
Makefileimplementations/rust/provekit-cli/src/cmd_emit.rsimplementations/rust/provekit-cli/src/cmd_link.rsimplementations/rust/provekit-cli/src/main.rsimplementations/rust/provekit-cli/tests/cli_surface.rs
💤 Files with no reviewable changes (2)
- implementations/rust/provekit-cli/src/cmd_link.rs
- implementations/rust/provekit-cli/src/main.rs
Summary
make cross-language-proof-parityprovekit linksubcommand, which hard-coded Rust/Go project layout and Go source/LSP handling in the CLIVerification
rg -n "cmd_emit_java_testng" Makefilemake -n cross-language-proof-parity | rg -n "cmd_emit_java_testng|emit_java_testng_dispatches_real_emitter"cargo test --release --manifest-path implementations/rust/Cargo.toml -p provekit-cli --test cmd_emit_java_testng emit_java_testng_dispatches_real_emitter_and_maven_checks_output -- --nocapturecargo test --manifest-path implementations/rust/Cargo.toml -p provekit-cli default_artifact_path_is_not_language_framework_special_cased -- --nocapturefailed with CLI returningprovekit_emitted_test.gofor Go/testingcargo test --manifest-path implementations/rust/Cargo.toml -p provekit-cli default_artifact_path_is_not_language_framework_special_cased -- --nocapturecargo test --release --manifest-path implementations/rust/Cargo.toml -p provekit-cli --test cmd_emit_go_testing emit_go_testing_dispatches_manifest_writes_artifact_and_compile_checks -- --nocapturecargo test --manifest-path implementations/rust/Cargo.toml -p provekit-cli --test cli_surface provekit_cli_does_not_expose_legacy_link_subcommand -- --nocapturefailed whilelinkwas exposedcargo test --manifest-path implementations/rust/Cargo.toml -p provekit-cli --test cli_surface provekit_cli_does_not_expose_legacy_link_subcommand -- --nocapturecargo test --manifest-path implementations/rust/Cargo.toml -p provekit-cli --test cli_surface -- --nocaptureSummary by CodeRabbit
Chores
provekit linkcommand from the CLI.Bug Fixes
Tests