[INFO] fetching crate crap4ts 2.0.0-rc.5...
[INFO] testing crap4ts-2.0.0-rc.5 against 1.101.0-beta.1+cargoflags=--release for beta-release-1.101-2
[INFO] extracting crate crap4ts 2.0.0-rc.5 into /workspace/builds/worker-0-tc2/source
[INFO] started tweaking crates.io crate crap4ts 2.0.0-rc.5
[INFO] removed 0 missing tests
[INFO] finished tweaking crates.io crate crap4ts 2.0.0-rc.5
[INFO] tweaked toml for crates.io crate crap4ts 2.0.0-rc.5 written to /workspace/builds/worker-0-tc2/source/Cargo.toml
[INFO] validating manifest of crates.io crate crap4ts 2.0.0-rc.5 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 crap4ts 2.0.0-rc.5 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-0-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] b881fd503c278b2a84d2a18a85639d89516ef6e4d6fb62a7f540e9c7d7f8147f
[INFO] running `"docker" "start" "b881fd503c278b2a84d2a18a85639d89516ef6e4d6fb62a7f540e9c7d7f8147f"`
[INFO] running `"docker" "inspect" "b881fd503c278b2a84d2a18a85639d89516ef6e4d6fb62a7f540e9c7d7f8147f"`
[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" "b881fd503c278b2a84d2a18a85639d89516ef6e4d6fb62a7f540e9c7d7f8147f" "/opt/rustwide/cargo-home/bin/cargo" "+1.101.0-beta.1" "metadata" "--no-deps" "--format-version=1"`
[INFO] running `"docker" "inspect" "b881fd503c278b2a84d2a18a85639d89516ef6e4d6fb62a7f540e9c7d7f8147f"`
[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" "b881fd503c278b2a84d2a18a85639d89516ef6e4d6fb62a7f540e9c7d7f8147f" "/opt/rustwide/cargo-home/bin/cargo" "+1.101.0-beta.1" "build" "--frozen" "--message-format=json" "--release"`
[INFO] [stderr] Compiling siphasher v1.0.3
[INFO] [stderr] Compiling memchr v2.8.2
[INFO] [stderr] Compiling fastrand v2.4.1
[INFO] [stderr] Compiling allocator-api2 v0.2.21
[INFO] [stderr] Compiling smawk v0.3.3
[INFO] [stderr] Compiling rustc-hash v2.1.2
[INFO] [stderr] Compiling oxc_data_structures v0.129.0
[INFO] [stderr] Compiling serde v1.0.228
[INFO] [stderr] Compiling syn v2.0.118
[INFO] [stderr] Compiling compact_str v0.9.1
[INFO] [stderr] Compiling oxc_estree v0.129.0
[INFO] [stderr] Compiling cow-utils v0.1.3
[INFO] [stderr] Compiling dragonbox_ecma v0.1.12
[INFO] [stderr] Compiling unicode-id-start v1.4.0
[INFO] [stderr] Compiling crossbeam-utils v0.8.21
[INFO] [stderr] Compiling textwrap v0.16.2
[INFO] [stderr] Compiling nonmax v0.5.5
[INFO] [stderr] Compiling smallvec v1.15.2
[INFO] [stderr] Compiling phf_shared v0.13.1
[INFO] [stderr] Compiling arrayvec v0.7.7
[INFO] [stderr] Compiling phf_shared v0.12.1
[INFO] [stderr] Compiling phf_generator v0.13.1
[INFO] [stderr] Compiling phf v0.13.1
[INFO] [stderr] Compiling rustix v1.1.4
[INFO] [stderr] Compiling parking_lot_core v0.9.12
[INFO] [stderr] Compiling clap_builder v4.6.0
[INFO] [stderr] Compiling num-integer v0.1.46
[INFO] [stderr] Compiling serde_json v1.0.150
[INFO] [stderr] Compiling litrs v1.0.0
[INFO] [stderr] Compiling phf_generator v0.12.1
[INFO] [stderr] Compiling basic-toml v0.1.10
[INFO] [stderr] Compiling aho-corasick v1.1.4
[INFO] [stderr] Compiling vte v0.14.1
[INFO] [stderr] Compiling nom v7.1.3
[INFO] [stderr] Compiling ref-cast v1.0.25
[INFO] [stderr] Compiling hashbrown v0.17.1
[INFO] [stderr] Compiling winnow v1.0.3
[INFO] [stderr] Compiling glob v0.3.3
[INFO] [stderr] Compiling convert_case v0.8.0
[INFO] [stderr] Compiling num-bigint v0.4.6
[INFO] [stderr] Compiling bstr v1.12.1
[INFO] [stderr] Compiling document-features v0.2.12
[INFO] [stderr] Compiling crossbeam-epoch v0.9.18
[INFO] [stderr] Compiling parking_lot v0.12.5
[INFO] [stderr] Compiling toml_write v0.1.2
[INFO] [stderr] Compiling winnow v0.7.15
[INFO] [stderr] Compiling anyhow v1.0.102
[INFO] [stderr] Compiling crossbeam-deque v0.8.6
[INFO] [stderr] Compiling console v0.16.3
[INFO] [stderr] Compiling seq-macro v0.3.6
[INFO] [stderr] Compiling napi-build v2.3.2
[INFO] [stderr] Compiling crap4ts v2.0.0-rc.5 (/opt/rustwide/workdir)
[INFO] [stderr] Compiling oxc_allocator v0.129.0
[INFO] [stderr] Compiling indexmap v2.14.0
[INFO] [stderr] Compiling regex-automata v0.4.14
[INFO] [stderr] Compiling crossterm v0.29.0
[INFO] [stderr] Compiling oxc_str v0.129.0
[INFO] [stderr] Compiling ansitok v0.3.0
[INFO] [stderr] Compiling ansi-str v0.9.0
[INFO] [stderr] Compiling comfy-table v7.2.2
[INFO] [stderr] Compiling serde_derive_internals v0.29.1
[INFO] [stderr] Compiling globset v0.4.18
[INFO] [stderr] Compiling regex v1.12.4
[INFO] [stderr] Compiling serde_derive v1.0.228
[INFO] [stderr] Compiling thiserror-impl v2.0.18
[INFO] [stderr] Compiling oxc-miette-derive v2.7.1
[INFO] [stderr] Compiling phf_macros v0.13.1
[INFO] [stderr] Compiling oxc_ast_macros v0.129.0
[INFO] [stderr] Compiling strum_macros v0.27.2
[INFO] [stderr] Compiling clap_derive v4.6.1
[INFO] [stderr] Compiling optfield v0.4.0
[INFO] [stderr] Compiling ref-cast-impl v1.0.25
[INFO] [stderr] Compiling phf_macros v0.12.1
[INFO] [stderr] Compiling schemars_derive v1.2.1
[INFO] [stderr] Compiling ignore v0.4.26
[INFO] [stderr] Compiling phf v0.12.1
[INFO] [stderr] Compiling clap v4.6.1
[INFO] [stderr] Compiling clap_complete v4.6.5
[INFO] [stderr] Compiling thiserror v2.0.18
[INFO] [stderr] Compiling oxc-miette v2.7.1
[INFO] [stderr] Compiling clap_complete_nushell v4.6.0
[INFO] [stderr] Compiling strum v0.27.2
[INFO] [stderr] Compiling documented-macros v0.9.2
[INFO] [stderr] Compiling oxc_span v0.129.0
[INFO] [stderr] Compiling oxc_diagnostics v0.129.0
[INFO] [stderr] Compiling oxc_regular_expression v0.129.0
[INFO] [stderr] Compiling askama_parser v0.16.0
[INFO] [stderr] Compiling oxc_index v4.1.0
[INFO] [stderr] Compiling serde_spanned v0.6.9
[INFO] [stderr] Compiling toml_datetime v0.6.11
[INFO] [stderr] Compiling schemars v1.2.1
[INFO] [stderr] Compiling documented v0.9.2
[INFO] [stderr] Compiling toml_edit v0.22.27
[INFO] [stderr] Compiling oxc_syntax v0.129.0
[INFO] [stderr] Compiling oxc_ast v0.129.0
[INFO] [stderr] Compiling askama_derive v0.16.0
[INFO] [stderr] Compiling toml v0.8.23
[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] Compiling oxc_ecmascript v0.129.0
[INFO] [stderr] Compiling oxc_parser v0.129.0
[INFO] [stderr] Compiling oxc v0.129.0
[INFO] [stderr] Finished `release` profile [optimized] target(s) in 2m 24s
[INFO] running `"docker" "inspect" "b881fd503c278b2a84d2a18a85639d89516ef6e4d6fb62a7f540e9c7d7f8147f"`
[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" "b881fd503c278b2a84d2a18a85639d89516ef6e4d6fb62a7f540e9c7d7f8147f" "/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 either v1.16.0
[INFO] [stderr] Compiling getrandom v0.3.4
[INFO] [stderr] Compiling zerocopy v0.8.52
[INFO] [stderr] Compiling indexmap v2.14.0
[INFO] [stderr] Compiling zmij v1.0.21
[INFO] [stderr] Compiling winnow v0.5.40
[INFO] [stderr] Compiling serde_json v1.0.150
[INFO] [stderr] Compiling futures-sink v0.3.32
[INFO] [stderr] Compiling futures-core v0.3.32
[INFO] [stderr] Compiling bytecount v0.6.9
[INFO] [stderr] Compiling futures-io v0.3.32
[INFO] [stderr] Compiling peg-runtime v0.6.3
[INFO] [stderr] Compiling futures-channel v0.3.32
[INFO] [stderr] Compiling wait-timeout v0.2.1
[INFO] [stderr] Compiling itertools v0.14.0
[INFO] [stderr] Compiling rand_core v0.9.5
[INFO] [stderr] Compiling winnow v1.0.3
[INFO] [stderr] Compiling aho-corasick v1.1.4
[INFO] [stderr] Compiling nom v8.0.0
[INFO] [stderr] Compiling rand_xoshiro v0.7.0
[INFO] [stderr] Compiling peg-macros v0.6.3
[INFO] [stderr] Compiling predicates-core v1.0.10
[INFO] [stderr] Compiling crap4ts v2.0.0-rc.5 (/opt/rustwide/workdir)
[INFO] [stderr] Compiling termtree v0.5.1
[INFO] [stderr] Compiling vte v0.14.1
[INFO] [stderr] Compiling nom v7.1.3
[INFO] [stderr] Compiling inflections v1.1.1
[INFO] [stderr] Compiling peg v0.6.3
[INFO] [stderr] Compiling assert_cmd v2.2.2
[INFO] [stderr] Compiling difflib v0.4.0
[INFO] [stderr] Compiling pretty-hex v0.4.2
[INFO] [stderr] Compiling predicates-tree v1.0.13
[INFO] [stderr] Compiling rand_xorshift v0.4.0
[INFO] [stderr] Compiling regex-automata v0.4.14
[INFO] [stderr] Compiling predicates v3.1.4
[INFO] [stderr] Compiling linked-hash-map v0.5.6
[INFO] [stderr] Compiling humantime v2.3.0
[INFO] [stderr] Compiling inventory v0.3.24
[INFO] [stderr] Compiling ansitok v0.3.0
[INFO] [stderr] Compiling toml_edit v0.20.7
[INFO] [stderr] Compiling ansi-str v0.9.0
[INFO] [stderr] Compiling nom_locate v5.0.0
[INFO] [stderr] Compiling proc-macro-crate v2.0.0
[INFO] [stderr] Compiling regex v1.12.4
[INFO] [stderr] Compiling serde_derive_internals v0.29.1
[INFO] [stderr] Compiling terminal_size v0.4.4
[INFO] [stderr] Compiling crossterm v0.29.0
[INFO] [stderr] Compiling tempfile v3.27.0
[INFO] [stderr] Compiling clap_builder v4.6.0
[INFO] [stderr] Compiling rusty-fork v0.3.1
[INFO] [stderr] Compiling comfy-table v7.2.2
[INFO] [stderr] Compiling serde_derive v1.0.228
[INFO] [stderr] Compiling thiserror-impl v2.0.18
[INFO] [stderr] Compiling oxc-miette-derive v2.7.1
[INFO] [stderr] Compiling oxc_ast_macros v0.129.0
[INFO] [stderr] Compiling phf_macros v0.13.1
[INFO] [stderr] Compiling clap_derive v4.6.1
[INFO] [stderr] Compiling strum_macros v0.27.2
[INFO] [stderr] Compiling ref-cast-impl v1.0.25
[INFO] [stderr] Compiling derive_more-impl v2.1.1
[INFO] [stderr] Compiling ppv-lite86 v0.2.21
[INFO] [stderr] Compiling optfield v0.4.0
[INFO] [stderr] Compiling sealed v0.6.0
[INFO] [stderr] Compiling phf_macros v0.12.1
[INFO] [stderr] Compiling synthez-core v0.4.0
[INFO] [stderr] Compiling ref-cast v1.0.25
[INFO] [stderr] Compiling schemars_derive v1.2.1
[INFO] [stderr] Compiling futures-macro v0.3.32
[INFO] [stderr] Compiling typed-builder-macro v0.23.2
[INFO] [stderr] Compiling phf v0.13.1
[INFO] [stderr] Compiling bstr v1.12.1
[INFO] [stderr] Compiling phf v0.12.1
[INFO] [stderr] Compiling rand_chacha v0.9.0
[INFO] [stderr] Compiling futures-util v0.3.32
[INFO] [stderr] Compiling rand v0.9.4
[INFO] [stderr] Compiling synthez-codegen v0.4.0
[INFO] [stderr] Compiling thiserror v2.0.18
[INFO] [stderr] Compiling oxc-miette v2.7.1
[INFO] [stderr] Compiling bolero-generator-derive v0.13.4
[INFO] [stderr] Compiling synthez v0.4.0
[INFO] [stderr] Compiling pin-project-internal v1.1.13
[INFO] [stderr] Compiling globset v0.4.18
[INFO] [stderr] Compiling bolero-generator v0.13.5
[INFO] [stderr] Compiling clap v4.6.1
[INFO] [stderr] Compiling strum v0.27.2
[INFO] [stderr] Compiling clap_complete v4.6.5
[INFO] [stderr] Compiling documented-macros v0.9.2
[INFO] [stderr] Compiling typed-builder v0.23.2
[INFO] [stderr] Compiling tokio-macros v2.7.0
[INFO] [stderr] Compiling smart-default v0.7.1
[INFO] [stderr] Compiling proptest v1.11.0
[INFO] [stderr] Compiling ignore v0.4.26
[INFO] [stderr] Compiling pin-project v1.1.13
[INFO] [stderr] Compiling oxc_span v0.129.0
[INFO] [stderr] Compiling oxc_diagnostics v0.129.0
[INFO] [stderr] Compiling oxc_regular_expression v0.129.0
[INFO] [stderr] Compiling documented v0.9.2
[INFO] [stderr] Compiling serde v1.0.228
[INFO] [stderr] Compiling clap_complete_nushell v4.6.0
[INFO] [stderr] Compiling basic-toml v0.1.10
[INFO] [stderr] Compiling oxc_index v4.1.0
[INFO] [stderr] Compiling askama_parser v0.16.0
[INFO] [stderr] Compiling toml_datetime v0.6.11
[INFO] [stderr] Compiling serde_spanned v0.6.9
[INFO] [stderr] Compiling schemars v1.2.1
[INFO] [stderr] Compiling oxc_syntax v0.129.0
[INFO] [stderr] Compiling toml_edit v0.22.27
[INFO] [stderr] Compiling gherkin v0.15.0
[INFO] [stderr] Compiling derive_more v2.1.1
[INFO] [stderr] Compiling cucumber-expressions v0.5.0
[INFO] [stderr] Compiling oxc_ast v0.129.0
[INFO] [stderr] Compiling futures-executor v0.3.32
[INFO] [stderr] Compiling cucumber-codegen v0.22.1
[INFO] [stderr] Compiling futures v0.3.32
[INFO] [stderr] Compiling bolero-engine v0.13.4
[INFO] [stderr] Compiling globwalk v0.9.1
[INFO] [stderr] Compiling bolero v0.13.4
[INFO] [stderr] Compiling tokio v1.52.3
[INFO] [stderr] Compiling cucumber v0.22.1
[INFO] [stderr] Compiling toml v0.8.23
[INFO] [stderr] Compiling askama_derive v0.16.0
[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] Compiling oxc_ecmascript v0.129.0
[INFO] [stderr] Compiling oxc_parser v0.129.0
[INFO] [stderr] Compiling oxc v0.129.0
[INFO] [stderr] Finished `release` profile [optimized] target(s) in 4m 18s
[INFO] running `"docker" "inspect" "b881fd503c278b2a84d2a18a85639d89516ef6e4d6fb62a7f540e9c7d7f8147f"`
[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" "b881fd503c278b2a84d2a18a85639d89516ef6e4d6fb62a7f540e9c7d7f8147f" "/opt/rustwide/cargo-home/bin/cargo" "+1.101.0-beta.1" "test" "--frozen" "--release"`
[INFO] [stderr] Compiling crap4ts v2.0.0-rc.5 (/opt/rustwide/workdir)
[INFO] [stderr] Finished `release` profile [optimized] target(s) in 1m 44s
[INFO] [stderr] Running unittests src/lib.rs (/opt/rustwide/target/release/build/crap4ts/c09542d323d5897e/out/crap4ts-c09542d323d5897e)
[INFO] [stdout]
[INFO] [stdout] running 19 tests
[INFO] [stdout] test adapters::coverage::tests::istanbul_coverage_constructible ... ok
[INFO] [stdout] test adapters::walker::tests::panic_reason_extracts_str_payload ... ok
[INFO] [stdout] test adapters::coverage::tests::line_coverage_handles_three_statements_at_same_line ... ok
[INFO] [stdout] test adapters::coverage::tests::line_coverage_collapses_two_covered_statements_to_smaller_hits ... ok
[INFO] [stdout] test adapters::coverage::tests::line_coverage_multiple_lines_aggregated_independently ... ok
[INFO] [stdout] test adapters::walker::tests::oxc_walker_constructible ... ok
[INFO] [stdout] test parse_diagnostic::tests::diagnostic_kind_display_is_kebab_case ... ok
[INFO] [stdout] test parse_diagnostic::tests::serde_round_trip_schema_unrecognized ... ok
[INFO] [stdout] test adapters::coverage::tests::parse_empty_object_returns_ok_with_no_coverage ... ok
[INFO] [stdout] test parse_diagnostic::tests::serde_round_trip_branch_mismatch ... ok
[INFO] [stdout] test parse_diagnostic::tests::serde_round_trip_path_unresolved ... ok
[INFO] [stdout] test adapters::coverage::tests::parse_malformed_json_returns_source_parse_with_istanbul_prefix ... ok
[INFO] [stdout] test adapters::coverage::tests::line_coverage_single_statement_passes_through_unchanged ... ok
[INFO] [stdout] test adapters::walker::tests::panic_reason_extracts_string_payload ... ok
[INFO] [stdout] test parse_diagnostic::tests::diagnostic_display_with_line ... ok
[INFO] [stdout] test parse_diagnostic::tests::serde_round_trip_missing_field ... ok
[INFO] [stdout] test adapters::coverage::tests::line_coverage_collapses_two_statements_at_same_line_to_min ... ok
[INFO] [stderr] Running unittests src/main.rs (/opt/rustwide/target/release/build/crap4ts/dd4a0b509409b7b2/out/crap4ts-dd4a0b509409b7b2)
[INFO] [stdout] test adapters::walker::tests::panic_reason_falls_back_on_non_string_payload ... ok
[INFO] [stdout] test parse_diagnostic::tests::diagnostic_display_path_unresolved_no_line ... ok
[INFO] [stdout]
[INFO] [stdout] test result: ok. 19 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
[INFO] [stdout]
[INFO] [stdout]
[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] [stderr] Running tests/api_smoke.rs (/opt/rustwide/target/release/build/crap4ts/5e365de539e8ce41/out/api_smoke-5e365de539e8ce41)
[INFO] [stdout]
[INFO] [stdout] running 7 tests
[INFO] [stdout] test analyze_to_json_missing_source_root_is_rejected ... ok
[INFO] [stderr] Running tests/arrow_function_coverage_cucumber.rs (/opt/rustwide/target/release/build/crap4ts/78b1610320436576/out/arrow_function_coverage_cucumber-78b1610320436576)
[INFO] [stdout] test analyze_to_json_negative_threshold_is_rejected ... ok
[INFO] [stdout] test analyze_to_json_nan_threshold_is_rejected ... ok
[INFO] [stdout] test analyze_to_json_skips_dts_declaration_files ... ok
[INFO] [stdout] test analyze_to_json_explicit_threshold_overrides_default ... ok
[INFO] [stdout] test analyze_to_json_cognitive_metric_surfaces_not_supported_error ... ok
[INFO] [stdout] test analyze_to_json_happy_path_returns_valid_json_with_expected_shape ... ok
[INFO] [stdout]
[INFO] [stdout] test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
[INFO] [stdout]
[INFO] [stdout] Feature: Arrow-function coverage accuracy
[INFO] [stdout] Scenario: An invoked arrow function has matching coverage
[INFO] [stdout] ✔ Given a TypeScript source file `src/arrow.ts` containing:
[INFO] [stdout] ✔ And a jest-emitted `coverage-final.json` recording 100 invocations of `square` and zero of `cube`
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then the report shows function `square` with line coverage 100.0
[INFO] [stdout] ✔ And the report shows function `cube` with line coverage 0.0
[INFO] [stdout] ✔ And the report does NOT show `square` as 0.0 (would be silent undercount)
[INFO] [stdout] Scenario: A useCallback-style arrow has matching coverage
[INFO] [stdout] ✔ Given a TypeScript source file `src/Button.tsx` containing:
[INFO] [stdout] ✔ And a jest-emitted `coverage-final.json` recording `Button` invoked 5 times and the `handle` arrow invoked 5 times (both at 100% line coverage)
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then the report shows function `Button` with line coverage 100.0
[INFO] [stdout] ✔ And the report shows the useCallback arrow with line coverage 100.0
[INFO] [stdout] Scenario: An array.map(arrow) covers the inner arrow
[INFO] [stdout] ✔ Given a TypeScript source file `src/map.ts` containing:
[INFO] [stdout] ✔ And a jest-emitted `coverage-final.json` recording the outer `increment` and the inner arrow each invoked at least once (both at 100% line coverage)
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then the inner arrow's line coverage in the report is 100.0
[INFO] [stdout] ✔ And `increment`'s CRAP score is computed using the arrow's coverage value
[INFO] [stdout] Scenario: Mixed function-expression / arrow / declared-function bodies in one file
[INFO] [stdout] ✔ Given a TypeScript source file `src/mixed.ts` containing:
[INFO] [stdout] ✔ And a jest-emitted `coverage-final.json` recording all three invoked at 100% line coverage
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then the report shows function `declared` with line coverage 100.0
[INFO] [stdout] ✔ And the report shows function `expression` with line coverage 100.0
[INFO] [stdout] ✔ And the report shows function `arrow` with line coverage 100.0
[INFO] [stdout] [Summary]
[INFO] [stdout] 1 feature
[INFO] [stdout] 4 scenarios (4 passed)
[INFO] [stdout] 22 steps (22 passed)
[INFO] [stderr] Running tests/branch_coverage_cucumber.rs (/opt/rustwide/target/release/build/crap4ts/dc665faa756365ef/out/branch_coverage_cucumber-dc665faa756365ef)
[INFO] [stdout] Feature: Istanbul branch coverage flows through to the scorecard
[INFO] [stdout] Scenario: A coverage-final.json with branch records populates ParseOutput.branches
[INFO] [stdout] ✔ Given an Istanbul `coverage-final.json` whose entries include `b` and `branchMap` records
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then the report includes a branch-coverage column for every covered function
[INFO] [stdout] ✔ And the branch-coverage entries are keyed by workspace-relative paths
[INFO] [stdout] ✔ And every branch record in the input is paired with its `branchMap` entry
[INFO] [stdout] Scenario: A coverage-final.json with NO branch records leaves ParseOutput.branches as None
[INFO] [stdout] ✔ Given an Istanbul `coverage-final.json` whose entries have empty `b` and empty `branchMap`
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then the scorecard renders with no branch-coverage column
[INFO] [stdout] ✔ And the JSON envelope omits the `branches` field (or sets it to null)
[INFO] [stdout] Scenario: A function's branch coverage joins its line coverage in the report
[INFO] [stdout] ✔ Given a TypeScript function with cyclomatic complexity 3 (one if/else, one ternary)
[INFO] [stdout] ✔ And a coverage-final.json showing 4 of 6 branches hit (66% branch coverage)
[INFO] [stdout] ✔ And the same function shows 100% line coverage in the `s` record
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src --format json`
[INFO] [stdout] ✔ Then the function's `lineCoverage` is 100.0
[INFO] [stdout] ✔ And the function's `branchCoverage` is 66.7 (rounded one decimal)
[INFO] [stdout] ✔ And both values appear in the JSON envelope's row for the function
[INFO] [stdout] Scenario: A b record references a branchId not in branchMap emits BranchMismatch
[INFO] [stdout] ✔ Given an Istanbul `coverage-final.json` whose `b` references branchId `42` and `branchMap` omits `42`
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then the parser emits an `IstanbulParseDiagnostic` with kind `branch-mismatch`
[INFO] [stdout] ✔ And the function's `branchCoverage` is `null` for the affected entry
[INFO] [stdout] ✔ And the rest of the scorecard still produces line coverage for the file
[INFO] [stdout] [Summary]
[INFO] [stdout] 1 feature
[INFO] [stdout] 4 scenarios (4 passed)
[INFO] [stdout] 21 steps (21 passed)
[INFO] [stderr] Running tests/cli_init_integration.rs (/opt/rustwide/target/release/build/crap4ts/9b94e60837932ba7/out/cli_init_integration-9b94e60837932ba7)
[INFO] [stdout]
[INFO] [stdout] running 4 tests
[INFO] [stdout] test crap4ts_init_emits_ts_specific_excludes ... ok
[INFO] [stdout] test crap4ts_init_writes_canonical_crap_toml ... ok
[INFO] [stdout] test crap4ts_init_force_overwrites ... ok
[INFO] [stderr] Running tests/config_discovery_integration.rs (/opt/rustwide/target/release/build/crap4ts/50376504fd74367c/out/config_discovery_integration-50376504fd74367c)
[INFO] [stdout] test crap4ts_init_refuses_to_overwrite_without_force ... ok
[INFO] [stdout]
[INFO] [stdout] test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] running 2 tests
[INFO] [stdout] test crap4ts_falls_back_to_legacy_crap4ts_toml ... ok
[INFO] [stdout] test crap4ts_discovers_canonical_crap_toml ... ok
[INFO] [stdout]
[INFO] [stdout] test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
[INFO] [stdout]
[INFO] [stderr] Running tests/cyclomatic_walker_cucumber.rs (/opt/rustwide/target/release/build/crap4ts/3250f49edc1bfa59/out/cyclomatic_walker_cucumber-3250f49edc1bfa59)
[INFO] [stdout] Feature: Cyclomatic complexity for TypeScript via the oxc walker
[INFO] [stdout] Scenario: A function with no decision points scores complexity 1
[INFO] [stdout] ✔ Given a TypeScript source file containing:
[INFO] [stdout] ✔ When the oxc walker analyzes the source
[INFO] [stdout] ✔ Then the report includes function `greet` with cyclomatic complexity 1
[INFO] [stdout] ✔ And no contributors are emitted for `greet`
[INFO] [stdout] Scenario: An if/else branch increments complexity by 1
[INFO] [stdout] ✔ Given a TypeScript source file containing:
[INFO] [stdout] ✔ When the oxc walker analyzes the source
[INFO] [stdout] ✔ Then the report includes function `classify` with cyclomatic complexity 2
[INFO] [stdout] ✔ And the contributors include one `if-branch` at line 2
[INFO] [stdout] Scenario Outline: Each universal decision-point construct contributes 1
[INFO] [stdout] ✔ Given a TypeScript source file containing the construct ``if (cond) { … }``
[INFO] [stdout] ✔ When the oxc walker analyzes the source
[INFO] [stdout] ✔ Then the function's cyclomatic complexity is `2`
[INFO] [stdout] ✔ And the contributors include exactly one `if-branch` entry
[INFO] [stdout] Scenario Outline: Each universal decision-point construct contributes 1
[INFO] [stdout] ✔ Given a TypeScript source file containing the construct ``for (let i = 0; i < n; i++) { … }``
[INFO] [stdout] ✔ When the oxc walker analyzes the source
[INFO] [stdout] ✔ Then the function's cyclomatic complexity is `2`
[INFO] [stdout] ✔ And the contributors include exactly one `for-loop` entry
[INFO] [stdout] Scenario Outline: Each universal decision-point construct contributes 1
[INFO] [stdout] ✔ Given a TypeScript source file containing the construct ``for (const x of xs) { … }``
[INFO] [stdout] ✔ When the oxc walker analyzes the source
[INFO] [stdout] ✔ Then the function's cyclomatic complexity is `2`
[INFO] [stdout] ✔ And the contributors include exactly one `for-loop` entry
[INFO] [stdout] Scenario Outline: Each universal decision-point construct contributes 1
[INFO] [stdout] ✔ Given a TypeScript source file containing the construct ``for (const k in obj) { … }``
[INFO] [stdout] ✔ When the oxc walker analyzes the source
[INFO] [stdout] ✔ Then the function's cyclomatic complexity is `2`
[INFO] [stdout] ✔ And the contributors include exactly one `for-loop` entry
[INFO] [stdout] Scenario Outline: Each universal decision-point construct contributes 1
[INFO] [stdout] ✔ Given a TypeScript source file containing the construct ``while (cond) { … }``
[INFO] [stdout] ✔ When the oxc walker analyzes the source
[INFO] [stdout] ✔ Then the function's cyclomatic complexity is `2`
[INFO] [stdout] ✔ And the contributors include exactly one `while-loop` entry
[INFO] [stdout] Scenario Outline: Each universal decision-point construct contributes 1
[INFO] [stdout] ✔ Given a TypeScript source file containing the construct ``do { … } while (cond)``
[INFO] [stdout] ✔ When the oxc walker analyzes the source
[INFO] [stdout] ✔ Then the function's cyclomatic complexity is `2`
[INFO] [stdout] ✔ And the contributors include exactly one `do-while-loop` entry
[INFO] [stdout] Scenario Outline: Each universal decision-point construct contributes 1
[INFO] [stdout] ✔ Given a TypeScript source file containing the construct ``switch (x) { case 1: … }``
[INFO] [stdout] ✔ When the oxc walker analyzes the source
[INFO] [stdout] ✔ Then the function's cyclomatic complexity is `2`
[INFO] [stdout] ✔ And the contributors include exactly one `case-branch` entry
[INFO] [stdout] Scenario Outline: Each universal decision-point construct contributes 1
[INFO] [stdout] ✔ Given a TypeScript source file containing the construct ``a && b``
[INFO] [stdout] ✔ When the oxc walker analyzes the source
[INFO] [stdout] ✔ Then the function's cyclomatic complexity is `2`
[INFO] [stdout] ✔ And the contributors include exactly one `logical-operator` entry
[INFO] [stdout] Scenario Outline: Each universal decision-point construct contributes 1
[INFO] [stdout] ✔ Given a TypeScript source file containing the construct ``a || b``
[INFO] [stdout] ✔ When the oxc walker analyzes the source
[INFO] [stdout] ✔ Then the function's cyclomatic complexity is `2`
[INFO] [stdout] ✔ And the contributors include exactly one `logical-operator` entry
[INFO] [stdout] Scenario Outline: TypeScript-specific decision points add to cyclomatic
[INFO] [stdout] ✔ Given a TypeScript source file containing the construct ``cond ? a : b``
[INFO] [stdout] ✔ When the oxc walker analyzes the source
[INFO] [stdout] ✔ Then the function's cyclomatic complexity is `2`
[INFO] [stdout] ✔ And the contributors include exactly one `ternary` entry
[INFO] [stdout] Scenario Outline: TypeScript-specific decision points add to cyclomatic
[INFO] [stdout] ✔ Given a TypeScript source file containing the construct ``obj?.field``
[INFO] [stdout] ✔ When the oxc walker analyzes the source
[INFO] [stdout] ✔ Then the function's cyclomatic complexity is `2`
[INFO] [stdout] ✔ And the contributors include exactly one `optional-chain` entry
[INFO] [stdout] Scenario Outline: TypeScript-specific decision points add to cyclomatic
[INFO] [stdout] ✔ Given a TypeScript source file containing the construct ``obj?.method()``
[INFO] [stdout] ✔ When the oxc walker analyzes the source
[INFO] [stdout] ✔ Then the function's cyclomatic complexity is `2`
[INFO] [stdout] ✔ And the contributors include exactly one `optional-chain` entry
[INFO] [stdout] Scenario Outline: TypeScript-specific decision points add to cyclomatic
[INFO] [stdout] ✔ Given a TypeScript source file containing the construct ``a ?? fallback``
[INFO] [stdout] ✔ When the oxc walker analyzes the source
[INFO] [stdout] ✔ Then the function's cyclomatic complexity is `2`
[INFO] [stdout] ✔ And the contributors include exactly one `logical-operator` entry
[INFO] [stdout] Scenario Outline: TypeScript-specific decision points add to cyclomatic
[INFO] [stdout] ✔ Given a TypeScript source file containing the construct ``try { … } catch (e) { … }``
[INFO] [stdout] ✔ When the oxc walker analyzes the source
[INFO] [stdout] ✔ Then the function's cyclomatic complexity is `2`
[INFO] [stdout] ✔ And the contributors include exactly one `catch` entry
[INFO] [stdout] Scenario: JSX conditional rendering decomposes through logical-operator
[INFO] [stdout] ✔ Given a TypeScript JSX source file containing:
[INFO] [stdout] ✔ When the oxc walker analyzes the source
[INFO] [stdout] ✔ Then the function's cyclomatic complexity is 2
[INFO] [stdout] ✔ And the JSX conditional is counted via the existing `logical-operator` contributor
[INFO] [stdout] ✔ And the contributors list contains exactly one entry of kind `logical-operator`
[INFO] [stdout] Scenario: Nested functions are tracked as their own complexity sites
[INFO] [stdout] ✔ Given a TypeScript source file containing:
[INFO] [stdout] ✔ When the oxc walker analyzes the source
[INFO] [stdout] ✔ Then the report includes function `outer` with cyclomatic complexity 1
[INFO] [stdout] ✔ And the report includes function `inner` with cyclomatic complexity 2
[INFO] [stdout] ✔ And `inner`'s contributors include one `ternary` entry
[INFO] [stdout] Scenario: A chained ternary contributes one decision point per `?`
[INFO] [stdout] ✔ Given a TypeScript source file containing:
[INFO] [stdout] ✔ When the oxc walker analyzes the source
[INFO] [stdout] ✔ Then the report includes function `classify` with cyclomatic complexity 3
[INFO] [stderr] Running tests/end_to_end_smoke.rs (/opt/rustwide/target/release/build/crap4ts/1b15743bb41eb6a6/out/end_to_end_smoke-1b15743bb41eb6a6)
[INFO] [stdout] ✔ And the contributors include exactly two `ternary` entries
[INFO] [stdout] Scenario: A chained logical-operator expression contributes one per operator
[INFO] [stdout] ✔ Given a TypeScript source file containing:
[INFO] [stdout] ✔ When the oxc walker analyzes the source
[INFO] [stdout] ✔ Then the report includes function `allTruthy` with cyclomatic complexity 4
[INFO] [stdout] ✔ And the contributors include exactly three `logical-operator` entries
[INFO] [stdout] Scenario: Nested if-statements contribute one per if-branch (no flattening)
[INFO] [stdout] ✔ Given a TypeScript source file containing:
[INFO] [stdout] ✔ When the oxc walker analyzes the source
[INFO] [stdout] ✔ Then the report includes function `deep` with cyclomatic complexity 3
[INFO] [stdout] ✔ And the contributors include exactly two `if-branch` entries
[INFO] [stdout] Scenario: Compound construct `if (a && b)` counts the `if` AND the `&&` (no skipping)
[INFO] [stdout] ✔ Given a TypeScript source file containing:
[INFO] [stdout] ✔ When the oxc walker analyzes the source
[INFO] [stdout] ✔ Then the report includes function `both` with cyclomatic complexity 3
[INFO] [stdout] ✔ And the contributors include exactly one `if-branch` entry
[INFO] [stdout] ✔ And the contributors include exactly one `logical-operator` entry
[INFO] [stdout] Scenario: Risk classification is metric-invariant
[INFO] [stdout] ✔ Given a TypeScript function with cyclomatic complexity 4 and coverage 50%
[INFO] [stdout] ✔ When the oxc walker analyzes the source
[INFO] [stdout] ✔ Then the function's CRAP score is 6.0
[INFO] [stdout] ✔ And the function's risk classification is `low`
[INFO] [stdout] [Summary]
[INFO] [stdout] 1 feature
[INFO] [stdout] 23 scenarios (23 passed)
[INFO] [stdout] 95 steps (95 passed)
[INFO] [stdout]
[INFO] [stdout] running 4 tests
[INFO] [stdout] test happy_path_table_lists_simple_add_function ... ok
[INFO] [stdout] test markdown_reporter_emits_crap4ts_title_header ... ok
[INFO] [stdout] test json_envelope_parses_and_reports_functions ... ok
[INFO] [stderr] Running tests/file_extensions_cucumber.rs (/opt/rustwide/target/release/build/crap4ts/b5c459d287b4b8cb/out/file_extensions_cucumber-b5c459d287b4b8cb)
[INFO] [stdout] test parse_failure_continues_other_files_are_analyzed ... ok
[INFO] [stdout]
[INFO] [stdout] test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
[INFO] [stdout]
[INFO] [stdout] Feature: TypeScript file extension discovery and parsing
[INFO] [stdout] Scenario Outline: Files with supported extensions are discovered and parsed
[INFO] [stdout] ✔ Given a source tree under `src/` containing a single file `example.ts` with contents ``export function greet(name: string): string { return `hello ${name}`; }``
[INFO] [stdout] ✔ And a valid Istanbul `coverage-final.json` covering that file
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then `crap4ts` exits with status 0 (no parse errors)
[INFO] [stdout] ✔ And the report includes at least one function from `example.ts`
[INFO] [stdout] Scenario Outline: Files with supported extensions are discovered and parsed
[INFO] [stdout] ✔ Given a source tree under `src/` containing a single file `example.tsx` with contents ``export const Greet = ({name}: {name: string}) => hi {name};``
[INFO] [stdout] ✔ And a valid Istanbul `coverage-final.json` covering that file
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then `crap4ts` exits with status 0 (no parse errors)
[INFO] [stdout] ✔ And the report includes at least one function from `example.tsx`
[INFO] [stdout] Scenario Outline: Files with supported extensions are discovered and parsed
[INFO] [stdout] ✔ Given a source tree under `src/` containing a single file `example.js` with contents ``export function greet(name) { return 'hello ' + name; }``
[INFO] [stdout] ✔ And a valid Istanbul `coverage-final.json` covering that file
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then `crap4ts` exits with status 0 (no parse errors)
[INFO] [stdout] ✔ And the report includes at least one function from `example.js`
[INFO] [stdout] Scenario Outline: Files with supported extensions are discovered and parsed
[INFO] [stdout] ✔ Given a source tree under `src/` containing a single file `example.jsx` with contents ``export const Greet = ({name}) => hi {name};``
[INFO] [stdout] ✔ And a valid Istanbul `coverage-final.json` covering that file
[INFO] [stderr] Running tests/fuzz_istanbul/main.rs (/opt/rustwide/target/release/build/crap4ts/a9bb7f3307816f64/out/fuzz_istanbul-a9bb7f3307816f64)
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then `crap4ts` exits with status 0 (no parse errors)
[INFO] [stdout] ✔ And the report includes at least one function from `example.jsx`
[INFO] [stdout] Scenario Outline: Files with supported extensions are discovered and parsed
[INFO] [stdout] ✔ Given a source tree under `src/` containing a single file `example.mjs` with contents ``export function greet(name) { return 'hello ' + name; }``
[INFO] [stdout] ✔ And a valid Istanbul `coverage-final.json` covering that file
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then `crap4ts` exits with status 0 (no parse errors)
[INFO] [stdout] ✔ And the report includes at least one function from `example.mjs`
[INFO] [stdout] Scenario Outline: Files with supported extensions are discovered and parsed
[INFO] [stdout] ✔ Given a source tree under `src/` containing a single file `example.cjs` with contents ``module.exports.greet = function(name) { return 'hello ' + name; };``
[INFO] [stdout] ✔ And a valid Istanbul `coverage-final.json` covering that file
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then `crap4ts` exits with status 0 (no parse errors)
[INFO] [stdout] ✔ And the report includes at least one function from `example.cjs`
[INFO] [stdout] Scenario: A .d.ts file is skipped by default (declaration-only, no executable code)
[INFO] [stdout] ✔ Given a source tree under `src/` containing `types.d.ts` and `app.ts`
[INFO] [stdout] ✔ And the operator's `crap.toml` does NOT explicitly include `.d.ts`
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then the report includes functions from `app.ts`
[INFO] [stdout] ✔ And the report does NOT include entries from `types.d.ts`
[INFO] [stdout] Scenario: A .test.ts file is included unless excluded via crap.toml
[INFO] [stdout] ✔ Given a source tree under `src/` containing `app.ts` and `app.test.ts`
[INFO] [stdout] ✔ And the operator's `crap.toml` has no exclusion for `.test.ts`
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then the report includes functions from both `app.ts` and `app.test.ts`
[INFO] [stdout] Scenario: A .test.ts file is excluded when crap.toml lists it in excludes
[INFO] [stdout] ✔ Given a source tree under `src/` containing `app.ts` and `app.test.ts`
[INFO] [stdout] ✔ And the operator's `crap.toml` has `exclude = ["**/*.test.ts"]`
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then the report includes functions from `app.ts`
[INFO] [stdout] ✔ And the report does NOT include entries from `app.test.ts`
[INFO] [stdout] Scenario: An unrecognized extension is silently skipped
[INFO] [stdout] ✔ Given a source tree under `src/` containing `app.ts` and `notes.txt`
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then the report includes functions from `app.ts`
[INFO] [stdout] ✔ And the report does NOT mention `notes.txt`
[INFO] [stdout] ✔ And no diagnostic is emitted about `notes.txt`
[INFO] [stdout] Scenario: A parser failure on one file does not abort the run for others
[INFO] [stdout] ✔ Given a source tree under `src/` containing `good.ts` (parses cleanly) and `broken.ts` (syntactically invalid)
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then `crap4ts` still produces a scorecard for functions in `good.ts`
[INFO] [stdout] ✔ And the diagnostics section reports `broken.ts` as unparseable
[INFO] [stdout] ✔ And `AnalysisDiagnostics.files_unparseable` equals 1
[INFO] [stdout] ✔ And the run exits with non-zero status ONLY if threshold violations gate it (not because of parse failure alone)
[INFO] [stdout] [Summary]
[INFO] [stdout] 1 feature
[INFO] [stdout] 11 scenarios (11 passed)
[INFO] [stdout] 55 steps (55 passed)
[INFO] [stdout]
[INFO] [stdout] running 3 tests
[INFO] [stdout] test replay_committed_corpus_and_crashes ... ok
[INFO] [stdout] test fuzz_istanbul_structured ... ok
[INFO] [stderr] Running tests/fuzz_oxc_walker/main.rs (/opt/rustwide/target/release/build/crap4ts/1c2f09c91ae68008/out/fuzz_oxc_walker-1c2f09c91ae68008)
[INFO] [stdout] test fuzz_istanbul_raw ... ok
[INFO] [stdout]
[INFO] [stdout] test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.00s
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] running 2 tests
[INFO] [stdout] test replay_committed_corpus_and_crashes ... ok
[INFO] [stdout] test fuzz_oxc_walker ... ok
[INFO] [stdout]
[INFO] [stdout] test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.00s
[INFO] [stdout]
[INFO] [stderr] Running tests/istanbul_parser_cucumber.rs (/opt/rustwide/target/release/build/crap4ts/ee79e8f8b9e5ddb3/out/istanbul_parser_cucumber-ee79e8f8b9e5ddb3)
[INFO] [stdout] Feature: Istanbul JSON coverage parsing
[INFO] [stdout] Scenario: A jest-emitted coverage-final.json parses cleanly
[INFO] [stdout] ✔ Given a jest-emitted Istanbul `coverage-final.json` covering 3 source files
[INFO] [stdout] ✔ And the report's source root resolves all 3 file paths to discovered sources
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then the report attributes line coverage to all 3 files
[INFO] [stdout] ✔ And no warnings or diagnostics are emitted for the coverage input
[INFO] [stdout] Scenario: A vitest-emitted coverage-final.json parses with the same shape
[INFO] [stdout] ✔ Given a vitest-emitted Istanbul `coverage-final.json` covering 3 source files
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then the report attributes line coverage to all 3 files
[INFO] [stdout] ✔ And no warnings or diagnostics are emitted for the coverage input
[INFO] [stdout] Scenario: An nyc-emitted coverage-final.json parses with the same shape
[INFO] [stdout] ✔ Given an nyc-emitted Istanbul `coverage-final.json` covering 3 source files
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then the report attributes line coverage to all 3 files
[INFO] [stdout] ✔ And no warnings or diagnostics are emitted for the coverage input
[INFO] [stdout] Scenario: A coverage entry whose path cannot resolve to a source file emits PathUnresolved
[INFO] [stdout] ✔ Given an Istanbul `coverage-final.json` with one entry pointing at `/private/build/transpiled/foo.js`
[INFO] [stdout] ✔ And no source file resolves to that path under `--src src`
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then the diagnostics section of the report contains one entry for that unresolved path
[INFO] [stdout] ✔ And the diagnostic's kind is `path-unresolved`
[INFO] [stdout] ✔ And the diagnostic's message mentions the unresolved path
[INFO] [stdout] ✔ And the scorecard still produces line coverage for the OTHER entries (never abort first-record)
[INFO] [stdout] Scenario: A JSON file that is not Istanbul-shaped emits SchemaUnrecognized
[INFO] [stdout] ✔ Given a `coverage.json` whose top-level shape is `{ "foo": "bar" }` (not Istanbul)
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage.json --src src`
[INFO] [stdout] ✔ Then `crap4ts` exits with a non-zero status
[INFO] [stdout] ✔ And the user-facing error message names the problem ("top-level shape not recognized as Istanbul")
[INFO] [stdout] ✔ And the message hints at the expected shape `{[path]: { path, s, statementMap, … }}`
[INFO] [stdout] ✔ And the JSON envelope's diagnostic record carries kind `schema-unrecognized`
[INFO] [stdout] Scenario: A branch-record references an unknown branchId — emits BranchMismatch
[INFO] [stdout] ✔ Given a `coverage-final.json` whose `b` record references branchId `42`
[INFO] [stdout] ✔ And `branchMap` contains no entry for branchId `42`
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then the diagnostics section of the report contains one entry for that branch
[INFO] [stdout] ✔ And the diagnostic's kind is `branch-mismatch`
[INFO] [stdout] ✔ And the diagnostic's message redirects the user to "the coverage tool's issue tracker"
[INFO] [stdout] Scenario: validate() pre-flight catches an empty coverage file before parse
[INFO] [stdout] ✔ Given a `coverage-final.json` that decodes as Istanbul JSON but every entry's `statementMap` is empty
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then `crap4ts` exits with a non-zero status before reaching the parse pass
[INFO] [stdout] ✔ And the user-facing error explains "no statement coverage records"
[INFO] [stdout] ✔ And the error message tells the user how to regenerate coverage (e.g., "run jest with --coverage")
[INFO] [stdout] Scenario: A coverage entry with extra unknown fields is ignored permissively
[INFO] [stdout] ✔ Given a jest-emitted `coverage-final.json` with `hash` and `contentHash` fields
[INFO] [stdout] ✔ And no other deviation from the expected schema
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src`
[INFO] [stdout] ✔ Then the parser produces a `ParseOutput` containing line coverage for the entries
[INFO] [stdout] ✔ And no `ParseDiagnostic` records are emitted for the unknown fields
[INFO] [stdout] Scenario: Relative paths in the coverage report are resolved against --src
[INFO] [stdout] ✔ Given an Istanbul `coverage-final.json` whose entries use relative paths like `src/foo.ts`
[INFO] [stdout] ✔ And the operator invokes `crap4ts --coverage coverage-final.json --src /home/me/project/src`
[INFO] [stdout] ✔ When the parser normalizes the entry paths
[INFO] [stdout] ✔ Then the paths resolve against `/home/me/project/src`
[INFO] [stdout] ✔ And the normalized paths in the output are workspace-relative
[INFO] [stdout] [Summary]
[INFO] [stdout] 1 feature
[INFO] [stdout] 9 scenarios (9 passed)
[INFO] [stdout] 47 steps (47 passed)
[INFO] [stderr] Running tests/istanbul_smoke.rs (/opt/rustwide/target/release/build/crap4ts/949f0cf38cb9d82b/out/istanbul_smoke-949f0cf38cb9d82b)
[INFO] [stdout]
[INFO] [stdout] running 32 tests
[INFO] [stdout] test arrow_ac_5b_button_and_use_callback_handle_both_100 ... ok
[INFO] [stdout] test arrow_ac_5a_square_covered_cube_uncovered ... ok
[INFO] [stdout] test arrow_ac_5d_mixed_bodies_all_covered ... ok
[INFO] [stdout] test arrow_ac_5c_inner_map_arrow_covered ... ok
[INFO] [stdout] test parses_jest_fixture_with_all_five_files ... ok
[INFO] [stdout] test fix216_parentdir_traversal_does_not_resolve_outside_effective_src ... ok
[INFO] [stdout] test producer_jest29_parses_clean ... ok
[INFO] [stdout] test producer_c8_parses_clean ... ok
[INFO] [stdout] test parse_malformed_json_returns_source_parse_with_istanbul_prefix ... ok
[INFO] [stdout] test fix215_no_matching_suffix_still_emits_path_unresolved ... ok
[INFO] [stdout] test fix215_foreign_prefix_absolute_path_resolves_via_suffix_fallback ... ok
[INFO] [stdout] test validate_returns_err_on_bad_shape ... ok
[INFO] [stdout] test validate_returns_err_on_empty_statement_map ... ok
[INFO] [stdout] test fix215_ambiguous_suffix_longest_wins_deterministically ... ok
[INFO] [stdout] test w23_orphan_branch_id_emits_branch_mismatch_and_skips_only_that_branch ... ok
[INFO] [stdout] test w23_regression_no_b_records_leaves_branches_none ... ok
[INFO] [stdout] test parse_emits_path_unresolved_for_out_of_tree_entries ... ok
[INFO] [stdout] test producer_vitest4_parses_clean_with_null_columns ... ok
[INFO] [stdout] test w23_branch_arms_fan_to_per_arm_rows_not_summed ... ok
[INFO] [stdout] test w23_branches_populated_when_b_records_present ... ok
[INFO] [stdout] test w24_unrecognized_shape_emits_schema_unrecognized_with_detected_keys ... ok
[INFO] [stdout] test w24_validate_accepts_wrapped_shape_for_cli_parity_with_parse ... ok
[INFO] [stdout] test w24_vitest_null_columns_parse_without_bailing ... ok
[INFO] [stdout] test w24_missing_field_emits_diagnostic_and_skips_only_that_entry ... ok
[INFO] [stdout] test w24_orphan_path_emits_path_unresolved_and_valid_entries_still_parse ... ok
[INFO] [stdout] test w24_top_level_array_emits_schema_unrecognized ... ok
[INFO] [stdout] test w24_nyc_absolute_paths_normalize_via_strip_prefix ... ok
[INFO] [stdout] test w24_truly_malformed_json_still_returns_source_parse_error ... ok
[INFO] [stdout] test w24_vitest_shape_parses_with_no_diagnostics ... ok
[INFO] [stdout] test w24_wrapped_shape_parses_via_single_level_unwrap ... ok
[INFO] [stdout] test producer_nyc17_parses_clean ... ok
[INFO] [stdout] test fix215_v1_corpus_e2e_floor_majority_functions_have_nonzero_coverage ... ok
[INFO] [stdout]
[INFO] [stdout] test result: ok. 32 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.05s
[INFO] [stdout]
[INFO] [stderr] Running tests/metric_unsupported_cucumber.rs (/opt/rustwide/target/release/build/crap4ts/7afa0e5c67c1edea/out/metric_unsupported_cucumber-7afa0e5c67c1edea)
[INFO] [stdout] Feature: --metric cognitive returns a helpful error in crap4ts@2.0.0
[INFO] [stdout] Scenario: --metric cognitive on crap4ts exits non-zero with direct guidance
[INFO] [stdout] ✔ Given a TypeScript source tree under `src/`
[INFO] [stdout] ✔ And a valid Istanbul `coverage-final.json`
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src --metric cognitive`
[INFO] [stdout] ✔ Then `crap4ts` exits with status 2
[INFO] [stdout] ✔ And the user-facing error reads exactly:
[INFO] [stdout] Scenario: --metric cyclomatic on crap4ts is the default and works
[INFO] [stdout] ✔ Given a TypeScript source tree under `src/`
[INFO] [stdout] ✔ And a valid Istanbul `coverage-final.json`
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage coverage-final.json --src src --metric cyclomatic`
[INFO] [stdout] ✔ Then `crap4ts` produces a complete CRAP scorecard
[INFO] [stdout] ✔ And no MetricNotSupported error is emitted
[INFO] [stdout] Scenario: The MetricNotSupported error uses metric Display format, not Debug
[INFO] [stdout] ✔ When the binary renders the MetricNotSupported error for metric `Cognitive`
[INFO] [stdout] ✔ Then the rendered metric name in the user message is `cognitive` (lowercase, matching CLI input)
[INFO] [stdout] ✔ And the rendered metric name is NOT `Cognitive` (PascalCase, Debug format)
[INFO] [stdout] Scenario: --metric an-unknown-value exits with clap's standard error (not MetricNotSupported)
[INFO] [stdout] ✔ When the operator runs `crap4ts --coverage cov.json --src src --metric halstead`
[INFO] [stdout] ✔ Then `crap4ts` exits with status 2
[INFO] [stdout] ✔ And the error originates from clap's argument validation, NOT from MetricNotSupported
[INFO] [stdout] ✔ And the error names the valid `--metric` values
[INFO] [stdout] [Summary]
[INFO] [stdout] 1 feature
[INFO] [stdout] 4 scenarios (4 passed)
[INFO] [stdout] 17 steps (17 passed)
[INFO] [stderr] Running tests/metric_unsupported_smoke.rs (/opt/rustwide/target/release/build/crap4ts/3f91d8eef9e63884/out/metric_unsupported_smoke-3f91d8eef9e63884)
[INFO] [stdout]
[INFO] [stdout] running 4 tests
[INFO] [stdout] test crap4rs_no_flag_default_cognitive_still_works ... FAILED
[INFO] [stdout] test no_flag_invocation_defaults_to_cyclomatic_via_adapter_meta ... ok
[INFO] [stdout] test cognitive_flag_exits_with_metric_not_supported_error ... ok
[INFO] [stdout] test cyclomatic_flag_explicit_succeeds ... ok
[INFO] [stdout]
[INFO] [stdout] failures:
[INFO] [stdout]
[INFO] [stdout] ---- crap4rs_no_flag_default_cognitive_still_works stdout ----
[INFO] [stdout]
[INFO] [stdout] thread 'crap4rs_no_flag_default_cognitive_still_works' (7346) panicked at /opt/rustwide/cargo-home/registry/src/index.crates.io-1949cf8c6b5b557f/assert_cmd-2.2.2/src/cargo.rs:232:5:
[INFO] [stdout] `CARGO_BIN_EXE_crap4rs` is unset
[INFO] [stdout] help: available binary names are "crap4ts"
[INFO] [stdout] stack backtrace:
[INFO] [stdout] 0: 0x5d2dd6c65c21 - <::print::DisplayBacktrace as core[5c14b8d5a259cc4e]::fmt::Display>::fmt
[INFO] [stdout] 1: 0x5d2dd6c7aeaa - core[5c14b8d5a259cc4e]::fmt::write
[INFO] [stdout] 2: 0x5d2dd6c6a74c - as core[5c14b8d5a259cc4e]::io::write::Write>::write_fmt
[INFO] [stdout] 3: 0x5d2dd6c40b96 - std[218a0f7bb9a8af32]::panicking::default_hook::{closure#0}
[INFO] [stdout] 4: 0x5d2dd6c5d7d9 - std[218a0f7bb9a8af32]::panicking::default_hook
[INFO] [stdout] 5: 0x5d2dd6bf10d0 - test[2df5162924bba3e2]::test_main_inner::{closure#0}
[INFO] [stdout] 6: 0x5d2dd6c5d992 - std[218a0f7bb9a8af32]::panicking::panic_with_hook
[INFO] [stdout] 7: 0x5d2dd6c40c42 - std[218a0f7bb9a8af32]::panicking::panic_handler::{closure#0}
[INFO] [stdout] 8: 0x5d2dd6c39489 - std[218a0f7bb9a8af32]::sys::backtrace::__rust_end_short_backtrace::
[INFO] [stdout] 9: 0x5d2dd6c4184d - __rustc[abc93889656912e2]::rust_begin_unwind
[INFO] [stdout] 10: 0x5d2dd6c7bbbc - core[5c14b8d5a259cc4e]::panicking::panic_fmt
[INFO] [stdout] 11: 0x5d2dd6c2649f - assert_cmd[56330545676ece9]::cargo::missing_cargo_bin
[INFO] [stdout] 12: 0x5d2dd6c26333 - assert_cmd[56330545676ece9]::cargo::cargo_bin_str
[INFO] [stdout] 13: 0x5d2dd6be3066 - ::cargo_bin::<&str>
[INFO] [stdout] 14: 0x5d2dd6be24c7 - >::call_once
[INFO] [stdout] 15: 0x5d2dd6be3f3b - test[2df5162924bba3e2]::__rust_begin_short_backtrace::, fn() -> core[5c14b8d5a259cc4e]::result::Result<(), alloc[f65cf102c2e86268]::string::String>>
[INFO] [stdout] 16: 0x5d2dd6bf16f5 - test[2df5162924bba3e2]::run_test::{closure#0}
[INFO] [stdout] 17: 0x5d2dd6beab44 - std[218a0f7bb9a8af32]::sys::backtrace::__rust_begin_short_backtrace::
[INFO] [stdout] 18: 0x5d2dd6bf4682 - ::{closure#1} as core[5c14b8d5a259cc4e]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
[INFO] [stdout] 19: 0x5d2dd6c652df - ::new::thread_start
[INFO] [stdout] 20: 0x70257aa6fdfa -
[INFO] [stdout] 21: 0x70257ab033d4 - clone
[INFO] [stdout] 22: 0x0 -
[INFO] [stdout]
[INFO] [stdout]
[INFO] [stdout] failures:
[INFO] [stdout] crap4rs_no_flag_default_cognitive_still_works
[INFO] [stdout]
[INFO] [stdout] test result: FAILED. 3 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
[INFO] [stdout]
[INFO] [stderr] error: test failed, to rerun pass `--test metric_unsupported_smoke`
[INFO] running `"docker" "inspect" "b881fd503c278b2a84d2a18a85639d89516ef6e4d6fb62a7f540e9c7d7f8147f"`
[INFO] running `"docker" "rm" "-f" "b881fd503c278b2a84d2a18a85639d89516ef6e4d6fb62a7f540e9c7d7f8147f"`
[INFO] [stdout] b881fd503c278b2a84d2a18a85639d89516ef6e4d6fb62a7f540e9c7d7f8147f