Repository navigation
CI: remove suite gets a render file (#1089) - #1641
Mikola Lysenko (mikolalysenko) wants to merge 4 commits into
Conversation
Assisted-by: Claude Code:claude-opus-5-5
The remove suite's behaviour tests matched English sentences, so a wording change could fail a test whose behaviour was still right. Every other command suite already keeps human output in a *_render.rs file and asserts behaviour through --json codes. - remove_render.rs holds the human-mode and PTY wording checks, including the human legs split out of two mixed tests. - remove_fixture.rs holds the shared runner and fixtures. - remove_failure_paths.rs keeps the --json behaviour tests. Refs #1089. Test-only; no product change. Assisted-by: Claude Code:claude-opus-5-5
Review follow-ups for the remove render split: - The --json preserve-state test now checks that the lock is restored and the manifest entry kept, not only the warning code. - The corrupt pre-v5 ledger test asserts no wording, so it stays with the behaviour tests. - Restore the duality test's error-message check to its main version. - Fix section headers and numbering left stale by the move. Assisted-by: Claude Code:claude-opus-5-5
|
BugBot review Generated by Claude Code |
|
[agent] I ported #1639's Generated by Claude Code |
|
BugBot review Generated by Claude Code |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 9fe4b7b. Configure here.
|
Labeled Ready for review (burn-down agent).
Generated by Claude Code |
Final review briefWhat it does: Splits the Risk: low. Only tests change. I diffed every old test body against the new files and found no lost assertions. Look here
Verified
Changes I made: none. Open questions (non-blocking)
Auto-merge (squash) is armed, so approving sends this straight to the merge queue. Generated by Claude Code |
|
[agent] About the open question on Generated by Claude Code |
LLM Description written by Claude Code:claude-opus-5-5
Refs #1089 (the
removeslice of child 6; the tracking issue stays open)Root cause
The
removebehaviour tests matched English sentences, so a wordingchange could fail a test whose behaviour was still right. Every other
command suite (
get,scan,vendor,apply,rollback,repair)already keeps human output in a
*_render.rsfile and checks behaviourthrough
--jsoncodes viacommon::envelope.removehad no renderfile yet.
Change
remove/remove_render.rs(new) holds the human-mode and PTYwording checks: 10 tests moved from
remove_failure_paths.rs(including the PTY decline test). It also holds the human legs split
out of three mixed tests: the hosted-only
--preserve-statenote, thedetached
--preserve-statedry-run preview, and the detacheddrift-keep lines.
remove/remove_fixture.rs(new) holds the shared runner, themanifest and ledger writers, the hosted-redirect lock pair, the mock npm
registry and the mixed drift-keep fixture. These used to be private
helpers in
remove_failure_paths.rs.remove/remove_failure_paths.rskeeps the--jsonbehaviour tests.The only message reads left are the ones its header allows: a purl, a
flag, a path, a remedy command, and the "manifest was not modified"
promise. The manifest-backed
--preserve-stateJSON test now alsochecks that the lock is restored and the manifest entry is kept. Those
checks used to live only in the human-mode test that moved.
.github/workflows/ci.yml: this is Fix nightly Pipenv pylock legs broken by uv 0.13.2 #1639's uv pin(
version: "0.13.1"on the Pipenv/pipsetup-uvstep), copied hereso this PR can go green while main is red from uv 0.13.2. It changes
nothing once Fix nightly Pipenv pylock legs broken by uv 0.13.2 #1639 merges.
Assertions of 4+-word sentences in
remove_failure_paths.rswent from11 to 1. The one left is the "manifest was not modified" promise. No
production code changes.
Testing
cargo test -p socket-patch-cli --all-features --test remove: 103passed, 0 failed. Main has 100: three mixed human/JSON tests were each
split into a JSON test and a render test, and no test was dropped.
cargo fmt --all -- --check: clean.cargo clippy --locked --workspace --all-features -- -D warnings(thesame command CI runs): clean. Running clippy with
--testsreports onlyexisting findings in
tests/common/mod.rsandtests/prebuilt_common/mod.rs, none in files this PR touches.one test binary and no library code.
cfg(windows)/cfg(unix)logic changed. The unix-only helpers keeptheir
#[cfg(unix)], andstd::path::Pathis imported inside theunix-only
ptymodule, so Windows builds have no unused import. Forthat reason I didn't dispatch a full-scope run.
ci-ok,clippy,coverage, and every leane2e leg, including the pipenv pylock leg. Bugbot found no issues.
CI cost
The workflow edit only pins a tool version.
removeis still one testbinary in the same job, so a lean PR run is the same before and after:
about 28 Linux jobs, about 8 minutes.
/code-review highfindings--jsonpreserve-state test now checks the restored lock andthe kept manifest.
the behaviour file.
remove_duality_invariants.rskeeps its own copy ofthe hosted fixtures. They differ from
remove_fixture.rs: itsNpmRegistrytakes adistvalue. Merging the two belongs in aseparate dedup slice.
(
rollback_render.rs,scan_tty.rs,interactive_prompts_e2e.rs, andnow
remove_render.rs). Moving it intocommon/pty_io.rstouches foursuites and belongs in its own PR.
Follow-ups (still open on #1089)
cli_remove_silent.rskeeps its sentence checks for loud vs--silentoutput. Whether silent/TTY suites count as render suites is still an
open question on #1089.
https://claude.ai/code/session_01S8t79pTCoiDJkY1YX6A7Vq
Generated by Claude Code