[INFO] fetching crate crap4ts 2.0.0-rc.5...
[INFO] testing crap4ts-2.0.0-rc.5 against 1.99.0-beta.8+cargoflags=--release for beta-release-1.100-2
[INFO] extracting crate crap4ts 2.0.0-rc.5 into /workspace/builds/worker-7-tc1/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-7-tc1/source/Cargo.toml
[INFO] validating manifest of crates.io crate crap4ts 2.0.0-rc.5 on toolchain 1.99.0-beta.8
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1.99.0-beta.8" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }`
[INFO] crate crates.io crate crap4ts 2.0.0-rc.5 already has a lockfile, it will not be regenerated
[INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+1.99.0-beta.8" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }`
[INFO] [stderr]     Updating crates.io index
[INFO] [stderr]  Downloading crates ...
[INFO] [stderr]   Downloaded oxc_syntax v0.129.0
[INFO] [stderr]   Downloaded oxc_str v0.129.0
[INFO] [stderr]   Downloaded oxc_estree v0.129.0
[INFO] [stderr]   Downloaded oxc v0.129.0
[INFO] [stderr]   Downloaded napi-sys v3.2.2
[INFO] [stderr]   Downloaded oxc_ast_macros v0.129.0
[INFO] [stderr]   Downloaded oxc_diagnostics v0.129.0
[INFO] [stderr]   Downloaded napi-build v2.3.2
[INFO] [stderr]   Downloaded napi-derive v3.5.6
[INFO] [stderr]   Downloaded oxc_span v0.129.0
[INFO] [stderr]   Downloaded napi-derive-backend v5.0.4
[INFO] [stderr]   Downloaded oxc_allocator v0.129.0
[INFO] [stderr]   Downloaded ctor v1.0.7
[INFO] [stderr]   Downloaded oxc_data_structures v0.129.0
[INFO] [stderr]   Downloaded oxc_regular_expression v0.129.0
[INFO] [stderr]   Downloaded oxc_ecmascript v0.129.0
[INFO] [stderr]   Downloaded napi v3.9.3
[INFO] [stderr]   Downloaded oxc_parser v0.129.0
[INFO] [stderr]   Downloaded oxc_ast v0.129.0
[INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/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:77db811e55d90add9212f6832c23229e3de5f1c1f9905e8cb07319ea15df73ac" "sleep" "infinity", kill_on_drop: false }`
[INFO] [stdout] dd7bb3bbb9973cbb287661d9bdb2e0d03842943d8379ead3ad09d24b2453639a
[INFO] running `Command { std: "docker" "start" "dd7bb3bbb9973cbb287661d9bdb2e0d03842943d8379ead3ad09d24b2453639a", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "dd7bb3bbb9973cbb287661d9bdb2e0d03842943d8379ead3ad09d24b2453639a", kill_on_drop: false }`
[INFO] running `Command { std: "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" "dd7bb3bbb9973cbb287661d9bdb2e0d03842943d8379ead3ad09d24b2453639a" "/opt/rustwide/cargo-home/bin/cargo" "+1.99.0-beta.8" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "inspect" "dd7bb3bbb9973cbb287661d9bdb2e0d03842943d8379ead3ad09d24b2453639a", kill_on_drop: false }`
[INFO] running `Command { std: "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" "dd7bb3bbb9973cbb287661d9bdb2e0d03842943d8379ead3ad09d24b2453639a" "/opt/rustwide/cargo-home/bin/cargo" "+1.99.0-beta.8" "build" "--frozen" "--message-format=json" "--release", kill_on_drop: false }`
[INFO] [stderr]    Compiling allocator-api2 v0.2.21
[INFO] [stderr]    Compiling phf_shared v0.13.1
[INFO] [stderr]    Compiling owo-colors v4.3.0
[INFO] [stderr]    Compiling unicode-linebreak v0.1.5
[INFO] [stderr]    Compiling oxc-miette-derive v2.7.1
[INFO] [stderr]    Compiling oxc_data_structures v0.129.0
[INFO] [stderr]    Compiling rustc-hash v2.1.2
[INFO] [stderr]    Compiling oxc_estree v0.129.0
[INFO] [stderr]    Compiling castaway v0.2.4
[INFO] [stderr]    Compiling dragonbox_ecma v0.1.12
[INFO] [stderr]    Compiling cow-utils v0.1.3
[INFO] [stderr]    Compiling unicode-id-start v1.4.0
[INFO] [stderr]    Compiling nonmax v0.5.5
[INFO] [stderr]    Compiling num-bigint v0.4.6
[INFO] [stderr]    Compiling napi-build v2.3.2
[INFO] [stderr]    Compiling compact_str v0.9.1
[INFO] [stderr]    Compiling seq-macro v0.3.6
[INFO] [stderr]    Compiling askama v0.16.0
[INFO] [stderr]    Compiling textwrap v0.16.2
[INFO] [stderr]    Compiling crap4ts v2.0.0-rc.5 (/opt/rustwide/workdir)
[INFO] [stderr]    Compiling hashbrown v0.17.1
[INFO] [stderr]    Compiling phf_generator v0.13.1
[INFO] [stderr]    Compiling phf v0.13.1
[INFO] [stderr]    Compiling oxc_index v4.1.0
[INFO] [stderr]    Compiling oxc_ast_macros v0.129.0
[INFO] [stderr]    Compiling phf_macros v0.13.1
[INFO] [stderr]    Compiling oxc-miette v2.7.1
[INFO] [stderr]    Compiling oxc_allocator v0.129.0
[INFO] [stderr]    Compiling indexmap v2.14.0
[INFO] [stderr]    Compiling oxc_str v0.129.0
[INFO] [stderr]    Compiling toml_edit v0.22.27
[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 oxc_syntax v0.129.0
[INFO] [stderr]    Compiling oxc_ast v0.129.0
[INFO] [stderr]    Compiling toml v0.8.23
[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 1m 20s
[INFO] running `Command { std: "docker" "inspect" "dd7bb3bbb9973cbb287661d9bdb2e0d03842943d8379ead3ad09d24b2453639a", kill_on_drop: false }`
[INFO] running `Command { std: "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" "dd7bb3bbb9973cbb287661d9bdb2e0d03842943d8379ead3ad09d24b2453639a" "/opt/rustwide/cargo-home/bin/cargo" "+1.99.0-beta.8" "test" "--frozen" "--no-run" "--message-format=json" "--release", kill_on_drop: false }`
[INFO] [stderr]    Compiling syn v2.0.118
[INFO] [stderr]    Compiling rustix v1.1.4
[INFO] [stderr]    Compiling regex-automata v0.4.14
[INFO] [stderr]    Compiling ppv-lite86 v0.2.21
[INFO] [stderr]    Compiling ansi-str v0.9.0
[INFO] [stderr]    Compiling proc-macro-crate v2.0.0
[INFO] [stderr]    Compiling regex v1.12.4
[INFO] [stderr]    Compiling nom_locate v5.0.0
[INFO] [stderr]    Compiling predicates-core v1.0.10
[INFO] [stderr]    Compiling peg-runtime v0.6.3
[INFO] [stderr]    Compiling once_cell v1.21.4
[INFO] [stderr]    Compiling bytecount v0.6.9
[INFO] [stderr]    Compiling crap4ts v2.0.0-rc.5 (/opt/rustwide/workdir)
[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 inflections v1.1.1
[INFO] [stderr]    Compiling termtree v0.5.1
[INFO] [stderr]    Compiling peg v0.6.3
[INFO] [stderr]    Compiling itertools v0.14.0
[INFO] [stderr]    Compiling inventory v0.3.24
[INFO] [stderr]    Compiling linked-hash-map v0.5.6
[INFO] [stderr]    Compiling predicates-tree v1.0.13
[INFO] [stderr]    Compiling predicates v3.1.4
[INFO] [stderr]    Compiling rand_chacha v0.9.0
[INFO] [stderr]    Compiling rand v0.9.4
[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 proptest v1.11.0
[INFO] [stderr]    Compiling bstr v1.12.1
[INFO] [stderr]    Compiling globset v0.4.18
[INFO] [stderr]    Compiling ignore v0.4.26
[INFO] [stderr]    Compiling serde_derive_internals v0.29.1
[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 optfield v0.4.0
[INFO] [stderr]    Compiling phf_macros v0.12.1
[INFO] [stderr]    Compiling sealed v0.6.0
[INFO] [stderr]    Compiling schemars_derive v1.2.1
[INFO] [stderr]    Compiling synthez-core v0.4.0
[INFO] [stderr]    Compiling futures-macro v0.3.32
[INFO] [stderr]    Compiling bolero-generator-derive v0.13.4
[INFO] [stderr]    Compiling ref-cast v1.0.25
[INFO] [stderr]    Compiling typed-builder-macro v0.23.2
[INFO] [stderr]    Compiling phf v0.12.1
[INFO] [stderr]    Compiling pin-project-internal v1.1.13
[INFO] [stderr]    Compiling phf v0.13.1
[INFO] [stderr]    Compiling globwalk v0.9.1
[INFO] [stderr]    Compiling bolero-generator v0.13.5
[INFO] [stderr]    Compiling futures-util v0.3.32
[INFO] [stderr]    Compiling synthez-codegen v0.4.0
[INFO] [stderr]    Compiling tokio-macros v2.7.0
[INFO] [stderr]    Compiling synthez v0.4.0
[INFO] [stderr]    Compiling smart-default v0.7.1
[INFO] [stderr]    Compiling thiserror v2.0.18
[INFO] [stderr]    Compiling oxc-miette v2.7.1
[INFO] [stderr]    Compiling tokio v1.52.3
[INFO] [stderr]    Compiling pin-project v1.1.13
[INFO] [stderr]    Compiling typed-builder v0.23.2
[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 oxc_span v0.129.0
[INFO] [stderr]    Compiling oxc_diagnostics v0.129.0
[INFO] [stderr]    Compiling documented v0.9.2
[INFO] [stderr]    Compiling oxc_regular_expression v0.129.0
[INFO] [stderr]    Compiling clap_complete_nushell v4.6.0
[INFO] [stderr]    Compiling serde v1.0.228
[INFO] [stderr]    Compiling futures-executor v0.3.32
[INFO] [stderr]    Compiling derive_more v2.1.1
[INFO] [stderr]    Compiling cucumber-expressions v0.5.0
[INFO] [stderr]    Compiling oxc_index v4.1.0
[INFO] [stderr]    Compiling toml_datetime v0.6.11
[INFO] [stderr]    Compiling askama_parser v0.16.0
[INFO] [stderr]    Compiling basic-toml v0.1.10
[INFO] [stderr]    Compiling serde_spanned v0.6.9
[INFO] [stderr]    Compiling gherkin v0.15.0
[INFO] [stderr]    Compiling toml_edit v0.22.27
[INFO] [stderr]    Compiling schemars v1.2.1
[INFO] [stderr]    Compiling oxc_syntax v0.129.0
[INFO] [stderr]    Compiling bolero-engine v0.13.4
[INFO] [stderr]    Compiling cucumber-codegen v0.22.1
[INFO] [stderr]    Compiling futures v0.3.32
[INFO] [stderr]    Compiling bolero v0.13.4
[INFO] [stderr]    Compiling oxc_ast v0.129.0
[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 oxc_ecmascript v0.129.0
[INFO] [stderr]    Compiling crap-core v0.9.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 3m 43s
[INFO] running `Command { std: "docker" "inspect" "dd7bb3bbb9973cbb287661d9bdb2e0d03842943d8379ead3ad09d24b2453639a", kill_on_drop: false }`
[INFO] running `Command { std: "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" "dd7bb3bbb9973cbb287661d9bdb2e0d03842943d8379ead3ad09d24b2453639a" "/opt/rustwide/cargo-home/bin/cargo" "+1.99.0-beta.8" "test" "--frozen" "--release", kill_on_drop: false }`
[INFO] [stderr]    Compiling crap4ts v2.0.0-rc.5 (/opt/rustwide/workdir)
[INFO] [stderr]     Finished `release` profile [optimized] target(s) in 1m 34s
[INFO] [stderr]      Running unittests src/lib.rs (/opt/rustwide/target/release/deps/crap4ts-cf2a7bf5affff333)
[INFO] [stdout] 
[INFO] [stdout] running 19 tests
[INFO] [stdout] test adapters::coverage::tests::istanbul_coverage_constructible ... ok
[INFO] [stdout] test adapters::coverage::tests::line_coverage_multiple_lines_aggregated_independently ... ok
[INFO] [stdout] test adapters::coverage::tests::parse_empty_object_returns_ok_with_no_coverage ... ok
[INFO] [stdout] test adapters::coverage::tests::line_coverage_single_statement_passes_through_unchanged ... ok
[INFO] [stdout] test adapters::walker::tests::panic_reason_falls_back_on_non_string_payload ... ok
[INFO] [stdout] test adapters::coverage::tests::line_coverage_collapses_two_statements_at_same_line_to_min ... ok
[INFO] [stdout] test adapters::coverage::tests::line_coverage_collapses_two_covered_statements_to_smaller_hits ... ok
[INFO] [stdout] test parse_diagnostic::tests::serde_round_trip_branch_mismatch ... ok
[INFO] [stdout] test parse_diagnostic::tests::serde_round_trip_missing_field ... ok
[INFO] [stdout] test parse_diagnostic::tests::serde_round_trip_path_unresolved ... ok
[INFO] [stdout] test parse_diagnostic::tests::diagnostic_display_with_line ... 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::diagnostic_display_path_unresolved_no_line ... ok
[INFO] [stdout] test parse_diagnostic::tests::serde_round_trip_schema_unrecognized ... ok
[INFO] [stdout] test adapters::walker::tests::panic_reason_extracts_string_payload ... ok
[INFO] [stderr]      Running unittests src/main.rs (/opt/rustwide/target/release/deps/crap4ts-9c49cf5383881e73)
[INFO] [stdout] test adapters::coverage::tests::parse_malformed_json_returns_source_parse_with_istanbul_prefix ... ok
[INFO] [stderr]      Running tests/api_smoke.rs (/opt/rustwide/target/release/deps/api_smoke-204f9d328c661aca)
[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] 
[INFO] [stdout] test result: ok. 19 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.03s
[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] [stdout] 
[INFO] [stdout] running 7 tests
[INFO] [stdout] test analyze_to_json_missing_source_root_is_rejected ... ok
[INFO] [stdout] test analyze_to_json_cognitive_metric_surfaces_not_supported_error ... ok
[INFO] [stdout] test analyze_to_json_negative_threshold_is_rejected ... ok
[INFO] [stdout] test analyze_to_json_skips_dts_declaration_files ... ok
[INFO] [stdout] test analyze_to_json_nan_threshold_is_rejected ... ok
[INFO] [stderr]      Running tests/arrow_function_coverage_cucumber.rs (/opt/rustwide/target/release/deps/arrow_function_coverage_cucumber-13c019e1fdce3c14)
[INFO] [stdout] test analyze_to_json_explicit_threshold_overrides_default ... 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.07s
[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/deps/branch_coverage_cucumber-b80d3fc8172f0128)
[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/deps/cli_init_integration-b536bdc77e718241)
[INFO] [stdout] 
[INFO] [stdout] running 4 tests
[INFO] [stdout] test crap4ts_init_force_overwrites ... ok
[INFO] [stdout] test crap4ts_init_writes_canonical_crap_toml ... ok
[INFO] [stdout] test crap4ts_init_refuses_to_overwrite_without_force ... ok
[INFO] [stderr]      Running tests/config_discovery_integration.rs (/opt/rustwide/target/release/deps/config_discovery_integration-94c12e459efd8bb7)
[INFO] [stdout] test crap4ts_init_emits_ts_specific_excludes ... ok
[INFO] [stdout] 
[INFO] [stdout] test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
[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.01s
[INFO] [stdout] 
[INFO] [stderr]      Running tests/cyclomatic_walker_cucumber.rs (/opt/rustwide/target/release/deps/cyclomatic_walker_cucumber-018bf4ef00fd0b55)
[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] [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] [stderr]      Running tests/end_to_end_smoke.rs (/opt/rustwide/target/release/deps/end_to_end_smoke-7f3e3b78f49224bc)
[INFO] [stdout] 
[INFO] [stdout] running 4 tests
[INFO] [stdout] test parse_failure_continues_other_files_are_analyzed ... ok
[INFO] [stdout] test markdown_reporter_emits_crap4ts_title_header ... ok
[INFO] [stdout] test happy_path_table_lists_simple_add_function ... ok
[INFO] [stdout] test json_envelope_parses_and_reports_functions ... ok
[INFO] [stdout] 
[INFO] [stdout] test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.01s
[INFO] [stdout] 
[INFO] [stderr]      Running tests/file_extensions_cucumber.rs (/opt/rustwide/target/release/deps/file_extensions_cucumber-93a43e671a7b77ff)
[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}) => <span>hi {name}</span>;``
[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}) => <span>hi {name}</span>;``
[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.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] [stderr]      Running tests/fuzz_istanbul/main.rs (/opt/rustwide/target/release/deps/fuzz_istanbul-ed780b0e100841b7)
[INFO] [stdout] 
[INFO] [stdout] running 3 tests
[INFO] [stdout] test replay_committed_corpus_and_crashes ... ok
[INFO] [stderr]      Running tests/fuzz_oxc_walker/main.rs (/opt/rustwide/target/release/deps/fuzz_oxc_walker-7e28bf093fbf7d40)
[INFO] [stdout] test fuzz_istanbul_structured ... ok
[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] [stderr]      Running tests/istanbul_parser_cucumber.rs (/opt/rustwide/target/release/deps/istanbul_parser_cucumber-332bee442d3fe192)
[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] [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] [stderr]      Running tests/istanbul_smoke.rs (/opt/rustwide/target/release/deps/istanbul_smoke-a53e50ae7a3aeeb8)
[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] [stdout] 
[INFO] [stdout] running 32 tests
[INFO] [stdout] test arrow_ac_5a_square_covered_cube_uncovered ... ok
[INFO] [stdout] test arrow_ac_5b_button_and_use_callback_handle_both_100 ... ok
[INFO] [stdout] test parse_malformed_json_returns_source_parse_with_istanbul_prefix ... ok
[INFO] [stdout] test producer_nyc17_parses_clean ... ok
[INFO] [stdout] test arrow_ac_5d_mixed_bodies_all_covered ... ok
[INFO] [stdout] test parse_emits_path_unresolved_for_out_of_tree_entries ... ok
[INFO] [stdout] test fix215_foreign_prefix_absolute_path_resolves_via_suffix_fallback ... ok
[INFO] [stdout] test validate_returns_err_on_empty_statement_map ... ok
[INFO] [stdout] test w23_branch_arms_fan_to_per_arm_rows_not_summed ... ok
[INFO] [stdout] test fix215_ambiguous_suffix_longest_wins_deterministically ... ok
[INFO] [stdout] test arrow_ac_5c_inner_map_arrow_covered ... ok
[INFO] [stdout] test fix216_parentdir_traversal_does_not_resolve_outside_effective_src ... ok
[INFO] [stdout] test w24_missing_field_emits_diagnostic_and_skips_only_that_entry ... ok
[INFO] [stdout] test producer_vitest4_parses_clean_with_null_columns ... ok
[INFO] [stdout] test w23_regression_no_b_records_leaves_branches_none ... ok
[INFO] [stdout] test validate_returns_err_on_bad_shape ... ok
[INFO] [stdout] test w24_nyc_absolute_paths_normalize_via_strip_prefix ... ok
[INFO] [stdout] test w24_orphan_path_emits_path_unresolved_and_valid_entries_still_parse ... ok
[INFO] [stdout] test w23_branches_populated_when_b_records_present ... ok
[INFO] [stdout] test w23_orphan_branch_id_emits_branch_mismatch_and_skips_only_that_branch ... ok
[INFO] [stdout] test producer_c8_parses_clean ... ok
[INFO] [stdout] test producer_jest29_parses_clean ... ok
[INFO] [stdout] test parses_jest_fixture_with_all_five_files ... ok
[INFO] [stdout] test w24_top_level_array_emits_schema_unrecognized ... ok
[INFO] [stdout] test w24_validate_accepts_wrapped_shape_for_cli_parity_with_parse ... ok
[INFO] [stdout] test w24_truly_malformed_json_still_returns_source_parse_error ... ok
[INFO] [stdout] test w24_unrecognized_shape_emits_schema_unrecognized_with_detected_keys ... ok
[INFO] [stdout] test fix215_no_matching_suffix_still_emits_path_unresolved ... ok
[INFO] [stdout] test w24_vitest_null_columns_parse_without_bailing ... ok
[INFO] [stdout] test w24_wrapped_shape_parses_via_single_level_unwrap ... ok
[INFO] [stdout] test w24_vitest_shape_parses_with_no_diagnostics ... 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.08s
[INFO] [stdout] 
[INFO] [stderr]      Running tests/metric_unsupported_cucumber.rs (/opt/rustwide/target/release/deps/metric_unsupported_cucumber-9f56a62affb8a6ba)
[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/deps/metric_unsupported_smoke-5de3dfa05af2b648)
[INFO] [stdout] 
[INFO] [stdout] running 4 tests
[INFO] [stdout] test cognitive_flag_exits_with_metric_not_supported_error ... ok
[INFO] [stdout] test cyclomatic_flag_explicit_succeeds ... ok
[INFO] [stdout] test no_flag_invocation_defaults_to_cyclomatic_via_adapter_meta ... ok
[INFO] [stdout] test crap4rs_no_flag_default_cognitive_still_works ... FAILED
[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' (5597) panicked at tests/metric_unsupported_smoke.rs:209:5:
[INFO] [stdout] crap4rs (no flag) should default to cognitive via AdapterMeta::default_metric; got non-zero exit
[INFO] [stdout] stdout=
[INFO] [stdout] stderr=error: coverage file not found: ../crap4rs/tests/fixtures/crap4rs-self.lcov
[INFO] [stdout]   hint: ensure tests ran with coverage enabled (`cargo llvm-cov --lcov`)
[INFO] [stdout] 
[INFO] [stdout] stack backtrace:
[INFO] [stdout]    0:     0x64adcff45661 - <<std[70759c8f55707aa4]::sys::backtrace::BacktraceLock>::print::DisplayBacktrace as core[df12db4294e9bfd3]::fmt::Display>::fmt
[INFO] [stdout]    1:     0x64adcff5a80a - core[df12db4294e9bfd3]::fmt::write
[INFO] [stdout]    2:     0x64adcff49f9c - <alloc[2182bb758b4b3781]::vec::Vec<u8> as core[df12db4294e9bfd3]::io::write::Write>::write_fmt
[INFO] [stdout]    3:     0x64adcff1fe26 - std[70759c8f55707aa4]::panicking::default_hook::{closure#0}
[INFO] [stdout]    4:     0x64adcff3d369 - std[70759c8f55707aa4]::panicking::default_hook
[INFO] [stdout]    5:     0x64adcfecfe10 - test[9d35eded1c95d3be]::test_main_inner::<test[9d35eded1c95d3be]::test_main_static::{closure#0}>::{closure#0}
[INFO] [stdout]    6:     0x64adcff3d522 - std[70759c8f55707aa4]::panicking::panic_with_hook
[INFO] [stdout]    7:     0x64adcff1fed2 - std[70759c8f55707aa4]::panicking::panic_handler::{closure#0}
[INFO] [stdout]    8:     0x64adcff18b39 - std[70759c8f55707aa4]::sys::backtrace::__rust_end_short_backtrace::<std[70759c8f55707aa4]::panicking::panic_handler::{closure#0}, !>
[INFO] [stdout]    9:     0x64adcff20acd - __rustc[8fa7c3cbc660c2b3]::rust_begin_unwind
[INFO] [stdout]   10:     0x64adcff5af3c - core[df12db4294e9bfd3]::panicking::panic_fmt
[INFO] [stdout]   11:     0x64adcfec165f - <metric_unsupported_smoke[93e644103e521178]::crap4rs_no_flag_default_cognitive_still_works::{closure#0} as core[df12db4294e9bfd3]::ops::function::FnOnce<()>>::call_once
[INFO] [stdout]   12:     0x64adcfec30fb - test[9d35eded1c95d3be]::__rust_begin_short_backtrace::<core[df12db4294e9bfd3]::result::Result<(), alloc[2182bb758b4b3781]::string::String>, fn() -> core[df12db4294e9bfd3]::result::Result<(), alloc[2182bb758b4b3781]::string::String>>
[INFO] [stdout]   13:     0x64adcfed0765 - test[9d35eded1c95d3be]::run_test::{closure#0}
[INFO] [stdout]   14:     0x64adcfeca024 - std[70759c8f55707aa4]::sys::backtrace::__rust_begin_short_backtrace::<test[9d35eded1c95d3be]::run_test::{closure#1}, ()>
[INFO] [stdout]   15:     0x64adcfed38c2 - <std[70759c8f55707aa4]::thread::lifecycle::spawn_unchecked<test[9d35eded1c95d3be]::run_test::{closure#1}, ()>::{closure#1} as core[df12db4294e9bfd3]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
[INFO] [stdout]   16:     0x64adcff44d49 - <std[70759c8f55707aa4]::sys::thread::unix::Thread>::new::thread_start
[INFO] [stdout]   17:     0x729f2d82cdfa - <unknown>
[INFO] [stdout]   18:     0x729f2d8c03d4 - clone
[INFO] [stdout]   19:                0x0 - <unknown>
[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.04s
[INFO] [stdout] 
[INFO] [stderr] error: test failed, to rerun pass `--test metric_unsupported_smoke`
[INFO] running `Command { std: "docker" "inspect" "dd7bb3bbb9973cbb287661d9bdb2e0d03842943d8379ead3ad09d24b2453639a", kill_on_drop: false }`
[INFO] running `Command { std: "docker" "rm" "-f" "dd7bb3bbb9973cbb287661d9bdb2e0d03842943d8379ead3ad09d24b2453639a", kill_on_drop: false }`
[INFO] [stdout] dd7bb3bbb9973cbb287661d9bdb2e0d03842943d8379ead3ad09d24b2453639a
