test(cli): regression for #121 — FakeDriver mobile rect in JSON output - #137
Conversation
Add an end-to-end CLI regression for #121 against the JSON formatter: `plumb lint plumb-fake://hello --viewport mobile --format json` against a `[viewports.mobile]` config MUST emit `"width": 375 / "height": 812` rects, not the canned desktop `1280x800`. PR #125's fix is at the FakeDriver layer; this guards the symptom at the layer the issue was reported (CLI + JSON). Audit follow-up: PR #125 merged with the Claude review check failed (SDK max-turns infrastructure error, not a code finding) so no recorded approval verdict exists. All other gates passed. This PR adds the missing CLI-level regression test so the acceptance-criteria check is durable. Refs #121.
|
I have a complete picture of the change. Here is the review. PR #137 —
|
Summary
End-to-end CLI regression test for issue #121. PR #125 fixed the
FakeDriverso multi-viewport runs againstplumb-fake://hellonolonger emit the canned desktop rect for the mobile viewport. The fix
is unit-tested at the
FakeDriver::snapshotlayer(
crates/plumb-cdp/tests/snapshot_all_default.rs::fake_driver_rewrites_viewport_sized_rects_to_target).The original issue, however, was reported at the CLI layer —
plumb lint plumb-fake://hello --format jsonshowing1280x800rects undera mobile viewport. This PR adds the matching CLI-level assertion so
the regression is guarded at the level the issue was reported.
Why this exists (audit follow-up)
PR #125 merged with the
Claude reviewcheck failed because thereview action hit its SDK turn limit (
Reached maximum number of turns (20)), an infrastructure failure rather than a review finding.All other gates (tests, fmt, clippy, determinism, coverage, MSRV,
cargo-deny, three-OS test matrix) passed. There is therefore no
recorded approval verdict on #125, only passing real CI. This PR
closes the acceptance-criteria validation gap so the fix is covered
end-to-end.
What the test asserts
plumb lint plumb-fake://hello --viewport mobile --format jsonagainsta
[viewports.mobile] width=375 height=812config MUST:3(warning-only)"viewport": "mobile""width": 375/"height": 812in the rect block"width": 1280or"height": 800(the pre-fix(cdp): scale FakeDriver viewport rects to configured target #125 bug)Test plan
cargo test -p plumb-cli --test cli_integration— all 22 tests passcargo fmt --all -- --check— cleancargo clippy -p plumb-cli --all-targets -- -D warnings— cleanRefs #121.