[INFO] fetching crate crap4rs 0.6.2... [INFO] testing crap4rs-0.6.2 against 1.101.0-beta.1+cargoflags=--release for beta-release-1.101-2 [INFO] extracting crate crap4rs 0.6.2 into /workspace/builds/worker-1-tc2/source [INFO] started tweaking crates.io crate crap4rs 0.6.2 [INFO] removed 0 missing tests [INFO] finished tweaking crates.io crate crap4rs 0.6.2 [INFO] tweaked toml for crates.io crate crap4rs 0.6.2 written to /workspace/builds/worker-1-tc2/source/Cargo.toml [INFO] validating manifest of crates.io crate crap4rs 0.6.2 on toolchain 1.101.0-beta.1 [INFO] running `"cargo" "+1.101.0-beta.1" "metadata" "--manifest-path" "Cargo.toml" "--no-deps"` [INFO] crate crates.io crate crap4rs 0.6.2 already has a lockfile, it will not be regenerated [INFO] running `"cargo" "+1.101.0-beta.1" "fetch" "--manifest-path" "Cargo.toml"` [INFO] running `"docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-m" "1610612736" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:13253766d39459fde29cea4e7c35a3fe37c2c19b4a224f71f2c27711c2837d36" "sleep" "infinity"` [INFO] [stdout] 61d059abfe4cc431fa16d0f665af4db8003080afb2d75dac29a3d06d3ad7dd86 [INFO] running `"docker" "start" "61d059abfe4cc431fa16d0f665af4db8003080afb2d75dac29a3d06d3ad7dd86"` [INFO] running `"docker" "inspect" "61d059abfe4cc431fa16d0f665af4db8003080afb2d75dac29a3d06d3ad7dd86"` [INFO] running `"docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-w" "/opt/rustwide/workdir" "--user" "0:0" "61d059abfe4cc431fa16d0f665af4db8003080afb2d75dac29a3d06d3ad7dd86" "/opt/rustwide/cargo-home/bin/cargo" "+1.101.0-beta.1" "metadata" "--no-deps" "--format-version=1"` [INFO] running `"docker" "inspect" "61d059abfe4cc431fa16d0f665af4db8003080afb2d75dac29a3d06d3ad7dd86"` [INFO] running `"docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-w" "/opt/rustwide/workdir" "--user" "0:0" "61d059abfe4cc431fa16d0f665af4db8003080afb2d75dac29a3d06d3ad7dd86" "/opt/rustwide/cargo-home/bin/cargo" "+1.101.0-beta.1" "build" "--frozen" "--message-format=json" "--release"` [INFO] [stderr] Compiling syn v2.0.118 [INFO] [stderr] Compiling crossbeam-utils v0.8.21 [INFO] [stderr] Compiling memchr v2.8.2 [INFO] [stderr] Compiling phf_shared v0.12.1 [INFO] [stderr] Compiling aho-corasick v1.1.4 [INFO] [stderr] Compiling arrayvec v0.7.7 [INFO] [stderr] Compiling rustc-hash v2.1.2 [INFO] [stderr] Compiling fastrand v2.4.1 [INFO] [stderr] Compiling parking_lot_core v0.9.12 [INFO] [stderr] Compiling phf_generator v0.12.1 [INFO] [stderr] Compiling nom v7.1.3 [INFO] [stderr] Compiling vte v0.14.1 [INFO] [stderr] Compiling clap_builder v4.6.0 [INFO] [stderr] Compiling basic-toml v0.1.10 [INFO] [stderr] Compiling winnow v1.0.3 [INFO] [stderr] Compiling either v1.16.0 [INFO] [stderr] Compiling glob v0.3.3 [INFO] [stderr] Compiling serde_json v1.0.150 [INFO] [stderr] Compiling proc-macro2 v1.0.106 [INFO] [stderr] Compiling regex-automata v0.4.14 [INFO] [stderr] Compiling convert_case v0.8.0 [INFO] [stderr] Compiling rustix v1.1.4 [INFO] [stderr] Compiling itertools v0.14.0 [INFO] [stderr] Compiling crossbeam-epoch v0.9.18 [INFO] [stderr] Compiling parking_lot v0.12.5 [INFO] [stderr] Compiling ansitok v0.3.0 [INFO] [stderr] Compiling bstr v1.12.1 [INFO] [stderr] Compiling winnow v0.7.15 [INFO] [stderr] Compiling serde_derive_internals v0.29.1 [INFO] [stderr] Compiling quote v1.0.46 [INFO] [stderr] Compiling console v0.16.3 [INFO] [stderr] Compiling globset v0.4.18 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling clap_derive v4.6.1 [INFO] [stderr] Compiling strum_macros v0.27.2 [INFO] [stderr] Compiling phf_macros v0.12.1 [INFO] [stderr] Compiling thiserror-impl v2.0.18 [INFO] [stderr] Compiling ref-cast-impl v1.0.25 [INFO] [stderr] Compiling optfield v0.4.0 [INFO] [stderr] Compiling clap v4.6.1 [INFO] [stderr] Compiling clap_complete v4.6.5 [INFO] [stderr] Compiling ref-cast v1.0.25 [INFO] [stderr] Compiling strum v0.27.2 [INFO] [stderr] Compiling phf v0.12.1 [INFO] [stderr] Compiling documented-macros v0.9.2 [INFO] [stderr] Compiling schemars_derive v1.2.1 [INFO] [stderr] Compiling thiserror v2.0.18 [INFO] [stderr] Compiling ansi-str v0.9.0 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Compiling askama_parser v0.16.0 [INFO] [stderr] Compiling serde_spanned v0.6.9 [INFO] [stderr] Compiling toml_datetime v0.6.11 [INFO] [stderr] Compiling crossterm v0.29.0 [INFO] [stderr] Compiling toml_edit v0.22.27 [INFO] [stderr] Compiling crossbeam-deque v0.8.6 [INFO] [stderr] Compiling comfy-table v7.2.2 [INFO] [stderr] Compiling schemars v1.2.1 [INFO] [stderr] Compiling toml v0.8.23 [INFO] [stderr] Compiling askama_derive v0.16.0 [INFO] [stderr] Compiling ignore v0.4.26 [INFO] [stderr] Compiling documented v0.9.2 [INFO] [stderr] Compiling clap_complete_nushell v4.6.0 [INFO] [stderr] Compiling regex v1.12.4 [INFO] [stderr] Compiling colored v3.1.1 [INFO] [stderr] Compiling crap4rs v0.6.2 (/opt/rustwide/workdir) [INFO] [stderr] Compiling askama_macros v0.16.0 [INFO] [stderr] Compiling askama v0.16.0 [INFO] [stderr] Compiling crap-core v0.9.0 [INFO] [stderr] Finished `release` profile [optimized] target(s) in 1m 50s [INFO] running `"docker" "inspect" "61d059abfe4cc431fa16d0f665af4db8003080afb2d75dac29a3d06d3ad7dd86"` [INFO] running `"docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-w" "/opt/rustwide/workdir" "--user" "0:0" "61d059abfe4cc431fa16d0f665af4db8003080afb2d75dac29a3d06d3ad7dd86" "/opt/rustwide/cargo-home/bin/cargo" "+1.101.0-beta.1" "test" "--frozen" "--no-run" "--message-format=json" "--release"` [INFO] [stderr] Compiling memchr v2.8.2 [INFO] [stderr] Compiling rustix v1.1.4 [INFO] [stderr] Compiling syn v2.0.118 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Compiling smallvec v1.15.2 [INFO] [stderr] Compiling either v1.16.0 [INFO] [stderr] Compiling getrandom v0.4.3 [INFO] [stderr] Compiling indexmap v2.14.0 [INFO] [stderr] Compiling parking_lot_core v0.9.12 [INFO] [stderr] Compiling itertools v0.14.0 [INFO] [stderr] Compiling num-integer v0.1.46 [INFO] [stderr] Compiling parking_lot v0.12.5 [INFO] [stderr] Compiling aho-corasick v1.1.4 [INFO] [stderr] Compiling serde_json v1.0.150 [INFO] [stderr] Compiling winnow v1.0.3 [INFO] [stderr] Compiling vte v0.14.1 [INFO] [stderr] Compiling nom v7.1.3 [INFO] [stderr] Compiling regex-automata v0.4.14 [INFO] [stderr] Compiling toml_datetime v0.6.11 [INFO] [stderr] Compiling toml_edit v0.20.7 [INFO] [stderr] Compiling terminal_size v0.4.4 [INFO] [stderr] Compiling clap_builder v4.6.0 [INFO] [stderr] Compiling synstructure v0.13.2 [INFO] [stderr] Compiling tempfile v3.27.0 [INFO] [stderr] Compiling serde_derive_internals v0.29.1 [INFO] [stderr] Compiling ansitok v0.3.0 [INFO] [stderr] Compiling futures-core v0.3.32 [INFO] [stderr] Compiling futures-sink v0.3.32 [INFO] [stderr] Compiling futures-channel v0.3.32 [INFO] [stderr] Compiling ansi-str v0.9.0 [INFO] [stderr] Compiling bstr v1.12.1 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling zerofrom-derive v0.1.7 [INFO] [stderr] Compiling yoke-derive v0.8.2 [INFO] [stderr] Compiling zerovec-derive v0.11.3 [INFO] [stderr] Compiling displaydoc v0.2.6 [INFO] [stderr] Compiling ref-cast-impl v1.0.25 [INFO] [stderr] Compiling zerofrom v0.1.8 [INFO] [stderr] Compiling clap_derive v4.6.1 [INFO] [stderr] Compiling yoke v0.8.3 [INFO] [stderr] Compiling ref-cast v1.0.25 [INFO] [stderr] Compiling thiserror-impl v2.0.18 [INFO] [stderr] Compiling globset v0.4.18 [INFO] [stderr] Compiling zerotrie v0.2.4 [INFO] [stderr] Compiling zerovec v0.11.6 [INFO] [stderr] Compiling derive_more-impl v2.1.1 [INFO] [stderr] Compiling tinystr v0.8.3 [INFO] [stderr] Compiling thiserror v2.0.18 [INFO] [stderr] Compiling icu_locale_core v2.2.0 [INFO] [stderr] Compiling potential_utf v0.1.5 [INFO] [stderr] Compiling strum_macros v0.27.2 [INFO] [stderr] Compiling clap v4.6.1 [INFO] [stderr] Compiling regex v1.12.4 [INFO] [stderr] Compiling strum v0.27.2 [INFO] [stderr] Compiling serde_spanned v0.6.9 [INFO] [stderr] Compiling basic-toml v0.1.10 [INFO] [stderr] Compiling askama_parser v0.16.0 [INFO] [stderr] Compiling icu_provider v2.2.0 [INFO] [stderr] Compiling icu_collections v2.2.0 [INFO] [stderr] Compiling ignore v0.4.26 [INFO] [stderr] Compiling phf_macros v0.12.1 [INFO] [stderr] Compiling optfield v0.4.0 [INFO] [stderr] Compiling sealed v0.6.0 [INFO] [stderr] Compiling phf v0.12.1 [INFO] [stderr] Compiling synthez-core v0.4.0 [INFO] [stderr] Compiling documented-macros v0.9.2 [INFO] [stderr] Compiling toml_edit v0.22.27 [INFO] [stderr] Compiling clap_complete v4.6.5 [INFO] [stderr] Compiling futures-macro v0.3.32 [INFO] [stderr] Compiling schemars_derive v1.2.1 [INFO] [stderr] Compiling askama_derive v0.16.0 [INFO] [stderr] Compiling rusty-fork v0.3.1 [INFO] [stderr] Compiling proc-macro-crate v2.0.0 [INFO] [stderr] Compiling crossterm v0.29.0 [INFO] [stderr] Compiling num-bigint v0.4.6 [INFO] [stderr] Compiling nom v8.0.0 [INFO] [stderr] Compiling bytecount v0.6.9 [INFO] [stderr] Compiling peg-runtime v0.6.3 [INFO] [stderr] Compiling futures-util v0.3.32 [INFO] [stderr] Compiling peg-macros v0.6.3 [INFO] [stderr] Compiling comfy-table v7.2.2 [INFO] [stderr] Compiling num-rational v0.4.2 [INFO] [stderr] Compiling askama_macros v0.16.0 [INFO] [stderr] Compiling proptest v1.11.0 [INFO] [stderr] Compiling askama v0.16.0 [INFO] [stderr] Compiling nom_locate v5.0.0 [INFO] [stderr] Compiling schemars v1.2.1 [INFO] [stderr] Compiling icu_properties v2.2.0 [INFO] [stderr] Compiling icu_normalizer v2.2.0 [INFO] [stderr] Compiling bolero-generator-derive v0.13.4 [INFO] [stderr] Compiling toml v0.8.23 [INFO] [stderr] Compiling synthez-codegen v0.4.0 [INFO] [stderr] Compiling documented v0.9.2 [INFO] [stderr] Compiling clap_complete_nushell v4.6.0 [INFO] [stderr] Compiling derive_more v2.1.1 [INFO] [stderr] Compiling gherkin v0.15.0 [INFO] [stderr] Compiling typed-builder-macro v0.23.2 [INFO] [stderr] Compiling num-iter v0.1.45 [INFO] [stderr] Compiling rand_xoshiro v0.7.0 [INFO] [stderr] Compiling num-complex v0.4.6 [INFO] [stderr] Compiling predicates-core v1.0.10 [INFO] [stderr] Compiling borrow-or-share v0.2.4 [INFO] [stderr] Compiling smawk v0.3.3 [INFO] [stderr] Compiling unicode-linebreak v0.1.5 [INFO] [stderr] Compiling typed-builder v0.23.2 [INFO] [stderr] Compiling textwrap v0.16.2 [INFO] [stderr] Compiling peg v0.6.3 [INFO] [stderr] Compiling crap4rs v0.6.2 (/opt/rustwide/workdir) [INFO] [stderr] Compiling fluent-uri v0.3.2 [INFO] [stderr] Compiling num v0.4.3 [INFO] [stderr] Compiling bolero-generator v0.13.5 [INFO] [stderr] Compiling crap-core v0.9.0 [INFO] [stderr] Compiling ahash v0.8.12 [INFO] [stderr] Compiling cucumber-expressions v0.5.0 [INFO] [stderr] Compiling synthez v0.4.0 [INFO] [stderr] Compiling idna_adapter v1.2.2 [INFO] [stderr] Compiling futures-executor v0.3.32 [INFO] [stderr] Compiling pin-project-internal v1.1.13 [INFO] [stderr] Compiling inflections v1.1.1 [INFO] [stderr] Compiling uuid v1.23.3 [INFO] [stderr] Compiling assert_cmd v2.2.2 [INFO] [stderr] Compiling pretty-hex v0.4.2 [INFO] [stderr] Compiling difflib v0.4.0 [INFO] [stderr] Compiling termtree v0.5.1 [INFO] [stderr] Compiling uuid-simd v0.8.0 [INFO] [stderr] Compiling predicates-tree v1.0.13 [INFO] [stderr] Compiling pin-project v1.1.13 [INFO] [stderr] Compiling predicates v3.1.4 [INFO] [stderr] Compiling cucumber-codegen v0.22.1 [INFO] [stderr] Compiling bolero-engine v0.13.4 [INFO] [stderr] Compiling futures v0.3.32 [INFO] [stderr] Compiling idna v1.1.0 [INFO] [stderr] Compiling referencing v0.30.0 [INFO] [stderr] Compiling fraction v0.15.4 [INFO] [stderr] Compiling globwalk v0.9.1 [INFO] [stderr] Compiling email_address v0.2.9 [INFO] [stderr] Compiling tokio-macros v2.7.0 [INFO] [stderr] Compiling smart-default v0.7.1 [INFO] [stderr] Compiling fancy-regex v0.14.0 [INFO] [stderr] Compiling similar v2.7.0 [INFO] [stderr] Compiling humantime v2.3.0 [INFO] [stderr] Compiling inventory v0.3.24 [INFO] [stderr] Compiling jsonschema v0.30.0 [INFO] [stderr] Compiling insta v1.48.0 [INFO] [stderr] Compiling cucumber v0.22.1 [INFO] [stderr] Compiling tokio v1.52.3 [INFO] [stderr] Compiling bolero v0.13.4 [INFO] [stderr] Finished `release` profile [optimized] target(s) in 4m 05s [INFO] running `"docker" "inspect" "61d059abfe4cc431fa16d0f665af4db8003080afb2d75dac29a3d06d3ad7dd86"` [INFO] running `"docker" "exec" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "RUSTDOCFLAGS=--cap-lints=warn" "-w" "/opt/rustwide/workdir" "--user" "0:0" "61d059abfe4cc431fa16d0f665af4db8003080afb2d75dac29a3d06d3ad7dd86" "/opt/rustwide/cargo-home/bin/cargo" "+1.101.0-beta.1" "test" "--frozen" "--release"` [INFO] [stderr] Compiling crap4rs v0.6.2 (/opt/rustwide/workdir) [INFO] [stderr] Finished `release` profile [optimized] target(s) in 1m 08s [INFO] [stderr] Running unittests src/lib.rs (/opt/rustwide/target/release/build/crap4rs/0b3b268e6476698d/out/crap4rs-0b3b268e6476698d) [INFO] [stdout] [INFO] [stdout] running 138 tests [INFO] [stdout] test adapters::complexity::contributor_tests::continue_contributor ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::break_contributor ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::base_fn_empty_contributors ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::for_loop_contributor_cognitive ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::closure_no_contributor ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::for_with_continue_records_nesting_depth_cyclomatic ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::for_with_continue_threads_nesting_depth_cognitive ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::for_loop_contributor_cyclomatic ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::contributors_sorted_by_line ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::if_branch_contributor_cognitive ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::let_else_contributor_cognitive ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::logical_operator_same_chain_cognitive ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::let_else_contributor_cyclomatic ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::match_arm_contributor_cyclomatic ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::loop_contributor_cognitive ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::match_contributor_cognitive ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::logical_operator_switch_cognitive ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::match_records_end_line_covering_arms_cognitive ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::nested_if_nesting_increment ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::nested_if_records_construct_end_line_and_nesting_depth_cognitive ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::nested_if_records_nesting_depth_cyclomatic ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::try_records_token_span_for_atomic_contributor ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::try_contributor_cyclomatic ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::try_contributor_cognitive ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::while_loop_contributor_cyclomatic ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::while_loop_contributor_cognitive ... ok [INFO] [stdout] test adapters::complexity::contributor_tests::unsafe_block_produces_no_unsafe_contributor ... ok [INFO] [stdout] test adapters::complexity::tests::async_fn_detected ... ok [INFO] [stdout] test adapters::complexity::tests::alternating_operators_cognitive ... ok [INFO] [stdout] test adapters::complexity::tests::baseline_complexity_is_one_cyclomatic ... ok [INFO] [stdout] test adapters::complexity::tests::baseline_complexity_is_one_cognitive ... ok [INFO] [stdout] test adapters::complexity::tests::bool_in_condition_cognitive ... ok [INFO] [stdout] test adapters::complexity::tests::bool_operator_switch_cyclomatic ... ok [INFO] [stdout] test adapters::complexity::tests::bool_operator_switch_cognitive ... ok [INFO] [stdout] test adapters::complexity::tests::bool_same_sequence_cognitive ... ok [INFO] [stdout] test adapters::complexity::proptests::complexity_gte_one ... ok [INFO] [stdout] test adapters::complexity::tests::bool_same_sequence_cyclomatic ... ok [INFO] [stdout] test adapters::complexity::tests::chained_try_cognitive ... ok [INFO] [stdout] test adapters::complexity::proptests::qualified_name_segment_count_tracks_mod_depth ... ok [INFO] [stdout] test adapters::complexity::tests::chained_try_cyclomatic ... ok [INFO] [stdout] test adapters::complexity::tests::columns_are_exact_one_based_offsets_indented ... ok [INFO] [stdout] test adapters::complexity::tests::closure_in_parent_cognitive ... ok [INFO] [stdout] test adapters::complexity::tests::cognitive_gte_cyclomatic_for_nested ... ok [INFO] [stdout] test adapters::complexity::tests::else_if_chain_cyclomatic_counts_each_arm ... ok [INFO] [stdout] test adapters::complexity::tests::columns_are_exact_one_based_offsets_unindented ... ok [INFO] [stdout] test adapters::complexity::tests::else_is_not_counted_cognitive ... ok [INFO] [stdout] test adapters::complexity::tests::else_if_chain_cognitive_counts_each_continuation ... ok [INFO] [stdout] test adapters::complexity::tests::else_if_chain_with_nested_decision_inside_arm ... ok [INFO] [stdout] test adapters::complexity::tests::for_iterator_try_cyclomatic ... ok [INFO] [stdout] test adapters::complexity::tests::if_else_cognitive ... ok [INFO] [stdout] test adapters::complexity::tests::if_else_cyclomatic ... ok [INFO] [stdout] test adapters::complexity::tests::impl_method_no_branch ... ok [INFO] [stdout] test adapters::complexity::tests::impl_method_qualified_name ... ok [INFO] [stdout] test adapters::complexity::tests::impl_method_inside_mod_prepends_mod_path ... ok [INFO] [stdout] test adapters::complexity::tests::invalid_source_returns_error ... ok [INFO] [stdout] test adapters::complexity::tests::for_iterator_try_cognitive ... ok [INFO] [stdout] test adapters::complexity::tests::long_or_chain_cognitive ... ok [INFO] [stdout] test adapters::complexity::tests::impl_method_with_branch ... ok [INFO] [stdout] test adapters::complexity::tests::let_else_cyclomatic ... ok [INFO] [stdout] test adapters::complexity::tests::match_arms_cyclomatic ... ok [INFO] [stdout] test adapters::complexity::tests::loop_with_break_cognitive ... ok [INFO] [stdout] test adapters::complexity::tests::match_flat_cognitive ... ok [INFO] [stdout] test adapters::complexity::tests::mod_qualification_does_not_disturb_complexity ... ok [INFO] [stdout] test adapters::complexity::tests::match_scrutinee_try_cognitive ... ok [INFO] [stdout] test adapters::complexity::tests::multiple_fns_returns_all ... ok [INFO] [stdout] test adapters::complexity::tests::loop_with_break_cyclomatic ... ok [INFO] [stdout] test adapters::complexity::tests::multi_level_mod_qualified_name ... ok [INFO] [stdout] test adapters::complexity::tests::nested_fn_inside_mod_is_mod_scoped_not_fn_scoped ... ok [INFO] [stdout] test adapters::complexity::tests::let_else_cognitive ... ok [INFO] [stdout] test adapters::complexity::tests::nested_if_cognitive_penalty ... ok [INFO] [stdout] test adapters::complexity::tests::one_level_mod_qualified_name ... ok [INFO] [stdout] test adapters::complexity::tests::nested_if_cyclomatic ... ok [INFO] [stdout] test adapters::complexity::tests::span_accuracy ... ok [INFO] [stdout] test adapters::complexity::tests::top_level_fn_in_nested_mods_fixture_is_unqualified ... ok [INFO] [stdout] test adapters::complexity::tests::top_level_fn_identity ... ok [INFO] [stdout] test adapters::complexity::tests::trait_method_without_default_not_found ... ok [INFO] [stdout] test adapters::complexity::tests::span_carries_one_based_columns ... ok [INFO] [stdout] test adapters::complexity::tests::trait_default_method_found ... ok [INFO] [stdout] test adapters::complexity::tests::trait_default_and_concrete_override_have_disjoint_spans ... ok [INFO] [stdout] test adapters::complexity::tests::try_operator_cognitive ... ok [INFO] [stdout] test adapters::complexity::tests::try_operator_cyclomatic ... ok [INFO] [stdout] test adapters::coverage::proptests::no_panic_on_arbitrary_input ... ok [INFO] [stdout] test adapters::coverage::proptests::no_panic_on_arbitrary_brda ... ok [INFO] [stdout] test adapters::coverage::proptests::no_cross_file_leakage ... ok [INFO] [stdout] test adapters::coverage::proptests::all_line_numbers_are_positive ... ok [INFO] [stdout] test adapters::coverage::tests::backslash_normalized_to_forward_slash ... ok [INFO] [stdout] test adapters::coverage::tests::brda_and_da_records_parsed ... ok [INFO] [stdout] test adapters::coverage::tests::brda_dash_and_numeric_merge ... ok [INFO] [stdout] test adapters::coverage::tests::brda_dash_maps_to_none ... ok [INFO] [stdout] test adapters::coverage::proptests::no_panic_on_structured_input ... ok [INFO] [stdout] test adapters::coverage::tests::brda_line_zero_is_malformed ... ok [INFO] [stdout] test adapters::coverage::tests::brda_missing_taken_is_malformed ... ok [INFO] [stdout] test adapters::coverage::tests::brda_numeric_maps_to_some ... ok [INFO] [stdout] test adapters::coverage::tests::brda_missing_fields_is_malformed ... ok [INFO] [stdout] test adapters::coverage::tests::brda_zero_maps_to_some_zero ... ok [INFO] [stdout] test adapters::coverage::proptests::normalize_path_never_panics ... ok [INFO] [stdout] test adapters::coverage::tests::da_missing_hit_count_is_malformed ... ok [INFO] [stdout] test adapters::coverage::tests::da_line_zero_is_malformed ... ok [INFO] [stdout] test adapters::coverage::tests::da_negative_hit_count_is_malformed ... ok [INFO] [stdout] test adapters::coverage::tests::da_with_checksum_field_is_accepted ... ok [INFO] [stdout] test adapters::coverage::tests::duplicate_da_multiple_lines_sum_correctly ... ok [INFO] [stdout] test adapters::coverage::tests::duplicate_da_lines_sum_hits ... ok [INFO] [stdout] test adapters::coverage::tests::duplicate_brda_sum_taken ... ok [INFO] [stdout] test adapters::coverage::tests::empty_input_returns_empty_output ... ok [INFO] [stdout] test adapters::coverage::tests::end_of_record_is_ignored ... ok [INFO] [stdout] test adapters::coverage::tests::hit_count_preservation ... ok [INFO] [stdout] test adapters::coverage::tests::malformed_brda_produces_diagnostic ... ok [INFO] [stdout] test adapters::coverage::tests::empty_sf_path_emits_diagnostic ... ok [INFO] [stdout] test adapters::coverage::tests::multiple_da_lines ... ok [INFO] [stdout] test adapters::coverage::tests::malformed_da_produces_diagnostic ... ok [INFO] [stdout] test adapters::coverage::tests::multiple_source_files ... ok [INFO] [stdout] test adapters::coverage::tests::no_brda_produces_none_branches ... ok [INFO] [stdout] test adapters::coverage::tests::non_coverage_records_are_ignored ... ok [INFO] [stdout] test adapters::coverage::tests::non_matching_path_passes_through ... ok [INFO] [stdout] test adapters::coverage::proptests::suffix_match_under_is_rooted_and_parentdir_free ... ok [INFO] [stdout] test adapters::coverage::tests::parentdir_sf_path_does_not_take_fast_path_is_file_probe ... ok [INFO] [stdout] test adapters::coverage::tests::malformed_da_does_not_stop_parsing ... ok [INFO] [stdout] test adapters::coverage::tests::path_boundary_not_confused_by_prefix_substring ... ok [INFO] [stdout] test adapters::coverage::tests::path_normalization_strips_prefix ... ok [INFO] [stdout] test adapters::coverage::tests::repeated_sf_blocks_merge_coverage ... ok [INFO] [stdout] test adapters::coverage::tests::single_file_single_da ... ok [INFO] [stdout] test adapters::coverage::tests::repeated_sf_blocks_merge_branch_coverage ... ok [INFO] [stdout] test adapters::coverage::tests::validate_da_line_zero_rejected ... ok [INFO] [stdout] test adapters::coverage::tests::validate_empty_input_rejected ... ok [INFO] [stdout] test adapters::coverage::tests::validate_first_da_in_second_block_passes ... ok [INFO] [stdout] test adapters::coverage::tests::unterminated_final_block_emits_data ... ok [INFO] [stdout] test adapters::coverage::tests::validate_da_outside_sf_block_rejected ... ok [INFO] [stdout] test adapters::coverage::tests::validate_malformed_da_rejected ... ok [INFO] [stdout] test adapters::coverage::tests::validate_single_da_inside_sf_block_passes ... ok [INFO] [stdout] test parse_diagnostic::tests::parse_diagnostic_display_empty_source_file ... ok [INFO] [stdout] test parse_diagnostic::tests::parse_diagnostic_serde_round_trip ... ok [INFO] [stdout] test adapters::coverage::tests::validate_missing_path_returns_open_error ... ok [INFO] [stdout] test adapters::coverage::tests::validate_no_da_lines_rejected ... ok [INFO] [stdout] test parse_diagnostic::tests::parse_diagnostic_display_malformed_record ... ok [INFO] [stdout] test adapters::complexity::contributor_proptests::every_contributor_has_positive_increment ... ok [INFO] [stdout] test adapters::complexity::contributor_proptests::contributor_increments_sum_to_complexity_minus_one ... ok [INFO] [stdout] test adapters::complexity::proptests::no_panic_on_fixture_files ... ok [INFO] [stdout] test adapters::complexity::proptests::same_fn_count_both_metrics ... ok [INFO] [stdout] [INFO] [stdout] test result: ok. 138 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.28s [INFO] [stdout] [INFO] [stderr] Running unittests src/main.rs (/opt/rustwide/target/release/build/crap4rs/c94f1ad5ba9cd56b/out/crap4rs-c94f1ad5ba9cd56b) [INFO] [stdout] [INFO] [stderr] Running tests/analyze_integration.rs (/opt/rustwide/target/release/build/crap4rs/11e21cf1598aca64/out/analyze_integration-11e21cf1598aca64) [INFO] [stdout] running 0 tests [INFO] [stdout] [INFO] [stdout] test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] running 5 tests [INFO] [stdout] test missing_coverage_policy_changes_outputs_end_to_end ... ok [INFO] [stdout] test self_referential_known_functions_present ... ok [INFO] [stdout] test self_referential_with_cyclomatic ... ok [INFO] [stdout] test exclude_pattern_filters_correctly ... ok [INFO] [stdout] test self_referential_analysis ... ok [INFO] [stdout] [INFO] [stdout] test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.07s [INFO] [stdout] [INFO] [stderr] Running tests/analyze_pipeline_tests.rs (/opt/rustwide/target/release/build/crap4rs/3620424903a0a38d/out/analyze_pipeline_tests-3620424903a0a38d) [INFO] [stdout] [INFO] [stdout] running 21 tests [INFO] [stdout] test analyze_branching_fn_partial_coverage_higher_crap ... ok [INFO] [stdout] test analyze_diff_ref_none_is_backward_compat ... ok [INFO] [stdout] test analyze_diagnostics_counts_no_coverage_functions ... ok [INFO] [stdout] test analyze_fail_when_above_threshold ... ok [INFO] [stdout] test analyze_diagnostics_surfaces_parse_diagnostics ... ok [INFO] [stdout] test analyze_exclude_pattern_filters_files ... ok [INFO] [stdout] test analyze_at_exact_threshold_does_not_exceed ... ok [INFO] [stdout] test analyze_missing_coverage_file_errors ... ok [INFO] [stdout] test analyze_empty_src_dir_errors ... ok [INFO] [stdout] test analyze_no_functions_extracted_errors ... ok [INFO] [stdout] test analyze_omits_diagnostics_when_disabled ... ok [INFO] [stdout] test analyze_options_default_coverage_metric_is_line ... ok [INFO] [stdout] test analyze_populates_diagnostics_for_exceeders_when_enabled ... ok [INFO] [stdout] test analyze_returns_results_for_simple_project ... ok [INFO] [stdout] test analyze_pass_when_all_below_threshold ... ok [INFO] [stdout] test analyze_simple_fn_fully_covered_has_low_crap ... ok [INFO] [stderr] Running tests/cli_completions_integration.rs (/opt/rustwide/target/release/build/crap4rs/21bf84dc25f5e33b/out/cli_completions_integration-21bf84dc25f5e33b) [INFO] [stdout] test analyze_with_cyclomatic_metric ... ok [INFO] [stdout] test analyze_returns_diagnostics ... ok [INFO] [stdout] test analyze_with_per_path_overrides ... ok [INFO] [stdout] test summary_computed_correctly ... ok [INFO] [stdout] test analyze_passes_branch_data_through ... ok [INFO] [stdout] [INFO] [stdout] test result: ok. 21 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] running 7 tests [INFO] [stdout] test completions_elvish ... ok [INFO] [stdout] test completions_fish ... ok [INFO] [stdout] test completions_zsh ... ok [INFO] [stdout] test completions_unknown_shell_exits_2 ... ok [INFO] [stdout] test completions_powershell ... ok [INFO] [stdout] test completions_nushell ... ok [INFO] [stdout] test completions_bash ... ok [INFO] [stdout] [INFO] [stdout] test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s [INFO] [stdout] [INFO] [stderr] Running tests/cli_ergonomics_cucumber.rs (/opt/rustwide/target/release/build/crap4rs/a132cc79d64c8fbe/out/cli_ergonomics_cucumber-a132cc79d64c8fbe) [INFO] [stdout] Feature: CLI ergonomics — shaping the report from the command line [INFO] [stdout] Scenario: --top N limits the report to the N highest-CRAP functions [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5 --format json --top 3` [INFO] [stdout] ✔ Then the JSON envelope at "view.shown" has 3 entries [INFO] [stdout] ✔ And the JSON envelope at "view.spec.limit" is 3 [INFO] [stdout] ✔ And the JSON envelope at "view.eligible_count" is 6 [INFO] [stdout] ✔ And the JSON envelope at "view.truncated" is true [INFO] [stdout] Scenario: --top 0 canonicalises to no limit [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5 --format json --top 0` [INFO] [stdout] ✔ Then the JSON envelope at "view.shown" has 6 entries [INFO] [stdout] ✔ And the JSON envelope at "view.spec.limit" is null [INFO] [stdout] ✔ And the JSON envelope at "view.truncated" is false [INFO] [stdout] Scenario: --top hiding violations does not change the exit code [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5 --format json --top 1` [INFO] [stdout] ✔ Then the exit code is 1 [INFO] [stdout] ✔ And the JSON envelope at "view.shown" has 1 entry [INFO] [stdout] ✔ And the JSON envelope at "view.truncated" is true [INFO] [stdout] ✔ And the JSON envelope at "result.summary.exceeding_threshold" is 3 [INFO] [stdout] Scenario Outline: --top rejects non-positive-integer values [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --top -3` [INFO] [stdout] ✔ Then the exit code is 2 [INFO] [stdout] ✔ And stderr contains "invalid value '-3' for '--top" [INFO] [stdout] Scenario Outline: --top rejects non-positive-integer values [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --top 3.5` [INFO] [stdout] ✔ Then the exit code is 2 [INFO] [stdout] ✔ And stderr contains "invalid value '3.5' for '--top" [INFO] [stdout] Scenario Outline: --top rejects non-positive-integer values [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --top abc` [INFO] [stdout] ✔ Then the exit code is 2 [INFO] [stdout] ✔ And stderr contains "invalid value 'abc' for '--top" [INFO] [stdout] Scenario Outline: coverage-range flags resolve into the envelope filter [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5 --format json --min-coverage 1` [INFO] [stdout] ✔ Then the JSON envelope at "view.spec.filters.coverage_range.min" is 1.0 [INFO] [stdout] ✔ And the JSON envelope at "view.spec.filters.coverage_range.max" is 100.0 [INFO] [stdout] Scenario Outline: coverage-range flags resolve into the envelope filter [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5 --format json --max-coverage 0` [INFO] [stdout] ✔ Then the JSON envelope at "view.spec.filters.coverage_range.min" is 0.0 [INFO] [stdout] ✔ And the JSON envelope at "view.spec.filters.coverage_range.max" is 0.0 [INFO] [stdout] Scenario Outline: coverage-range flags resolve into the envelope filter [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5 --format json --min-coverage 1 --max-coverage 90` [INFO] [stdout] ✔ Then the JSON envelope at "view.spec.filters.coverage_range.min" is 1.0 [INFO] [stdout] ✔ And the JSON envelope at "view.spec.filters.coverage_range.max" is 90.0 [INFO] [stdout] Scenario Outline: invalid coverage ranges exit 2 with a clear message [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --min-coverage -5` [INFO] [stdout] ✔ Then the exit code is 2 [INFO] [stdout] ✔ And stderr contains "--min-coverage must be in [0, 100]" [INFO] [stdout] Scenario Outline: invalid coverage ranges exit 2 with a clear message [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --max-coverage 105` [INFO] [stdout] ✔ Then the exit code is 2 [INFO] [stdout] ✔ And stderr contains "--max-coverage must be in [0, 100]" [INFO] [stdout] Scenario Outline: invalid coverage ranges exit 2 with a clear message [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --min-coverage 90 --max-coverage 30` [INFO] [stdout] ✔ Then the exit code is 2 [INFO] [stdout] ✔ And stderr contains "--min-coverage must not exceed --max-coverage" [INFO] [stdout] Scenario: a coverage filter hiding violations does not change the exit code [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5 --format json --min-coverage 99` [INFO] [stdout] ✔ Then the exit code is 1 [INFO] [stdout] ✔ And the JSON envelope at "view.eligible_count" is 3 [INFO] [stdout] ✔ And the JSON envelope at "result.summary.exceeding_threshold" is 3 [INFO] [stdout] Scenario Outline: --sort-by crap echoes into the envelope as a lowercase string [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5 --format json --sort-by crap` [INFO] [stdout] ✔ Then the JSON envelope at "view.spec.sort" is "crap" [INFO] [stdout] Scenario Outline: --sort-by coverage echoes into the envelope as a lowercase string [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5 --format json --sort-by coverage` [INFO] [stdout] ✔ Then the JSON envelope at "view.spec.sort" is "coverage" [INFO] [stdout] Scenario Outline: --sort-by complexity echoes into the envelope as a lowercase string [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5 --format json --sort-by complexity` [INFO] [stdout] ✔ Then the JSON envelope at "view.spec.sort" is "complexity" [INFO] [stdout] Scenario Outline: --sort-by path echoes into the envelope as a lowercase string [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5 --format json --sort-by path` [INFO] [stdout] ✔ Then the JSON envelope at "view.spec.sort" is "path" [INFO] [stdout] Scenario: --sort-by rejects an unknown dimension [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --sort-by nonsense` [INFO] [stdout] ✔ Then the exit code is 2 [INFO] [stdout] ✔ And stderr contains "invalid value 'nonsense' for '--sort-by" [INFO] [stdout] Scenario: --no-fail forces exit 0 but keeps result.passed false [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5 --format json --no-fail` [INFO] [stdout] ✔ Then the exit code is 0 [INFO] [stdout] ✔ And the JSON envelope at "result.passed" is false [INFO] [stdout] Scenario: --quiet and --no-fail compose to silent success [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5 --quiet --no-fail` [INFO] [stdout] ✔ Then stdout is empty [INFO] [stdout] ✔ And the exit code is 0 [INFO] [stdout] Scenario: --only-failing keeps result.summary global while view.shown holds only violations [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5 --format json --only-failing` [INFO] [stdout] ✔ Then the exit code is 1 [INFO] [stdout] ✔ And the JSON envelope at "result.summary.total_functions" is 6 [INFO] [stdout] ✔ And the JSON envelope at "result.summary.exceeding_threshold" is 3 [INFO] [stdout] ✔ And the JSON envelope at "view.spec.filters.only_failing" is true [INFO] [stdout] ✔ And the JSON envelope at "view.shown" has 3 entries [INFO] [stdout] Scenario: --only-failing on a passing project produces an empty view and exit 0 [INFO] [stdout] ✔ Given a synthetic project where every function is within threshold [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --format json --only-failing` [INFO] [stdout] ✔ Then the exit code is 0 [INFO] [stdout] ✔ And the JSON envelope at "result.summary.total_functions" is 3 [INFO] [stdout] ✔ And the JSON envelope at "view.shown" has 0 entries [INFO] [stdout] Scenario: a default invocation carries a neutral view block [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5 --format json` [INFO] [stdout] ✔ Then the JSON envelope at "view.spec.filters.only_failing" is false [INFO] [stdout] ✔ And the JSON envelope at "view.spec.filters.coverage_range" is null [INFO] [stdout] ✔ And the JSON envelope at "view.spec.sort" is "crap" [INFO] [stdout] ✔ And the JSON envelope at "view.spec.limit" is null [INFO] [stdout] ✔ And the JSON envelope at "view.eligible_count" is 6 [INFO] [stdout] ✔ And the JSON envelope at "view.truncated" is false [INFO] [stdout] ✔ And the JSON envelope at "view.shown" has 6 entries [INFO] [stdout] Scenario: a default invocation prints the Summary block and no View line [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5` [INFO] [stdout] ✔ Then stdout contains "Summary: 6 functions" [INFO] [stdout] ✔ And stdout does not contain "View:" [INFO] [stdout] Scenario: --sort-by alone does not print a View line (reorders without reducing rows) [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5 --sort-by coverage` [INFO] [stdout] ✔ Then stdout does not contain "View:" [INFO] [stdout] Scenario: --top prints a View line because rows are truncated [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5 --top 3` [INFO] [stdout] ✔ Then stdout contains "View: showing 3 of 6 functions (top 3)" [INFO] [stdout] Scenario: a coverage filter prints a View line because functions are excluded [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5 --max-coverage 90` [INFO] [stdout] ✔ Then stdout contains "View: showing 3 of 6 functions (coverage 0–90%)" [INFO] [stdout] Scenario: --only-failing prints a View line because violations are isolated [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5 --only-failing` [INFO] [stdout] ✔ Then stdout contains "View: showing 3 of 6 functions (failing only)" [INFO] [stdout] Scenario: an investigator's full flag-set composes into a shaped report that does not fail CI [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5 --format json --only-failing --sort-by coverage --top 5 --no-fail` [INFO] [stdout] ✔ Then the exit code is 0 [INFO] [stdout] ✔ And the JSON envelope at "result.passed" is false [INFO] [stdout] ✔ And the JSON envelope at "view.shown" has 3 entries [INFO] [stdout] Scenario: short -h help shows the one-line tool description [INFO] [stdout] ✔ When the operator runs `crap4rs -h` [INFO] [stdout] ✔ Then stdout contains "CRAP score analyzer for Rust" [INFO] [stdout] Scenario: long --help shows the extended description and the first-run example [INFO] [stdout] ✔ When the operator runs `crap4rs --help` [INFO] [stdout] ✔ Then stdout contains "Change Risk Anti-Patterns" [INFO] [stdout] ✔ And stdout contains "cognitive complexity" [INFO] [stdout] ✔ And stdout contains "EXAMPLES:" [INFO] [stdout] ✔ And stdout contains "crap4rs --coverage lcov.info --top 20" [INFO] [stdout] Scenario: --help shows an investigation example combining the shaping flags [INFO] [stdout] ✔ When the operator runs `crap4rs --help` [INFO] [stdout] ✔ Then the help text shows the example "--min-coverage 1 --max-coverage 90 --sort-by coverage --top 10 --no-fail" [INFO] [stdout] Scenario: --only-failing is grouped under the Filtering heading in --help [INFO] [stdout] ✔ When the operator runs `crap4rs --help` [INFO] [stdout] ✔ Then the help text lists "--only-failing" under the "Filtering" heading [INFO] [stdout] ✔ And the help text lists "--min-coverage" under the "Filtering" heading [INFO] [stdout] ✔ And the help text lists "--max-coverage" under the "Filtering" heading [INFO] [stdout] ✔ And the help text lists "--top" under the "Filtering" heading [INFO] [stdout] Scenario: a default invocation on a violating project exits 1 [INFO] [stdout] ✔ Given a synthetic project with six functions spanning the CRAP range [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5` [INFO] [stdout] ✔ Then the exit code is 1 [INFO] [stdout] Scenario: --summary on a passing run emits a single PASS line [INFO] [stdout] ✔ Given a synthetic project where every function is within threshold [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 25 --summary` [INFO] [stdout] ✔ Then stdout contains exactly one line [INFO] [stdout] ✔ And stdout matches "^PASS: \d+ functions \| 0 above threshold \(25\) \| worst: \d+\.\d \| avg: \d+\.\d$" [INFO] [stdout] ✔ And the exit code is 0 [INFO] [stdout] Scenario: --summary on a failing run emits a single FAIL line [INFO] [stdout] ✔ Given a synthetic project where at least one function exceeds threshold [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5 --summary` [INFO] [stdout] ✔ Then stdout contains exactly one line [INFO] [stdout] ✔ And stdout matches "^FAIL: \d+ functions \| \d+ above threshold \(5\) \| worst: \d+\.\d \| avg: \d+\.\d$" [INFO] [stdout] ✔ And the exit code is 1 [INFO] [stdout] Scenario: --summary with --no-fail keeps emitting FAIL but exits 0 [INFO] [stdout] ✔ Given a synthetic project where at least one function exceeds threshold [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5 --summary --no-fail` [INFO] [stdout] ✔ Then stdout contains exactly one line [INFO] [stdout] ✔ And stdout starts with "FAIL:" [INFO] [stdout] ✔ And the exit code is 0 [INFO] [stdout] Scenario: --summary with --quiet suppresses output (quiet wins) [INFO] [stdout] ✔ Given a synthetic project where at least one function exceeds threshold [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 5 --summary --quiet` [INFO] [stdout] ✔ Then stdout is empty [INFO] [stdout] ✔ And the exit code is 1 [INFO] [stdout] Scenario: --summary short-circuits --format json (summary line wins) [INFO] [stdout] ✔ Given a synthetic project where every function is within threshold [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 25 --summary --format json` [INFO] [stdout] ✔ Then stdout contains exactly one line [INFO] [stdout] ✔ And stdout starts with "PASS:" [INFO] [stdout] ✔ And stdout does not contain "schema_version" [INFO] [stdout] Scenario: --summary renders fractional threshold with decimals [INFO] [stdout] ✔ Given a synthetic project where every function is within threshold [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 25.5 --summary` [INFO] [stdout] ✔ Then stdout contains exactly one line [INFO] [stdout] ✔ And stdout contains "above threshold (25.5)" [INFO] [stdout] Scenario: --summary help text includes the format template [INFO] [stdout] ✔ When the operator runs `crap4rs --help` [INFO] [stdout] ✔ Then stdout contains "--summary" [INFO] [stdout] ✔ And stdout contains "single-line analysis verdict" [INFO] [stdout] [Summary] [INFO] [stdout] 1 feature [INFO] [stdout] 41 scenarios (41 passed) [INFO] [stdout] 172 steps (172 passed) [INFO] [stderr] Running tests/cli_init_cucumber.rs (/opt/rustwide/target/release/build/crap4rs/6b83d82f8bdca792/out/cli_init_cucumber-6b83d82f8bdca792) [INFO] [stdout] Feature: crap4rs init subcommand [INFO] [stdout] Scenario: init emits the fixed annotated dump, ignoring project layout [INFO] [stdout] ✔ Given a project directory with a "crates" subdirectory [INFO] [stdout] ✔ When the operator runs `crap4rs init --non-interactive` [INFO] [stdout] ✔ Then a file named "crap.toml" exists in the project directory [INFO] [stdout] ✔ And the config file contains "exhaustive annotated config reference" [INFO] [stdout] ✔ And the config file contains 'src = ["crates/core/src", "crates/cli/src"]' [INFO] [stdout] ✔ And the config file contains 'threshold = 15.0' [INFO] [stdout] ✔ And the exit code is 0 [INFO] [stdout] Scenario: stdin is ignored — there is no interactive prompt to answer [INFO] [stdout] ✔ Given an empty project directory [INFO] [stdout] ✔ When the operator runs `crap4rs init` with stdin "s\n" [INFO] [stdout] ✔ Then the config file contains 'threshold = 15.0' [INFO] [stdout] ✔ And the config file does not contain 'preset = "strict"' [INFO] [stdout] ✔ And the config file does not contain 'preset = "lenient"' [INFO] [stdout] ✔ And the exit code is 0 [INFO] [stdout] Scenario: generated config lists common exclude patterns live (not commented out) [INFO] [stdout] ✔ Given an empty project directory [INFO] [stdout] ✔ When the operator runs `crap4rs init --non-interactive` [INFO] [stdout] ✔ Then the config file contains 'exclude = ["tests/**"' [INFO] [stdout] ✔ And the config file contains "benches/**" [INFO] [stdout] ✔ And the config file contains "examples/**" [INFO] [stdout] ✔ And the config file does not contain "# exclude = [" [INFO] [stdout] Scenario: generated config documents every section with header comments [INFO] [stdout] ✔ Given an empty project directory [INFO] [stdout] ✔ When the operator runs `crap4rs init --non-interactive` [INFO] [stdout] ✔ Then the config file contains "# crap.toml" [INFO] [stdout] ✔ And the config file contains "exhaustive annotated config reference" [INFO] [stdout] ✔ And the config file contains "[language.rust]" [INFO] [stdout] ✔ And the config file contains "[language.typescript]" [INFO] [stdout] ✔ And the config file contains "[output]" [INFO] [stdout] ✔ And the config file contains "title =" [INFO] [stdout] Scenario: generated config round-trips through the loader with threshold live and no preset [INFO] [stdout] ✔ Given an empty project directory [INFO] [stdout] ✔ When the operator runs `crap4rs init --non-interactive` [INFO] [stdout] ✔ Then the generated config file loads without error [INFO] [stdout] ✔ And the config file contains 'threshold = 15.0' [INFO] [stdout] ✔ And the loaded config has no top-level preset [INFO] [stdout] Scenario: refuses to overwrite an existing config without --force [INFO] [stdout] ✔ Given a project directory with an existing "crap.toml" containing 'preset = "lenient"' [INFO] [stdout] ✔ When the operator runs `crap4rs init --non-interactive` [INFO] [stdout] ✔ Then the exit code is 2 [INFO] [stdout] ✔ And stderr contains "crap.toml already exists" [INFO] [stdout] ✔ And stderr contains "--force" [INFO] [stdout] ✔ And the config file still contains 'preset = "lenient"' [INFO] [stdout] Scenario: --force overwrites an existing config [INFO] [stdout] ✔ Given a project directory with an existing "crap.toml" containing 'preset = "lenient"' [INFO] [stdout] ✔ When the operator runs `crap4rs init --non-interactive --force` [INFO] [stdout] ✔ Then the exit code is 0 [INFO] [stdout] ✔ And the config file contains 'threshold = 15.0' [INFO] [stdout] ✔ And the config file does not contain 'preset = "lenient"' [INFO] [stdout] Scenario: init subcommand appears in --help output [INFO] [stdout] ✔ When the operator runs `crap4rs --help` [INFO] [stdout] ✔ Then stdout contains "init" [INFO] [stdout] ✔ And stdout contains "starter" [INFO] [stdout] Scenario: init --help describes the flags [INFO] [stdout] ✔ When the operator runs `crap4rs init --help` [INFO] [stdout] ✔ Then stdout contains "--non-interactive" [INFO] [stdout] ✔ And stdout contains "--force" [INFO] [stdout] [Summary] [INFO] [stdout] 1 feature [INFO] [stdout] 9 scenarios (9 passed) [INFO] [stdout] 49 steps (49 passed) [INFO] [stderr] Running tests/cli_minimal_view_integration.rs (/opt/rustwide/target/release/build/crap4rs/c68924976a4b5c3f/out/cli_minimal_view_integration-c68924976a4b5c3f) [INFO] [stdout] [INFO] [stdout] running 3 tests [INFO] [stdout] test minimal_view_preserves_scope_context ... ok [INFO] [stdout] test default_invocation_includes_shown ... ok [INFO] [stdout] test minimal_view_omits_shown_array ... ok [INFO] [stdout] [INFO] [stdout] test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s [INFO] [stdout] [INFO] [stderr] Running tests/complexity_breakdown_cucumber.rs (/opt/rustwide/target/release/build/crap4rs/a1e86a2d844d3084/out/complexity_breakdown_cucumber-a1e86a2d844d3084) [INFO] [stdout] Feature: Complexity breakdown [INFO] [stdout] Scenario: --breakdown renders contributor sub-rows for an exceeding function [INFO] [stdout] ✔ Given a project with one nested function that exceeds threshold and is uncovered [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --threshold 1 --breakdown --color never` [INFO] [stdout] ✔ Then stdout contains "├─ line 2: if-branch (+1)" [INFO] [stdout] ✔ And stdout contains "└─ line 3: if-branch (+2 (nested))" [INFO] [stdout] Scenario: Breakdown is off by default — no sub-rows [INFO] [stdout] ✔ Given a project with one nested function that exceeds threshold and is uncovered [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --threshold 1 --color never` [INFO] [stdout] ✔ Then stdout does not contain "if-branch" [INFO] [stdout] Scenario: --explain adds the increment legend beneath the breakdown [INFO] [stdout] ✔ Given a project with one nested function that exceeds threshold and is uncovered [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --threshold 1 --breakdown --explain --color never` [INFO] [stdout] ✔ Then stdout contains "└─ line 3: if-branch (+2 (nested))" [INFO] [stdout] ✔ And stdout contains "Legend: +1 = base structural increment." [INFO] [stdout] Scenario: --explain requires --breakdown (clap rejects it otherwise, exit 2) [INFO] [stdout] ✔ Given a project with one nested function that exceeds threshold and is uncovered [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --threshold 1 --explain` [INFO] [stdout] ✔ Then the exit code is 2 [INFO] [stdout] ✔ And stderr contains "--explain requires --breakdown" [INFO] [stdout] Scenario: --explain leaves the JSON envelope shape intact with contributors present [INFO] [stdout] ✔ Given a project with one nested function that exceeds threshold and is uncovered [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --format json --explain` [INFO] [stdout] ✔ Then the first function in the envelope carries a contributors array [INFO] [stdout] ✔ And the JSON envelope has no top-level "legend" key [INFO] [stdout] [Summary] [INFO] [stdout] 1 feature [INFO] [stdout] 5 scenarios (5 passed) [INFO] [stdout] 19 steps (19 passed) [INFO] [stderr] Running tests/config_discovery_integration.rs (/opt/rustwide/target/release/build/crap4rs/f01cf0d80c0a6289/out/config_discovery_integration-f01cf0d80c0a6289) [INFO] [stdout] [INFO] [stdout] running 6 tests [INFO] [stdout] test legacy_crap4rs_toml_discovered_emits_deprecation_notice ... ok [INFO] [stdout] test canonical_crap_toml_emits_no_notice ... ok [INFO] [stdout] test canonical_crap_toml_wins_and_reports_legacy_shadowed ... ok [INFO] [stdout] test no_config_file_uses_builtin_defaults_silently ... ok [INFO] [stdout] test malformed_canonical_crap_toml_errors_without_legacy_fallthrough ... ok [INFO] [stdout] test walk_upward_finds_ancestor_config_from_nested_relative_src ... ok [INFO] [stdout] [INFO] [stdout] test result: ok. 6 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s [INFO] [stdout] [INFO] [stderr] Running tests/config_src_path_strip.rs (/opt/rustwide/target/release/build/crap4rs/91255c6ae608701b/out/config_src_path_strip-91255c6ae608701b) [INFO] [stdout] [INFO] [stdout] running 1 test [INFO] [stdout] test config_only_src_strips_lcov_path_prefix ... ok [INFO] [stderr] Running tests/delta_cucumber.rs (/opt/rustwide/target/release/build/crap4rs/2d7b681a4c6c21ad/out/delta_cucumber-2d7b681a4c6c21ad) [INFO] [stdout] [INFO] [stdout] test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s [INFO] [stdout] [INFO] [stdout] Feature: --baseline delta analysis (Bundle E, issue #81) [INFO] [stdout] Scenario: --baseline loads the JSON envelope and emits a delta block [INFO] [stdout] ✔ Given a baseline of three passing functions captured at threshold 5 [INFO] [stdout] ✔ And the project then adds the three exceeding functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline baseline.json --threshold 5 --no-fail --format json` [INFO] [stdout] ✔ Then the JSON envelope has a "delta" object [INFO] [stdout] ✔ And the JSON envelope has a "delta.summary" object [INFO] [stdout] ✔ And the JSON envelope has a "delta.spec" object [INFO] [stdout] ✔ And the JSON envelope at "delta.shown" has 6 entries [INFO] [stdout] Scenario: Without --baseline the JSON envelope omits the delta key entirely [INFO] [stdout] ✔ Given a synthetic project with six functions and no baseline [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --threshold 1000 --format json` [INFO] [stdout] ✔ Then the JSON envelope has no top-level "delta" key [INFO] [stdout] Scenario: Without --baseline the table reporter renders no delta section [INFO] [stdout] ✔ Given a synthetic project with six functions and no baseline [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --threshold 1000 --color never` [INFO] [stdout] ✔ Then stdout does not contain "Delta vs baseline" [INFO] [stdout] Scenario: --baseline alone on a passing analysis is informational and exits 0 [INFO] [stdout] ✔ Given a baseline of six functions (three exceeding) captured at threshold 1000 [INFO] [stdout] ✔ And the project is left unchanged [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline baseline.json --threshold 1000` [INFO] [stdout] ✔ Then the exit code is 0 [INFO] [stdout] Scenario: --baseline alone — exit code reflects only the threshold gate, not the delta [INFO] [stdout] ✔ Given a baseline of six functions (three exceeding) captured at threshold 5 [INFO] [stdout] ✔ And the project is left unchanged [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline baseline.json --threshold 5 --no-fail --format json` [INFO] [stdout] ✔ Then the JSON envelope at "delta.summary.new_violations" is 0 [INFO] [stdout] ✔ And the JSON envelope at "delta.summary.passed" is true [INFO] [stdout] Scenario: --delta-gate fails (exit 1) when the delta introduces new violations [INFO] [stdout] ✔ Given a baseline of three passing functions captured at threshold 5 [INFO] [stdout] ✔ And the project then adds the three exceeding functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline baseline.json --threshold 5 --delta-gate` [INFO] [stdout] ✔ Then the exit code is 1 [INFO] [stdout] Scenario: --delta-gate without new violations exits 0 [INFO] [stdout] ✔ Given a baseline of six functions (three exceeding) captured at threshold 1000 [INFO] [stdout] ✔ And the project is left unchanged [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline baseline.json --threshold 1000 --delta-gate` [INFO] [stdout] ✔ Then the exit code is 0 [INFO] [stdout] Scenario: --no-fail overrides --delta-gate while the truth stays in JSON [INFO] [stdout] ✔ Given a baseline of three passing functions captured at threshold 5 [INFO] [stdout] ✔ And the project then adds the three exceeding functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline baseline.json --threshold 5 --delta-gate --no-fail --format json` [INFO] [stdout] ✔ Then the exit code is 0 [INFO] [stdout] ✔ And the JSON envelope at "result.passed" is false [INFO] [stdout] ✔ And the JSON envelope at "delta.summary.passed" is false [INFO] [stdout] ✔ And the JSON envelope at "delta.summary.new_violations" is 3 [INFO] [stdout] Scenario: --delta-gate requires --baseline (clap rejects it otherwise, exit 2) [INFO] [stdout] ✔ Given a synthetic project with six functions and no baseline [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --threshold 5 --delta-gate` [INFO] [stdout] ✔ Then the exit code is 2 [INFO] [stdout] ✔ And stderr contains "baseline" [INFO] [stdout] Scenario: --threshold-epsilon suppresses a border-band crossing [INFO] [stdout] ✔ Given a baseline where one covered function scores below threshold 12 [INFO] [stdout] ✔ And that function then becomes fully uncovered [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline baseline.json --threshold 12 --threshold-epsilon 10 --delta-gate --no-fail --format json` [INFO] [stdout] ✔ Then the JSON envelope at "delta.summary.new_violations" is 0 [INFO] [stdout] ✔ And the JSON envelope at "delta.summary.border_jitter_suppressed" is 1 [INFO] [stdout] ✔ And the JSON envelope at "delta.summary.passed" is true [INFO] [stdout] Scenario: The same crossing with no epsilon is a genuine new violation [INFO] [stdout] ✔ Given a baseline where one covered function scores below threshold 12 [INFO] [stdout] ✔ And that function then becomes fully uncovered [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline baseline.json --threshold 12 --delta-gate --no-fail --format json` [INFO] [stdout] ✔ Then the JSON envelope at "delta.summary.new_violations" is 1 [INFO] [stdout] ✔ And the JSON envelope at "delta.summary.border_jitter_suppressed" is 0 [INFO] [stdout] ✔ And the JSON envelope at "delta.summary.passed" is false [INFO] [stdout] Scenario: The table reporter renders a Delta section under the analysis table [INFO] [stdout] ✔ Given a baseline of two functions captured at threshold 1000 [INFO] [stdout] ✔ And the project drops one function, modifies another, and adds a third [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline baseline.json --threshold 1000 --color never` [INFO] [stdout] ✔ Then stdout contains "Delta vs baseline:" [INFO] [stdout] ✔ And stdout contains "removed" [INFO] [stdout] ✔ And stdout contains "added" [INFO] [stdout] ✔ And stdout contains "modified" [INFO] [stdout] Scenario: The markdown reporter renders a PR-comment scorecard [INFO] [stdout] ✔ Given a baseline of two functions captured at threshold 1000 [INFO] [stdout] ✔ And the project drops one function, modifies another, and adds a third [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline baseline.json --threshold 1000 --format markdown` [INFO] [stdout] ✔ Then stdout starts with "" [INFO] [stdout] ✔ And stdout contains "## CRAP Scorecard" [INFO] [stdout] ✔ And stdout contains "- **Delta status:**" [INFO] [stdout] ✔ And stdout contains "- **Changes:**" [INFO] [stdout] Scenario: The CSV reporter switches to a row-per-change schema [INFO] [stdout] ✔ Given a baseline of two functions captured at threshold 1000 [INFO] [stdout] ✔ And the project drops one function, modifies another, and adds a third [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline baseline.json --threshold 1000 --format csv` [INFO] [stdout] ✔ Then stdout starts with "change_kind," [INFO] [stdout] ✔ And stdout does not contain "exceeds_threshold" [INFO] [stdout] Scenario: --minimal-view does not suppress the delta block [INFO] [stdout] ✔ Given a baseline of three passing functions captured at threshold 5 [INFO] [stdout] ✔ And the project then adds the three exceeding functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline baseline.json --threshold 5 --no-fail --minimal-view --format json` [INFO] [stdout] ✔ Then the JSON envelope at "delta.shown" has 6 entries [INFO] [stdout] Scenario: The delta is an additive sibling of result under schema_version 2 [INFO] [stdout] ✔ Given a baseline of three passing functions captured at threshold 5 [INFO] [stdout] ✔ And the project then adds the three exceeding functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline baseline.json --threshold 5 --no-fail --format json` [INFO] [stdout] ✔ Then the JSON envelope at "schema_version" is 2 [INFO] [stdout] ✔ And the JSON envelope has a "delta" object [INFO] [stdout] Scenario: The delta block carries baseline provenance metadata [INFO] [stdout] ✔ Given a baseline of three passing functions captured at threshold 5 [INFO] [stdout] ✔ And the project then adds the three exceeding functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline baseline.json --threshold 5 --no-fail --format json` [INFO] [stdout] ✔ Then the JSON envelope at "delta.baseline_tool_version" holds a non-empty string [INFO] [stdout] ✔ And the JSON envelope at "delta.baseline_timestamp" holds a non-empty string [INFO] [stdout] ✔ And the JSON envelope at "delta.baseline_ref" is null [INFO] [stdout] Scenario: The delta block propagates the baseline's diagnostics [INFO] [stdout] ✔ Given a baseline captured with diagnostics at threshold 1000 [INFO] [stdout] ✔ And the project drops one function, modifies another, and adds a third [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline baseline.json --threshold 1000 --no-fail --format json` [INFO] [stdout] ✔ Then the JSON envelope has a "delta.baseline_diagnostics" object [INFO] [stdout] Scenario: A function whose lines shift stays Modified (identity is file + name) [INFO] [stdout] ✔ Given a baseline of two functions captured at threshold 1000 [INFO] [stdout] ✔ And the project drops one function, modifies another, and adds a third [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline baseline.json --threshold 1000 --no-fail --format json` [INFO] [stdout] ✔ Then the JSON envelope at "delta.summary.modified" is 1 [INFO] [stdout] ✔ And the JSON envelope at "delta.summary.added" is 1 [INFO] [stdout] ✔ And the JSON envelope at "delta.summary.removed" is 1 [INFO] [stdout] Scenario: A relocated function pairs as one Renamed and adds no new violation [INFO] [stdout] ✔ Given a baseline with one function in old_mod.rs captured at threshold 5 [INFO] [stdout] ✔ And the function relocates to new_mod.rs [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline baseline.json --threshold 5 --no-fail --format json` [INFO] [stdout] ✔ Then the JSON envelope at "delta.summary.renamed" is 1 [INFO] [stdout] ✔ And the JSON envelope at "delta.summary.added" is 0 [INFO] [stdout] ✔ And the JSON envelope at "delta.summary.removed" is 0 [INFO] [stdout] ✔ And the JSON envelope at "delta.summary.new_violations" is 0 [INFO] [stdout] ✔ And the JSON envelope at "delta.summary.passed" is true [INFO] [stdout] Scenario: --delta-top truncates delta.shown and records the limit [INFO] [stdout] ✔ Given a baseline of two functions captured at threshold 1000 [INFO] [stdout] ✔ And the project drops one function, modifies another, and adds a third [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline baseline.json --threshold 1000 --no-fail --delta-top 2 --format json` [INFO] [stdout] ✔ Then the JSON envelope at "delta.shown" has 2 entries [INFO] [stdout] ✔ And the JSON envelope at "delta.eligible_count" is 3 [INFO] [stdout] ✔ And the JSON envelope at "delta.truncated" is true [INFO] [stdout] ✔ And the JSON envelope at "delta.spec.limit" is 2 [INFO] [stdout] Scenario: --delta-sort current-crap records the sort key in the spec [INFO] [stdout] ✔ Given a baseline of two functions captured at threshold 1000 [INFO] [stdout] ✔ And the project drops one function, modifies another, and adds a third [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline baseline.json --threshold 1000 --no-fail --delta-sort current-crap --format json` [INFO] [stdout] ✔ Then the JSON envelope at "delta.spec.sort" is "current_crap" [INFO] [stdout] Scenario: --delta-only filters delta.shown to the named change kinds [INFO] [stdout] ✔ Given a baseline of two functions captured at threshold 1000 [INFO] [stdout] ✔ And the project drops one function, modifies another, and adds a third [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline baseline.json --threshold 1000 --no-fail --delta-only added,modified --format json` [INFO] [stdout] ✔ Then the JSON envelope at "delta.shown" has 2 entries [INFO] [stdout] ✔ And the JSON envelope at "delta.spec.filters.change_kinds" is ["added","modified"] [INFO] [stdout] Scenario: --baseline with a non-existent path exits 2 [INFO] [stdout] ✔ Given a synthetic project with six functions and no baseline [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline does-not-exist.json --threshold 5` [INFO] [stdout] ✔ Then the exit code is 2 [INFO] [stdout] ✔ And stderr contains "baseline file not found" [INFO] [stdout] Scenario: --baseline with malformed JSON exits 2 [INFO] [stdout] ✔ Given a project with a malformed baseline file present [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline bad.json --threshold 5` [INFO] [stdout] ✔ Then the exit code is 2 [INFO] [stdout] ✔ And stderr contains "failed to parse baseline JSON" [INFO] [stdout] Scenario: --baseline with an unsupported schema_version exits 2 [INFO] [stdout] ✔ Given a project with a baseline declaring an unsupported schema_version [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline future.json --threshold 5` [INFO] [stdout] ✔ Then the exit code is 2 [INFO] [stdout] ✔ And stderr contains "unsupported baseline schema_version" [INFO] [stdout] Scenario: A baseline scored under a different metric warns without changing the gate [INFO] [stdout] ✔ Given a baseline of two functions captured at threshold 1000 [INFO] [stdout] ✔ And the project drops one function, modifies another, and adds a third [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline baseline.json --threshold 1000 --metric cyclomatic --no-fail --format json` [INFO] [stdout] ✔ Then the exit code is 0 [INFO] [stdout] ✔ And stderr contains "metric `cognitive`" [INFO] [stdout] ✔ And stderr contains "`cyclomatic`" [INFO] [stdout] ✔ And the JSON envelope has a "delta" object [INFO] [stdout] Scenario: A baseline that predates the metric field does not warn [INFO] [stdout] ✔ Given a baseline of two functions captured at threshold 1000 [INFO] [stdout] ✔ And the baseline metric field is then stripped [INFO] [stdout] ✔ And the project drops one function, modifies another, and adds a third [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --baseline baseline.json --threshold 1000 --metric cyclomatic --no-fail` [INFO] [stdout] ✔ Then the exit code is 0 [INFO] [stdout] ✔ And stderr does not contain "metric `" [INFO] [stdout] Scenario: --delta-only with an unknown kind exits 2 [INFO] [stdout] ✔ Given a synthetic project with six functions and no baseline [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --delta-only nonsense` [INFO] [stdout] ✔ Then the exit code is 2 [INFO] [stdout] ✔ And stderr contains "invalid value 'nonsense' for '--delta-only" [INFO] [stdout] Scenario: --delta-sort with an unknown key exits 2 [INFO] [stdout] ✔ Given a synthetic project with six functions and no baseline [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --delta-sort nonsense` [INFO] [stdout] ✔ Then the exit code is 2 [INFO] [stdout] ✔ And stderr contains "invalid value 'nonsense' for '--delta-sort" [INFO] [stdout] Scenario: --delta-top with a negative value exits 2 [INFO] [stdout] ✔ Given a synthetic project with six functions and no baseline [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --delta-top -5` [INFO] [stdout] ✔ Then the exit code is 2 [INFO] [stdout] ✔ And stderr contains "invalid value '-5' for '--delta-top" [INFO] [stdout] Scenario: --help advertises --baseline, --delta-gate, and the delta examples [INFO] [stdout] ✔ When the operator runs `crap4rs --help` [INFO] [stdout] ✔ Then stdout contains "--baseline" [INFO] [stdout] ✔ And stdout contains "--delta-gate" [INFO] [stdout] ✔ And stdout contains "COMPARING TWO ANALYSES" [INFO] [stdout] ✔ And stdout contains "baseline.json" [INFO] [stdout] [Summary] [INFO] [stdout] 1 feature [INFO] [stdout] 32 scenarios (32 passed) [INFO] [stdout] 163 steps (163 passed) [INFO] [stderr] Running tests/diff_cucumber.rs (/opt/rustwide/target/release/build/crap4rs/673516e1b4eb5176/out/diff_cucumber-673516e1b4eb5176) [INFO] [stdout] Feature: Diff mode [INFO] [stdout] Scenario: Only changed functions appear in the report [INFO] [stdout] ✔ Given a git repo whose latest commit changed only function foo [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --diff HEAD~1 --threshold 30 --format json` [INFO] [stdout] ✔ Then the report includes function "foo" [INFO] [stdout] ✔ And the report excludes function "bar" [INFO] [stdout] Scenario: Hunk-level precision excludes an untouched function in a changed file [INFO] [stdout] ✔ Given a git repo whose latest commit changed only function alpha, leaving beta untouched [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --diff HEAD~1 --threshold 30 --format json` [INFO] [stdout] ✔ Then the report includes function "alpha" [INFO] [stdout] ✔ And the report excludes function "beta" [INFO] [stdout] Scenario: An empty diff produces an empty report and exit 0 [INFO] [stdout] ✔ Given a git repo with no changes since HEAD [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --diff HEAD --threshold 30 --format json` [INFO] [stdout] ✔ Then the exit code is 0 [INFO] [stdout] ✔ And the report contains 0 functions [INFO] [stdout] ✔ And the result reports passed as true [INFO] [stdout] Scenario: The JSON envelope records diff_ref when --diff is used [INFO] [stdout] ✔ Given a git repo whose latest commit changed only function foo [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --diff HEAD~1 --threshold 30 --format json` [INFO] [stdout] ✔ Then the JSON envelope at "diff_ref" is "HEAD~1" [INFO] [stdout] Scenario: The JSON envelope has a null diff_ref when --diff is not used [INFO] [stdout] ✔ Given a project that is not a git repository [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --threshold 30 --format json` [INFO] [stdout] ✔ Then the JSON envelope at "diff_ref" is null [INFO] [stdout] Scenario: --diff composes with --exclude as AND [INFO] [stdout] ✔ Given a git repo with changes in src/lib.rs and src/tests/test_lib.rs [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --diff HEAD~1 --exclude tests/** --threshold 30 --format json` [INFO] [stdout] ✔ Then the report includes function "kept" [INFO] [stdout] ✔ And the report excludes function "excluded" [INFO] [stdout] Scenario: --diff composes with --only-failing as AND [INFO] [stdout] ✔ Given a git repo with changed functions, one passing and one exceeding threshold [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --diff HEAD~1 --only-failing --threshold 5 --format json` [INFO] [stdout] ✔ Then the view includes function "complex" [INFO] [stdout] ✔ And the view excludes function "simple" [INFO] [stdout] Scenario: A renamed file surfaces its functions under the new path [INFO] [stdout] ✔ Given a git repo where src/old.rs was renamed to src/new.rs with changes [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --diff HEAD~1 --threshold 30 --format json` [INFO] [stdout] ✔ Then the report includes function "moved" [INFO] [stdout] Scenario: --diff outside a git repository exits 2 [INFO] [stdout] ✔ Given a project that is not a git repository [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --diff main --threshold 30` [INFO] [stdout] ✔ Then the exit code is 2 [INFO] [stdout] ✔ And stderr contains "not inside a git work tree" [INFO] [stdout] Scenario: --diff with an invalid ref exits 2 [INFO] [stdout] ✔ Given a git repo [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --diff nonexistent-ref-xyz --threshold 30` [INFO] [stdout] ✔ Then the exit code is 2 [INFO] [stdout] ✔ And stderr contains "bad revision" [INFO] [stdout] Scenario: --diff with a dash-prefixed ref is rejected (never reaches git) [INFO] [stdout] ✔ Given a git repo [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --diff --malicious-flag --threshold 30` [INFO] [stdout] ✔ Then the exit code is 2 [INFO] [stdout] ✔ And stderr contains "unexpected argument" [INFO] [stdout] [Summary] [INFO] [stdout] 1 feature [INFO] [stdout] 11 scenarios (11 passed) [INFO] [stdout] 42 steps (42 passed) [INFO] [stdout] [INFO] [stdout] running 14 tests [INFO] [stderr] Running tests/diff_integration.rs (/opt/rustwide/target/release/build/crap4rs/96e8cdf6070437ad/out/diff_integration-96e8cdf6070437ad) [INFO] [stdout] test diff_invalid_ref_errors ... ok [INFO] [stdout] test diff_empty_returns_passed_true ... ok [INFO] [stdout] test diff_deletion_only_excluded ... ok [INFO] [stdout] test diff_hunk_precision_excludes_untouched_function ... ok [INFO] [stdout] test diff_outside_git_repo_errors ... ok [INFO] [stdout] test diff_composes_with_exclude ... ok [INFO] [stdout] test diff_modified_function_only ... ok [INFO] [stdout] test diff_ignores_non_rust_files ... ok [INFO] [stdout] test diff_composes_with_only_failing ... ok [INFO] [stdout] test json_envelope_diff_ref_null_without_flag ... ok [INFO] [stdout] test json_envelope_contains_diff_ref ... ok [INFO] [stdout] test diff_nested_path_normalization ... ok [INFO] [stdout] test diff_scores_match_full_analysis ... ok [INFO] [stderr] Running tests/format_advice_cucumber.rs (/opt/rustwide/target/release/build/crap4rs/749263a0cab374aa/out/format_advice_cucumber-749263a0cab374aa) [INFO] [stdout] test diff_new_file_includes_all_functions ... ok [INFO] [stdout] [INFO] [stdout] test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.12s [INFO] [stdout] [INFO] [stdout] Feature: --format advice (issue #76) [INFO] [stdout] Scenario: --format advice emits the canonical envelope on stdout [INFO] [stdout] ✔> Given a project with a mix of over-threshold and under-threshold functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 8 --no-gitignore --no-fail --format advice` [INFO] [stdout] ✔ Then stdout is parseable JSON [INFO] [stdout] ✔ And the JSON value at "schema_version" is 2 [INFO] [stdout] ✔ And the JSON path "view.shown" is an array [INFO] [stdout] ✔ And stdout is JSON-only with no table borders or prose [INFO] [stdout] Scenario: --format advice exit code matches --format json [INFO] [stdout] ✔> Given a project with a mix of over-threshold and under-threshold functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 8 --no-gitignore --format advice` [INFO] [stdout] ✔ Then the exit code is 1 [INFO] [stdout] ✔ And the exit code equals the same command under --format json [INFO] [stdout] Scenario: Over-threshold verdicts carry a four-field Diagnostic, under-threshold ones omit it [INFO] [stdout] ✔> Given a project with a mix of over-threshold and under-threshold functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 8 --no-gitignore --no-fail --format advice` [INFO] [stdout] ✔ Then every over-threshold entry carries a populated diagnostic [INFO] [stdout] ✔ And every under-threshold entry omits the diagnostic key [INFO] [stdout] Scenario: --no-fail reports findings but only flips the exit code [INFO] [stdout] ✔> Given a project with a mix of over-threshold and under-threshold functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 8 --no-gitignore --no-fail --format advice` [INFO] [stdout] ✔ Then the exit code is 0 [INFO] [stdout] ✔ And every over-threshold entry carries a populated diagnostic [INFO] [stdout] Scenario: Diagnostics survive view truncation under --top [INFO] [stdout] ✔> Given a project with a mix of over-threshold and under-threshold functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 8 --no-gitignore --no-fail --format advice --top 2` [INFO] [stdout] ✔ Then the JSON value at "view.shown" has 2 entries [INFO] [stdout] ✔ And every over-threshold entry carries a populated diagnostic [INFO] [stdout] Scenario: --format advice emits one stderr summary line per over-threshold function [INFO] [stdout] ✔> Given a project with a mix of over-threshold and under-threshold functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 8 --no-gitignore --no-fail --format advice` [INFO] [stdout] ✔ Then stdout is parseable JSON [INFO] [stdout] ✔ And stderr carries one "[crap=" summary line per over-threshold function [INFO] [stdout] Scenario: --format json carries no diagnostics and no stderr summary [INFO] [stdout] ✔> Given a project with a mix of over-threshold and under-threshold functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 8 --no-gitignore --no-fail --format json` [INFO] [stdout] ✔ Then no view.shown entry carries a diagnostic key [INFO] [stdout] ✔ And stderr carries no "[crap=" summary line [INFO] [stdout] Scenario: Same input produces byte-identical advice stdout and stderr [INFO] [stdout] ✔> Given a project with a mix of over-threshold and under-threshold functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --threshold 8 --no-gitignore --no-fail --format advice` [INFO] [stdout] ✔ Then running the same command again produces byte-identical stdout and stderr [INFO] [stdout] [Summary] [INFO] [stdout] 1 feature [INFO] [stdout] 8 scenarios (8 passed) [INFO] [stdout] 33 steps (33 passed) [INFO] [stderr] Running tests/fuzz_syn_walker/main.rs (/opt/rustwide/target/release/build/crap4rs/4bedc512e12b3cc6/out/fuzz_syn_walker-4bedc512e12b3cc6) [INFO] [stdout] [INFO] [stdout] running 3 tests [INFO] [stdout] test replay_committed_corpus_and_crashes ... ok [INFO] [stdout] test fuzz_syn_walker_cyclomatic ... ok [INFO] [stdout] test fuzz_syn_walker_cognitive ... ok [INFO] [stdout] [INFO] [stdout] test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.05s [INFO] [stdout] [INFO] [stderr] Running tests/github_annotations_cucumber.rs (/opt/rustwide/target/release/build/crap4rs/86a78a37f0dc2e3f/out/github_annotations_cucumber-86a78a37f0dc2e3f) [INFO] [stdout] Feature: GitHub Actions inline annotations reporter (issue #276) [INFO] [stdout] Scenario: --format github-annotations emits one ::warning per exceeding function [INFO] [stdout] ✔ Given several exceeding functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --format github-annotations` [INFO] [stdout] ✔ Then stdout contains one line starting with `::warning ` per exceeding function (up to the annotation limit) [INFO] [stdout] ✔ And every emitted line includes a `file=`, `line=`, `title=CRAP ` triple before the `::` data separator [INFO] [stdout] ✔ And the message data after `::` includes the function's qualified name, CRAP score, complexity, coverage percent, and the threshold value [INFO] [stdout] Scenario: Functions at or below threshold produce no annotation [INFO] [stdout] ✔ Given every function is below the threshold [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --format github-annotations` [INFO] [stdout] ✔ Then stdout is empty (no `::warning`, no `::notice`, no other workflow commands) [INFO] [stdout] Scenario: Severity is single-tier ::warning regardless of risk level [INFO] [stdout] ✔ Given exceeding functions across risk levels high, moderate, acceptable [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --format github-annotations` [INFO] [stdout] ✔ Then every emitted line begins with `::warning ` — never `::error ` or `::notice ` (the trailing summary notice in the cap scenario is the only exception) [INFO] [stdout] Scenario: Annotations are sorted by CRAP score descending [INFO] [stdout] ✔ Given five exceeding functions with distinct CRAP scores [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --format github-annotations` [INFO] [stdout] ✔ Then the emitted lines appear in CRAP-score-descending order (the worst function's annotation first, the least-bad last) [INFO] [stdout] Scenario: --annotation-limit caps the emitted set [INFO] [stdout] ✔ Given fifteen exceeding functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --format github-annotations --annotation-limit 10` [INFO] [stdout] ✔ Then exactly ten `::warning` lines are emitted (the ten with the highest CRAP) [INFO] [stdout] ✔ And exactly one trailing `::notice::` line is emitted whose message names the remaining count: `5 more functions exceed threshold; see scorecard for the full list` [INFO] [stdout] Scenario: No truncation notice when the cap is not exceeded [INFO] [stdout] ✔ Given three exceeding functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --format github-annotations --annotation-limit 10` [INFO] [stdout] ✔ Then three `::warning` lines are emitted and no `::notice` line follows [INFO] [stdout] Scenario: Default annotation limit is 10 [INFO] [stdout] ✔ Given twelve exceeding functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --format github-annotations` (without an explicit `--annotation-limit`) [INFO] [stdout] ✔ Then ten `::warning` lines and one trailing `::notice::` line are emitted [INFO] [stdout] Scenario: --annotation-limit can be configured via crap.toml [INFO] [stdout] ✔ Given a `crap.toml` with `[output] annotation_limit = 25` [INFO] [stdout] ✔ And eleven exceeding functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --format github-annotations` [INFO] [stdout] ✔ Then all eleven `::warning` lines are emitted and no `::notice` line follows [INFO] [stdout] Scenario: CLI --annotation-limit overrides crap.toml [INFO] [stdout] ✔ Given a `crap.toml` with `[output] annotation_limit = 25` [INFO] [stdout] ✔ And fifteen exceeding functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --format github-annotations --annotation-limit 5` [INFO] [stdout] ✔ Then exactly five `::warning` lines are emitted (the CLI flag wins) [INFO] [stdout] Scenario: Percent, carriage-return, and newline characters in the message are escaped [INFO] [stdout] ✔ Given an exceeding function whose qualified name contains `%`, `\r`, and `\n` [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --format github-annotations` [INFO] [stdout] ✔ Then the emitted message replaces `%` with `%25`, `\r` with `%0D`, `\n` with `%0A` [INFO] [stdout] ✔ And the `file=`, `line=`, and `title=` property values carry no message-data escape sequences from this fixture (no `%25`, `%0D`, or `%0A` leaks across the `::` boundary; property-level escapes `%3A` for `:` and `%2C` for `,` apply separately when a dynamic path contains those delimiters) [INFO] [stdout] Scenario: file= property is CWD-relative when the analyzed path lives under CWD [INFO] [stdout] ✔ Given the operator's CWD is the project root and an exceeding function in `src/lib.rs` [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --format github-annotations` [INFO] [stdout] ✔ Then the annotation's `file=` value is `src/lib.rs` (relative), not the absolute path [INFO] [stdout] Scenario: --top does NOT shrink the annotation set [INFO] [stdout] ✔ Given six exceeding functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --format github-annotations --top 2 --annotation-limit 10` [INFO] [stdout] ✔ Then six `::warning` lines are emitted (the `--top` view shaping is independent of the annotation cap; the cap is the GitHub UI limit, not a display knob) [INFO] [stdout] Scenario: --only-failing is a no-op for the annotation set [INFO] [stdout] ✔ Given an analysis with both passing and exceeding functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --format github-annotations --only-failing` [INFO] [stdout] ✔ Then the annotation set is identical to the run without `--only-failing` (the reporter already filters to `exceeds == true`) [INFO] [stdout] Scenario: --sort-by does NOT reorder the annotations [INFO] [stdout] ✔ Given several exceeding functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --format github-annotations --sort-by coverage` [INFO] [stdout] ✔ Then the emitted lines remain CRAP-score-descending (the reporter's own ordering invariant — the View's sort key does not leak through) [INFO] [stdout] Scenario: github-annotations can be combined with another format in one invocation [INFO] [stdout] ✔ Given several exceeding functions [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --format markdown:scorecard.md,github-annotations` [INFO] [stdout] ✔ Then `scorecard.md` is created with the markdown reporter's output [INFO] [stdout] ✔ And stdout contains the `::warning` lines from the annotation reporter [INFO] [stdout] ✔ And the two reporters produce consistent function counts (the annotation cap may truncate but the markdown is full-fidelity) [INFO] [stdout] Scenario: Empty analysis produces empty output [INFO] [stdout] ✔ Given no functions are discovered [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --format github-annotations` [INFO] [stdout] ✔ Then stdout is empty [INFO] [stdout] Scenario: --annotation-limit 0 is rejected at the CLI boundary [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --format github-annotations --annotation-limit 0` [INFO] [stdout] ✔ Then the CLI exits non-zero with a clap error explaining the value must be ≥ 1 (the per-step display cap is meaningless at zero; the user almost certainly meant to use the default) [INFO] [stdout] [Summary] [INFO] [stdout] 1 feature [INFO] [stdout] 17 scenarios (17 passed) [INFO] [stdout] 58 steps (58 passed) [INFO] [stderr] Running tests/group_by_file_cucumber.rs (/opt/rustwide/target/release/build/crap4rs/3e23ea4e123095ce/out/group_by_file_cucumber-3e23ea4e123095ce) [INFO] [stdout] Feature: --group-by file (Bundle C, issue #64) [INFO] [stdout] Scenario: Default invocation produces no grouped block [INFO] [stdout] ✔> Given a project with 6 functions across 3 files (blob.rs 3 functions 2 exceeding, index.rs 2 functions 1 exceeding, util.rs 1 function 0 exceeding) [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --threshold 8 --no-fail --format json` [INFO] [stdout] ✔ Then the JSON envelope at "view.grouped" is null [INFO] [stdout] ✔ And the JSON envelope at "view.spec.group_by" is null [INFO] [stdout] ✔ And the JSON envelope at "view.shown" has 6 entries [INFO] [stdout] Scenario: --group-by file emits a grouped block in JSON [INFO] [stdout] ✔> Given a project with 6 functions across 3 files (blob.rs 3 functions 2 exceeding, index.rs 2 functions 1 exceeding, util.rs 1 function 0 exceeding) [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --threshold 8 --no-fail --group-by file --format json` [INFO] [stdout] ✔ Then the JSON envelope at "view.grouped.key" is "file" [INFO] [stdout] ✔ And the JSON envelope at "view.grouped.files" has 3 entries [INFO] [stdout] ✔ And the JSON envelope at "view.grouped.eligible_count" is 3 [INFO] [stdout] ✔ And the JSON envelope at "view.grouped.truncated" is false [INFO] [stdout] ✔ And the JSON envelope at "view.shown" has 6 entries [INFO] [stdout] ✔ And each grouped file carries the FileSummary fields [INFO] [stdout] Scenario: --top N truncates to top N files when grouped (functions untouched) [INFO] [stdout] ✔> Given a project with 6 functions across 3 files (blob.rs 3 functions 2 exceeding, index.rs 2 functions 1 exceeding, util.rs 1 function 0 exceeding) [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --threshold 8 --no-fail --group-by file --top 1 --format json` [INFO] [stdout] ✔ Then the JSON envelope at "view.grouped.files" has 1 entry [INFO] [stdout] ✔ And the JSON envelope at "view.grouped.truncated" is true [INFO] [stdout] ✔ And the JSON envelope at "view.grouped.eligible_count" is 3 [INFO] [stdout] ✔ And the JSON envelope at "view.shown" has 6 entries [INFO] [stdout] ✔ And the JSON envelope at "view.truncated" is false [INFO] [stdout] Scenario: --only-failing --group-by file keeps only files with a failing function [INFO] [stdout] ✔> Given a project with 6 functions across 3 files (blob.rs 3 functions 2 exceeding, index.rs 2 functions 1 exceeding, util.rs 1 function 0 exceeding) [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --threshold 8 --no-fail --only-failing --group-by file --format json` [INFO] [stdout] ✔ Then the JSON envelope at "view.grouped.files" has 2 entries [INFO] [stdout] ✔ And every grouped file has at least one exceeding function [INFO] [stdout] Scenario: --format csv --group-by file emits the per-file header [INFO] [stdout] ✔> Given a project with 6 functions across 3 files (blob.rs 3 functions 2 exceeding, index.rs 2 functions 1 exceeding, util.rs 1 function 0 exceeding) [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --threshold 8 --no-fail --group-by file --format csv` [INFO] [stdout] ✔ Then the first stdout line is "file,function_count,exceeding_count,average_crap,max_crap,worst_function,distribution_low,distribution_acceptable,distribution_moderate,distribution_high" [INFO] [stdout] Scenario: --minimal-view --group-by file strips view.shown but keeps view.grouped [INFO] [stdout] ✔> Given a project with 6 functions across 3 files (blob.rs 3 functions 2 exceeding, index.rs 2 functions 1 exceeding, util.rs 1 function 0 exceeding) [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --threshold 8 --no-fail --minimal-view --group-by file --format json` [INFO] [stdout] ✔ Then the JSON envelope has no "view.shown" path [INFO] [stdout] ✔ And the JSON envelope at "view.grouped.files" has 3 entries [INFO] [stdout] Scenario: --group-by file does not change exit code on a failing analysis [INFO] [stdout] ✔> Given a project with 6 functions across 3 files (blob.rs 3 functions 2 exceeding, index.rs 2 functions 1 exceeding, util.rs 1 function 0 exceeding) [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --threshold 8 --group-by file --format json` [INFO] [stdout] ✔ Then the exit code is 1 [INFO] [stdout] ✔ And the JSON envelope at "result.passed" is false [INFO] [stdout] Scenario: --group-by file --top truncating files leaves the gate alone [INFO] [stdout] ✔> Given a project with 6 functions across 3 files (blob.rs 3 functions 2 exceeding, index.rs 2 functions 1 exceeding, util.rs 1 function 0 exceeding) [INFO] [stdout] ✔ When the operator runs `crap4rs --coverage lcov.info --src src --no-gitignore --threshold 8 --group-by file --top 1 --format json` [INFO] [stdout] ✔ Then the exit code is 1 [INFO] [stdout] ✔ And the JSON envelope at "result.passed" is false [INFO] [stdout] Scenario: --help documents the --top and --sort-by semantic shift [INFO] [stdout] ✔> Given a project with 6 functions across 3 files (blob.rs 3 functions 2 exceeding, index.rs 2 functions 1 exceeding, util.rs 1 function 0 exceeding) [INFO] [stdout] ✔ When the operator runs `crap4rs --help` [INFO] [stdout] ✔ Then stdout contains "--group-by" [INFO] [stdout] ✔ And stdout contains "top N **files**" [INFO] [stdout] ✔ And stdout contains "keys at the file level" [INFO] [stdout] [Summary] [INFO] [stdout] 1 feature [INFO] [stdout] 9 scenarios (9 passed) [INFO] [stdout] 44 steps (44 passed) [INFO] [stderr] Running tests/json_reporter_cucumber.rs (/opt/rustwide/target/release/build/crap4rs/1894843b9e5bbeaf/out/json_reporter_cucumber-1894843b9e5bbeaf) [INFO] [stdout] Feature: JSON reporter [INFO] [stdout] Scenario: JSON output contains a versioned envelope [INFO] [stdout] ✔ Given an analysis result [INFO] [stdout] ✔ When the JSON is formatted [INFO] [stdout] ✔ Then the output contains "schema_version" with value 2 [INFO] [stdout] ✔ And the output contains "tool_version" [INFO] [stdout] ✔ And the output contains "language" with value "rust" [INFO] [stdout] ✔ And the output contains "timestamp" as an ISO 8601 string [INFO] [stdout] ✔ And the output contains "metric" [INFO] [stdout] ✔ And the output contains "threshold" [INFO] [stdout] Scenario: Analysis result is nested under "result" key [INFO] [stdout] ✔ Given an analysis result [INFO] [stdout] ✔ When the JSON is formatted [INFO] [stdout] ✔ Then the "result" object contains "functions" [INFO] [stdout] ✔ And the "result" object contains "summary" [INFO] [stdout] ✔ And the "result" object contains "passed" [INFO] [stdout] Scenario: Schema version is an integer [INFO] [stdout] ✔ Given an analysis result [INFO] [stdout] ✔ When the JSON is formatted [INFO] [stdout] ✔ Then "schema_version" is the integer 2 [INFO] [stdout] Scenario: Function entries contain all scored fields [INFO] [stdout] ✔ Given an analysis with one function "compute_crap" in "src/domain/crap.rs" with complexity 5, coverage 80.0%, and CRAP score 5.16 [INFO] [stdout] ✔ When the JSON is formatted [INFO] [stdout] ✔ Then the functions array has one entry [INFO] [stdout] ✔ And the entry contains "identity" with "qualified_name" equal to "compute_crap" [INFO] [stdout] ✔ And the entry contains "identity" with "file_path" equal to "src/domain/crap.rs" [INFO] [stdout] ✔ And the entry contains "complexity" equal to 5 [INFO] [stdout] ✔ And the entry contains "coverage_percent" equal to 80.0 [INFO] [stdout] ✔ And the entry contains "crap" with "value" equal to 5.16 [INFO] [stdout] ✔ And the entry contains "crap" with "risk_level" equal to "low" [INFO] [stdout] ✔ And the entry contains "exceeds" equal to false [INFO] [stdout] Scenario: Summary contains aggregate statistics [INFO] [stdout] ✔ Given an analysis with 10 functions, 2 exceeding threshold [INFO] [stdout] ✔ When the JSON is formatted [INFO] [stdout] ✔ Then "result.summary.total_functions" equals 10 [INFO] [stdout] ✔ And "result.summary.exceeding_threshold" equals 2 [INFO] [stdout] ✔ And "result.summary.average_crap" is a number [INFO] [stdout] ✔ And "result.summary.median_crap" is a number [INFO] [stdout] Scenario: Summary contains risk distribution [INFO] [stdout] ✔ Given an analysis with distribution low=5 acceptable=3 moderate=1 high=1 [INFO] [stdout] ✔ When the JSON is formatted [INFO] [stdout] ✔ Then "result.summary.distribution.low" equals 5 [INFO] [stdout] ✔ And "result.summary.distribution.acceptable" equals 3 [INFO] [stdout] ✔ And "result.summary.distribution.moderate" equals 1 [INFO] [stdout] ✔ And "result.summary.distribution.high" equals 1 [INFO] [stdout] Scenario: Passed reflects threshold compliance [INFO] [stdout] ✔ Given an analysis where all functions are within threshold [INFO] [stdout] ✔ When the JSON is formatted [INFO] [stdout] ✔ Then "result.passed" is true [INFO] [stdout] Scenario: Failed reflects threshold violations [INFO] [stdout] ✔ Given an analysis where 1 function exceeds the threshold [INFO] [stdout] ✔ When the JSON is formatted [INFO] [stdout] ✔ Then "result.passed" is false [INFO] [stdout] Scenario: Empty analysis produces valid JSON [INFO] [stdout] ✔ Given an analysis with no functions [INFO] [stdout] ✔ When the JSON is formatted [INFO] [stdout] ✔ Then the output is valid JSON [INFO] [stdout] ✔ And "result.functions" is an empty array [INFO] [stdout] ✔ And "result.summary.total_functions" equals 0 [INFO] [stdout] ✔ And "result.passed" is true [INFO] [stdout] Scenario: Metric field reflects the configured complexity metric [INFO] [stdout] ✔ Given the analysis used cognitive complexity [INFO] [stdout] ✔ When the JSON is formatted with metric "cognitive" [INFO] [stdout] ✔ Then "metric" equals "cognitive" [INFO] [stdout] Scenario: Threshold field reflects the configured threshold [INFO] [stdout] ✔ Given the analysis used threshold 8.0 [INFO] [stdout] ✔ When the JSON is formatted with threshold 8.0 [INFO] [stdout] ✔ Then "threshold" equals 8.0 [INFO] [stdout] Scenario: Timestamp is a valid ISO 8601 datetime [INFO] [stdout] ✔ Given an analysis result [INFO] [stdout] ✔ When the JSON is formatted [INFO] [stdout] ✔ Then "timestamp" is a valid ISO 8601 datetime [INFO] [stdout] [Summary] [INFO] [stdout] 1 feature [INFO] [stdout] 12 scenarios (12 passed) [INFO] [stdout] 59 steps (59 passed) [INFO] [stderr] Running tests/json_reporter_lcov_diagnostics.rs (/opt/rustwide/target/release/build/crap4rs/d5330df9db475529/out/json_reporter_lcov_diagnostics-d5330df9db475529) [INFO] [stdout] [INFO] [stdout] running 1 test [INFO] [stderr] Running tests/matching_integration.rs (/opt/rustwide/target/release/build/crap4rs/af73a93ce85e5aaa/out/matching_integration-af73a93ce85e5aaa) [INFO] [stdout] test diagnostics_included_when_present ... ok [INFO] [stdout] [INFO] [stdout] test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] running 4 tests [INFO] [stdout] test function_with_no_coverage_file ... ok [INFO] [stdout] test impl_methods_matched_correctly ... ok [INFO] [stdout] test simple_functions_fully_covered ... ok [INFO] [stdout] test mixed_coverage_per_function ... ok [INFO] [stdout] [INFO] [stdout] test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s [INFO] [stdout] [INFO] [stderr] Running tests/multi_lang_html_cucumber.rs (/opt/rustwide/target/release/build/crap4rs/ceadc33ca5c4f6ba/out/multi_lang_html_cucumber-ceadc33ca5c4f6ba) [INFO] [stdout] Feature: Multi-language unified HTML report [INFO] [stdout] Scenario: Single-language input renders byte-identical to the adapter binary [INFO] [stderr] [INFO] [stdout] ✔ Given a crap4rs JSON envelope from a representative workspace [INFO] [stderr] thread 'main' (7403) panicked at /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/cucumber-0.22.1/src/cucumber.rs:1243:13: [INFO] [stdout] ✘ When crap-render is invoked with that single envelope and --format html [INFO] [stderr] 11 steps failed [INFO] [stdout] Step failed: [INFO] [stderr] stack backtrace: [INFO] [stdout] Defined: tests/features/multi_lang_html.feature:24:5 [INFO] [stdout] Matched: tests/multi_lang_html_cucumber.rs:499:1 [INFO] [stdout] Step panicked. Captured output: `CARGO_BIN_EXE_crap-render` is unset [INFO] [stdout] help: available binary names are "crap4rs" [INFO] [stdout] Scenario: Two-language input renders a unified document with two-axis navigation [INFO] [stdout] ✔ Given a crap4rs JSON envelope and a crap4ts JSON envelope from one workspace [INFO] [stdout] ✘ When crap-render is invoked with both envelopes and --format html [INFO] [stdout] Step failed: [INFO] [stdout] Defined: tests/features/multi_lang_html.feature:34:5 [INFO] [stdout] Matched: tests/multi_lang_html_cucumber.rs:515:1 [INFO] [stdout] Step panicked. Captured output: `CARGO_BIN_EXE_crap-render` is unset [INFO] [stdout] help: available binary names are "crap4rs" [INFO] [stdout] Scenario: Combined view ranks functions by risk level desc then ratio desc [INFO] [stdout] ✔ Given a crap4rs envelope with one High-risk function at CRAP/threshold ratio 5.7 [INFO] [stdout] ✔ And a crap4ts envelope with one Moderate-risk function at CRAP/threshold ratio 2.5 [INFO] [stdout] ✘ When crap-render is invoked with both envelopes and --format html [INFO] [stdout] Step failed: [INFO] [stdout] Defined: tests/features/multi_lang_html.feature:46:5 [INFO] [stdout] Matched: tests/multi_lang_html_cucumber.rs:515:1 [INFO] [stdout] Step panicked. Captured output: `CARGO_BIN_EXE_crap-render` is unset [INFO] [stdout] help: available binary names are "crap4rs" [INFO] [stdout] Scenario: Mismatched schema_version on input envelopes fails with an actionable error [INFO] [stdout] ✔ Given two JSON envelopes carrying different schema_version values [INFO] [stdout] ✘ When crap-render is invoked with both envelopes [INFO] [stdout] Step failed: [INFO] [stdout] Defined: tests/features/multi_lang_html.feature:55:5 [INFO] [stdout] Matched: tests/multi_lang_html_cucumber.rs:527:1 [INFO] [stdout] Step panicked. Captured output: `CARGO_BIN_EXE_crap-render` is unset [INFO] [stdout] help: available binary names are "crap4rs" [INFO] [stdout] Scenario: Two envelopes for the same adapter language fails with an actionable error [INFO] [stdout] ✔ Given two crap4rs JSON envelopes from the same workspace [INFO] [stdout] ✘ When crap-render is invoked with both envelopes [INFO] [stdout] Step failed: [INFO] [stdout] Defined: tests/features/multi_lang_html.feature:64:5 [INFO] [stdout] Matched: tests/multi_lang_html_cucumber.rs:527:1 [INFO] [stdout] Step panicked. Captured output: `CARGO_BIN_EXE_crap-render` is unset [INFO] [stdout] help: available binary names are "crap4rs" [INFO] [stdout] Scenario: Single-language composite-action mode emits no unified-render artifact [INFO] [stdout] ✘ Given a workspace configured with a single language adapter [INFO] [stdout] Step failed: [INFO] [stdout] Defined: tests/features/multi_lang_html.feature:72:5 [INFO] [stdout] Matched: tests/multi_lang_html_cucumber.rs:485:1 [INFO] [stdout] Step panicked. Captured output: read .github/actions/scorecard/action.yml: Os { code: 2, kind: NotFound, message: "No such file or directory" } [INFO] [stdout] Scenario: Two-language input with baselines renders Current and Delta tabs in every panel [INFO] [stdout] ✔ Given a crap4rs envelope and a crap4ts envelope with matching baselines for each language [INFO] [stdout] ✘ When crap-render is invoked with both current envelopes plus both baseline envelopes [INFO] [stdout] Step failed: [INFO] [stdout] Defined: tests/features/multi_lang_html.feature:82:5 [INFO] [stdout] Matched: tests/multi_lang_html_cucumber.rs:538:1 [INFO] [stdout] Step panicked. Captured output: `CARGO_BIN_EXE_crap-render` is unset [INFO] [stdout] help: available binary names are "crap4rs" [INFO] [stdout] Scenario: No-baseline multi-language input renders View nav with disabled Delta tab in every panel [INFO] [stdout] ✔ Given a crap4rs JSON envelope and a crap4ts JSON envelope from one workspace [INFO] [stdout] ✘ When crap-render is invoked with both envelopes and --format html [INFO] [stdout] Step failed: [INFO] [stdout] Defined: tests/features/multi_lang_html.feature:92:5 [INFO] [stdout] Matched: tests/multi_lang_html_cucumber.rs:515:1 [INFO] [stdout] Step panicked. Captured output: `CARGO_BIN_EXE_crap-render` is unset [INFO] [stdout] help: available binary names are "crap4rs" [INFO] [stdout] Scenario: Mismatched baselines render a disabled Delta tab on the language without a baseline [INFO] [stdout] ✔ Given a crap4rs envelope with a matching baseline and a crap4ts envelope without a baseline [INFO] [stdout] ✘ When crap-render is invoked with both current envelopes and the Rust baseline only [INFO] [stdout] Step failed: [INFO] [stdout] Defined: tests/features/multi_lang_html.feature:102:5 [INFO] [stdout] Matched: tests/multi_lang_html_cucumber.rs:554:1 [INFO] [stdout] Step panicked. Captured output: `CARGO_BIN_EXE_crap-render` is unset [INFO] [stdout] help: available binary names are "crap4rs" [INFO] [stdout] Scenario: Combined Delta ranks cross-adapter regressions by risk band desc then ratio desc [INFO] [stdout] ✔ Given a Rust baseline plus a Rust current with one High-risk regression at ratio 5.7 [INFO] [stdout] ✔ And a TypeScript baseline plus a TypeScript current with one Moderate-risk regression at ratio 2.5 [INFO] [stdout] ✘ When crap-render is invoked with both pairs of envelopes [INFO] [stdout] Step failed: [INFO] [stdout] Defined: tests/features/multi_lang_html.feature:114:5 [INFO] [stdout] Matched: tests/multi_lang_html_cucumber.rs:563:1 [INFO] [stdout] Step panicked. Captured output: `CARGO_BIN_EXE_crap-render` is unset [INFO] [stdout] help: available binary names are "crap4rs" [INFO] [stdout] Scenario: URL hash routing supports two-axis state with combined:current as the default [INFO] [stdout] ✔ Given two language envelopes with baselines [INFO] [stdout] ✘ When crap-render renders the unified HTML report [INFO] [stdout] Step failed: [INFO] [stdout] Defined: tests/features/multi_lang_html.feature:123:5 [INFO] [stdout] Matched: tests/multi_lang_html_cucumber.rs:568:1 [INFO] [stdout] Step panicked. Captured output: `CARGO_BIN_EXE_crap-render` is unset [INFO] [stdout] help: available binary names are "crap4rs" [INFO] [stdout] [Summary] [INFO] [stdout] 1 feature [INFO] [stdout] 11 scenarios (11 failed) [INFO] [stdout] 23 steps (12 passed, 11 failed) [INFO] [stderr] 0: 0x5b4baac15421 - <::print::DisplayBacktrace as core[5c14b8d5a259cc4e]::fmt::Display>::fmt [INFO] [stderr] 1: 0x5b4baac2d09a - core[5c14b8d5a259cc4e]::fmt::write [INFO] [stderr] 2: 0x5b4baac1b29c - ::write_fmt [INFO] [stderr] 3: 0x5b4baabf0d56 - std[218a0f7bb9a8af32]::panicking::default_hook::{closure#0} [INFO] [stderr] 4: 0x5b4baac0cc01 - std[218a0f7bb9a8af32]::panicking::default_hook [INFO] [stderr] 5: 0x5b4baac0cdf2 - std[218a0f7bb9a8af32]::panicking::panic_with_hook [INFO] [stderr] 6: 0x5b4baabf0e02 - std[218a0f7bb9a8af32]::panicking::panic_handler::{closure#0} [INFO] [stderr] 7: 0x5b4baabe8fa9 - std[218a0f7bb9a8af32]::sys::backtrace::__rust_end_short_backtrace:: [INFO] [stderr] 8: 0x5b4baabf1a8d - __rustc[abc93889656912e2]::rust_begin_unwind [INFO] [stderr] 9: 0x5b4baac2d85c - core[5c14b8d5a259cc4e]::panicking::panic_fmt [INFO] [stderr] 10: 0x5b4baaa01c3e - core[5c14b8d5a259cc4e]::panicking::panic_display:: [INFO] [stderr] 11: 0x5b4baa9fdef6 - ::block_on:: [INFO] [stderr] 12: 0x5b4baa9b95a4 - ::block_on:: [INFO] [stderr] 13: 0x5b4baa995b2e - multi_lang_html_cucumber[92c3267120809fa0]::main [INFO] [stderr] 14: 0x5b4baa9c6eb3 - std[218a0f7bb9a8af32]::sys::backtrace::__rust_begin_short_backtrace:: [INFO] [stderr] 15: 0x5b4baaa185d9 - std[218a0f7bb9a8af32]::rt::lang_start::<()>::{closure#0} [INFO] [stderr] 16: 0x5b4baac0b968 - std[218a0f7bb9a8af32]::rt::lang_start_internal [INFO] [stderr] 17: 0x5b4baa99bb65 - main [INFO] [stderr] 18: 0x7696de34c601 - [INFO] [stderr] 19: 0x7696de34c718 - __libc_start_main [INFO] [stderr] 20: 0x5b4baa98c2c5 - _start [INFO] [stderr] 21: 0x0 - [INFO] [stderr] error: test failed, to rerun pass `--test multi_lang_html_cucumber` [INFO] running `"docker" "inspect" "61d059abfe4cc431fa16d0f665af4db8003080afb2d75dac29a3d06d3ad7dd86"` [INFO] running `"docker" "rm" "-f" "61d059abfe4cc431fa16d0f665af4db8003080afb2d75dac29a3d06d3ad7dd86"` [INFO] [stdout] 61d059abfe4cc431fa16d0f665af4db8003080afb2d75dac29a3d06d3ad7dd86