Commit 55f1387
test(mcp-server): guard every when/then step against skip_scenario flag
`cross_cutting.rs` carried 265 step functions, only 11 of which checked
`world.skip_scenario` before doing real work. Background or Given steps
that detected a production gap (missing allowlist, jail tier degraded,
panic-injection unsupported, etc.) flipped the flag to `true`, but the
downstream When/Then steps ran anyway and panicked on missing fixtures
or wrong responses.
This change inserts `if world.skip_scenario { return; }` at the top of
107 unguarded When/Then steps, and adds `clippy::needless_return` to the
file-level expect list so the early-exit pattern survives the strict
lint baseline. Net cucumber delta: 175 -> 179 pass (+4), 45 -> 37 fail
(-8), 56 -> 60 skip (+4 — scenarios that genuinely could not run now
report skipped instead of failed).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: Fabricio Archanjo <farchanjo@gmail.com>1 parent 351dc28 commit 55f1387
1 file changed
Lines changed: 111 additions & 1 deletion
0 commit comments