Public report of pydantic/monty, published 27 October 2026. It has the same score, grades and number of findings as the full report. The details of security findings (where they are in the code, which known vulnerabilities and which passwords or keys were found) are left out, so nobody can use them against the project.
Public
Executive report Measured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.10.5). Assert signed this survey and filed it in the standard's public register, where anyone can look it up by its survey ID. Check this survey → Signed and filed in the standard's public register, 27 October 2026, 10:46 UTC · Survey ID cd_eafa4985562049c2958780a9419a29be

pydantic/monty

Measured 27 October 2026, 10:28 UTC, at code version 4dd8e3a

Regression: 1 dimension fell since the last survey Code coverage: not measured

A regression is a drop of 0.5 points or more in the score, or of 2.5 or more out of 10 in a dimension, since the last survey.

Code coverage is not measured: JavaScript/TypeScript suite (CouldNotMeasureNoCollector).

CAI score 59out of 100 At risk Down 3 since the last survey

The score is built from these lenses. Each lens grades one area of the code, such as how easy it is to change or how well it is protected. The weakest lens counts most, so one weak area pulls the score down instead of being averaged away.

A large codebase: 238,023 lines of product code in 20 projects, tests not counted · Estimated rebuild effort: about 2.2 person-years · Weakest lens: Security and Compliance, 51

Findings by how serious they are

28 critical 788 serious 627 minor

15 dimensions are left out of the score. For each one, Watchdog either couldn't measure it in this code, or found no evidence of the safeguard it looks for, such as a tested backup restore. They count neither for nor against the score, and Limitations lists each one with its reason.

This survey was produced by

Watchdog
Producer
Canine Development
Analyzer
Watchdog engine 1.0.0
Measured
27 October 2026, 10:28 UTC

A measurement, not a certificate. The Code Assurance Index records a number together with the evidence it was worked out from, so anyone can recalculate it, but it doesn't certify or guarantee the code. The standard was written by Canine Development, which also builds Watchdog. It is open to any tool that implements it, and today Watchdog is the only one that does.

A critical security finding is open, such as a library with a known critical vulnerability or a password or key found in the code. The score itself is unchanged, but its band shows At risk until the finding is fixed. See the Security and Compliance lens.

The score is deterministic, which means the same code always gets the same score. Watchdog works it out with tools that follow published rules, and an AI model never decides it, so anyone who applies the same rules to the same code gets the same number. How it is done is explained under Methodology ▸

75of 75 dimensions measured by tools.
1399of 1443 findings point to an exact file and line, so you can open each one in the code. The other 44 concern the repository as a whole, such as missing documentation.
75dimensions across 6 lenses, read from 238,023 lines of product code in 20 projects.
Chapters

Executive summary

pydantic/monty is rated At risk because critical security findings are open. Its score is held back because it has packages with a known security hole and places where the code runs text as code or as a command. It scores 59 out of 100, which the At risk rating leaves unchanged.

Security and Compliance, at 51, is the weakest lens and counts most in the score. The best first steps are fixing the runtime or framework that no longer gets security updates and fixing the password or key in the code, each worth about 3 points. Raising Security and Compliance to 70 would lift the score to about 65.

Nine known security holes in the packages the code depends on can be used by attackers. Nine places in the code run text as code, which an attacker could use, and four pipeline steps install packages that can change without warning. Updating the vulnerable packages, replacing text run as code with direct calls and pinning what the pipeline installs would close these risks. The two pieces of product code that depend on test code need their reference to the test project removed.

The product code is 238,023 lines, about €320,000 to rebuild.

A lens is capped at Adequate while one of its dimensions scores below 4 out of 10, however well the rest of the lens does. That way a serious problem in one place always shows in the lens's rating.

How the score is built: what each lens counts for The lenses don't count equally. The weakest lens counts most, the next weakest a little less, and so on, so a weak area pulls the score down instead of being averaged away. In the bar below, each part's width shows how much that lens counts and its colour shows its rating. Improving the widest part moves the score most, and as that lens improves, it counts for less, because another lens becomes the weakest.
Security and Compliance 51 · counts for 46%Production Readiness 61 · counts for 25%Maturity 64 · counts for 14%Code Health 68 · counts for 8%Architecture 83 · counts for 4%Performance 94 · counts for 2%

If Security and Compliance rose from 51 to 70, the lowest score rated Strong, the score would rise from 59 to about 65.

Code composition: what the lines of code are
Product code 78%Tests 22%
New since the last survey: 144 findings

These 144 critical or serious findings weren't in the previous survey, on 13 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.

  • Cyclomatic Complexity · Type::call_native (cyclomatic 39) crates/monty/src/types/type.rs
  • Cyclomatic Complexity · Parser::process_char (cyclomatic 32) crates/monty/src/types/csv/reader.rs
  • Cyclomatic Complexity · Decimal::pow (cyclomatic 22) crates/monty/src/types/decimal/pow.rs
  • Cyclomatic Complexity · Decimal::power_exact (cyclomatic 22) crates/monty/src/types/decimal/pow.rs
  • Cyclomatic Complexity · FormatSpec::parse (cyclomatic 20) crates/monty/src/types/decimal/format.rs
  • Cyclomatic Complexity · Decimal::format_spec (cyclomatic 20) crates/monty/src/types/decimal/format.rs
  • Cyclomatic Complexity · Decimal::fix (cyclomatic 20) crates/monty/src/types/decimal/mod.rs
  • Cyclomatic Complexity · ParsedFormatSpec::to_spec_string (cyclomatic 19) crates/monty/src/fstring.rs
  • Cyclomatic Complexity · Decimal::quantize (cyclomatic 19) crates/monty/src/types/decimal/methods.rs
  • Cyclomatic Complexity · AbstractOS.path_scan (cyclomatic 19) crates/monty-python/python/pydantic_monty/os_access.py
  • Cyclomatic Complexity · Decimal::add (cyclomatic 18) crates/monty/src/types/decimal/arith.rs
  • Cyclomatic Complexity · Decimal::exp (cyclomatic 16) crates/monty/src/types/decimal/trans.rs
  • Cyclomatic Complexity · monty::modules::tomllib::parser::parse_value (cyclomatic 16) crates/monty/src/modules/tomllib/parser.rs
  • Cyclomatic Complexity · monty::types::csv::dict::reader_next (cyclomatic 16) crates/monty/src/types/csv/dict.rs
  • Cyclomatic Complexity · monty::types::decimal::round_direction (cyclomatic 16) crates/monty/src/types/decimal/mod.rs
  • Cyclomatic Complexity · monty::types::decimal::py::from_tuple (cyclomatic 16) crates/monty/src/types/decimal/py.rs
  • Cognitive Complexity · Decimal::pow (cognitive 38) crates/monty/src/types/decimal/pow.rs
  • Cognitive Complexity · Decimal::power_exact (cognitive 38) crates/monty/src/types/decimal/pow.rs
  • Cognitive Complexity · Decimal::fix (cognitive 32) crates/monty/src/types/decimal/mod.rs
  • Cognitive Complexity · GlobSelector::select_recursive (cognitive 32) crates/monty-types/src/scan.rs
  • Cognitive Complexity · AbstractOS.path_scan (cognitive 32) crates/monty-python/python/pydantic_monty/os_access.py
  • Cognitive Complexity · Decimal::format_spec (cognitive 25) crates/monty/src/types/decimal/format.rs
  • Cognitive Complexity · WalkIterator::step (cognitive 25) crates/monty/src/types/dir_scan.rs
  • Cognitive Complexity · monty::types::csv::reader::next_fields (cognitive 25) crates/monty/src/types/csv/reader.rs
  • Cognitive Complexity · monty::types::csv::writer::append_field_data (cognitive 25) crates/monty/src/types/csv/writer.rs
  • Cognitive Complexity · Parser::process_char (cognitive 24) crates/monty/src/types/csv/reader.rs
  • Cognitive Complexity · Decimal::add (cognitive 24) crates/monty/src/types/decimal/arith.rs
  • Cognitive Complexity · Decimal::quantize (cognitive 24) crates/monty/src/types/decimal/methods.rs
  • Cognitive Complexity · MultiPattern::matches (cognitive 24) crates/monty-types/src/scan.rs
  • Cognitive Complexity · FormatSpec::parse (cognitive 23) crates/monty/src/types/decimal/format.rs
  • Cognitive Complexity · monty::types::csv::dict::reader_next (cognitive 23) crates/monty/src/types/csv/dict.rs
  • Cognitive Complexity · GlobSelector::run (cognitive 23) crates/monty-types/src/scan.rs
  • Cognitive Complexity · monty::types::dir_scan::walk_step (cognitive 22) crates/monty/src/types/dir_scan.rs
  • Cognitive Complexity · Decimal::div (cognitive 21) crates/monty/src/types/decimal/arith.rs
  • Cognitive Complexity · Decimal::sqrt (cognitive 21) crates/monty/src/types/decimal/trans.rs
  • Cognitive Complexity · Decimal::exp (cognitive 21) crates/monty/src/types/decimal/trans.rs
  • Cognitive Complexity · monty::modules::tomllib::parser::parse_number (cognitive 21) crates/monty/src/modules/tomllib/parser.rs
  • Cognitive Complexity · monty::types::decimal::round_direction (cognitive 21) crates/monty/src/types/decimal/mod.rs
  • Cognitive Complexity · ParsedFormatSpec::to_spec_string (cognitive 20) crates/monty/src/fstring.rs
  • Cognitive Complexity · HeapReadMut::setitem_slice (cognitive 19) crates/monty/src/types/list.rs
  • Cognitive Complexity · Decimal::mul (cognitive 19) crates/monty/src/types/decimal/arith.rs
  • Cognitive Complexity · monty::modules::tomllib::value::table_into_value (cognitive 19) crates/monty/src/modules/tomllib/value.rs
  • Cognitive Complexity · monty::types::decimal::format::format_number (cognitive 19) crates/monty/src/types/decimal/format.rs
  • Cognitive Complexity · monty_fs::overlay::scan_list (cognitive 19) crates/monty-fs/src/overlay.rs
  • Cognitive Complexity · Decimal::fma (cognitive 18) crates/monty/src/types/decimal/arith.rs
  • Cognitive Complexity · Decimal::pick (cognitive 17) crates/monty/src/types/decimal/cmp.rs
  • Cognitive Complexity · Decimal::to_sci_string (cognitive 17) crates/monty/src/types/decimal/mod.rs
  • Cognitive Complexity · ScanEffect::apply (cognitive 17) crates/monty/src/types/dir_scan.rs
  • Cognitive Complexity · monty::modules::tomllib::parser::parse (cognitive 17) crates/monty/src/modules/tomllib/parser.rs
  • Cognitive Complexity · monty::modules::tomllib::parser::parse_value (cognitive 17) crates/monty/src/modules/tomllib/parser.rs
  • Cognitive Complexity · monty::modules::tomllib::parser::match_datetime (cognitive 17) crates/monty/src/modules/tomllib/parser.rs
  • Cognitive Complexity · monty::types::decimal::py::hash_decimal (cognitive 17) crates/monty/src/types/decimal/py.rs
  • Cognitive Complexity · monty_types::scan::compile_step (cognitive 17) crates/monty-types/src/scan.rs
  • Cognitive Complexity · HeapRead::compare_operand (cognitive 16) crates/monty/src/types/set.rs
  • Cognitive Complexity · Decimal::number_class (cognitive 16) crates/monty/src/types/decimal/methods.rs
  • Cognitive Complexity · monty::modules::bisect::search (cognitive 16) crates/monty/src/modules/bisect.rs
  • Cognitive Complexity · monty::types::numeric::round_int (cognitive 16) crates/monty/src/types/numeric.rs
  • Cognitive Complexity · monty::types::str::str_splitlines (cognitive 16) crates/monty/src/types/str.rs
  • Cognitive Complexity · monty_runtime::run::run_script (cognitive 16) crates/monty-runtime/src/run.rs
  • God Classes · TooManyMethods: Decimal crates/monty/src/types/decimal/mod.rs
  • God Classes · FileTooLong: decimal/py.rs crates/monty/src/types/decimal/py.rs
  • God Classes · TooManyMethods: HeapObjectRead crates/monty/src/heap/mod.rs
  • God Classes · FileTooLong: tomllib/parser.rs crates/monty/src/modules/tomllib/parser.rs
  • God Classes · FileTooLong: src/scan.rs crates/monty-types/src/scan.rs
  • God Classes · FileTooLong: types/dir_scan.rs crates/monty/src/types/dir_scan.rs
  • God Classes · FileTooLong: decimal/py_context.rs crates/monty/src/types/decimal/py_context.rs
  • God Classes · TooManyMethods: HeapReadMut crates/monty/src/heap/mod.rs
  • God Classes · TooManyMethods: Coeff crates/monty/src/types/decimal/coeff.rs
  • God Classes · FileTooLong: json/dump.rs crates/monty/src/modules/json/dump.rs
  • God Classes · FunctionTooLong: monty_pool::telemetry::tracing::os_call_span crates/monty-pool/src/telemetry/tracing.rs
  • God Classes · MethodTooLong: MontyType.from_internal_static crates/monty/src/object_bridge.rs
  • God Classes · FileTooLong: types/instance.rs crates/monty/src/types/instance.rs
  • God Classes · MethodTooLong: Opcode.stack_effect crates/monty/src/bytecode/op.rs
  • God Classes · TooManyMethods: AbstractOS crates/monty-python/python/pydantic_monty/os_access.py
  • God Classes · TooManyMethods: Prepare crates/monty/src/prepare.rs
  • God Classes · FunctionTooLong: monty_js::pool::turn_to_js crates/monty-js/src/pool.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/monty/src/run_progress.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/monty/src/types/bytes.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/monty/src/types/set.rs
  • Code Duplication · Duplicated block (14 lines × 2) crates/monty/src/bytecode/vm/call.rs
  • Code Duplication · Duplicated block (13 lines × 2) crates/monty/src/types/decimal/arith.rs
  • Code Duplication · Duplicated block (11 lines × 2) crates/monty/src/types/set.rs
  • Code Duplication · Duplicated block (9 lines × 3) crates/monty/src/builtins/bin.rs
  • Code Duplication · Duplicated block (9 lines × 2) crates/monty/src/bytecode/vm/pattern.rs
  • Code Duplication · Duplicated block (9 lines × 2) crates/monty/src/types/decimal/trans.rs
  • Code Duplication · Duplicated block (9 lines × 2) crates/monty/src/types/set.rs
  • Code Duplication · Duplicated block (8 lines × 2) crates/monty-proto/src/python/exceptions.rs
  • Code Duplication · Duplicated block (8 lines × 2) crates/monty/src/types/decimal/mod.rs
  • Code Duplication · Duplicated block (7 lines × 2) crates/monty/src/types/dict.rs
  • Code Duplication · Duplicated block (6 lines × 2) crates/monty/src/types/decimal/py.rs
  • Code Duplication · Duplicated block (5 lines × 3) crates/monty/src/types/long_int/arithmetic.rs
  • Code Duplication · Duplicated block (5 lines × 2) crates/monty/src/builtins/any.rs
  • Code Duplication · Duplicated block (5 lines × 2) crates/monty/src/types/decimal/arith.rs
  • Code Duplication · Duplicated block (5 lines × 2) crates/monty/src/types/decimal/methods.rs
  • Code Duplication · Duplicated block (5 lines × 2) crates/monty/src/types/long_int.rs
  • Code Duplication · Duplicated block (5 lines × 2) crates/monty/src/types/long_int/arithmetic.rs
  • Code Duplication · Duplicated block (7 lines × 2) crates/monty-types/src/scan.rs
  • Code Duplication · Duplicated block (7 lines × 2) crates/monty/src/types/bytes.rs
  • Code Duplication · Duplicated block (6 lines × 2) crates/monty/src/types/bytes.rs
  • Code Duplication · Duplicated block (6 lines × 2) crates/monty/src/types/bytes.rs

Watchdog compares every finding with the previous survey's. A finding that has only moved to another line in the same file counts as the same finding, so only new findings appear here. Advisory notes from the AI model are left out, because the model words them afresh in every survey.

Fixed since the last survey: 51 findings

These 51 critical or serious findings were in the previous survey, on 13 October 2026, and are gone from this one.

  • Cyclomatic Complexity · Type::call (cyclomatic 41) crates/monty/src/types/type.rs
  • Cyclomatic Complexity · Value::py_floordiv_impl (cyclomatic 23) crates/monty/src/value.rs
  • Cyclomatic Complexity · Value::py_truediv_impl (cyclomatic 22) crates/monty/src/value.rs
  • Cyclomatic Complexity · Value::py_pow_impl (cyclomatic 22) crates/monty/src/value.rs
  • Cyclomatic Complexity · monty::builtins::round::builtin_round (cyclomatic 19) crates/monty/src/builtins/round.rs
  • Cyclomatic Complexity · Encoder::serialize_value (cyclomatic 16) crates/monty/src/modules/json/dump.rs
  • Cognitive Complexity · Value::py_pow_impl (cognitive 40) crates/monty/src/value.rs
  • Cognitive Complexity · monty::builtins::round::builtin_round (cognitive 39) crates/monty/src/builtins/round.rs
  • Cognitive Complexity · Value::py_floordiv_impl (cognitive 34) crates/monty/src/value.rs
  • Cognitive Complexity · Value::py_truediv_impl (cognitive 30) crates/monty/src/value.rs
  • Cognitive Complexity · monty_fs::overlay::iterdir (cognitive 19) crates/monty-fs/src/overlay.rs
  • Cognitive Complexity · VM::instantiate_class (cognitive 16) crates/monty/src/bytecode/vm/call.rs
  • God Classes · ClassTooLong: StaticStrings crates/monty/src/intern.rs
  • God Classes · FileTooLong: src/intern.rs crates/monty/src/intern.rs
  • God Classes · FileTooLong: dataclasses/mod.rs crates/monty/src/modules/dataclasses/mod.rs
  • God Classes · FunctionTooLong: monty::fstring::format_with_spec crates/monty/src/fstring.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/monty/src/run_progress.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/monty/src/types/bytes.rs
  • Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) crates/monty/src/types/set.rs
  • Code Duplication · Duplicated block (33–35 lines × 2) crates/monty/src/types/bytes.rs
  • Code Duplication · Duplicated block (13 lines × 2) crates/monty/src/bytecode/vm/call.rs
  • Code Duplication · Duplicated block (10 lines × 2) crates/monty/src/modules/math.rs
  • Code Duplication · Duplicated block (8 lines × 2) crates/monty/src/types/long_int.rs
  • Code Duplication · Duplicated block (8 lines × 2) crates/monty/src/types/set.rs
  • Code Duplication · Duplicated block (8 lines × 2) crates/monty/src/value.rs
  • Code Duplication · Duplicated block (7 lines × 2) crates/monty/src/bytecode/vm/mod.rs
  • Code Duplication · Duplicated block (7 lines × 2) crates/monty/src/modules/json/dump.rs
  • Code Duplication · Duplicated block (7 lines × 2) crates/monty/src/modules/math.rs
  • Code Duplication · Duplicated block (7 lines × 2) crates/monty/src/types/dict.rs
  • Code Duplication · Duplicated block (6 lines × 2) crates/monty/src/types/bytes.rs
  • Code Duplication · Duplicated block (7 lines × 2) crates/monty/src/bytecode/vm/mod.rs
  • Code Duplication · Duplicated block (7 lines × 3) crates/monty/src/modules/math.rs
  • Code Duplication · Duplicated block (5 lines × 2) crates/monty/src/types/long_int.rs
  • Cohesion (LCOM4) · Low cohesion: VM (LCOM4 8) crates/monty/src/bytecode/vm/mod.rs
  • Churn × Complexity Hotspots · Hotspot: crates/monty/src/modules/math.rs crates/monty/src/modules/math.rs
  • Churn × Complexity Hotspots · Hotspot: crates/monty/src/types/long_int.rs crates/monty/src/types/long_int.rs
  • Churn × Complexity Hotspots · Hotspot: crates/monty-macros/src/from_args.rs crates/monty-macros/src/from_args.rs
  • Churn × Complexity Hotspots · Hotspot: crates/monty/src/builtins/round.rs crates/monty/src/builtins/round.rs
  • Churn × Complexity Hotspots · Hotspot: crates/monty/src/identity.rs crates/monty/src/identity.rs
  • Churn × Complexity Hotspots · Hotspot: crates/monty/src/builtins/open.rs crates/monty/src/builtins/open.rs
  • Churn × Complexity Hotspots · Hotspot: crates/monty/src/bytecode/builder.rs crates/monty/src/bytecode/builder.rs
  • Churn × Complexity Hotspots · Hotspot: crates/monty-types/src/file_mode.rs crates/monty-types/src/file_mode.rs
  • Churn × Complexity Hotspots · Repeated repair: crates/monty/test_cases/set__ops.py crates/monty/test_cases/set__ops.py
  • Explicit Debt · TodoComment crates/monty/src/modules/dataclasses/mod.rs
  • Static Analysis (SAST) · High: REDACTED REDACTED
  • Dependency Vulnerabilities · Medium CVE: REDACTED REDACTED
  • Code Duplication · Duplicated block (11 lines × 2 locations) crates/monty-js/ts/pool.ts
  • Cyclomatic Complexity · Complex function checkout (cyclomatic 11, cognitive 10) crates/monty-js/ts/pool.ts
  • Large Files · crates/monty-js/ts/session.ts: 1446 lines of code crates/monty-js/ts/session.ts
  • Large Files · crates/monty-js/ts/worker/transport.ts: 689 lines of code crates/monty-js/ts/worker/transport.ts
  • Large Files · crates/monty-js/ts/worker/value.ts: 598 lines of code crates/monty-js/ts/worker/value.ts
Rebuild cost: about €320,000 · Estimate
Cost to rebuild€110,000 to €540,000, for 1,791 to 5,681 hours of work, about 2.2 person-years for 1 to 5 engineers
Difficulty of the problemStandard, judged from the kind of software and how it is built. Code that solves a harder problem, such as payments or medical bookings, costs more per line to write.
Quality factor×0.8 at a score of 59. Better code takes more work to write, so the factor is ×1.0 at a score of 70, lower below it and higher above it.
SizeLarge: 238,023 lines of product code
What it is notNot a quotation: nobody has offered to build it for that. Not a valuation: it says nothing about what the business is worth. Not a certified figure: no professional has signed it as one.

How the estimate is made: Watchdog prices the hours a team would need to write this code again, at €60 to €95 an hour. Declarations and boilerplate are priced at a fast rate and logic at a slower one, and the logic is then multiplied by the difficulty of the problem and by the quality factor. The estimate can be about 30% off either way, and it moves most with the hourly rate and the difficulty. For this code, every line is priced as straight logic, which keeps the estimate on the low side.

Top priorities

The three actions that raise the score most for the work they take. The full ranked list is in the Roadmap.

1
Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life — start with package.json.
Raises the score by about 3 points · Low effort · Platform End-of-Life
2
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED.
Raises the score by about 3 points · Low effort · Secret Scanning
3
Resolve the 1 No ADRs found finding(s) in ADR Quality.
Raises the score by about 2 points · Low effort · ADR Quality

Diagnosis: what the measurements show together

Each conclusion below combines several dimensions into one point that no single dimension shows, and lists the measurements it rests on.

Where the investment is most exposed · Value at risk
This code would cost about €320,000 to build again, about 2.2 person-years of work. Its weakest lens is Security and Compliance, at 51 (Adequate). Security and Compliance is about how well the product is protected, and how it handles personal data. Because the weakest lens counts most in the score, work on Security and Compliance also moves the score most.
Based on: the rebuild estimate · the Security and Compliance grade · how much each lens counts
What to do: Start with the Security and Compliance actions in Top priorities.
If you do one thing first · First action
Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life. Of all the actions in this report, it raises the score most for the work it takes: about 3 points for low effort, because it clears the 1 Platform End-of-Life findings. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort

Architecture — module dependency graph

Project dependencies, layered top-to-bottom; arrows show direction. Any dashed red edge points upward or sideways, which only happens where the projects form a dependency cycle. A graph without cycles has none.

arch @pydantic/monty monty monty monty monty-macros monty-macros monty->monty-macros monty-types monty-types monty->monty-types monty-alloc monty-alloc monty-alloc->monty-types monty-apidoc monty-apidoc monty-bench monty-bench monty-bench->monty monty-bench->monty-alloc monty-fs monty-fs monty-bench->monty-fs monty-pool monty-pool monty-bench->monty-pool monty-proto monty-proto monty-bench->monty-proto monty-bench->monty-types monty-datatest monty-datatest monty-datatest->monty monty-datatest->monty-fs monty-datatest->monty-pool monty-datatest->monty-types monty-doctest monty-doctest monty-fs->monty-types monty-js monty-js monty-js->monty-pool monty-js->monty-types monty-pool->monty-fs monty-pool->monty-proto monty-pool->monty-types monty-proto->monty monty-type-checking monty-type-checking monty-proto->monty-type-checking monty-proto->monty-types monty-runtime monty-runtime monty-runtime->monty monty-runtime->monty-alloc monty-runtime->monty-fs monty-runtime->monty-proto monty-runtime->monty-type-checking monty-runtime->monty-types monty-type-checking->monty-types monty-typeshed monty-typeshed monty-type-checking->monty-typeshed monty-types->monty-macros monty-wasm-runtime monty-wasm-runtime monty-wasm-runtime->monty-alloc monty-wasm-runtime->monty-proto monty-wasm-runtime->monty-types pydantic-monty pydantic-monty pydantic-monty-client (Python) pydantic-monty-client (Python) pydantic-monty->pydantic-monty-client (Python) pydantic-monty-client (Cargo) pydantic-monty-client (Cargo) pydantic-monty-client (Cargo)->monty-fs pydantic-monty-client (Cargo)->monty-pool pydantic-monty-client (Cargo)->monty-proto pydantic-monty-client (Cargo)->monty-types

Architecture: which parts of the code depend on which

The code is divided into modules, groups of code that each handle one part of the product, and a module depends on another when it uses code from it. The table lists the modules both down the side and across the top, in an order where each module should only use modules listed above it. A number in a cell means the module on that row uses the module in that column, and it counts the pairs of building blocks (types) that connect them. The one thing to look for is a mark above the diagonal line. It means two or more modules use each other in a loop (a dependency cycle), so none of them can be changed, tested or released on its own.

402 modules, with 1559 dependencies between them. 3 loops run through 98 of the modules, marked above the diagonal.

The table shows the 40 modules with the most connections; 362 more are left out to keep it readable.

Which modules use which. The module on each row uses the module in each column, and the number counts the pairs of types that connect them. A cell above the diagonal is part of a loop.
uses →1 monty_proto.budget_vec2 monty_types.uuid3 monty.heap_traits4 monty.intern5 monty_types.exceptions6 monty_types.graph7 monty_types.resource8 monty.parse9 monty.types.type10 monty.expressions11 monty.heap_data12 monty_types.object13 monty.types.datetime14 monty.types.lru_cache15 monty.types.py_trait16 monty_proto.wire17 monty_types.os18 monty_proto.generated.monty.v119 monty.args.from_value20 monty.types.decimal21 monty_js.convert22 monty.types.decimal.context23 monty.value24 monty.percent_format25 monty.run26 monty.fstring27 monty.exception_private28 monty.types.dict29 monty.heap30 monty.bytecode.vm.call31 monty.bytecode.vm32 monty.args33 monty.run_progress34 monty.args.bind_native35 monty.bytecode.compiler36 monty.repl37 monty.types.dir_scan38 monty.types.path39 monty_pool.checkout40 pydantic_monty_client.pool
1 monty_proto.budget_vec
2 monty_types.uuid
3 monty.heap_traits2
4 monty.intern1
5 monty_types.exceptions12111
6 monty_types.graph11121
7 monty_types.resource2
8 monty.parse51912
9 monty.types.type242222
10 monty.expressions44
11 monty.heap_data331311011
12 monty_types.object11811711
13 monty.types.datetime111111171511
14 monty.types.lru_cache2162522
15 monty.types.py_trait114221
16 monty_proto.wire32418117
17 monty_types.os11422
18 monty_proto.generated.monty.v11261
19 monty.args.from_value11414
20 monty.types.decimal111253
21 monty_js.convert11794
22 monty.types.decimal.context121113
23 monty.value152132153
24 monty.percent_format22162435
25 monty.run324412
26 monty.fstring111111
27 monty.exception_private1461311321311
28 monty.types.dict82141011865
29 monty.heap23213346210512244
30 monty.bytecode.vm.call121121
31 monty.bytecode.vm2921111112313611
32 monty.args42323122
33 monty.run_progress316411163235
34 monty.args.bind_native222314
35 monty.bytecode.compiler224141212
36 monty.repl2171221625242
37 monty.types.dir_scan1121113335121
38 monty.types.path12145522
39 monty_pool.checkout1821
40 pydantic_monty_client.pool111277
Uses a module listed above itPart of a loopThe module itself
1 monty_proto.budget_vec2 monty_types.uuid3 monty.heap_traits4 monty.intern5 monty_types.exceptions6 monty_types.graph7 monty_types.resource8 monty.parse9 monty.types.type10 monty.expressions11 monty.heap_data12 monty_types.object13 monty.types.datetime14 monty.types.lru_cache15 monty.types.py_trait16 monty_proto.wire17 monty_types.os18 monty_proto.generated.monty.v119 monty.args.from_value20 monty.types.decimal21 monty_js.convert22 monty.types.decimal.context23 monty.value24 monty.percent_format25 monty.run26 monty.fstring27 monty.exception_private28 monty.types.dict29 monty.heap30 monty.bytecode.vm.call31 monty.bytecode.vm32 monty.args33 monty.run_progress34 monty.args.bind_native35 monty.bytecode.compiler36 monty.repl37 monty.types.dir_scan38 monty.types.path39 monty_pool.checkout40 pydantic_monty_client.poolmonty_proto.budget_vec1monty_types.uuid2monty.heap_traits3monty.intern4monty_types.exceptions5monty_types.graph6monty_types.resource7monty.parse8monty.types.type9monty.expressions10monty.heap_data11monty_types.object12monty.types.datetime13monty.types.lru_cache14monty.types.py_trait15monty_proto.wire16monty_types.os17monty_proto.generated.monty.v118monty.args.from_value19monty.types.decimal20monty_js.convert21monty.types.decimal.context22monty.value23monty.percent_format24monty.run25monty.fstring26monty.exception_private27monty.types.dict28monty.heap29monty.bytecode.vm.call30monty.bytecode.vm31monty.args32monty.run_progress33monty.args.bind_native34monty.bytecode.compiler35monty.repl36monty.types.dir_scan37monty.types.path38monty_pool.checkout39pydantic_monty_client.pool4021121111112125191224222244331311011118117111111111715112162522114221324181171142212611141411125311794121113152132153221624353244121111111461311321311821410118652321334621051224412112129211111123136114232312231641116323522231422414121221712216252421121113335121121455221821111277+362 more modules (most-connected shown)

At a glance — Code Health · 68% · Adequate ·

At a glance — Architecture · 83% · Strong ·

At a glance — Maturity · 64% · Adequate · gated by M2 ·

At a glance — Readiness · 61% · Adequate · gated by P5 ·

At a glance — Security · 51% · Adequate · gated by D29, D30 ·

At a glance — Performance · 94% · Exemplary ·

Security & Compliance — OWASP Top-10 mapping

Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).

OWASP categoryFindingsSeverity
A03:2025 — Software Supply Chain Failures37High / Critical
A05:2025 — Injection33High / Critical
A07:2025 — Authentication Failures3High / Critical

Roadmap

Begin by addressing the platform end-of-life risk in package.json and the leaked secret in REDACTED to secure the immediate runtime and credential environment. Next, remediate the ten medium-severity dependency vulnerabilities identified in REDACTED to strengthen supply chain integrity. Finally, establish architectural governance by documenting significant design decisions in a dedicated ADR folder to ensure long-term clarity and maintainability.

Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.

Do thisHelpsEffortDimension
Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life — start with package.json.+3.1 ptsLowPlatform End-of-Life
Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED.+2.6 ptsLowSecret Scanning
Resolve the 1 No ADRs found finding(s) in ADR Quality.+2.3 ptsLowADR Quality
Resolve the 2 Assertions commented out finding(s) in Test Quality — start with exceptions.spec.ts (2).+1.6 ptsLowTest Quality
Resolve the 1 High secret finding(s) in Secrets (history) — start with REDACTED.+1.5 ptsLowSecrets (history)
Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3).+1.5 ptsLowStatic Analysis (SAST)
Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (4).+1.5 ptsLowStatic Analysis (SAST)
Resolve the 6 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (4), REDACTED (2).+1.5 ptsLowStatic Analysis (SAST)

File quality

Per-file score 0–10 — a quality signature. Of 202 files carrying findings, judged against the Production bar: 0% slop · 56% mixed · 44% near-clean.

FileScoreBandWorst signal
REDACTED0.0SlopSecret Scanning: Leaked secret: REDACTED
REDACTED4.6MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): High: REDACTED
REDACTED4.8MixedStatic Analysis (SAST): Medium: REDACTED
crates/monty/src/heap/mod.rs5.5MixedCyclomatic Complexity: monty::heap::for_each_child_id (cyclomatic 121)
crates/monty/src/types/bytes.rs5.5MixedCognitive Complexity: monty::types::bytes::bytes_hex (cognitive 32)
crates/monty/src/types/str.rs5.5MixedCognitive Complexity: monty::types::str::str_expandtabs (cognitive 17)
crates/monty/src/types/list.rs5.5MixedCognitive Complexity: HeapReadMut::setitem_slice (cognitive 19)
crates/monty-types/src/object.rs5.5MixedCyclomatic Complexity: ObjectRef::leaf_repr_fmt (cyclomatic 48)
REDACTED5.8MixedDependency Vulnerabilities: Medium CVE: REDACTED
REDACTED5.8MixedStatic Analysis (SAST): Medium: REDACTED
crates/monty/src/bytecode/vm/mod.rs6.0MixedExplicit Debt: TodoComment
crates/monty/src/parse.rs6.0MixedExplicit Debt: TodoComment
crates/monty/src/prepare.rs6.0MixedExplicit Debt: TodoComment
crates/monty/src/object_bridge.rs6.0MixedExplicit Debt: TodoComment
crates/monty/src/args/bind_native.rs6.0MixedExplicit Debt: TodoComment
crates/monty/src/types/re_pattern.rs6.0MixedExplicit Debt: TodoComment
crates/monty/src/bytecode/vm/async_exec.rs6.0MixedExplicit Debt: TodoComment
crates/monty-js/__test__/exceptions.spec.ts6.0MixedTest Quality: Assertions commented out: assertion error

How the grades work

Every finding carries one of four grades. Three say how serious it is. The fourth says this survey could not settle it — and it is a grade, not a gap.

Critical — 28

A definite problem that already costs you something and drags the score down: a missing authorisation check, a dependency with a known exploit, a build that does not reproduce. Failure here tends to cause failures elsewhere.

Serious — 788

Likely wrong, but not failing yet. It degrades the codebase over a longer horizon and can cause failures elsewhere — not urgent this week, not something to carry for two years either.

Minor — 627

Recorded, with no effect on how the codebase functions. Present so the survey is complete, not because it needs doing.

Could not be resolved — 15

Something this survey could not settle from the outside, and which could be critical or serious. Either a control was required and no positive evidence of it exists in the repository — a backup job that nothing shows was ever restored from proves nothing about restores — or our own analysis could not run over that part of the tree. This is not a clean result. These are excluded from the score rather than awarded a pass, so the number on the cover neither rewards nor penalises them: if you act on this survey without resolving them, you carry that risk yourself. Each one is named under Limitations.

Methodology & how to trust this report

Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 75 of 75 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); none rely on LLM judgement. Overall confidence is 0.9 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.

Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.

What we checked — 75 dimensions across the health lenses
D1D2D3D4D5D6D9D10D12D13D14D15D16D17D19D20D26D28D29D30D34D35D36D43D44AX10AX3AX4AX6AX8AX9M1M2M3P1P10P2P3P4P5P6PF1PF3R1R10R2R3R4R5R6R7R8R9X1X12X13X14X15X16X17X18X19X2X21X22X23X24X25X26X27X28X29X3X30X5

Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.

How to trust any code-health report — three questions
  1. Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 1399 of 1443 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
  2. Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
  3. Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.

This report answers yes to all three. That's the bar to hold any assessment to.

Tools & methods

The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.

MethodBacksVersionEvaluator
Roslyn static analysisComplexity, cohesion, coupling, dead code, API surface, layering5.3.0✓ deterministic
Native secret scannerHardcoded secrets / credentials1.0.0✓ deterministic
Watchdog duplication detector (in-process)Code duplication1.0.0✓ deterministic
Coverage (coverlet / dotnet-coverage)Line & branch coverage10.0.400✓ deterministic
NuGet / dotnetOutdated, vulnerable & deprecated dependencies10.0.400✓ deterministic
git / LibGit2SharpChurn hotspots, knowledge concentration, history2.43.0 · 0.31.0✓ deterministic
gitleaks · semgrep · trivySecrets in history, SAST, CVEs, IaC & container, PII / GDPR1.86.0 · 0.69.3✓ deterministic
LLM (sampled · advisory)Documentation quality, ADR conformance, naming — sampled over a bounded sample; advisory, never a deterministic measurement—◐ LLM · sampled · advisory

Every finding is locatable in findings.md. Run 01a17ce7-76ac-748b-9b8f-844f1cd50d6e.

The exact command behind every deep-scan dimension — tool, version, invocation and retained raw output — is in Appendix B — Reproduction & audit trail.

Run transparency — what happened this run

What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.

  • D10 Test Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. The 593 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 124 test source file(s) (.py, .rs) that it cannot: it reads JavaScript/TypeScript test declarations off disk, so a JUnit/pytest-style suite is invisible to it. Skipped tests, zero-assertion tests and the other quality signals on this row are UNMEASURED in that suite — their absence from the counts above is a gap in this analyzer's language coverage, not a finding that those tests are sound.
  • D11 Test Reliability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Test reliability NOT SCORED: this repository's production source includes .rs, and the rust executor ran against the .rs half and never executed — so reliability was not measured for the repository as a whole. The JavaScript/TypeScript (vitest via `npm ci --ignore-scripts` in crates/monty-js/ (78 tests); vitest via `npm ci --ignore-scripts` in crates/monty-js/smoke-test/ (0 tests)): measured (0 flaky); Python (2 distributions): measured (0 flaky) suite(s) did re-run, and came back with 0 flaky across 2 measured tier(s) — but that is a figure for one half of the product, and we do not publish a partial one as if it were complete. This is OUR limitation, not a defect in the repo — test reliability is excluded from the score rather than counted. The half was driven by a runner we ship, so this is not a missing-runner gap.
  • D14 License Compliance — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. This repository declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry), but the licence verdict published here was taken over its crate dependencies. Nothing was read about its Python dependencies' licensing in either direction, and a clean score on this card must not be read as covering them.
  • D19 Documentation Quality — measured, with a gap in what it reached — Watchdog measured this, but not all of it. What it did not reach is a gap on our side — a collector, parser or image we have not built yet — so the numbers on that dimension cover less than the repository, and the part left out is not evidence that it would have passed. Each ecosystem's manifests (what makes a folder runnable or a published package) need their own proof before D19 judges its units. Until then those folders' READMEs are judged only as documents (boilerplate, structure), never counted as complete.
  • D21 Naming Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D21's deterministic naming rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. Until then its declarations carry no naming verdict this run — this says nothing about whether its names are consistent.
  • D22 Internal API Consistency — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. D22's deterministic call-shape rules are gated on C# first (docs/plans/deterministic-engine.md, P5): each other language is switched on only after its own concept suite and A/B gate pass. This says nothing about whether that surface is consistent.
  • D24 Comment Value — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check's reader does not cover the language this repository's product is written in, so it had nothing of the product to read. That is a gap in this analyzer's language reach — not a finding about this repository.
  • D27 Navigability — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Navigability is taken over call sites whose callee resolved. For C# that population includes calls into referenced assemblies; for this language only calls declared inside the repository count, so the abstention threshold reads the repository's use of its standard library as a resolution failure. That is a limit of this analyzer, not a build problem in this repository.
  • D32 Data Compliance (PII/GDPR) — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. `crates/monty-js/ts/classInstance.ts`, `crates/monty-js/ts/mount.ts`, `crates/monty-js/ts/session.ts` produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
  • AX1 Captive dependencies — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads Microsoft.Extensions.DependencyInjection registrations in C# and Spring beans in Java/Kotlin only, and this repository defines its own container in crates/monty-js/ts/classInstance.ts, whose lifetimes are not modelled yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • AXR1 Runtime accessibility — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. Render strategy: boot via DevServer (dev). the dev server did not expose a crawlable HTTP endpoint in time — no runtime evidence.
  • C1 Data Protection — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
  • C2 Access Controls — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These authorization controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks authorization controls.
  • C3 Audit Trail — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These audit controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks audit controls.
  • C4 Data Retention — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These retention controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks retention controls.
  • C5 Data-Subject Rights — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These data-subject rights controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks data-subject rights controls.
  • GD1 Unfinished & placeholder code — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, F#, JavaScript/TypeScript, Dart, Ruby and Scala source only, and this repository's Python, Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • IC1 Incompleteness & stubs — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. This check reads C# syntax, JavaScript/TypeScript, Java, Dart, Ruby and Scala source only, and this repository's Python, Rust is most of its product and is not read yet, so it had nothing of this repository's product to read. That is a gap in this analyzer's language reach — not a finding that the repository is free of what this check looks for.
  • S1 Web-Security Posture — not measured this run — Watchdog could not measure this here. That is a gap on our side — a collector, parser or image we have not built yet — and it is neither a defect in this repository nor evidence that the check would have passed. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.

Repo exclusion declarations: 22 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.

Limitations & what we did not check

Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.

Per-dimension blind spots

For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.

  • D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
  • D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
  • D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
  • D4 Code Duplication: Duplication is token-similarity — an in-process token-stream comparison over sliding windows, with type-aware normalization — so it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
  • D5 Coupling: Coupling is measured between projects/assemblies — runtime coupling through DI, reflection, messaging or shared databases is invisible to a static reference graph.
  • D6 Cohesion (LCOM4): LCOM4 cohesion is syntactic — it infers connectivity from which methods touch which fields/methods by name, not from real runtime behaviour or intent.
  • D9 Test Distribution: The test-pyramid shape is inferred from project/folder naming and references, with a single test host bucketed per-file by its path tier and content signals — a suite that names tiers unconventionally and gives no per-file signal can still be mis-bucketed.
  • D10 Test Quality: Assertion density is structural — it cannot tell a meaningful behavioural assertion from a trivial one, only that an assertion is present.
  • D12 Dependency Hygiene: Dependency health reads manifests and lockfiles — a vulnerability in a vendored/copied dependency, or risk from how a dependency is actually used, is outside this view.
  • D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
  • D14 License Compliance: License compatibility is checked against declared package metadata and a policy — mislabelled or missing license metadata, and obligations that depend on how you distribute, are not resolved here.
  • D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
  • D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
  • D17 Explicit Debt: Acknowledged-debt signals (TODO/FIXME, suppressions, dead code) are textual — undocumented debt that nobody marked, and debt that lives in design rather than annotations, is invisible. Committed machine-written code (scaffolded migrations, designer/codegen output, generated stubs) is excluded — it is never the team's dead code to delete.
  • D19 Documentation Quality: Documentation quality publishes two things only: a runnable or packaged unit with no example, and a multi-project root README that maps none of its parts. It does not judge clarity, and its other checks (overview, licence, boilerplate, structure, empty sections, XML-doc coverage) are withheld after adjudication: their candidates are counted in the card's gaps, not shown as rows. A false statement in a document is M4's; units are .NET projects only.
  • D20 ADR Quality: ADR quality is an LLM read of the decision records present — it cannot know about decisions made and never recorded, and its verdict is sampled and advisory.
  • D26 Project Cohesion: Project focus is sized from members/namespaces per project — a project that is broad by deliberate design reads the same as one that has sprawled.
  • D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
  • D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
  • D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
  • D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
  • D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
  • D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
  • D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
  • AX10 Code composition: Role is inferred from namespace/folder convention, not semantics — a domain concept living in a folder named "Services" reads as application, and the split is lines-of-code, not business value. The business-logic-share score is a SOFT, FLOORED signal: it contributes to the Architecture lens but is floored at the Critical gate, so an infrastructure-heavy design (a gateway, an ETL, a driver) is legitimately low without being nuked to zero.
  • AX9 CQS / query purity: Handlers are found by interface/name convention — a query handler using neither is not seen. Mutation is a resolved write/publish invocation (SaveChanges/repository/bus), so a write hidden behind a hand-rolled wrapper, reflection, or a string-keyed service locator resolves to a non-persistence type and isn't flagged; it detects that a query writes state, not whether the write is a legitimate read-side cache update. Clean means "no resolved write/publish in a query body", not a proof of CQS purity.
  • P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
  • P5 DR & Backup: Backup/restore and disaster-recovery readiness is judged from in-repo evidence — a config that exists is not a tested restore, so the absence of positive evidence is reported as "not evidenced", never scored as present.
  • P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.

Dimensions

D1 · Cyclomatic Complexity5.4 / 10Adequate✓ Tool-verified

What it measures: How tangled the control flow is — methods with many branches are hard to test and change.

Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.

Maturity: Documented → Verified → Prevented · effective 5.4 / 10 · rule-coverage 100% · ceiling Prevented

98 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was VM::run at 175. A further 82 method(s) were over the threshold but excluded as flat dispatchers (a long switch/match over independent cases: many branches, almost no nesting), the largest being MontyType::from_internal_static at 89 — they are counted neither in the figure above nor in this dimension's score. 31 files carry no cyclomatic complexity row at all for this reason — every one of their over-threshold functions was excluded, so the exclusion is disclosed nowhere in the file itself: crates/monty/src/heap_data.rs (HeapData::py_type at 62), crates/monty/src/modules/math.rs (monty::modules::math::call at 57), crates/monty/src/types/str.rs (monty::types::str::call_str_method_impl at 46), crates/monty/src/types/bytes.rs (monty::types::bytes::call_bytes_method_impl at 40), crates/monty/src/builtins/mod.rs (BuiltinsFunctions::call at 37), and 26 more not listed here. They are named here because the per-file figures other dimensions report are taken BEFORE this exclusion, so such a file can show a high maximum complexity elsewhere in this report and nothing here, with nothing to reconcile the two.

monty::heap::for_each_child_id (cyclomatic 121) · ×30crates/monty/src/heap/mod.rs:1855
Decimal::pow (cyclomatic 22) · ×7crates/monty/src/types/decimal/pow.rs:34
monty_datatest::dispatch_os_call (cyclomatic 54) · ×5crates/monty-datatest/src/main.rs:1029
Compiler::compile_expr (cyclomatic 53) · ×5crates/monty/src/bytecode/compiler.rs:1141
Parser::parse_expression_impl (cyclomatic 50) · ×4crates/monty/src/parse.rs:1472

+ 38 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 4 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with VM::run (cyclomatic 175), monty::heap::for_each_child_id (cyclomatic 121), Opcode::stack_effect (cyclomatic 72). — This score is capped by its worst body, so a finding fixed alone moves it by almost nothing — the next one down takes its place. Refactoring these 4 together lifts Cyclomatic Complexity from 5.4 to about 6.5/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
  2. Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.

D2 · Cognitive Complexity5.5 / 10Adequate✓ Tool-verified

What it measures: How hard the code is for a person to follow, beyond raw branching.

Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.

Maturity: Documented → Verified → Prevented · effective 5.5 / 10 · rule-coverage 100% · ceiling Prevented

169 method(s) exceeded the cognitive complexity threshold of 15; the worst was monty::heap::for_each_child_id at 165.

monty::heap::for_each_child_id (cognitive 165) · ×66crates/monty/src/heap/mod.rs:1855
Decimal::pow (cognitive 38) · ×14crates/monty/src/types/decimal/pow.rs:34
VM::run (cognitive 111) · ×7crates/monty/src/bytecode/vm/mod.rs:1244
monty_datatest::dispatch_os_call (cognitive 58) · ×5crates/monty-datatest/src/main.rs:1029
Parser::parse_statement_impl (cognitive 39) · ×5crates/monty/src/parse.rs:618

+ 48 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Bring the 1 body over 120 down to 120 or less in Cognitive Complexity — start with monty::heap::for_each_child_id (cognitive 165). — Refactoring it lifts Cognitive Complexity from 5.5 to about 5.8/10.
  2. Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.

D3 · God Classes8.7 / 10Strong✓ Tool-verified

What it measures: Over-large classes that try to do too much ("god classes").

Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.

Maturity: Documented → Verified → Prevented · effective 8.7 / 10 · rule-coverage 100% · ceiling Prevented

110 god class(es) detected.

FileTooLong: src/prepare.rs · ×56crates/monty/src/prepare.rs
MethodTooLong: VM.run · ×18crates/monty/src/bytecode/vm/mod.rs:1244
TooManyMethods: VM · ×16crates/monty/src/bytecode/vm/mod.rs:741
FunctionTooLong: monty::heap::for_each_child_id · ×10crates/monty/src/heap/mod.rs:1855
ClassTooLong: Compiler · ×9crates/monty/src/bytecode/compiler.rs:253

+ 1 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 56 FileTooLong finding(s) in God Classes — start with mod.rs (3), pool.rs (2), prepare.rs. — One of this dimension's main actionable groups (56 warning-level).
  2. Resolve the 18 MethodTooLong finding(s) in God Classes — start with prepare.rs (3), compiler.rs (3), parse.rs (2). — One of this dimension's main actionable groups (18 warning-level).
  3. Resolve the 16 TooManyMethods finding(s) in God Classes — start with mod.rs (5), os_access.py (2), compiler.rs. — One of this dimension's main actionable groups (16 warning-level).
  4. Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.

D4 · Code Duplication9.5 / 10Stronggated by 226 serious findings✓ Tool-verified

What it measures: Copy-pasted code that should be shared instead.

Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.5 / 10 · rule-coverage 100% · ceiling Verified

218 duplicated block group(s) detected. A further 8 rows report members as variants of one another; they aggregate block groups already counted above and are not themselves counted. 3 of the 226 are in trees this repository does not ship — vendored, example/demo, project-template, fixture and benchmark code — and are ranked below the shipped groups rather than excluded from them: the duplication there is real and is still counted in this dimension's score. The dimensions that publish a production-file census leave those trees out of theirs, so this count is deliberately drawn over the wider population.

Duplicated block (5 lines × 2) · ×29crates/monty-js/src/telemetry.rs:177
Duplicated block (7 lines × 2) · ×23crates/monty-python/src/exceptions.rs:230
Duplicated block (6 lines × 2) · ×21crates/monty-fs/src/overlay.rs:530
Duplicated block (9 lines × 2) · ×19crates/monty-datatest/src/main.rs:2787
Duplicated block (8 lines × 2) · ×19crates/monty-pool/src/telemetry/tracing_json.rs:420

+ 57 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 29 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with dict_view.rs (3), set.rs (2), telemetry.rs. — One of this dimension's main actionable groups (29 warning-level).
  2. Resolve the 23 Duplicated block (7 lines × 2) finding(s) in Code Duplication — start with bytes.rs (4), set.rs (4), dict_view.rs (2). — One of this dimension's main actionable groups (23 warning-level).
  3. Resolve the 21 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with bytes.rs (5), math.rs (2), set.rs (2). — One of this dimension's main actionable groups (21 warning-level).
  4. Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.

D5 · Coupling8.4 / 10Strong✓ Tool-verified

What it measures: Whether volatile projects sit underneath others that depend on them (so their churn ripples upward), and whether project dependencies form cycles. A widely-depended-on but stable shared/kernel project is healthy, not penalised.

Method: Dependency cycles via elementary-DFS over real .csproj references, plus Martin instability (afferent/efferent) per project. Exhaustive over the reference graph, deterministic.

Coverage: Exhaustive · type-level: afferent/efferent coupling + cycles computed over every production type — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 8.4 / 10 · rule-coverage 100% · ceiling Prevented

20 production modules (Cargo+npm+Python), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 4 module(s) off the main sequence, with abstractness counted on 15 of the 20 (the rest declare no modelled class or interface, export only macros, declare types in source no model reads, or have no source directory of their own).

Off the main sequence: monty-typeshed · ×4

What to do

  1. Resolve the 4 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (4 warning-level).
  2. Enforce Coupling in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.

D6 · Cohesion (LCOM4)9.9 / 10Stronggated by 2 serious findings✓ Tool-verified

What it measures: Whether a class's methods are focused on a single responsibility.

Method: LCOM4 cohesion per production class with at least two methods: connected components of methods sharing state or calls, computed syntactically. Deterministic, not a proxy.

Coverage: Exhaustive · type-level: LCOM4 cohesion computed over every production class — the population is all types, not a name convention.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Verified

2 of 253 classes have LCOM4 above 3.

Low cohesion: HeapObjectRead (LCOM4 158) · ×2crates/monty/src/heap/mod.rs:364

What to do

  1. Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with mod.rs (2). — One of this dimension's main actionable groups (2 warning-level).
  2. Enforce Cohesion (LCOM4) in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.

Detailed fixes: d6_recommendation.md · top locations in Appendix A, every location in findings.md.

D9 · Test Distribution10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether the test suite has a healthy mix of unit / integration / end-to-end tests.

Method: Test projects classified (Unit/Integration/BDD/E2E) from compiled metadata; test methods counted exhaustively across projects with placement-agnostic disk fallback. Deterministic.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

3612 test methods: 1845 unit, 1767 integration, 0 BDD, 0 e2e. The JavaScript/TypeScript suite contributes 593 `it`/`test` case(s) across 29 test file(s) declaring at least one; its tier split is read from package names and paths only. The Rust suite contributes 1880 `#[test]` function(s) across 87 file(s) declaring at least one; its unit/integration split is Cargo's own — 73 of those file(s) are integration-test targets under a crate's tests/ directory, and the rest are #[test] functions compiled into the crate they test. The Python suite contributes 1139 test function(s) across 30 file(s) declaring at least one — every `def test…` in a file pytest or unittest would collect, which is those frameworks' own definition of a case; a parametrize table counts once, so this is a floor. Its tier split is read from file names and paths only.

✓ On the Gold path — maintain.

Detailed fixes: d9_recommendation.md.

D10 · Test Quality9.9 / 10Adequategated by 2 critical findings✓ Tool-verified

What it measures: Whether the tests truly assert behaviour rather than just running the code.

Method: Per-test assertions, skips, and mock references analyzed via Roslyn; structured skip-reason tags (BUG:/ENV:) separate documented deferrals from debt. Deterministic.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Prevented

4 skipped (3 with a documented reason), 582 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 593 tests (1 harness-style project(s) excluded from the assertion penalty). Measured on the JavaScript/TypeScript suite only — at least 124 test source file(s) (.py, .rs) went unread, so its test quality is unmeasured and is not in these counts.

Assertions commented out: assertion error · ×2crates/monty-js/__test__/exceptions.spec.ts:70
Skipped test: ${name} (${skip})crates/monty-js/__test__/node_docs.spec.ts:91
No direct assertions: sequential coroutines use one suspension per call · ×580crates/monty-js/__test__/async.spec.ts:15
Skipped (documented): a mount follows its directory across feeds, not its path · ×3crates/monty-js/__test__/mount.spec.ts:61

What to do

  1. Resolve the 2 Assertions commented out finding(s) in Test Quality — start with exceptions.spec.ts (2). — One of this dimension's main actionable groups (2 issue-level).
  2. Resolve the 580 No direct assertions finding(s) in Test Quality — start with class_instance.spec.ts (74), types.spec.ts (55), mount.spec.ts (53). — One of this dimension's main actionable groups (580 recommendation-level).
  3. Resolve the 1 Skipped test finding(s) in Test Quality — start with node_docs.spec.ts. — One of this dimension's main actionable groups (1 warning-level).
  4. Enforce Test Quality in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d10_recommendation.md · top locations in Appendix A, every location in findings.md.

D12 · Dependency Hygiene9.2 / 10Exemplary✓ Tool-verified

What it measures: Whether dependencies are current, secure, and not bloated.

Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (saturating for vulnerabilities, capped-linear for deprecation/outdated) per KLoC. Exhaustive, deterministic.

Maturity: Documented → Verified → Prevented · effective 9.2 / 10 · rule-coverage 100% · ceiling Verified

16 outdated, 0 yanked direct Cargo dependencies. Only DIRECT edges are graded: a transitive crate cannot be moved past what its parent's requirement admits, so reporting one would be advice its owner cannot take. A newer release is reported only where this repository's OWN requirement already admits it, so the remedy is `cargo update` and never a manifest edit — which means a release outside the declared range is deliberately NOT charged, because a written-down constraint is a decision rather than a defect. Note that a bare requirement is a CARET, and for a 0.x crate its ceiling is the minor. Whether any crate is UNMAINTAINED is not graded — crates.io publishes no maintenance status, and release age does not stand in for one. Known CVEs in this dependency graph are D30's question, read from REDACTED there.

Outdated: arbitrary · ×16

✓ On the Gold path — maintain.

Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.

D13 · Secret Scanning5.0 / 10Adequate✓ Tool-verified

What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.

Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.

Maturity: Documented → Verified → Prevented · effective 5.0 / 10 · rule-coverage 100% · ceiling Prevented

1 secret(s) detected.

REDACTED

What to do

  1. Resolve the 1 Leaked secret finding(s) in Secret Scanning — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Enforce Secret Scanning in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d13_recommendation.md · top locations in Appendix A, every location in findings.md.

D14 · License Compliance10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the licenses of third-party packages are compatible with your policy.

Method: Third-party package licenses resolved from declared package metadata and checked against the configured policy (allow/deny/copyleft). Deterministic; clean = no incompatible license found at metadata depth.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Verified

0 of 582 shipped crate(s) use a banned license. Licences were resolved from crates.io over the crates a consumer compiles — this repository's REDACTED closed over its manifests' `[dependencies]` and `[build-dependencies]`. Crates it asks for ONLY under `[dev-dependencies]` are excluded: they are not compiled by anything that depends on this repository. This repository publishes itself under MIT, which is its own choice and is not judged here. ★ COVERAGE OF THIS VERDICT: it grades this repository's crate dependencies and nothing else. The repository also declares a Python pyproject.toml/requirements.txt (pip/uv/Poetry), and the licences of those dependencies were NOT read by this pass — a gap in this engine's coverage, not a statement about them. So this result says the graded closure carries no banned licence; it does NOT say this repository's licensing is clear.

✓ On the Gold path — maintain.

Detailed fixes: d14_recommendation.md.

D15 · Churn × Complexity Hotspots9.3 / 10Stronggated by 60 serious findings✓ Tool-verified

What it measures: Files that change often and are also complex — the riskiest hotspots.

Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.

Maturity: Documented → Verified → Prevented · effective 9.3 / 10 · rule-coverage 100% · ceiling Documented

Top hotspots: crates/monty/src/bytecode/vm/mod.rs (42×175=7350); crates/monty/src/heap/mod.rs (32×121=3872); crates/monty/src/object_bridge.rs (33×89=2937)

Hotspot: crates/monty/src/bytecode/vm/mod.rs · ×60crates/monty/src/bytecode/vm/mod.rs:1244

What to do

  1. Resolve the 60 Hotspot finding(s) in Churn × Complexity Hotspots — start with mod.rs (5), pool.rs (3), value.rs (2). — One of this dimension's main actionable groups (60 warning-level).

Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.

D16 · Bus Factor8.9 / 10Strong✓ Tool-verified

What it measures: Whether knowledge is concentrated in too few people (the "bus factor").

Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.

Maturity: Documented → Verified → Prevented · effective 8.9 / 10 · rule-coverage 100% · ceiling Documented

59 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is crates/monty/src/codecs.rs. Counted over 526 of the 1150 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Off-boarding risk: anonymized user #1 · ×2
Further sole-owners (lower concentration)

What to do

  1. Resolve the 2 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (2 recommendation-level).
  2. Resolve the 1 Further sole-owners (lower concentration) finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.

D17 · Explicit Debt10.0 / 10Stronggated by 31 serious findings✓ Tool-verified

What it measures: Acknowledged debt left in the code — TODOs, dead code, suppressed warnings.

Method: Roslyn syntactic debt markers (suppressions/TODO/FIXME/HACK/empty-catch/commented-code/Obsolete) plus SymbolFinder dead-code analysis; weighted-debt-per-KLoC density deducted 2.0x per unit. Deterministic, exhaustive.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Prevented

31 deducted task-comment markers across 238023 LoC (0.0/KLoC) → score 10.0. Task comments only: this repository's language is read without a compiler, so D17's suppression, dead-code and commented-out-code arms did not run and this score counts fewer marker kinds than a .NET repository's would.

TodoComment · ×30crates/monty-python/src/print_target.rs:261
HackCommentcrates/monty-bench/benches/python/pyperformance_meteor_contest.py:180

What to do

  1. Resolve the 30 TodoComment finding(s) in Explicit Debt — start with datetime__core.py (3), fstring__all.py (3), parse.rs (2). — One of this dimension's main actionable groups (30 warning-level).
  2. Resolve the 1 HackComment finding(s) in Explicit Debt — start with pyperformance_meteor_contest.py. — One of this dimension's main actionable groups (1 warning-level).
  3. Enforce Explicit Debt in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.

Detailed fixes: d17_recommendation.md · top locations in Appendix A, every location in findings.md.

D19 · Documentation Quality10.0 / 10Exemplary○ Nothing flagged

What it measures: Whether the project's documentation is clear, complete, and useful.

Method: Every README, docs/ document and root guide parsed by its markup and measured in Unicode letters. Published: a runnable or packaged .NET project whose README (or a document it links, or a root guide) shows no example, and a root README naming none of three or more projects. Overview, licence, boilerplate, wall-of-text, empty-section and XML-doc rows are measured and withheld (counted in gaps) after adjudication. Deterministic, exhaustive, advisory.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

1 of 1 documentation facets pass in full. 81 document(s) read across 1 unit(s).

✓ On the Gold path — maintain.

Detailed fixes: d19_recommendation.md.

D20 · ADR Quality0.0 / 10Critical✓ Tool-verified

What it measures: Whether architecture decisions are recorded well (context, decision, consequences).

Method: Per-ADR judgment by language model at low temperature with two-pass stability; confidence is share of ADRs evaluated; enforcement-field presence detected deterministically. Advisory.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

No architecture decision records were found.

No ADRs found

What to do

  1. Resolve the 1 No ADRs found finding(s) in ADR Quality. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d20_recommendation.md · top locations in Appendix A, every location in findings.md.

D26 · Project Cohesion7.1 / 10Strong✓ Tool-verified

What it measures: Whether each project is a focused, coherent unit rather than an oversized grab-bag.

Method: Project size overshoot penalties (LoC / public-type count / namespace count, 2-of-3 flag) weighted by log magnitude. Exhaustive across projects, deterministic, LLM-independent.

Maturity: Documented → Verified → Prevented · effective 7.1 / 10 · rule-coverage 100% · ceiling Documented

3 of 18 build units (Cargo, npm) flagged as possibly oversized/incoherent.

Projects may be oversized for their cohesion

What to do

  1. Resolve the 1 Projects may be oversized for their cohesion finding(s) in Project Cohesion. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d26_recommendation.md · top locations in Appendix A, every location in findings.md.

D28 · Secrets (history)9.0 / 10Adequategated by 1 critical finding✓ Tool-verified

What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.

Method: Secret scan via TWO gitleaks detect passes in an isolated checkout — the full git history, then a second --no-git pass over the working tree as it stands — merged and de-duplicated by (rule, file, line); each match flagged High. Both invocations are recorded in the audit trail. Exhaustive; when the tool is absent, or when its output cannot be parsed into the expected shape, the dimension is WITHHELD as an explicit measurement gap on our side — unscored and excluded from the lens, never a hedged middling score.

Maturity: Documented → Verified → Prevented · effective 9.0 / 10 · rule-coverage 100% · ceiling Documented

1 finding(s): 0 critical, 1 high, 0 medium, 0 low. Remediation for historically-committed secrets is credential rotation — they remain in history regardless of later deletion.

REDACTED
REDACTED

What to do

  1. Resolve the 1 High secret finding(s) in Secrets (history) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
  2. Resolve the 1 Rotate the exposed credentials finding(s) in Secrets (history). — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d28_recommendation.md · top locations in Appendix A, every location in findings.md.

D29 · Static Analysis (SAST)0.4 / 10Critical✓ Tool-verified

What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.

Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.

Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).

Maturity: Documented → Verified → Prevented · effective 0.4 / 10 · rule-coverage 100% · ceiling Documented

33 finding(s): 0 critical, 13 high, 18 medium, 2 low. semgrep hit a parse error in 27 file(s) — `crates/monty-js/__test__/basic.spec.ts` (line 83), `crates/monty-js/__test__/external_modules.spec.ts` (line 35, line 50, line 61, …), `crates/monty-js/__test__/install_dependencies.spec.ts` (line 12, line 21), `crates/monty-js/__test__/limits.spec.ts` (line 80, line 144, line 153, …), `crates/monty-js/__test__/mount.spec.ts` (line 53, line 83, line 172, …), … (+22 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 2 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 6 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (4), REDACTED (2). — One of this dimension's main actionable groups (6 issue-level).
  2. Resolve the 4 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (4). — One of this dimension's main actionable groups (4 issue-level).
  3. Resolve the 3 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).

Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.

D30 · Dependency Vulnerabilities0.0 / 10Critical✓ Tool-verified

What it measures: Whether any dependency has a known published vulnerability (CVE), direct or transitive, in ANY ecosystem the repository declares — Dart pub, Elixir and Erlang via Hex, Go modules, Java and Kotlin via Maven/Gradle, JavaScript/npm, .NET/NuGet, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift.

Method: Dependency-CVE scan across every ecosystem the repository declares, scored ONCE. Three sources are unioned and deduplicated by advisory identity (rule id + alias closure, CVE<->GHSA) scoped to package+version, keeping the worst severity: `osv-scanner --recursive` over osv.dev for Dart pub, Elixir/Hex (and Erlang, whose `rebar.lock` syft first converts to a CycloneDX SBOM the scanner reads, with rows attributed back to the lock), Go, Java and Kotlin via Maven/Gradle (and Scala, whose sbt build's pinned direct declarations are written into a CycloneDX SBOM the scanner reads, with rows attributed back to the build file), npm, PHP/Composer, Python/PyPI, RubyGems, Rust/Cargo and Swift; `trivy fs --scanners vuln` for npm lockfiles; and `dotnet list package --vulnerable --include-transitive` for NuGet (with per-advisory collapse of the project x target-framework fan-out), plus a DECLARED-dependency arm that resolves a published gem's gemspec against rubygems.org where no Gemfile.lock is committed. `SeverityScore(c,h,m,l, normalizer 8.0)`. NotApplicable only when NO ecosystem is readable; if any applicable ecosystem could not be scanned the findings are REPORTED and the score is withheld. Supersedes the npm and OSV arms, retired 2026-09-05.

Maturity: Documented → Verified → Prevented · effective 0.0 / 10 · rule-coverage 100% · ceiling Documented

31 finding(s): 3 critical, 6 high, 22 medium, 0 low.

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 1 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 10 Medium advisory (unsound) finding(s) in Dependency Vulnerabilities — start with REDACTED (10). — One of this dimension's main actionable groups (10 warning-level).
  2. Resolve the 6 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (6). — One of this dimension's main actionable groups (6 issue-level).
  3. Resolve the 3 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).

Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.

D34 · Knowledge Freshness10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.

Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

2 of 526 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is crates/monty/test_cases/closure__pep448.py. Counted over 526 of the 1150 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.

Orphaned file · ×2crates/monty/test_cases/closure__pep448.py:1
Orphaned files with no living knowledge

✓ On the Gold path — maintain.

Detailed fixes: d34_recommendation.md · top locations in Appendix A, every location in findings.md.

D35 · Change Coupling9.9 / 10Stronggated by 9 serious findings✓ Tool-verified

What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.

Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.

Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling. A non-source file is never a coupling PARTICIPANT either: documentation, schemas, config and data files are dropped with the rest, so a code↔docs pair — a command and the reference page that restates it — is not reported however strongly the two co-change; nor is coupling that runs THROUGH a build step or config file.

Maturity: Documented → Verified → Prevented · effective 9.9 / 10 · rule-coverage 100% · ceiling Documented

Strongest change-coupling: str.rs↔str__methods.py 100%; range.rs↔tuple.rs 71%; builder.rs↔mod.rs 62%

Change coupling: str.rs ↔ str__methods.py · ×9crates/monty/src/types/str.rs:1

What to do

  1. Resolve the 9 Change coupling finding(s) in Change Coupling — start with update.py (2), str.rs, range.rs. — One of this dimension's main actionable groups (9 warning-level).

Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.

D36 · Supply-chain Provenance & Signing5.0 / 10Adequate✓ Tool-verified

What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.

Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.

Maturity: Documented → Verified → Prevented · effective 5.0 / 10 · rule-coverage 100% · ceiling Documented

2/4 supply-chain integrity signals present (provenance, signing, SBOM, pinned actions).

REDACTED
REDACTED
REDACTED
REDACTED
REDACTED

+ 1 more group(s) — more in Appendix A; the complete list is findings.md.

What to do

  1. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  2. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
  3. Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).

Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.

D43 · Malicious Dependencies10.0 / 10Exemplary✓ Tool-verified

What it measures: Whether any dependency the repository declares is published as MALICIOUS rather than merely vulnerable — a package that is an attacker's work, in any ecosystem osv-scanner reads. Scored apart from D30 because the answer is binary: there is no safe version to upgrade to, and the fix is to remove the package and rotate every credential it could have read.

Method: The same dependency scan D30 reads, partitioned on the scanner's own classification rather than rescanned: a row is MALICIOUS when its id is in the `MAL-` space (the ossf/malicious-packages feed) OR its `database_specific.cwe_ids` carries `CWE-506` ("Embedded Malicious Code"). Both channels are structural; the summary text is deliberately NOT read, because a malicious-package record whose summary says only "Critical severity vulnerability" is a real shape ([GHSA redacted]) and a text matcher misses it. Scored BINARY: any surviving row is 0, whatever its severity and however many CVEs sit beside it — a hostile dependency is not a quantity. Applicability and degradation are D30's: NotApplicable only when no ecosystem is readable, and an unscannable ecosystem degrades rather than reading clean. SCORED, not informational.

Maturity: Documented → Verified → Prevented · effective 10.0 / 10 · rule-coverage 100% · ceiling Documented

No dependency in any ecosystem this repository declares is published as malicious.

✓ On the Gold path — maintain.

Detailed fixes: d43_recommendation.md.

D44 · Platform End-of-Life6.0 / 10Adequate✓ Tool-verified

What it measures: Whether anyone still ships security patches for the platform this repository RUNS ON — the runtime it pins and the framework majors its own constraints hold it to. Separate from D12 because the question differs: a current Django on an end-of-life Python is perfectly up to date and completely unsupported, and the fix is a migration rather than a version bump. What the repository says it merely SUPPORTS is never charged.

Method: End-of-life PLATFORM read from the repository's own declarations and graded against a FROZEN, dated table of vendor support dates — no network, no feed, no API, so this dimension answers identically inside a closed scan fence. Two subjects: a RUNTIME the project pins (a single or all-end-of-life TargetFramework, a .nvmrc or .python-version, a requires-python CAP) and a FRAMEWORK major a dependency constraint cannot move off (a caret, tilde or exact version; `vue@^2.7.16` pins Vue 2). A FLOOR is deliberately never charged — `requires-python = ">=3.8"` states what a package SUPPORTS, not what it runs on — and a multi-target project is charged only when EVERY target is out of support. Runtime 4.0/product capped 8.0, framework 1.5 capped 4.5. The table is safe to freeze because a statement about support that ended in the past cannot become false: it loses recall as it ages, never precision, and a test asserts every entry predates the freeze date. Disjoint from D31 (a container image's OS layer) and D29 (the toolchain a CI workflow installs). Abstains when the repository declares no platform this pass reads — never scores it clean.

Maturity: Documented → Verified → Prevented · effective 6.0 / 10 · rule-coverage 100% · ceiling Documented

1 end-of-life runtime(s) and 0 end-of-life framework(s), read from 4 platform declaration(s) and 3 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.

End-of-life runtime: Node.js 20crates/monty-js/package.json:48

What to do

  1. Resolve the 1 End-of-life runtime finding(s) in Platform End-of-Life — start with package.json. — One of this dimension's main actionable groups (1 warning-level).

Detailed fixes: d44_recommendation.md · top locations in Appendix A, every location in findings.md.

Frontend & cross-cutting dimensions

R = React/JS · M = Maturity · P = Readiness.

AX10 · Code composition10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — How the codebase splits by code ROLE — domain, application, infrastructure, test, generated. The significance map behind the knowledge/coupling weighting, and a DDD signal in its own right: a thin domain core under fat infrastructure is the anemic-domain smell, quantified. How each file's role is decided, because the split is only as good as that: a generated name or a build-output tree makes it Generated, a test project makes it Test, and otherwise the file's NAMESPACE and PATH words are matched against fixed vocabularies in a fixed ORDER — domain, then infrastructure, then application — so a file whose words hit two layers is counted under the earlier one. A production file matching none of them counts as application, so that share reads 'application or unclassified' rather than a measured application layer. Roles come from naming convention, never from what the code does. On this repository the split was taken from the source tree on disk rather than from a loaded .NET workspace, so a file's role is decided by its PATH segments alone — no declared namespace was available to add to the evidence — and generated output is excluded from the census entirely rather than counted as a generated share.

Method: Roslyn line-count by code ROLE: every source file classified Domain/Application/Infrastructure/Test/Generated by namespace + path convention (the shared CodeRoleClassifier), then significant lines summed per role. Deterministic; the advisory score is the business-logic (domain+application) share of production code.

Coverage: Population: ALL source files, each bucketed into ONE of five roles (Domain/Application/Infrastructure/Test/Generated) by namespace + path convention — a file whose layer isn't named in the convention falls to Application (the neutral default), and the split is line-count, not semantic depth or business value.

What to do

  • The domain core is a small share of production code, but most of the rest matched no layer vocabulary at all — so this is not yet an anemic-domain finding. The namespace/path convention could not place that code, which makes the composition above a statement about the naming, not about the design. Name the layers (or check that the repository's conventions differ from the ones this check knows) before reading a thin domain into it.
AX3 · Project dependency cycles10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether the project-reference graph is acyclic (cycles block independent build/deploy and signal eroding boundaries).

Method: Project reference cycles via elementary-DFS over real .csproj references, using the engine shared with D5/D7; cyclic versus acyclic. Exhaustive, deterministic.

AX4 · Dependency direction10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether dependencies point inward (Domain ← Application ← Infrastructure/Web) — the clean-architecture dependency rule, checked across the project graph.

Method: Layer violations by name-segment inference (Domain/Core to Application to Infrastructure/Web) over the project-reference graph. Exhaustive over all projects, deterministic.

AX6 · Interface segregation10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether interfaces stay focused rather than fat — the Interface-Segregation principle (SOLID 'I').

Method: Roslyn scan: public interface declared-member counts (accessors fold into their property/event); fat-interface threshold (over 15 declared members) flagged per type. Each finding also reports the distinct-OPERATION count — members counted by name, so an overload group counts once — which decides whether it states the caller-side ISP harm or the implementer-side burden of an overload set. TypeScript: exported interfaces that declare behaviour, counted over their REQUIRED operations (method signatures and function-typed properties with no `?`, once per signature) — data-shape interfaces and ambient .d.ts declarations are outside the population; JavaScript declares no interfaces and is not applicable. Deterministic, type-level.

AX8 · Test isolation5.0 / 10Adequate✓ Tool-verified

Other · Architecture — Whether production projects stay free of references to test projects — tests may depend on production, never the reverse.

Method: Csproj graph: each production project checked for references to test projects (identified by test-framework presence, not name). Zero violations is clean. Deterministic.

  • `monty-bench` (production) references the test project `monty-fixture`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • `monty-datatest` (production) references the test project `monty-fixture`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.

What to do

  • Remove every production → test project reference: extract any shared test helper into a production support library (which the tests reference), or invert the dependency so the test project depends on production — not the reverse.
AX9 · CQS / query purity10.0 / 10Exemplary✓ Tool-verified

Other · Architecture — Whether read (query) handlers stay side-effect-free — a query that writes persistent state or raises events breaks CQS and makes reads unsafe to retry, cache, or route to a read replica.

Method: Roslyn scan: CQRS handlers classified query-vs-command by interface (IQueryHandler/ICommandHandler/IRequestHandler<TQuery,TResult>) and name convention (*Query/Get*/Find* vs *Command); each query handler's body checked for persistent-state writes (SaveChanges/repository Add-Update) or event publishes by resolved invocation. Deterministic, type-level, exhaustive over the detected handlers.

Coverage: Population: CQRS handlers identified by IQueryHandler/ICommandHandler/IRequestHandler interface + *Query/Get*/Find*/*Command NAME convention; query purity then checked exhaustively within that set — a query handler using neither convention is invisible, and mutation is a resolved persistence/publish CALL, not full dataflow.

M1 · Documentation (README)8.0 / 10Strong✓ Tool-verified

Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.

Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.

What to do

  • Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
  • Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
  • Add a README to the 8 of 23 project(s) that lack one — worth up to 0.7 pts.
M2 · Architecture documentation2.0 / 10Critical✓ Tool-verified

Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.

Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.

  • No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.

What to do

  • Record your significant design decisions. Write one short document per decision, giving its date, the situation, the decision and its consequences, and keep them together with your other design documents. A docs/adr folder with each file named by number and title is the easiest place to find them.
M3 · Folder & project structure10.0 / 10Exemplary✓ Tool-verified

Maturity · Maturity — Whether the repo is organised deliberately — src/test separation and consistent project naming.

Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.

P1 · CI/CD gates10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — Whether an automated pipeline builds and tests every change.

Method: Filesystem scan: CI workflow files (.github/workflows, .gitlab-ci.yml, etc.) for build and test stages. Exhaustive, deterministic.

P10 · Library API & versioning10.0 / 10Exemplary○ Nothing flagged

Readiness · Readiness — For a library: a deliberate (small) public API surface and explicit semantic versioning so consumers can depend on it safely.

Method: Roslyn scan: public API surface area and semantic-versioning markers (SemVer attributes, changelog entries) for libraries; off .NET, a library is the ecosystem's publication act (an npm package that is not private and names an entry point, a PyPI distribution with a build system, a Rust library crate, a Maven/Gradle module that publishes, a Go module with no package main, a gemspec, a Composer library, a SwiftPM library product, a pub.dev or Hex package), its surface is the share of types the language model records as public (Rust, Swift, Java, Kotlin, Go, Dart; not measured where the model records no type visibility or, as in TypeScript, only module-level export), and its version is read from the manifest, a semver CHANGELOG, release tooling or semver git tags. Exhaustive, deterministic.

P2 · Observability6.9 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.

Method: Filesystem/Roslyn scan: structured-logging frameworks (Serilog, NLog), OpenTelemetry, and health-check endpoint patterns. Exhaustive, deterministic.

  • Only 2/7 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `crates/monty-apidoc`, `crates/monty-datatest`, `crates/monty-proto`, `crates/monty-python`.

What to do

  • Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
P3 · Security & performance tooling9.0 / 10Exemplary✓ Tool-verified

Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).

Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.

What to do

  • Dependabot is configured but does not watch `npm`, `cargo`, `pip` — add those `package-ecosystem` entries to .github/dependabot.yml so those dependencies get the same automatic update and advisory pressure as the ones it already covers.
  • Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
P4 · Deployment & Rollback7.0 / 10Strong✓ Tool-verified

Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.

Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.

P5 · DR & Backup3.0 / 10Weak✓ Tool-verified

Readiness · Readiness — Whether disaster recovery is planned and codified — backups, geo-recovery, RTO/RPO, persistence guarantees — from IaC + container manifests + docs, never the live cloud.

Method: Filesystem scan: disaster recovery, backup, geo-recovery, RTO/RPO, persistence guarantees from IaC, manifests, and docs. Exhaustive, deterministic, never a live environment.

What to do

  • Codify backups + geo-recovery in IaC (snapshot/replication/geo-redundant) to back the DR plan.
P6 · Release Hygiene5.0 / 10Adequate✓ Tool-verified

Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.

Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.

  • No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)

What to do

  • Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
PF1 · Benchmark discipline9.0 / 10Exemplary✓ Tool-verified

Readiness · Performance — Whether the code protects its performance with benchmarks — a benchmark suite, allocation/memory measurement, and (ideally) a CI gate. Presence is credited as a bonus, never a deduction.

Method: Repo + source scan: BenchmarkDotNet referenced (csproj/source), [Benchmark]/[MemoryDiagnoser] attribute counts, and a benchmark step in CI; off .NET, the same ladder over Go testing.B, Rust criterion/#[bench]/divan, JMH/kotlinx-benchmark, pytest-benchmark/asv/pyperf, tinybench/mitata/vitest bench/benchmark.js and Swift package-benchmark — scored as a bonus ladder (absence is neutral, never a deduction). Deterministic, presence detection.

PF3 · Async & latency hygiene10.0 / 10Exemplary✓ Tool-verified

Readiness · Performance — Whether asynchronous code stays responsive — it avoids sync-over-async blocking (a .NET .Wait()/.GetAwaiter().GetResult(), a time.sleep or blocking HTTP call inside a Python coroutine, a *Sync call inside an async JavaScript function, block_on inside a Rust async fn, runBlocking inside a Kotlin suspend function, block() inside a Reactor publisher) that stalls a thread or event loop and risks deadlock, and, where the code is a reusable library on .NET, awaits with ConfigureAwait(false) so it never captures and stalls its caller's context.

Method: Production-source scan: sync-over-async blocking counted everywhere — .Wait()/.GetAwaiter().GetResult() in .NET; off .NET, read from the language model, a blocking call inside an async function (Python, TS/JS, Rust, Kotlin, Swift, Dart) or inside a Java method returning a Reactor Mono/Flux or a Scala method returning a Future or effect — and, for a .NET library with ≥5 awaits, the share of awaits using ConfigureAwait(false). Deterministic, syntax/text detection.

R1 · Type Safety9.6 / 10Exemplary✓ Tool-verified

React / JS · Code Health — How much of the frontend is typed TypeScript vs untyped JavaScript.

Method: Frontend file inventory: the share of typed TypeScript vs untyped JavaScript across the source tree. Deterministic, exhaustive over frontend files.

What to do

  • Migrate the remaining .js/.jsx files to TypeScript.
R10 · Code Duplication9.8 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm over JS/TS tokens, D-386): a block is reported only where its copies still agree on most of their own identifiers and literals, or were renamed as they were pasted but kept most of their constants, and where the copies carry enough code to stand on their own or the copied extent reaches 30 lines — so a re-implementation sharing neither names nor values, and a small pasted declaration, are both found and deliberately not reported, and a clean R10 is not a claim that nothing was copied.

Method: Near-exact copy-pasted blocks of substantial extent across the frontend (the D4 clone algorithm run over JS/TS tokens). Masking finds the candidates; a block is reported when its copies still agree on most of their own identifiers and literals, or when a renamed copy still agrees on most of its constants, AND the copies carry enough code to stand on their own — or when the copied extent reaches 30 lines. So a re-implementation sharing neither names nor values, and a small pasted declaration, are deliberately not counted. Deterministic.

  • crates/monty-js/ts/pool.ts:194 · crates/monty-js/ts/websocket.ts:100 — the two spans are one implementation copied and then locally edited — 120 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one. — crates/monty-js/ts/pool.ts:194
  • crates/monty-js/ts/worker/value.ts:261 · crates/monty-js/ts/worker/value.ts:280 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — crates/monty-js/ts/worker/value.ts:261
  • crates/monty-js/ts/classInstance.ts:827 · crates/monty-js/ts/classInstance.ts:856 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. — crates/monty-js/ts/classInstance.ts:827
  • crates/monty-js/ts/session.ts:610 · crates/monty-js/ts/session.ts:750 — all 2 copies are in the same file, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents. — crates/monty-js/ts/session.ts:610

What to do

  • Act on each finding's own remediation rather than one rule: the move depends on what recurs. Where the copies are executable blocks, give the shared part one home and call it from each site; where they are declarations, a listing, a specialisation already delegating to its base, or one shape repeated per entity, there is no call site and the move is a shared type, a generated set or a factory — sometimes there is nothing to extract.
R2 · Cyclomatic Complexity9.6 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Per-function cyclomatic/cognitive complexity from the token-level function scanner (D-386) — real branching, not a regex heuristic.

Method: Per-function cyclomatic/cognitive complexity from a token-level function scanner (real branching, not a regex heuristic), computed over every frontend function. Deterministic.

  • decodeNode has cyclomatic complexity 42 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — crates/monty-js/ts/worker/value.ts:504
  • encodeMarked has cyclomatic complexity 24 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — crates/monty-js/ts/worker/value.ts:141
  • encode has cyclomatic complexity 22 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — crates/monty-js/ts/worker/value.ts:97
  • pyTypeName has cyclomatic complexity 21 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — crates/monty-js/ts/errors.ts:366
  • run has cyclomatic complexity 20 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — crates/monty-js/ts/worker/transport.ts:393
  • encodeOsPolicy has cyclomatic complexity 19 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — crates/monty-js/ts/options.ts:184
  • canonicalFileMode has cyclomatic complexity 17 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — crates/monty-js/ts/types.ts:132
  • componentOsPolicy has cyclomatic complexity 16 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — crates/monty-js/ts/worker/transport.ts:567
  • nativeOsPolicy has cyclomatic complexity 15 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — crates/monty-js/ts/pool.ts:258
  • toTurn has cyclomatic complexity 15 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — crates/monty-js/ts/worker/transport.ts:468
  • feedRun has cyclomatic complexity 14 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — crates/monty-js/ts/session.ts:218
  • captureTelemetryContext has cyclomatic complexity 13 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — crates/monty-js/ts/telemetry.ts:326
  • prepareObject has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — crates/monty-js/ts/classInstance.ts:626
  • answerInContext has cyclomatic complexity 11 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — crates/monty-js/ts/session.ts:537
  • answerOsCall has cyclomatic complexity 11 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — crates/monty-js/ts/session.ts:808
  • run has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — crates/monty-js/__test__/helpers.ts:32

What to do

  • Break down the listed branch-heavy functions; aim P95 cyclomatic ≤ 5.
R3 · Large Files6.0 / 10Adequate✓ Tool-verified

React / JS · Code Health — How many source files exceed the large-file threshold.

Method: Components/modules exceeding the large-file threshold, counted exhaustively across the frontend source tree. Deterministic.

  • crates/monty-js/ts/session.ts has 1560 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — crates/monty-js/ts/session.ts:1
  • crates/monty-js/ts/classInstance.ts has 964 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — crates/monty-js/ts/classInstance.ts:1
  • crates/monty-js/ts/worker/transport.ts has 700 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — crates/monty-js/ts/worker/transport.ts:1
  • crates/monty-js/ts/worker/value.ts has 605 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — crates/monty-js/ts/worker/value.ts:1
  • crates/monty-js/ts/telemetry.ts has 525 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — crates/monty-js/ts/telemetry.ts:1

What to do

  • Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
R4 · Test Coverage9.1 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Static test reachability (D-386): the share of production files reachable from any test via the import graph — measured without running anything.

Method: Static test reachability: the share of production files reachable from any test via the import graph — measured without running anything. Deterministic.

  • No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one. (×3) — crates/monty-js/scripts/assemble-packages.mjs:1, crates/monty-js/scripts/create-platform-packages.mjs:1, crates/monty-js/ts/worker/nodeWorkerEntry.ts:1

What to do

  • Add tests that import the unreached modules (directly or through their public entry).
R5 · Dependency Freshness10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — How outdated the npm dependencies are (a maturity signal). JS/npm CVEs are scored separately in D30 (JS/npm Dependency Vulnerabilities).

Method: npm dependency staleness from manifest/registry metadata (a maturity signal; JS/npm CVEs are scored separately in D30, which answers dependency vulnerabilities for every ecosystem). Deterministic.

R6 · Tooling10.0 / 10Exemplary✓ Tool-verified

React / JS · Readiness — Whether the project wires up test, lint and typecheck — detected from each package.json script's COMMAND (eslint / tsc / vitest / jest / playwright), not just its name, and corroborated against CI-workflow invocations so a tool run only in CI still counts.

Method: package.json scanned for test/lint/typecheck script wiring. Deterministic presence check.

R7 · Dead Code9.9 / 10Exemplary✓ Tool-verified

React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).

Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.

  • Unreachable from the 15 application, 6 tooling and 42 test entry point(s) detected in this repo. Gate removals on `npm run build` — an undetected custom entry would make these reachable.
  • no import path from any entry point (15 application, 6 tooling, 42 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make — crates/monty-js/ts/worker/nodeWorkerEntry.ts
  • Nothing imports this binding — it is safe to review for removal. — crates/monty-js/ts/worker/value.ts:31

What to do

  • Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
R8 · Dependency Hygiene8.5 / 10Strong✓ Tool-verified

React / JS · Readiness — npm dependency truthfulness (D-386): unused dependencies, imports not declared anywhere, and type-/test-only packages shipped as production deps.

Method: npm dependency truthfulness: unused dependencies, imports declared nowhere, and type-/test-only packages shipped as production deps — from the manifest + import graph. Deterministic.

  • Declared in crates/monty-js/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it. (×3)

What to do

  • Remove unused dependencies, declare unlisted imports explicitly, and demote type-/test-only packages to devDependencies.
R9 · Circular Imports10.0 / 10Exemplary✓ Tool-verified

React / JS · Architecture — Import cycles in the module graph (D-386) — files that can only be understood and changed together.

Method: Import cycles in the module graph, detected exhaustively over JS/TS imports (the same cycle detection as the .NET coupling dimension). Deterministic.

X1 · Async correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the code avoids sync-over-async (deadlock-prone blocking on tasks) and async void.

Method: Roslyn syntax scan: async methods scanned for .Wait()/.GetAwaiter().GetResult() and async-void outside event handlers. Deterministic, hard fact per invocation.

X12 · Unreachable branch10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.

Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.

X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.

Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.

X14 · Bypassable address classification10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.

Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.

X15 · Unvalidated length from an untrusted reader10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a length read out of the stream being parsed is bounded before it is allocated or read — an unchecked count taken from the input lets the input choose the allocation.

Method: Roslyn syntax + semantics: integer lengths read from a BinaryReader and spent on a bulk read or an array allocation, checked for any comparison or bounding call on the value anywhere in the method. Deterministic, provable per finding. Advisory.

X16 · Unfloored truncation loop10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a loop that shortens a string until it fits a length budget has a floor — one with none grinds the value down to the empty string, or past it into a negative-length `Substring`.

Method: Roslyn syntax + semantics: while/do loops whose body's only effect on a string is to drop its last character, checked for whether anything — a direct comparison on the length, a body guard, a break — bounds that length below. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `while`/`do` loop whose body’s one assignment to a value is `x = x.slice(0, -1)` or `x = x.slice|substring|substr(0, x.length - 1)`, driven by a condition that reads `x.length` only as a term of a larger expression — never compared directly, never tested for truthiness, and with no other read of `x` — and whose body has no `break`, `return`, `throw` or `if` naming `x`. Deterministic, provable per finding. Advisory.

X17 · Uncapped recursion over a caller-supplied document10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.

Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.

X18 · Disposal-pattern correctness10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a type's disposal matches what it OWNS — releasing what it created, leaving alone what it was handed, and not declaring a finalizer for state that has nothing unmanaged to finalize.

Method: Roslyn syntax + semantics: every assignment to a disposable field is read to decide whether the type CREATED the value or was handed it, and the type's disposal is checked against that answer — an injected interface it disposes, a value it constructed and never releases, a finalizer on a type holding nothing unmanaged, and a disposable local whose every reference is a plain member read. A value handed to a container that disposes its contents (a parent control's `Controls` collection, a component `IContainer`) is released by that container and is not reported; generated code is out of population. On a repository with no .NET source the same ownership questions are read in JavaScript/TypeScript off the engine’s own token stream (test, vendored, generated and minified paths not): a class declaring `dispose()`, `[Symbol.dispose]()` or `[Symbol.asyncDispose]()` that disposes a field it was handed through a constructor parameter typed as a repository interface or resolved by a dependency-injection container; that assigns a field only ever from `new X(…)` of a disposable class and neither releases it anywhere in the class nor names it in its disposal member or a method that member calls, nor hands it to anything else; and a `const`/`let` local built from literals only whose every reference opens a statement operating on a non-release member of it. A class is disposable when every repository declaration of its name declares or inherits a disposal member, or when it is a documented library disposable (`vscode` EventEmitter, CancellationTokenSource and Disposable; three.js geometries, materials, textures, render targets, renderers, controls and composers). The finalizer arm has no JavaScript counterpart: a class cannot declare one. Dart is read for the owned-and-never-released arm: a Flutter `State` (or a class declaring `dispose()`/`close()`) whose library-private field is written only with direct creations of a framework controller, `FocusNode`, `StreamController` or periodic `Timer` (or a `.listen(…)` into a field declared `StreamSubscription`), which nothing in the class or its library releases (`dispose`/`close`/`cancel`) and which is never handed on except as a named argument. Ruby is read for the owned-and-never-released arm and the abandoned-local arm: a class declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose instance variable is written only with a blockless core descriptor creation (`File.open`/`new`, `Tempfile`, `Dir.open`, `IO.popen`, the `socket` and `openssl` socket classes) that no method of the class closes and that is never handed on (passed, returned, stored, exposed by `attr_reader`, delegated) — a class whose superclass or mixin lies outside the repository is not judged — and a blockless creation read through and dropped (`File.open(path).read`) or held in a local that is never closed, returned, passed or stored (a `&:read` block-pass, an `autoclose: false` borrow and a `fileno` hand-over are not abandonment). PHP is read for the same two arms: a class (not a trait, and not one using a trait) declaring an instance `close`, `dispose`, `shutdown`, `stop`, `disconnect` or `terminate` whose `private` property (or a `final` class's `protected` one) is written only with a direct core `fopen`, `tmpfile`, `popen`, `proc_open`, `fsockopen`, `stream_socket_client`/`server` or `opendir` that nothing in the class closes (`fclose`, `pclose`, `closedir`, `unset`, a reset to `null`) and that is never handed on, and a handle held in a function's local, or read through as the argument of a reader, that is never closed, returned, passed, captured or stored; a `php://` stream, `curl_init`, `SplFileObject`, `PDO` and a function the repository declares under the core name are not read. Deterministic, provable per finding. Advisory.

X19 · Unrestored process-global state10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.

Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.

X2 · Cancellation propagation4.0 / 10Weak✓ Tool-verified

Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).

Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.

  • Only 0/1 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
  • `loadModule` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`. — crates/monty-js/ts/worker/loadModule.browser.ts:8

What to do

  • Thread an AbortSignal through async functions that make requests, so the work stops when its caller gives up.
X21 · Side-effecting pattern guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `when` guard is free of side effects — a guard that increments a counter or assigns while deciding whether its arm matches applies that change during PATTERN MATCHING, on an arm that may not be selected, and skips it entirely when a short-circuit to its left answers first.

Method: Roslyn syntax: `when` guards on case labels and switch-expression arms, read for a mutation (`++`/`--`/assignment) sitting in a position the guard's own `&&`/`||`/`??`/`?:`/`?.` can skip. Deterministic, provable per finding. Advisory.

X22 · Contradicted release guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a method that TAKES a lock or semaphore and gives it back from a flag-guarded `finally` returns the value that flag implies — reporting success while the guard hands the primitive back admits a second caller the exclusion was there to keep out, and reporting failure while the guard keeps it leaves nothing to ever give it back.

Method: Roslyn syntax: `try` statements whose `finally` releases a synchronisation primitive under a bare local-bool guard, where the method also TOOK that same primitive before the `try`, checked for a `return` of a bool literal whose value disagrees with the flag state the method's own straight-line assignments put it in. Deterministic, provable per finding. Advisory.

X23 · Unguarded diagnostic materialisation10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.

Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.

X24 · Document value interpolated into markup unescaped10.0 / 10Exemplary○ Nothing flagged

Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.

Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.

X25 · Inert configuration knob10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.

Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.

X26 · Unsynchronised callback handoff10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a value handed from a callback to the body that waits on it crosses on something built to be crossed — a `Queue<T>`/`List<T>`/`Dictionary<K,V>` written inside an event handler and read back outside it is mutated by two flows at once, and the semaphore or completion source beside it orders how MANY items exist while leaving the collection's own head, tail and backing array unprotected.

Method: Roslyn syntax: method, accessor, local-function and lambda bodies that declare BOTH a non-thread-safe generic collection (`Queue`/`Stack`/`List`/`Dictionary`/`HashSet`/`Sorted*`/`LinkedList`) and a synchronisation primitive (`SemaphoreSlim`/`TaskCompletionSource`/`ManualResetEvent(Slim)`/`AutoResetEvent`/`CountdownEvent`) as locals, then read for a `+=`-registered lambda that raises that primitive while the body outside every lambda waits on it — and, in that scope, a mutating call on the collection inside the lambda paired with a mention of it outside. Any `lock` in the scope abstains it. On a repository with no .NET source the same handoff is read in Java off the engine’s own token stream (test source sets, vendored and demonstration paths not): an `ArrayList`/`LinkedList`/`ArrayDeque`/`PriorityQueue`/`Hash*`/`LinkedHash*`/`Tree*` local and a `CountDownLatch`/`Semaphore`/`CompletableFuture` local, a lambda or anonymous class that raises the primitive and mutates the collection, and a wait outside it; any `synchronized` or `lock()` abstains the body. Because each of those primitives orders what the callback wrote before raising it, only a touch that provably overlaps the callback is convicted: one after the registration and before the next wait, or one in a loop registered-before, waiting on every pass and not declaring the collection. Deterministic, provable per finding. Advisory.

X27 · Collection changed while being enumerated10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a `for` loop leaves the `RefCell` it is walking alone — safe Rust rejects a body that changes the collection its loop borrows at compile time, except through interior mutability: a `RefCell` borrowed in the loop's header stays borrowed until the loop ends, so a `borrow_mut()` of it inside the body panics with `already borrowed: BorrowMutError` and the remaining elements are never seen. Whether a `for` loop leaves the `dict`, `set` or `deque` it is walking alone — CPython's iterators over those check that the collection has not changed size since the loop began, so a body that removes from (or empties) the very collection the loop is walking makes the next step raise `RuntimeError: dictionary changed size during iteration` and the remaining items are never seen.

Method: Roslyn syntax + semantics: `foreach` statements whose body calls a structural mutator (`Add`/`Remove`/`Clear`/`Insert`/…) on the very expression the loop is enumerating. Two arms. ARM A — the source is a concrete fragile BCL collection, or a live `Keys`/`Values` view over one, and the mutator resolves to that same collection's own member; concurrent and immutable collections and arrays are outside the population by construction, since their enumerators survive a structural change. ARM B — the source is an argument-less accessor CALL on a receiver whose body is in source: the accessor must return a stored field VERBATIM and a sibling member must structurally change that same field, both read off the implementations rather than from the members' names. A mutation the loop provably exits immediately after (`break`/`return`/`throw`/`goto`), or one written inside a nested loop or a lambda, is counted and never reported. Deterministic, provable per finding. Advisory.

X28 · Index access outside its own emptiness guard10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a condition that tests a value for emptiness indexes that same value only where the test holds — an `||` written one parenthesis too far to the left leaves an index access outside the guard beside it, so the empty case the guard exists to anticipate reaches the index and throws.

Method: Roslyn syntax only, no semantic model: the OUTERMOST `&&`/`||` of every boolean condition, read for a symbol the condition tests for emptiness (`string.IsNullOrEmpty`/`IsNullOrWhiteSpace`, a `Length`/`Count` comparison against a literal, `Any()`, a `Length`/`Count` pattern, or a comparison against `""`) and ALSO indexes. Each `symbol[...]` access is placed by a boolean-reachability walk from the access up to the outermost connective: an access is COVERED when some enclosing step has it in the right operand and the left operand, under the truth value that step forces, proves the symbol non-empty — a recursion over `&&`/`||` whose true- and false-directions are asymmetric. A finding needs BOTH an uncovered access and a covered one on the same symbol in the same condition, which is the agreeing twin that separates a misplaced parenthesis from an unrelated length test. Bare index accesses with no emptiness test in the condition are neither counted nor reported; a non-identifier receiver and a lambda nested inside the condition are outside the population. Deterministic, provable per finding. Advisory.

X29 · Per-element action decided by a fixed element10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a decision taken once per element is taken ABOUT that element — a test inside a counted loop that reads a fixed subscript of the very collection its guarded statement indexes by the loop variable applies element zero's answer to all of them, so the elements that differ from it are all handled wrongly, and in the same direction.

Method: Roslyn syntax only, no semantic model: every `for` statement declaring exactly ONE loop variable, and every `if` inside its body that is not under a nested loop or a lambda. A site enters the population when the `if`’s condition never mentions the loop variable while the statement it guards indexes some collection by that variable ALONE (`c[i]`; `c[i + 1]` and `c[i, j]` are outside it). A finding additionally needs the AGREEING TWIN at the same-collection grain: the condition must read THAT SAME collection at a subscript that does not move — written into the condition, or reached through a local declared BEFORE the loop, so an alias bound inside the body is not followed. Both collection expressions must be simple identifiers. On a repository with no .NET source the same rule reads JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `for (let|var|const x = …; …; …)` with one declarator and a braced body, an alias followed only when it is declared before the loop in a block that encloses it and never assigned inside the loop. Deterministic, provable per finding. Advisory.

X3 · Exception handling7.3 / 10Strong✓ Tool-verified

Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.

Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.

  • An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. — crates/monty-js/ts/session.ts:391

What to do

  • Swallowed exception (empty catch)
X30 · Support guard that admits what it rejects10.0 / 10Exemplary○ Nothing flagged

Other · Code Health — Whether a guard written as a NEGATED `||` says what its author meant — `!(a || b || x != k)` is `!a && !b && x == k` by De Morgan, so a bail-out that mixes capabilities the code needs with a fault it refuses turns inside out: it fires only where the capabilities are ABSENT, and lets every value the fault term names walk straight into the body that cannot handle it.

Method: Roslyn syntax only, no semantic model: every logical-not whose operand is a parenthesised `||` chain of two or more disjuncts, flattened (a left-nested `a || b || c` read once would see `(a || b)` as one disjunct). A site enters the population on that shape alone. A finding additionally needs the disjuncts to DISAGREE in polarity: at least one bare boolean read — an identifier or member access, never an invocation, which is a predicate rather than a capability flag — and at least one `x != <constant>`, the only form that negates into an exact-value pin (`== null` negates into a looser requirement and is outside the fault set). Consistently-polarised disjunctions, all-fault or all-capability, are counted and never reported; a negated `&&` is outside the population entirely. No same-receiver gate: it was measured to cost a real defect and remove no false positive. Deterministic, provable per finding. Advisory.

X5 · Nullable reference types9.2 / 10Exemplary✓ Tool-verified

Other · Code Health — Whether strict null checking is enabled and not undermined by heavy `!` assertion — TypeScript's `strictNullChecks` (which `strict` turns on) is what makes `string` exclude `null` and `undefined`, and the postfix `!` is the operator that silences it.

Method: Roslyn compiler-options scan: NullableContextOptions per project; null-forgiving (!) suppression density per 1k syntax nodes. Deterministic, adoption plus suppression penalty.

  • ~2.0 `!` null assertions per 1k TypeScript source lines — 16 assertion(s) across the 7834 source line(s) of the 36 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: crates/monty-js/ts/classInstance.ts (6), crates/monty-js/ts/worker/value.ts (5), crates/monty-js/ts/worker/channel.ts (2). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.

What to do

  • The findings name the configuration each number was taken from and, for the assertions, the files that hold them. Turn null checking on where it is off — `"strict": true` in the base tsconfig that the others extend switches `strictNullChecks` on with the rest of the family — and then resolve the assertions rather than adding to them. A `!` on a value the checker could show to be null is a promise the author cannot check from where they are standing, and each one is a `TypeError: Cannot read properties of null` waiting for the path that makes it true; where the value genuinely cannot be null, say something the checker can see instead (narrow it with a test, make the property required, drop the `?`).

Reference — by lens

The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.

LensScoreRatingImpact
Code Health68%AdequateAcceptable, with room to improve.
Architecture83%StrongSolid.
Maturity64%Adequate — gated by M2Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Readiness61%Adequate — gated by P5Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Security51%Adequate — gated by D29, D30Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Performance94%ExemplaryStrongest area.
Unscored — 2 check(s) recorded observations but carry no score

These checks ran and found something, but they do not carry a score — either by design (an advisory check reports evidence rather than grading it) or because they could not be scored here. They are excluded from the score for that reason, not because there was nothing to see.

  • X10 Duplicated predicate — 2 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
  • X7 Silent fallback defaults — 5 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 3 control(s) we could not find positive evidence for

These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.

  • C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
Not included — 52 check(s) not relevant to this codebase

These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.

  • AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
  • AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
  • AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
  • AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
  • AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
  • AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
  • AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
  • AX1 Captive dependencies — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX2 Stateful singletons — No container singleton was found, so there is no shared instance for concurrent requests to race on. No function in this Python code is served by a threaded web framework (a Flask, Bottle or FastAPI route, a Django or Pyramid view), so no module is shared between request threads. Rust's compiler refuses unsynchronised shared mutation — a value shared across threads must be Sync — so the race this check looks for cannot be written. TypeScript/JavaScript runs each process's requests on one event loop, so no two requests write a shared object at the same instant (interleaving across an await is a different defect).
  • AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • AX7 Slice cohesion — not applicable — not a vertical-slice architecture
  • AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • AXR1 Runtime accessibility — the dev server did not expose a crawlable HTTP endpoint in time — no runtime evidence This is a statement about this run, not a statement about your application: nothing here says the surface is inaccessible, only that it was never rendered.
  • C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • D11 Test Reliability — Test reliability not scored — polyglot repository, one half's runner produced no measurement
  • D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
  • D21 Naming Consistency — Naming consistency is measured on C# only; JavaScript, Python, Rust, TypeScript not measured.
  • D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust, TypeScript surface was not measured.
  • D23 Boundary Type-Coupling — No bounded-context organisation was detected either — neither a context-shaped layout, nor 2+ sibling source directories each declaring an aggregate root, nor 2+ projects each declaring an entity of their own. Declaring this codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
  • D24 Comment Value — D24 reads C# and Visual Basic comments only — this repository's production source is .py, .rs, .ts, which was left unread. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D25 ADR Conformance — no ADRs to check
  • D27 Navigability — D27 counts a call into the standard library or a dependency as unresolved for this repository's language (.rs), so too few call sites counted as resolved to assess navigability. Not scored: this is a gap in the analyzer, not a verdict about this repository.
  • D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
  • D32 Data Compliance (PII/GDPR) — 3 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
  • D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
  • D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
  • D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
  • D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
  • D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
  • D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
  • D8 Code Coverage — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — crates/monty-js/ runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
  • DM1 Domain Modelling — applicable but not scored (2 of 3 signals for this style — below the bar we score at): 194 value object(s); 1 domain event(s); its domain events are published by services or handlers — no domain entity raises one
  • ED2 Event/command shape — not scored — deciding whether a command has more than one competing handler requires resolving the call graph, and a call made through an inferred or generic receiver has no resolvable owner in the source. Reported as guidance rather than measured
  • ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
  • ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this lens looks for
  • GD1 Unfinished & placeholder code — no source files were read — this check reads C#, F#, JavaScript/TypeScript, Dart, Ruby and Scala, and none was read for this repository's product. That is a limit of the analyzer, not a finding about your code.
  • IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
  • M4 Documentation accuracy — Not applicable: the 81 current-state document(s) make no claim of a kind M4 checks. 71 claim(s) of kinds M4 does not check were not checked (path 24, install 3, environment variable 31, setting 2, package 11); M4 checks only links and versions.
  • P12 CI test-gate honesty — Reported, not scored — this card publishes what the CI gate does with the test inventory rather than grading it. The findings above are its output.
  • P7 Outbound HTTP resilience — not applicable — no HTTP server, API framework or worker entry point was found in the JavaScript/TypeScript, Python, Rust source, so there is no service whose uptime a failing dependency could take down
  • P8 Schema migrations — no ORM, schema-migration tool or schema auto-create was found in this repository's dependency manifests or source, so there is no database schema for this check to judge
  • P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (lcov — `cargo install cargo-llvm-cov`, then `cargo llvm-cov --lcov --output-path lcov.info`) and commit it — a hosted scan measures a clone of the repository, so a report that exists only in a working tree, a CI runner's or your own, never reaches it; the artefact is commonly gitignored, so `git add -f` that one file (or un-ignore its path) and commit it alongside the code it measures, or wire coverage collection into CI, to enable this cross-layer check
  • PF2 Allocation hygiene — Not applicable: Rust spells out every heap allocation and makes borrowed slices (&[T], &str) its ordinary parameter types, so the allocation-aware style this card rewards elsewhere is the language's baseline rather than a rung to climb.
  • R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
  • S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
  • SC1 Supply-chain hygiene — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X20 Mistyped argument guard — This check asks whether an argument guard reports an EMPTY value as a NULL one, which needs a language that throws a null-specific argument exception — .NET's ArgumentNullException, the JVM's NullPointerException, Dart's ArgumentError.notNull. This repository contains none of those languages: the ones it is written in have a single exception for a bad argument, so there is no pair of exceptions to confuse and nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
  • X4 Structured logging — This check asks whether log calls keep a message's values apart from its text, which needs a logger that can carry them as fields. This repository's Rust was read, and it logs through none: the `log` crate's macros take one finished message (as log4net does in C#; its `kv` values are an opt-in its backends mostly drop), `println!`/`eprintln!` are not loggers, or it makes no log call outside its tests and examples at all. Calls through `tracing` (`tracing::info!`, or `info!` imported from it) would be judged.
  • X6 Hand-rolled structured-format parsing — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
  • X9 Subsumed condition operand — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.

Appendix A — Findings (grouped)

The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.

Critical — 28 finding(s)
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · High CVE · ×6
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Critical CVE · ×3
  • REDACTED
  • REDACTED
  • REDACTED
AX8 · Test isolation · Production project references a test project · ×2
  • Production project references a test project: monty-bench → monty-fixture — `monty-bench` (production) references the test project `monty-fixture`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
  • Production project references a test project: monty-datatest → monty-fixture — `monty-datatest` (production) references the test project `monty-fixture`. Production must never depend on test code — it pulls a unit-test framework and test fixtures into the shipped product and inverts the only correct direction (tests depend on production, never the reverse). Move any shared helper into a production support library, or invert the reference.
D10 · Test Quality · Assertions commented out · ×2
  • Assertions commented out: assertion error crates/monty-js/__test__/exceptions.spec.ts:70 — The test body contains commented-out assertion calls and no live one — it runs, verifies nothing, and still passes. Restore the assertions or delete the test; a green test that checks nothing is worse than an absent one.
  • Assertions commented out: assertion error with introspected detail crates/monty-js/__test__/exceptions.spec.ts:82 — The test body contains commented-out assertion calls and no live one — it runs, verifies nothing, and still passes. Restore the assertions or delete the test; a green test that checks nothing is worse than an absent one.
D13 · Secret Scanning · Leaked secret · ×1
  • REDACTED
D28 · Secrets (history) · High secret · ×1
  • REDACTED
Serious — 788 finding(s)
D2 · Cognitive Complexity · monty · ×66
  • monty::heap::for_each_child_id (cognitive 165) crates/monty/src/heap/mod.rs:1855 — monty::heap::for_each_child_id has cognitive complexity 165 (threshold 15). Drivers by points: if/else 46 (117 pts), loops 21 (43 pts), match/switch 3 (5 pts) (nesting depth added 95). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • monty::prepare::collect_scope_info_from_node (cognitive 59) crates/monty/src/prepare.rs:2515 — monty::prepare::collect_scope_info_from_node has cognitive complexity 59 (threshold 15). Drivers by points: loops 23 (48 pts), if/else 4 (10 pts), match/switch 1 (nesting depth added 31). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • monty::args::bind_native::bind_slow (cognitive 52) crates/monty/src/args/bind_native.rs:98 — monty::args::bind_native::bind_slow has cognitive complexity 52 (threshold 15). Drivers by points: if/else 20 (34 pts), match/switch 3 (10 pts), boolean chains 6, loops 2 (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty::prepare::collect_cell_vars_from_node (cognitive 49) crates/monty/src/prepare.rs:2928 — monty::prepare::collect_cell_vars_from_node has cognitive complexity 49 (threshold 15). Drivers by points: loops 18 (38 pts), if/else 4 (10 pts), match/switch 1 (nesting depth added 26). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • monty::prepare::collect_referenced_names_from_node (cognitive 49) crates/monty/src/prepare.rs:3444 — monty::prepare::collect_referenced_names_from_node has cognitive complexity 49 (threshold 15). Drivers by points: loops 18 (38 pts), if/else 4 (10 pts), match/switch 1 (nesting depth added 26). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • monty::builtins::min_max::run_min_max (cognitive 47) crates/monty/src/builtins/min_max.rs:40 — monty::builtins::min_max::run_min_max has cognitive complexity 47 (threshold 15). Drivers by points: if/else 16 (34 pts), loops 4 (12 pts), match/switch 1 (nesting depth added 26). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty::prepare::collect_cell_vars_from_expr (cognitive 45) crates/monty/src/prepare.rs:3223 — monty::prepare::collect_cell_vars_from_expr has cognitive complexity 45 (threshold 15). Drivers by points: loops 12 (27 pts), if/else 3 (10 pts), match/switch 3 (7 pts), boolean chains 1 (nesting depth added 26). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • monty::modules::base64::b64_decode (cognitive 39) crates/monty/src/modules/base64.rs:654 — monty::modules::base64::b64_decode has cognitive complexity 39 (threshold 15). Drivers by points: if/else 15 (32 pts), boolean chains 4, match/switch 1 (2 pts), loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty::prepare::collect_referenced_names_from_expr (cognitive 39) crates/monty/src/prepare.rs:3656 — monty::prepare::collect_referenced_names_from_expr has cognitive complexity 39 (threshold 15). Drivers by points: if/else 8 (18 pts), loops 7 (14 pts), match/switch 3 (7 pts) (nesting depth added 21). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty::fstring::format_with_spec (cognitive 36) crates/monty/src/fstring.rs:669 — monty::fstring::format_with_spec has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 11, match/switch 2 (3 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • monty::prepare::collect_assigned_names_from_expr (cognitive 32) crates/monty/src/prepare.rs:2736 — monty::prepare::collect_assigned_names_from_expr has cognitive complexity 32 (threshold 15). Drivers by points: loops 8 (18 pts), if/else 4 (7 pts), match/switch 3 (7 pts) (nesting depth added 17). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • monty::types::bytes::bytes_hex (cognitive 32) crates/monty/src/types/bytes.rs:2177 — monty::types::bytes::bytes_hex has cognitive complexity 32 (threshold 15). Drivers by points: if/else 13 (23 pts), loops 2 (8 pts), boolean chains 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty::types::re_pattern::translate_replacement (cognitive 32) crates/monty/src/types/re_pattern.rs:781 — monty::types::re_pattern::translate_replacement has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 2 (6 pts), match/switch 1 (3 pts), boolean chains 2 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty::modules::binascii::qp_encode (cognitive 31) crates/monty/src/modules/binascii.rs:691 — monty::modules::binascii::qp_encode has cognitive complexity 31 (threshold 15). Drivers by points: if/else 11 (24 pts), boolean chains 6, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty::builtins::zip::builtin_zip (cognitive 29) crates/monty/src/builtins/zip.rs:19 — monty::builtins::zip::builtin_zip has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (20 pts), loops 4 (9 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty::prepare::collect_assigned_names_from_args (cognitive 29) crates/monty/src/prepare.rs:2856 — monty::prepare::collect_assigned_names_from_args has cognitive complexity 29 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 4 (8 pts), match/switch 3 (7 pts) (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: 2 other methods here (monty::prepare::collect_cell_vars_from_args, monty::prepare::collect_referenced_names_from_args) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • monty::prepare::collect_cell_vars_from_args (cognitive 29) crates/monty/src/prepare.rs:3373 — monty::prepare::collect_cell_vars_from_args has cognitive complexity 29 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 4 (8 pts), match/switch 3 (7 pts) (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: 2 other methods here (monty::prepare::collect_assigned_names_from_args, monty::prepare::collect_referenced_names_from_args) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • monty::prepare::collect_referenced_names_from_args (cognitive 29) crates/monty/src/prepare.rs:3855 — monty::prepare::collect_referenced_names_from_args has cognitive complexity 29 (threshold 15). Drivers by points: loops 6 (14 pts), if/else 4 (8 pts), match/switch 3 (7 pts) (nesting depth added 16). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident. This shape REPEATS in the file: 2 other methods here (monty::prepare::collect_assigned_names_from_args, monty::prepare::collect_cell_vars_from_args) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared.
  • monty::types::type::parse_int_digits (cognitive 28) crates/monty/src/types/type.rs:1107 — monty::types::type::parse_int_digits has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15 (19 pts), boolean chains 4, match/switch 3 (4 pts), loops 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • monty::builtins::isinstance::isinstance_check_tuple (cognitive 27) crates/monty/src/builtins/isinstance.rs:89 — monty::builtins::isinstance::isinstance_check_tuple has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (24 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty::types::complex::parse (cognitive 27) crates/monty/src/types/complex.rs:468 — monty::types::complex::parse has cognitive complexity 27 (threshold 15). Drivers by points: if/else 18 (27 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty::modules::math::aggregate::fsum (cognitive 26) crates/monty/src/modules/math/aggregate.rs:139 — monty::modules::math::aggregate::fsum has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty::modules::random::gamma_deviate (cognitive 26) crates/monty/src/modules/random.rs:1374 — monty::modules::random::gamma_deviate has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (20 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty::modules::random::binomial_deviate (cognitive 26) crates/monty/src/modules/random.rs:1539 — monty::modules::random::binomial_deviate has cognitive complexity 26 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty::types::long_int::bigint_true_divide (cognitive 26) crates/monty/src/types/long_int.rs:1118 — monty::types::long_int::bigint_true_divide has cognitive complexity 26 (threshold 15). Drivers by points: if/else 17 (22 pts), boolean chains 4 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • + 41 more in this group — see findings.md.
D15 · Churn × Complexity Hotspots · Hotspot · ×60
  • Hotspot: crates/monty/src/bytecode/vm/mod.rs crates/monty/src/bytecode/vm/mod.rs:1244 — crates/monty/src/bytecode/vm/mod.rs changed 42 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 175 in VM::run at line 1244. 3 of those changes were fix/bug commits, and the other 39 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty/src/bytecode/vm/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty/src/heap/mod.rs crates/monty/src/heap/mod.rs:1855 — crates/monty/src/heap/mod.rs changed 32 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 121 in monty::heap::for_each_child_id at line 1855. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty/src/heap/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty/src/object_bridge.rs crates/monty/src/object_bridge.rs:712 — crates/monty/src/object_bridge.rs changed 33 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 89 in MontyType::from_internal_static at line 712. 2 of those changes were fix/bug commits, and the other 31 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty/src/object_bridge.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty/src/heap_data.rs crates/monty/src/heap_data.rs:339 — crates/monty/src/heap_data.rs changed 34 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 62 in HeapData::py_type at line 339. 1 of those changes was a fix/bug commit, and the other 33 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty/src/heap_data.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty/src/types/type.rs crates/monty/src/types/type.rs:807 — crates/monty/src/types/type.rs changed 42 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 39 in Type::call_native at line 807. 2 of those changes were fix/bug commits, and the other 40 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty/src/types/type.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty-types/src/object.rs crates/monty-types/src/object.rs:694 — crates/monty-types/src/object.rs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in ObjectRef::leaf_repr_fmt at line 694. 2 of those changes were fix/bug commits, and the other 28 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty-types/src/object.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty/src/value.rs crates/monty/src/value.rs:323 — crates/monty/src/value.rs changed 46 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 26 in Value::py_cmp at line 323. 2 of those changes were fix/bug commits, and the other 44 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty/src/value.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty-pool/src/checkout.rs crates/monty-pool/src/checkout.rs:1685 — crates/monty-pool/src/checkout.rs changed 35 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in Checkout::turn_io at line 1685. 1 of those changes was a fix/bug commit, and the other 34 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty-pool/src/checkout.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty/src/types/str.rs crates/monty/src/types/str.rs:547 — crates/monty/src/types/str.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in monty::types::str::call_str_method_impl at line 547. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty/src/types/str.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty-pool/src/telemetry/tracing.rs crates/monty-pool/src/telemetry/tracing.rs:712 — crates/monty-pool/src/telemetry/tracing.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in monty_pool::telemetry::tracing::os_call_span at line 712. 1 of those changes was a fix/bug commit, and the other 20 changed it for other reasons — this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty-pool/src/telemetry/tracing.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty/src/modules/mod.rs crates/monty/src/modules/mod.rs:113 — crates/monty/src/modules/mod.rs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 27 in StandardLib::from_static at line 113. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty/src/modules/mod.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty/src/parse.rs crates/monty/src/parse.rs:1472 — crates/monty/src/parse.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in Parser::parse_expression_impl at line 1472. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty/src/parse.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty/src/types/bytes.rs crates/monty/src/types/bytes.rs:520 — crates/monty/src/types/bytes.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in monty::types::bytes::call_bytes_method_impl at line 520. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty/src/types/bytes.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty/src/bytecode/compiler.rs crates/monty/src/bytecode/compiler.rs:1141 — crates/monty/src/bytecode/compiler.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in Compiler::compile_expr at line 1141. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty/src/bytecode/compiler.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty/src/types/dict.rs crates/monty/src/types/dict.rs:1473 — crates/monty/src/types/dict.rs changed 26 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 24 in HeapObjectRead::py_call_attr at line 1473. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty/src/types/dict.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty-js/src/pool.rs crates/monty-js/src/pool.rs:1061 — crates/monty-js/src/pool.rs changed 30 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in monty_js::pool::turn_to_js at line 1061. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty-js/src/pool.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty/src/prepare.rs crates/monty/src/prepare.rs:2515 — crates/monty/src/prepare.rs changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in monty::prepare::collect_scope_info_from_node at line 2515. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty/src/prepare.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty-proto/src/python/exceptions.rs crates/monty-proto/src/python/exceptions.rs:23 — crates/monty-proto/src/python/exceptions.rs changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in monty_proto::python::exceptions::exc_monty_to_py at line 23. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty-proto/src/python/exceptions.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty-proto/src/worker.rs crates/monty-proto/src/worker.rs:255 — crates/monty-proto/src/worker.rs changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 15 in Child::handle at line 255. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty-proto/src/worker.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty-pool/src/telemetry/metrics.rs crates/monty-pool/src/telemetry/metrics.rs:805 — crates/monty-pool/src/telemetry/metrics.rs changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in monty_pool::telemetry::metrics::os_call at line 805. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty-pool/src/telemetry/metrics.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty/src/bytecode/op.rs crates/monty/src/bytecode/op.rs:860 — crates/monty/src/bytecode/op.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 72 in Opcode::stack_effect at line 860. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty/src/bytecode/op.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty-proto/src/wire.rs crates/monty-proto/src/wire.rs:390 — crates/monty-proto/src/wire.rs changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in monty_proto::wire::encode_node at line 390. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty-proto/src/wire.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty-python/src/pool.rs crates/monty-python/src/pool.rs:1490 — crates/monty-python/src/pool.rs changed 23 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in pydantic_monty_client::pool::drive_sync at line 1490. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty-python/src/pool.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty/src/args/bind_python.rs crates/monty/src/args/bind_python.rs:251 — crates/monty/src/args/bind_python.rs changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 55 in Signature::bind at line 251. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty/src/args/bind_python.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • Hotspot: crates/monty-proto/src/python/convert.rs crates/monty-proto/src/python/convert.rs:81 — crates/monty-proto/src/python/convert.rs changed 21 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 18 in monty_proto::python::convert::host_type_object at line 81. Frequent change and high complexity in one file compound: schedule the next change to it to include carving out the part being edited, with the area under test before it moves. Counted over 2026-07-28..2026-10-26, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-07-28 20:13:57 +00:00' --until='2026-10-26 20:13:57 +00:00' --full-history --no-merges -- crates/monty-proto/src/python/convert.rs`: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each — a difference of several commits on a file whose history was re-landed or reverted inside the window.
  • + 35 more in this group — see findings.md.
D3 · God Classes · FileTooLong · ×56
  • FileTooLong: src/prepare.rs crates/monty/src/prepare.rs — FileTooLong — 2329 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 1829 over it, 4.66× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: bytecode/compiler.rs crates/monty/src/bytecode/compiler.rs — FileTooLong — 2212 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 87% of them inside a single declaration: Compiler (2 blocks, 253-3950). The bar is 500 significant lines; this is 1712 over it, 4.42× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/parse.rs crates/monty/src/parse.rs — FileTooLong — 1827 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 73% of them inside a single declaration: Parser (2 blocks, 318-2533). The bar is 500 significant lines; this is 1327 over it, 3.65× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: vm/mod.rs crates/monty/src/bytecode/vm/mod.rs — FileTooLong — 1510 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 78% of them inside a single declaration: VM (4 blocks, 741-2911). The bar is 500 significant lines; this is 1010 over it, 3.02× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/pool.rs crates/monty-python/src/pool.rs — FileTooLong — 1438 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 34 free functions. The bar is 500 significant lines; this is 938 over it, 2.88× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/exception_private.rs crates/monty/src/exception_private.rs — FileTooLong — 1375 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 80% of them inside a single declaration: ExcTypeExt (38-2565). The bar is 500 significant lines; this is 875 over it, 2.75× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: types/bytes.rs crates/monty/src/types/bytes.rs — FileTooLong — 1370 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 82 free functions. The bar is 500 significant lines; this is 870 over it, 2.74× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/fstring.rs crates/monty/src/fstring.rs — FileTooLong — 1290 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 49 free functions. The bar is 500 significant lines; this is 790 over it, 2.58× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: types/str.rs crates/monty/src/types/str.rs — FileTooLong — 1177 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 71 free functions. The bar is 500 significant lines; this is 677 over it, 2.35× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/value.rs crates/monty/src/value.rs — FileTooLong — 1137 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 73% of them inside a single declaration: Value (6 blocks, 51-1831). The bar is 500 significant lines; this is 637 over it, 2.27× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: modules/random.rs crates/monty/src/modules/random.rs — FileTooLong — 1114 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 56 free functions. The bar is 500 significant lines; this is 614 over it, 2.23× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/checkout.rs crates/monty-pool/src/checkout.rs — FileTooLong — 1110 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 67% of them inside a single declaration: Checkout (3 blocks, 403-2140). The bar is 500 significant lines; this is 610 over it, 2.22× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: types/dict.rs crates/monty/src/types/dict.rs — FileTooLong — 1097 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 597 over it, 2.19× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: decimal/py.rs crates/monty/src/types/decimal/py.rs — FileTooLong — 1096 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 596 over it, 2.19× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/object.rs crates/monty-types/src/object.rs — FileTooLong — 1069 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 569 over it, 2.14× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: heap/mod.rs crates/monty/src/heap/mod.rs — FileTooLong — 1044 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 544 over it, 2.09× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/overlay.rs crates/monty-fs/src/overlay.rs — FileTooLong — 1022 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 45 free functions. The bar is 500 significant lines; this is 522 over it, 2.04× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: types/set.rs crates/monty/src/types/set.rs — FileTooLong — 980 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 480 over it, 1.96× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: types/datetime.rs crates/monty/src/types/datetime.rs — FileTooLong — 910 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 50 free functions. The bar is 500 significant lines; this is 410 over it, 1.82× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: ts/session.ts crates/monty-js/ts/session.ts — FileTooLong — 867 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 367 over it, 1.73× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/snapshot.rs crates/monty-python/src/snapshot.rs — FileTooLong — 854 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 354 over it, 1.71× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: types/file.rs crates/monty/src/types/file.rs — FileTooLong — 851 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 351 over it, 1.70× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/pool.rs crates/monty-js/src/pool.rs — FileTooLong — 837 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted). The bar is 500 significant lines; this is 337 over it, 1.67× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • FileTooLong: src/worker.rs crates/monty-proto/src/worker.rs — FileTooLong — 826 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 66% of them inside a single declaration: Child (3 blocks, 217-1103). The bar is 500 significant lines; this is 326 over it, 1.65× the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body — the parts that share the same inputs and are named together — into its own unit in a sibling file, and have the original call them.
  • FileTooLong: src/wire.rs crates/monty-proto/src/wire.rs — FileTooLong — 825 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 65 free functions. The bar is 500 significant lines; this is 325 over it, 1.65× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
  • + 31 more in this group — see findings.md.
D1 · Cyclomatic Complexity · monty · ×30
  • monty::heap::for_each_child_id (cyclomatic 121) crates/monty/src/heap/mod.rs:1855 — monty::heap::for_each_child_id has cyclomatic complexity 121 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • monty::heap::py_dec_ref_ids_for_data (cyclomatic 65) crates/monty/src/heap/mod.rs:2202 — monty::heap::py_dec_ref_ids_for_data has cyclomatic complexity 65 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: HeapReadOutput::id (cyclomatic 67) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • monty::prepare::collect_scope_info_from_node (cyclomatic 50) crates/monty/src/prepare.rs:2515 — monty::prepare::collect_scope_info_from_node has cyclomatic complexity 50 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • monty::object_bridge::import_node (cyclomatic 46) crates/monty/src/object_bridge.rs:835 — monty::object_bridge::import_node has cyclomatic complexity 46 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: MontyType::from_internal_static (cyclomatic 89) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • monty::prepare::collect_referenced_names_from_node (cyclomatic 43) crates/monty/src/prepare.rs:3444 — monty::prepare::collect_referenced_names_from_node has cyclomatic complexity 43 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • monty::prepare::collect_cell_vars_from_node (cyclomatic 41) crates/monty/src/prepare.rs:2928 — monty::prepare::collect_cell_vars_from_node has cyclomatic complexity 41 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • monty::fstring::format_with_spec (cyclomatic 39) crates/monty/src/fstring.rs:669 — monty::fstring::format_with_spec has cyclomatic complexity 39 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • monty::prepare::collect_referenced_names_from_expr (cyclomatic 38) crates/monty/src/prepare.rs:3656 — monty::prepare::collect_referenced_names_from_expr has cyclomatic complexity 38 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • monty::prepare::collect_cell_vars_from_expr (cyclomatic 35) crates/monty/src/prepare.rs:3223 — monty::prepare::collect_cell_vars_from_expr has cyclomatic complexity 35 (threshold 15). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • monty::args::bind_native::bind_slow (cyclomatic 33) crates/monty/src/args/bind_native.rs:98 — monty::args::bind_native::bind_slow has cyclomatic complexity 33 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • monty::prepare::collect_assigned_names_from_expr (cyclomatic 31) crates/monty/src/prepare.rs:2736 — monty::prepare::collect_assigned_names_from_expr has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Prepare::prepare_expression (cyclomatic 33) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • monty::fstring::encode_format_spec (cyclomatic 27) crates/monty/src/fstring.rs:1150 — monty::fstring::encode_format_spec has cyclomatic complexity 27 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • monty::types::type::parse_int_digits (cyclomatic 24) crates/monty/src/types/type.rs:1107 — monty::types::type::parse_int_digits has cyclomatic complexity 24 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • monty::modules::base64::b64_decode (cyclomatic 23) crates/monty/src/modules/base64.rs:654 — monty::modules::base64::b64_decode has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • monty::modules::copy::deep_copy (cyclomatic 19) crates/monty/src/modules/copy.rs:204 — monty::modules::copy::deep_copy has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • monty::builtins::isinstance::isinstance_check_tuple (cyclomatic 18) crates/monty/src/builtins/isinstance.rs:89 — monty::builtins::isinstance::isinstance_check_tuple has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • monty::builtins::min_max::run_min_max (cyclomatic 18) crates/monty/src/builtins/min_max.rs:40 — monty::builtins::min_max::run_min_max has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • monty::modules::random::setstate (cyclomatic 18) crates/monty/src/modules/random.rs:360 — monty::modules::random::setstate has cyclomatic complexity 18 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: monty::modules::random::call_seeded (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • monty::prepare::collect_assigned_names_from_args (cyclomatic 18) crates/monty/src/prepare.rs:2856 — monty::prepare::collect_assigned_names_from_args has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This shape REPEATS in the file: 2 other methods here (monty::prepare::collect_cell_vars_from_args, monty::prepare::collect_referenced_names_from_args) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: Prepare::prepare_expression (cyclomatic 33) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • monty::prepare::collect_cell_vars_from_args (cyclomatic 18) crates/monty/src/prepare.rs:3373 — monty::prepare::collect_cell_vars_from_args has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This shape REPEATS in the file: 2 other methods here (monty::prepare::collect_assigned_names_from_args, monty::prepare::collect_referenced_names_from_args) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: Prepare::prepare_expression (cyclomatic 33) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • monty::prepare::collect_referenced_names_from_args (cyclomatic 18) crates/monty/src/prepare.rs:3855 — monty::prepare::collect_referenced_names_from_args has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions. This shape REPEATS in the file: 2 other methods here (monty::prepare::collect_assigned_names_from_args, monty::prepare::collect_cell_vars_from_args) have the same decision points, in the same order, at the same nesting depths — so this is one pattern written 3 times rather than 3 independent problems. Splitting this body alone leaves the other 2 exactly as they are. Where these are variations on one operation, the change that clears all 3 is the shared one: lift the common shape into a single routine the variants call, parameterised by whatever genuinely differs between them, and keep in each method only the part that is not shared. This is NOT this file's highest cyclomatic complexity: Prepare::prepare_expression (cyclomatic 33) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • monty::modules::random::binomial_deviate (cyclomatic 17) crates/monty/src/modules/random.rs:1539 — monty::modules::random::binomial_deviate has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: monty::modules::random::call_seeded (cyclomatic 23) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • monty::str_format::render_field (cyclomatic 17) crates/monty/src/str_format.rs:128 — monty::str_format::render_field has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • monty::modules::binascii::qp_encode (cyclomatic 16) crates/monty/src/modules/binascii.rs:691 — monty::modules::binascii::qp_encode has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • monty::modules::tomllib::parser::parse_value (cyclomatic 16) crates/monty/src/modules/tomllib/parser.rs:370 — monty::modules::tomllib::parser::parse_value has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • + 5 more in this group — see findings.md.
D17 · Explicit Debt · TodoComment · ×30
  • TodoComment crates/monty-python/src/print_target.rs:261 — // TODO: support `async def` print callbacks under `AsyncMonty` by having — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/test_cases/bytes__methods.py:383 — # TODO: These edge cases when start > len need to be fixed — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/test_cases/comprehension__all.py:168 — # TODO: When proper generators are implemented, these should return generator objects — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/test_cases/datetime__core.py:106 — # TODO(datetime): restore once compare/subtract error semantics are finalized without VM-specific branching. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/test_cases/datetime__core.py:187 — # TODO(timezone): add a GC-stability regression ensuring `timezone.utc` identity — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/test_cases/datetime__core.py:275 — # TODO(datetime): restore once overflow paths are finalized without VM-specific binary fallback branches. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/test_cases/fstring__all.py:390 — # TODO: method call on literal - parser doesn't support this yet — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/test_cases/fstring__all.py:393 — # TODO: method call on variable - str.upper() not implemented yet — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/test_cases/fstring__all.py:405 — # TODO: conditional expression - parser doesn't support IfExp yet — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/test_cases/iter__generator_expr_type.py:4 — # TODO: When proper generators are implemented, this test should be removed. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `# REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/src/object_bridge.rs:1012 — // TODO: apply `attrs` to the instance so host-side edits — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/src/os_dispatch.rs:146 — // TODO: Consider separating effects from caller names so functions can share result handling. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/src/parse.rs:804 — // TODO add cause to Node::Raise — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/src/parse.rs:1707 — // TODO: When proper generators are implemented, this should produce — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/src/prepare.rs:2179 — /// TODO This whole implementation seems ugly at best. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/src/types/file.rs:1188 — /// TODO: `enumerate`, `zip`, `map`, `filter` and `sorted` go away from this — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/src/types/py_trait.rs:243 — /// TODO: the intermediate `String` here is *not* tracked, so recursive — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/src/types/re_pattern.rs:775 — /// TODO: Multi-digit backreferences like `\10` are not fully supported. CPython — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/src/types/re_pattern.rs:821 — // TODO: This only handles single-digit backrefs (\1–\9). — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/src/types/itertools/mod.rs:111 — // TODO: when this fails, box the offending variant (as `Accumulate` and the — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/src/modules/asyncio.rs:166 — // TODO: support keyword arguments (e.g. return_exceptions); for now any — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/src/modules/dataclasses/method.rs:580 — /// TODO(dataclass-keywords): a third binder alongside `args::bind_native` and — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/src/heap/stable_heap.rs:153 — // TODO: use `UnsafeCell::as_mut_unchecked` when stable. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/src/heap/stable_heap.rs:206 — // TODO: use `UnsafeCell::as_ref_unchecked` when stable. — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • TodoComment crates/monty/src/bytecode/vm/async_exec.rs:1027 — // TODO: support concurrent re-await (CPython does). — source code is not a task system: move the work to your tracker and leave a reference instead (e.g. `// REF: #123`), so the task is planned where tasks live and the ticket links back to the code.
  • + 5 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (5 lines × 2) · ×29
  • Duplicated block (5 lines × 2) crates/monty-js/src/telemetry.rs:177 — crates/monty-js/src/telemetry.rs:177-181 | crates/monty-js/src/telemetry.rs:193-197 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/monty-pool/src/telemetry/tracing.rs:342 — crates/monty-pool/src/telemetry/tracing.rs:342-346 | crates/monty-pool/src/telemetry/tracing.rs:363-367 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/monty/src/builtins/any.rs:11 — crates/monty/src/builtins/any.rs:11-16 | crates/monty/src/modules/math/aggregate.rs:237-241 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) crates/monty/src/builtins/isinstance.rs:58 — crates/monty/src/builtins/isinstance.rs:58-62 | crates/monty/src/builtins/isinstance.rs:129-133 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/monty/src/bytecode/vm/collections.rs:227 — crates/monty/src/bytecode/vm/collections.rs:227-231 | crates/monty/src/bytecode/vm/collections.rs:316-320 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/monty/src/modules/time.rs:597 — crates/monty/src/modules/time.rs:597-601 | crates/monty/src/types/date.rs:391-395 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (5 lines × 2) crates/monty/src/parse.rs:1445 — crates/monty/src/parse.rs:1445-1449 | crates/monty/src/parse.rs:2179-2183 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/monty/src/types/complex.rs:655 — crates/monty/src/types/complex.rs:655-659 | crates/monty/src/types/complex.rs:665-669 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/monty/src/types/decimal/arith.rs:82 — crates/monty/src/types/decimal/arith.rs:82-86 | crates/monty/src/types/decimal/arith.rs:114-118 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/monty/src/types/decimal/methods.rs:265 — crates/monty/src/types/decimal/methods.rs:265-269 | crates/monty/src/types/decimal/methods.rs:290-294 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/monty/src/types/dict.rs:479 — crates/monty/src/types/dict.rs:479-483 | crates/monty/src/types/set.rs:310-314 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) crates/monty/src/types/long_int.rs:393 — crates/monty/src/types/long_int.rs:393-397 | crates/monty/src/types/long_int.rs:421-425 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/monty/src/types/long_int/arithmetic.rs:224 — crates/monty/src/types/long_int/arithmetic.rs:224-228 | crates/monty/src/types/long_int/arithmetic.rs:247-251 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/monty/src/types/set.rs:552 — crates/monty/src/types/set.rs:552-556 | crates/monty/src/types/set.rs:569-575 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/monty/src/types/timedelta.rs:492 — crates/monty/src/types/timedelta.rs:492-496 | crates/monty/src/types/timedelta.rs:510-514 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/monty/src/types/generic_alias.rs:107 — crates/monty/src/types/generic_alias.rs:107-111 | crates/monty/src/types/union.rs:271-275 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (5 lines × 2) crates/monty/src/types/set.rs:1271 — crates/monty/src/types/set.rs:1271-1275 | crates/monty/src/types/set.rs:1578-1582 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/monty/src/types/dict_view.rs:251 — crates/monty/src/types/dict_view.rs:251-255 | crates/monty/src/types/dict_view.rs:527-531 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/monty-js/src/convert.rs:331 — crates/monty-js/src/convert.rs:331-335 | crates/monty-js/src/convert.rs:379-383 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/monty/src/types/bytes.rs:1823 — crates/monty/src/types/bytes.rs:1823-1827 | crates/monty/src/types/str.rs:1648-1652 — before extracting anything, compare `crates/monty/src/types/bytes.rs` and `crates/monty/src/types/str.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 2) crates/monty-js/src/pool.rs:1083 — crates/monty-js/src/pool.rs:1083-1087 | crates/monty-js/src/pool.rs:1105-1109 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/monty-proto/src/wire.rs:687 — crates/monty-proto/src/wire.rs:687-691 | crates/monty-proto/src/wire.rs:712-716 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/monty-proto/src/worker.rs:772 — crates/monty-proto/src/worker.rs:772-776 | crates/monty-proto/src/worker.rs:831-835 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/monty/src/bytecode/vm/pattern.rs:127 — crates/monty/src/bytecode/vm/pattern.rs:127-131 | crates/monty/src/bytecode/vm/pattern.rs:154-158 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (5 lines × 2) crates/monty/src/modules/collections/counter.rs:570 — crates/monty/src/modules/collections/counter.rs:570-574 | crates/monty/src/modules/collections/counter.rs:681-685 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • + 4 more in this group — see findings.md.
D4 · Code Duplication · Duplicated block (7 lines × 2) · ×23
  • Duplicated block (7 lines × 2) crates/monty-python/src/exceptions.rs:230 — crates/monty-python/src/exceptions.rs:230-236 | crates/monty-python/src/exceptions.rs:305-311 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/monty/src/bytecode/vm/collections.rs:410 — crates/monty/src/bytecode/vm/collections.rs:410-416 | crates/monty/src/bytecode/vm/collections.rs:433-439 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/monty/src/modules/copy.rs:623 — crates/monty/src/modules/copy.rs:623-629 | crates/monty/src/modules/copy.rs:645-651 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/monty/src/types/bytes.rs:912 — crates/monty/src/types/bytes.rs:912-918 | crates/monty/src/types/bytes.rs:1024-1030 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/monty/src/types/bytes.rs:2124 — crates/monty/src/types/bytes.rs:2124-2130 | crates/monty/src/types/str.rs:695-701 — before extracting anything, compare `crates/monty/src/types/bytes.rs` and `crates/monty/src/types/str.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) crates/monty/src/types/dict.rs:916 — crates/monty/src/types/dict.rs:916-922 | crates/monty/src/types/dict.rs:1855-1861 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/monty/src/types/dict_view.rs:134 — crates/monty/src/types/dict_view.rs:134-140 | crates/monty/src/types/dict_view.rs:401-407 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/monty/src/types/list.rs:347 — crates/monty/src/types/list.rs:347-353 | crates/monty/src/types/tuple.rs:403-411 — before extracting anything, compare `crates/monty/src/types/list.rs` and `crates/monty/src/types/tuple.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) crates/monty/src/types/namedtuple.rs:429 — crates/monty/src/types/namedtuple.rs:429-435 | crates/monty/src/types/namedtuple.rs:440-446 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/monty/src/types/set.rs:557 — crates/monty/src/types/set.rs:557-563 | crates/monty/src/types/set.rs:576-582 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/monty/src/types/set.rs:933 — crates/monty/src/types/set.rs:933-939 | crates/monty/src/types/set.rs:1073-1079 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/monty-js/src/convert.rs:1055 — crates/monty-js/src/convert.rs:1055-1061 | crates/monty-proto/src/python/encode.rs:550-556 — before extracting anything, compare `crates/monty-js/src/convert.rs` and `crates/monty-proto/src/python/encode.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) crates/monty-types/src/scan.rs:922 — crates/monty-types/src/scan.rs:922-928 | crates/monty/src/types/dir_scan.rs:683-689 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) crates/monty/src/types/bytes.rs:281 — crates/monty/src/types/bytes.rs:281-287 | crates/monty/src/types/str.rs:151-157 — before extracting anything, compare `crates/monty/src/types/bytes.rs` and `crates/monty/src/types/str.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) crates/monty/src/types/csv/mod.rs:136 — crates/monty/src/types/csv/mod.rs:136-142 | crates/monty/src/types/dir_scan.rs:207-213 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) crates/monty/src/modules/unicodedata.rs:304 — crates/monty/src/modules/unicodedata.rs:304-311 | crates/monty/src/types/csv/dialect.rs:344-350 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (7 lines × 2) crates/monty/src/types/set.rs:1252 — crates/monty/src/types/set.rs:1252-1258 | crates/monty/src/types/set.rs:1559-1565 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/monty/src/types/bytes.rs:802 — crates/monty/src/types/bytes.rs:802-808 | crates/monty/src/types/bytes.rs:824-830 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/monty/src/types/datetime.rs:1402 — crates/monty/src/types/datetime.rs:1402-1408 | crates/monty/src/types/time.rs:593-599 — before extracting anything, compare `crates/monty/src/types/datetime.rs` and `crates/monty/src/types/time.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (7 lines × 2) crates/monty/src/types/set.rs:1260 — crates/monty/src/types/set.rs:1260-1266 | crates/monty/src/types/set.rs:1567-1573 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/monty/src/bytecode/vm/mod.rs:2857 — crates/monty/src/bytecode/vm/mod.rs:2857-2863 | crates/monty/src/bytecode/vm/mod.rs:2875-2881 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/monty/src/types/dict_view.rs:97 — crates/monty/src/types/dict_view.rs:97-103 | crates/monty/src/types/dict_view.rs:324-330 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (7 lines × 2) crates/fuzz/fuzz_targets/string_input_panic.rs:17 — crates/fuzz/fuzz_targets/string_input_panic.rs:17-23 | crates/fuzz/fuzz_targets/tokens_input_panic.rs:534-540 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (6 lines × 2) · ×21
  • Duplicated block (6 lines × 2) crates/monty-fs/src/overlay.rs:530 — crates/monty-fs/src/overlay.rs:530-535 | crates/monty-fs/src/overlay.rs:557-562 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/monty-js/src/convert.rs:1087 — crates/monty-js/src/convert.rs:1087-1092 | crates/monty-js/src/convert.rs:1106-1111 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/monty-proto/src/wire.rs:700 — crates/monty-proto/src/wire.rs:700-705 | crates/monty-proto/src/wire.rs:723-728 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/monty-python/src/exceptions.rs:159 — crates/monty-python/src/exceptions.rs:159-164 | crates/monty-python/src/exceptions.rs:450-455 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/monty/src/builtins/min_max.rs:90 — crates/monty/src/builtins/min_max.rs:90-95 | crates/monty/src/builtins/min_max.rs:131-136 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/monty/src/modules/math.rs:741 — crates/monty/src/modules/math.rs:741-747 | crates/monty/src/modules/math/aggregate.rs:400-405 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) crates/monty/src/parse.rs:2161 — crates/monty/src/parse.rs:2161-2166 | crates/monty/src/parse.rs:2179-2184 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/monty/src/types/bytes.rs:1223 — crates/monty/src/types/bytes.rs:1223-1229 | crates/monty/src/types/bytes.rs:1245-1250 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/monty/src/types/decimal/py.rs:140 — crates/monty/src/types/decimal/py.rs:140-145 | crates/monty/src/types/decimal/py.rs:758-763 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/monty/src/types/dict_view.rs:797 — crates/monty/src/types/dict_view.rs:797-802 | crates/monty/src/types/dict_view.rs:815-820 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/monty/src/types/set.rs:139 — crates/monty/src/types/set.rs:139-144 | crates/monty/src/types/set.rs:852-857 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/monty/src/types/timedelta.rs:445 — crates/monty/src/types/timedelta.rs:445-450 | crates/monty/src/types/timedelta.rs:460-465 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/monty-js/src/pool.rs:1301 — crates/monty-js/src/pool.rs:1301-1306 | crates/monty-python/src/external.rs:802-807 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (6 lines × 2) crates/monty/src/types/bytes.rs:290 — crates/monty/src/types/bytes.rs:290-295 | crates/monty/src/types/str.rs:160-165 — before extracting anything, compare `crates/monty/src/types/bytes.rs` and `crates/monty/src/types/str.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) crates/monty/src/types/bytes.rs:299 — crates/monty/src/types/bytes.rs:299-304 | crates/monty/src/types/str.rs:169-174 — before extracting anything, compare `crates/monty/src/types/bytes.rs` and `crates/monty/src/types/str.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) crates/monty/src/types/bytes.rs:312 — crates/monty/src/types/bytes.rs:312-317 | crates/monty/src/types/str.rs:182-187 — before extracting anything, compare `crates/monty/src/types/bytes.rs` and `crates/monty/src/types/str.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 2) crates/monty/src/types/namedtuple.rs:1285 — crates/monty/src/types/namedtuple.rs:1285-1290 | crates/monty/src/types/py_trait.rs:730-735 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (6 lines × 2) crates/monty/src/types/set.rs:1277 — crates/monty/src/types/set.rs:1277-1282 | crates/monty/src/types/set.rs:1584-1589 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/monty/src/modules/math.rs:1211 — crates/monty/src/modules/math.rs:1211-1216 | crates/monty/src/modules/math.rs:1232-1237 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/monty-datatest/src/main.rs:458 — crates/monty-datatest/src/main.rs:458-463 | crates/monty-datatest/src/main.rs:524-529 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (6 lines × 2) crates/monty/src/types/bytes.rs:635 — crates/monty/src/types/bytes.rs:635-640 | crates/monty/src/types/str.rs:1923-1928 — before extracting anything, compare `crates/monty/src/types/bytes.rs` and `crates/monty/src/types/str.rs` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 43 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9 lines × 2) · ×19
  • Duplicated block (9 lines × 2) crates/monty-datatest/src/main.rs:2787 — crates/monty-datatest/src/main.rs:2787-2795 | crates/monty-datatest/src/main.rs:2858-2866 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/monty-js/src/telemetry.rs:70 — crates/monty-js/src/telemetry.rs:70-78 | crates/monty-js/src/telemetry.rs:92-100 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/monty-python/src/exceptions.rs:198 — crates/monty-python/src/exceptions.rs:198-206 | crates/monty-python/src/exceptions.rs:273-281 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/monty/src/builtins/hasattr.rs:39 — crates/monty/src/builtins/hasattr.rs:39-47 | crates/monty/src/builtins/setattr.rs:30-38 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) crates/monty/src/bytecode/vm/async_exec.rs:90 — crates/monty/src/bytecode/vm/async_exec.rs:90-98 | crates/monty/src/bytecode/vm/async_exec.rs:642-650 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/monty/src/bytecode/vm/mod.rs:1934 — crates/monty/src/bytecode/vm/mod.rs:1934-1942 | crates/monty/src/bytecode/vm/mod.rs:1993-2001 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/monty/src/bytecode/vm/pattern.rs:94 — crates/monty/src/bytecode/vm/pattern.rs:94-102 | crates/monty/src/bytecode/vm/pattern.rs:134-142 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/monty/src/modules/collections/counter.rs:479 — crates/monty/src/modules/collections/counter.rs:479-487 | crates/monty/src/modules/collections/counter.rs:806-814 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/monty/src/modules/json/dump.rs:515 — crates/monty/src/modules/json/dump.rs:515-523 | crates/monty/src/modules/json/dump.rs:527-535 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/monty/src/repl.rs:303 — crates/monty/src/repl.rs:303-311 | crates/monty/src/repl.rs:1139-1147 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/monty/src/types/decimal/trans.rs:148 — crates/monty/src/types/decimal/trans.rs:148-156 | crates/monty/src/types/decimal/trans.rs:182-190 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/monty/src/types/namedtuple.rs:333 — crates/monty/src/types/namedtuple.rs:333-341 | crates/monty/src/types/tuple.rs:257-265 — before extracting anything, compare `crates/monty/src/types/namedtuple.rs` and `crates/monty/src/types/tuple.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) crates/monty/src/types/re_match.rs:251 — crates/monty/src/types/re_match.rs:251-259 | crates/monty/src/types/re_match.rs:271-279 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/monty/src/types/set.rs:313 — crates/monty/src/types/set.rs:313-321 | crates/monty/src/types/set.rs:343-351 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/monty/src/types/str.rs:924 — crates/monty/src/types/str.rs:924-932 | crates/monty/src/types/str.rs:944-952 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9 lines × 2) crates/monty-js/src/convert.rs:992 — crates/monty-js/src/convert.rs:992-1000 | crates/monty-proto/src/python/encode.rs:453-461 — before extracting anything, compare `crates/monty-js/src/convert.rs` and `crates/monty-proto/src/python/encode.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 2) crates/monty-proto/src/wire.rs:1250 — crates/monty-proto/src/wire.rs:1250-1258 | crates/monty-wasm-runtime/src/value.rs:470-478 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (9 lines × 2) crates/monty-fs/src/direct.rs:215 — crates/monty-fs/src/direct.rs:215-223 | crates/monty-fs/src/overlay.rs:1405-1413 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (9 lines × 2) scripts/startup_performance.py:195 — scripts/startup_performance.py:195-203 | scripts/startup_performance.py:338-346 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8 lines × 2) · ×19
  • Duplicated block (8 lines × 2) crates/monty-pool/src/telemetry/tracing_json.rs:420 — crates/monty-pool/src/telemetry/tracing_json.rs:420-428 | crates/monty-pool/src/telemetry/tracing_json.rs:435-442 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/monty-proto/src/python/exceptions.rs:250 — crates/monty-proto/src/python/exceptions.rs:250-257 | crates/monty-proto/src/python/exceptions.rs:273-280 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/monty-proto/src/worker.rs:1025 — crates/monty-proto/src/worker.rs:1025-1032 | crates/monty-proto/src/worker.rs:1036-1043 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/monty/src/bytecode/compiler.rs:2947 — crates/monty/src/bytecode/compiler.rs:2947-2954 | crates/monty/src/bytecode/compiler.rs:2978-2985 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/monty/src/heap/mod.rs:2278 — crates/monty/src/heap/mod.rs:2278-2285 | crates/monty/src/heap_data.rs:639-646 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) crates/monty/src/modules/copy.rs:405 — crates/monty/src/modules/copy.rs:405-412 | crates/monty/src/modules/copy.rs:652-659 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/monty/src/modules/time.rs:357 — crates/monty/src/modules/time.rs:357-364 | crates/monty/src/modules/time.rs:847-854 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/monty/src/object_bridge.rs:401 — crates/monty/src/object_bridge.rs:401-408 | crates/monty/src/object_bridge.rs:418-425 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/monty/src/types/bytes.rs:1762 — crates/monty/src/types/bytes.rs:1762-1769 | crates/monty/src/types/bytes.rs:1790-1797 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/monty/src/types/complex.rs:696 — crates/monty/src/types/complex.rs:696-703 | crates/monty/src/types/complex.rs:709-716 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/monty/src/types/decimal/mod.rs:453 — crates/monty/src/types/decimal/mod.rs:453-461 | crates/monty/src/types/decimal/mod.rs:469-476 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/monty/src/types/host_class.rs:236 — crates/monty/src/types/host_class.rs:236-244 | crates/monty/src/types/host_class.rs:563-570 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/monty/src/types/list.rs:602 — crates/monty/src/types/list.rs:602-609 | crates/monty/src/types/tuple.rs:344-351 — before extracting anything, compare `crates/monty/src/types/list.rs` and `crates/monty/src/types/tuple.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (8 lines × 2) crates/monty/src/types/str.rs:963 — crates/monty/src/types/str.rs:963-970 | crates/monty/src/types/str.rs:981-988 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/monty/src/types/str.rs:1586 — crates/monty/src/types/str.rs:1586-1593 | crates/monty/src/types/str.rs:1615-1622 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8 lines × 2) crates/monty-types/src/uuid.rs:94 — crates/monty-types/src/uuid.rs:94-101 | crates/monty/src/modules/binascii.rs:477-484 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (8 lines × 2) crates/monty/src/types/itertools/dropwhile.rs:43 — crates/monty/src/types/itertools/dropwhile.rs:43-50 | crates/monty/src/types/itertools/filterfalse.rs:35-42 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) crates/monty/src/types/itertools/pairwise.rs:52 — crates/monty/src/types/itertools/pairwise.rs:52-59 | crates/monty/src/types/itertools/takewhile.rs:47-54 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (8 lines × 2) crates/monty/src/prepare.rs:884 — crates/monty/src/prepare.rs:884-891 | crates/monty/src/prepare.rs:912-919 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D3 · God Classes · MethodTooLong · ×18
  • MethodTooLong: VM.run crates/monty/src/bytecode/vm/mod.rs:1244 — MethodTooLong — run runs 516 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 416 over it, 5.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Parser.parse_expression_impl crates/monty/src/parse.rs:1472 — MethodTooLong — parse_expression_impl runs 316 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 216 over it, 3.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Prepare.prepare_nodes crates/monty/src/prepare.rs:651 — MethodTooLong — prepare_nodes runs 283 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 183 over it, 2.83× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Parser.parse_statement_impl crates/monty/src/parse.rs:618 — MethodTooLong — parse_statement_impl runs 267 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 167 over it, 2.67× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Compiler.compile_expr crates/monty/src/bytecode/compiler.rs:1141 — MethodTooLong — compile_expr runs 180 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 80 over it, 1.80× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GraphExporter.convert_heap_object crates/monty/src/object_bridge.rs:248 — MethodTooLong — convert_heap_object runs 178 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 78 over it, 1.78× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Signature.bind crates/monty/src/args/bind_python.rs:251 — MethodTooLong — bind runs 172 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 72 over it, 1.72× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Compiler.compile_stmt crates/monty/src/bytecode/compiler.rs:645 — MethodTooLong — compile_stmt runs 137 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 37 over it, 1.37× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Checkout.turn_io crates/monty-pool/src/checkout.rs:1685 — MethodTooLong — turn_io runs 134 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 34 over it, 1.34× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Prepare.prepare_expression crates/monty/src/prepare.rs:1075 — MethodTooLong — prepare_expression runs 127 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 27 over it, 1.27× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Opcode.operand_shape crates/monty/src/bytecode/op.rs:638 — MethodTooLong — operand_shape runs 124 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 24 over it, 1.24× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Recorder.event crates/monty-pool/src/telemetry/tracing.rs:280 — MethodTooLong — event runs 123 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 23 over it, 1.23× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Recorder.begin_turn crates/monty-pool/src/telemetry/tracing.rs:101 — MethodTooLong — begin_turn runs 121 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 21 over it, 1.21× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Compiler.compile_method_call crates/monty/src/bytecode/compiler.rs:2306 — MethodTooLong — compile_method_call runs 110 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 10 over it, 1.10× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: MontyType.from_internal_static crates/monty/src/object_bridge.rs:712 — MethodTooLong — from_internal_static runs 108 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 8 over it, 1.08× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Opcode.stack_effect crates/monty/src/bytecode/op.rs:860 — MethodTooLong — stack_effect runs 107 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: GraphEncoder.encode crates/monty-proto/src/python/encode.rs:163 — MethodTooLong — encode runs 105 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 5 over it, 1.05× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • MethodTooLong: Prepare.prepare_lambda crates/monty/src/prepare.rs:2022 — MethodTooLong — prepare_lambda runs 104 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 4 over it, 1.04× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D3 · God Classes · TooManyMethods · ×16
  • TooManyMethods: VM crates/monty/src/bytecode/vm/mod.rs:741 — TooManyMethods — 243 methods, declared across 13 files: vm/mod.rs (60), vm/call.rs (33), vm/async_exec.rs (32), vm/binary.rs (23), +9 more file(s). The bar is 30 methods; this is 213 over it, 8.10× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Decimal crates/monty/src/types/decimal/mod.rs:72 — TooManyMethods — 103 methods, declared across 8 files: decimal/mod.rs (43), decimal/methods.rs (25), decimal/arith.rs (10), decimal/cmp.rs (10), +4 more file(s). The bar is 30 methods; this is 73 over it, 3.43× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Compiler crates/monty/src/bytecode/compiler.rs:253 — TooManyMethods — 89 methods, declared across 2 files: bytecode/compiler.rs (73), bytecode/pattern.rs (16). The bar is 30 methods; this is 59 over it, 2.97× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: HeapRead crates/monty/src/heap/mod.rs:407 — TooManyMethods — 68 methods, declared across 12 files: types/set.rs (19), types/dict.rs (11), types/namedtuple.rs (11), types/dict_view.rs (10), +8 more file(s). The bar is 30 methods; this is 38 over it, 2.27× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Value crates/monty/src/value.rs:51 — TooManyMethods — 62 methods. The bar is 30 methods; this is 32 over it, 2.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: HeapObjectRead crates/monty/src/heap/mod.rs:364 — TooManyMethods — 52 methods, declared across 9 files: types/file.rs (23), decimal/py.rs (11), decimal/py_context.rs (4), types/dict.rs (3), +5 more file(s). The bar is 30 methods; this is 22 over it, 1.73× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Parser crates/monty/src/parse.rs:318 — TooManyMethods — 45 methods. The bar is 30 methods; this is 15 over it, 1.50× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Checkout crates/monty-pool/src/checkout.rs:403 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: MontyObject crates/monty-types/src/object.rs:45 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: CodeBuilder crates/monty/src/bytecode/builder.rs:21 — TooManyMethods — 42 methods. The bar is 30 methods; this is 12 over it, 1.40× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: HeapReadMut crates/monty/src/heap/mod.rs:421 — TooManyMethods — 35 methods, declared across 9 files: types/dict.rs (9), types/set.rs (9), types/class.rs (4), vm/async_exec.rs (3), +5 more file(s). The bar is 30 methods; this is 5 over it, 1.17× the bar. That list is where to read them, not a suggestion to split the file: the members belong to the type wherever they are declared, so moving them between files leaves the count unchanged. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Coeff crates/monty/src/types/decimal/coeff.rs:49 — TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: ResourceTracker crates/monty-types/src/resource.rs:281 — TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: AbstractOS crates/monty-python/python/pydantic_monty/os_access.py:179 — TooManyMethods — 32 methods. The bar is 30 methods; this is 2 over it, 1.07× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: OSAccess crates/monty-python/python/pydantic_monty/os_access.py:990 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • TooManyMethods: Prepare crates/monty/src/prepare.rs:129 — TooManyMethods — 31 methods. The bar is 30 methods; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D2 · Cognitive Complexity · Decimal · ×14
  • Decimal::pow (cognitive 38) crates/monty/src/types/decimal/pow.rs:34 — Decimal::pow has cognitive complexity 38 (threshold 15). Drivers by points: if/else 28 (36 pts), loops 1 (2 pts) (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • Decimal::power_exact (cognitive 38) crates/monty/src/types/decimal/pow.rs:220 — Decimal::power_exact has cognitive complexity 38 (threshold 15). Drivers by points: if/else 15 (27 pts), loops 2 (5 pts), boolean chains 4, match/switch 1 (2 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Decimal::fix (cognitive 32) crates/monty/src/types/decimal/mod.rs:366 — Decimal::fix has cognitive complexity 32 (threshold 15). Drivers by points: if/else 21 (30 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Decimal::format_spec (cognitive 25) crates/monty/src/types/decimal/format.rs:21 — Decimal::format_spec has cognitive complexity 25 (threshold 15). Drivers by points: if/else 14 (17 pts), match/switch 3 (5 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • Decimal::add (cognitive 24) crates/monty/src/types/decimal/arith.rs:18 — Decimal::add has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (16 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Decimal::quantize (cognitive 24) crates/monty/src/types/decimal/methods.rs:20 — Decimal::quantize has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 7 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Decimal::div (cognitive 21) crates/monty/src/types/decimal/arith.rs:113 — Decimal::div has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Decimal::sqrt (cognitive 21) crates/monty/src/types/decimal/trans.rs:29 — Decimal::sqrt has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14 (18 pts), boolean chains 2, loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • Decimal::exp (cognitive 21) crates/monty/src/types/decimal/trans.rs:95 — Decimal::exp has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 4, loops 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • Decimal::mul (cognitive 19) crates/monty/src/types/decimal/arith.rs:81 — Decimal::mul has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Decimal::fma (cognitive 18) crates/monty/src/types/decimal/arith.rs:300 — Decimal::fma has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (17 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Decimal::pick (cognitive 17) crates/monty/src/types/decimal/cmp.rs:121 — Decimal::pick has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (13 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • Decimal::to_sci_string (cognitive 17) crates/monty/src/types/decimal/mod.rs:493 — Decimal::to_sci_string has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 1, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • Decimal::number_class (cognitive 16) crates/monty/src/types/decimal/methods.rs:225 — Decimal::number_class has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13 (16 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Duplicated block (11 lines × 2) · ×12
  • Duplicated block (11 lines × 2) crates/monty-datatest/src/main.rs:1546 — crates/monty-datatest/src/main.rs:1546-1556 | crates/monty-datatest/src/main.rs:1612-1622 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/monty-types/src/os.rs:340 — crates/monty-types/src/os.rs:340-350 | crates/monty-types/src/os.rs:390-400 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/monty/src/args/bind_python.rs:399 — crates/monty/src/args/bind_python.rs:399-409 | crates/monty/src/args/bind_python.rs:416-426 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/monty/src/bytecode/vm/async_exec.rs:595 — crates/monty/src/bytecode/vm/async_exec.rs:595-605 | crates/monty/src/bytecode/vm/mod.rs:933-943 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (11 lines × 2) crates/monty/src/modules/math.rs:1122 — crates/monty/src/modules/math.rs:1122-1132 | crates/monty/src/modules/math.rs:1184-1194 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/monty/src/types/bytes.rs:1773 — crates/monty/src/types/bytes.rs:1773-1783 | crates/monty/src/types/bytes.rs:1801-1811 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/monty/src/types/datetime.rs:1266 — crates/monty/src/types/datetime.rs:1266-1276 | crates/monty/src/types/time.rs:535-545 — before extracting anything, compare `crates/monty/src/types/datetime.rs` and `crates/monty/src/types/time.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) crates/monty/src/types/dict_view.rs:696 — crates/monty/src/types/dict_view.rs:696-706 | crates/monty/src/types/dict_view.rs:740-750 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/monty/src/types/list.rs:979 — crates/monty/src/types/list.rs:979-989 | crates/monty/src/types/tuple.rs:584-594 — before extracting anything, compare `crates/monty/src/types/list.rs` and `crates/monty/src/types/tuple.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (11 lines × 2) crates/monty/src/types/set.rs:970 — crates/monty/src/types/set.rs:970-980 | crates/monty/src/types/set.rs:1108-1118 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/monty/src/types/str.rs:1597 — crates/monty/src/types/str.rs:1597-1607 | crates/monty/src/types/str.rs:1626-1636 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (11 lines × 2) crates/monty/src/bytecode/vm/collections.rs:330 — crates/monty/src/bytecode/vm/collections.rs:330-340 | crates/monty/src/bytecode/vm/collections.rs:379-389 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10 lines × 2) · ×12
  • Duplicated block (10 lines × 2) crates/monty-fs/src/overlay.rs:579 — crates/monty-fs/src/overlay.rs:579-588 | crates/monty-fs/src/overlay.rs:607-616 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/monty-js/src/convert.rs:384 — crates/monty-js/src/convert.rs:384-393 | crates/monty-js/src/convert.rs:401-410 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/monty-js/src/convert.rs:583 — crates/monty-js/src/convert.rs:583-592 | crates/monty-proto/src/python/encode.rs:106-115 — before extracting anything, compare `crates/monty-js/src/convert.rs` and `crates/monty-proto/src/python/encode.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) crates/monty-js/src/convert.rs:911 — crates/monty-js/src/convert.rs:911-920 | crates/monty-proto/src/python/encode.rs:408-417 — before extracting anything, compare `crates/monty-js/src/convert.rs` and `crates/monty-proto/src/python/encode.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
  • Duplicated block (10 lines × 2) crates/monty-python/src/pool.rs:569 — crates/monty-python/src/pool.rs:569-578 | crates/monty-python/src/pool.rs:726-735 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/monty-python/src/pool.rs:1145 — crates/monty-python/src/pool.rs:1145-1154 | crates/monty-python/src/pool.rs:1272-1281 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/monty/src/heap/mod.rs:2001 — crates/monty/src/heap/mod.rs:2001-2010 | crates/monty/src/heap/mod.rs:2037-2046 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/monty/src/heap/mod.rs:2296 — crates/monty/src/heap/mod.rs:2296-2305 | crates/monty/src/heap_data.rs:664-673 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
  • Duplicated block (10 lines × 2) crates/monty/src/types/bytes.rs:830 — crates/monty/src/types/bytes.rs:830-839 | crates/monty/src/types/bytes.rs:1250-1259 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/monty/src/types/str.rs:1304 — crates/monty/src/types/str.rs:1304-1313 | crates/monty/src/types/str.rs:1351-1360 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/monty/src/bytecode/compiler.rs:1215 — crates/monty/src/bytecode/compiler.rs:1215-1224 | crates/monty/src/bytecode/compiler.rs:1310-1319 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10 lines × 2) crates/monty/src/bytecode/compiler.rs:1928 — crates/monty/src/bytecode/compiler.rs:1928-1937 | crates/monty/src/bytecode/compiler.rs:2386-2395 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D3 · God Classes · FunctionTooLong · ×10
  • FunctionTooLong: monty::heap::for_each_child_id crates/monty/src/heap/mod.rs:1855 — FunctionTooLong — monty::heap::for_each_child_id runs 184 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 84 over it, 1.84× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: monty::object_bridge::import_node crates/monty/src/object_bridge.rs:835 — FunctionTooLong — monty::object_bridge::import_node runs 177 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 77 over it, 1.77× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: monty::prepare::collect_scope_info_from_node crates/monty/src/prepare.rs:2515 — FunctionTooLong — monty::prepare::collect_scope_info_from_node runs 130 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 30 over it, 1.30× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: monty::prepare::collect_cell_vars_from_node crates/monty/src/prepare.rs:2928 — FunctionTooLong — monty::prepare::collect_cell_vars_from_node runs 120 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 20 over it, 1.20× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: pydantic_monty_client::pool::drive_sync crates/monty-python/src/pool.rs:1490 — FunctionTooLong — pydantic_monty_client::pool::drive_sync runs 116 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 16 over it, 1.16× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: monty_fs::overlay::rename crates/monty-fs/src/overlay.rs:1214 — FunctionTooLong — monty_fs::overlay::rename runs 114 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 14 over it, 1.14× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: monty::prepare::collect_referenced_names_from_node crates/monty/src/prepare.rs:3444 — FunctionTooLong — monty::prepare::collect_referenced_names_from_node runs 113 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 13 over it, 1.13× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: monty_pool::telemetry::tracing::os_call_span crates/monty-pool/src/telemetry/tracing.rs:712 — FunctionTooLong — monty_pool::telemetry::tracing::os_call_span runs 109 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 9 over it, 1.09× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: pydantic_monty_client::pool::drive_async_inner crates/monty-python/src/pool.rs:1752 — FunctionTooLong — pydantic_monty_client::pool::drive_async_inner runs 107 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 7 over it, 1.07× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
  • FunctionTooLong: monty_js::pool::turn_to_js crates/monty-js/src/pool.rs:1061 — FunctionTooLong — monty_js::pool::turn_to_js runs 101 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted) in one body. The bar is 100 significant lines; this is 1 over it, 1.01× the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body — the runs of statements that work on the same values and would earn the same name — into its own named unit, and have this one call them in order.
D30 · Dependency Vulnerabilities · Medium advisory (unsound) · ×10
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D3 · God Classes · ClassTooLong · ×9
  • ClassTooLong: Compiler crates/monty/src/bytecode/compiler.rs:253 — ClassTooLong — 1920 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 89 methods, 2 blocks, lines 253-3950. The bar is 400 significant lines; this is 1520 over it, 4.80× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Parser crates/monty/src/parse.rs:318 — ClassTooLong — 1340 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 45 methods, 2 blocks, lines 318-2533. The bar is 400 significant lines; this is 940 over it, 3.35× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Prepare crates/monty/src/prepare.rs:129 — ClassTooLong — 1210 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 31 methods, 2 blocks, lines 129-2372. The bar is 400 significant lines; this is 810 over it, 3.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: VM crates/monty/src/bytecode/vm/mod.rs:741 — ClassTooLong — 1175 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 243 methods, 4 blocks, lines 741-2911. The bar is 400 significant lines; this is 775 over it, 2.94× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: ExcTypeExt crates/monty/src/exception_private.rs:38 — ClassTooLong — 1105 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 236 methods. The bar is 400 significant lines; this is 705 over it, 2.76× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Value crates/monty/src/value.rs:51 — ClassTooLong — 832 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 62 methods, 6 blocks, lines 51-1831. The bar is 400 significant lines; this is 432 over it, 2.08× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Checkout crates/monty-pool/src/checkout.rs:403 — ClassTooLong — 741 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 42 methods, 3 blocks, lines 403-2140. The bar is 400 significant lines; this is 341 over it, 1.85× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Child crates/monty-proto/src/worker.rs:217 — ClassTooLong — 544 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 24 methods, 3 blocks, lines 217-1103. The bar is 400 significant lines; this is 144 over it, 1.36× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
  • ClassTooLong: Type crates/monty/src/types/type.rs:61 — ClassTooLong — 538 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 17 methods, 3 blocks, lines 61-903. The bar is 400 significant lines; this is 138 over it, 1.35× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D35 · Change Coupling · Change coupling · ×9
  • Change coupling: str.rs ↔ str__methods.py crates/monty/src/types/str.rs:1 — `crates/monty/src/types/str.rs` and `crates/monty/test_cases/str__methods.py` change together 100% of the time (10 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `5d879719` Match Python line boundaries in str.splitlines (#1106); `c8adc325` Match CPython's odd padding split in `str.center` and `bytes.center` …; `36c1bbb6` Better `casefold` and other case methods compatibility (#857) — run `git show` on any of them.
  • Change coupling: range.rs ↔ tuple.rs crates/monty/src/types/range.rs:1 — `crates/monty/src/types/range.rs` and `crates/monty/src/types/tuple.rs` change together 71% of the time (10 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 10 shared commits counted here, the most recent 3 are `418fd543` Fix remaining `py_contains` issues from the #625 review (#628); `5d9a3f32` Move `py_contains` onto `PyTrait`, fix `in` for bytes, add coverage (…; `9e36ce32` fix panics when overflowing negating i64::MIN (#368) — run `git show` on any of them.
  • Change coupling: builder.rs ↔ mod.rs crates/monty/src/bytecode/builder.rs:1 — `crates/monty/src/bytecode/builder.rs` and `crates/monty/src/bytecode/vm/mod.rs` change together 62% of the time (8 of the 13 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 8 shared commits counted here, the most recent 3 are `be364c32` Refactor try/finally compilation onto a CPython-style frame-block sta…; `fbdb2e14` fix interactions with global names, function scopes & repl (#469); `fdced216` fix(repl): Add local/global store operation in comprehension expressi… — run `git show` on any of them.
  • Change coupling: list.rs ↔ list__ops.py crates/monty/src/types/list.rs:1 — `crates/monty/src/types/list.rs` and `crates/monty/test_cases/list__ops.py` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `418fd543` Fix remaining `py_contains` issues from the #625 review (#628); `8a0a4999` fix: avoid panic when list.sort() key callback mutates the list (#413); `9e36ce32` fix panics when overflowing negating i64::MIN (#368) — run `git show` on any of them.
  • Change coupling: update.py ↔ intern.rs crates/monty-typeshed/update.py:1 — `crates/monty-typeshed/update.py` and `crates/monty/src/intern.rs` change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `3bd96dfb` Add `bisect` module (#1047); `6cbfc84d` Add the `base64` module (#761); `aa613f95` Add the `functools` module with `reduce` (#760) — run `git show` on any of them.
  • Change coupling: update.py ↔ mod.rs crates/monty-typeshed/update.py:1 — `crates/monty-typeshed/update.py` and `crates/monty/src/modules/mod.rs` change together 55% of the time (6 of the 11 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `3bd96dfb` Add `bisect` module (#1047); `6cbfc84d` Add the `base64` module (#761); `aa613f95` Add the `functools` module with `reduce` (#760) — run `git show` on any of them.
  • Change coupling: object.rs ↔ mod.rs crates/monty-types/src/object.rs:1 — `crates/monty-types/src/object.rs` and `crates/monty/src/heap/mod.rs` change together 50% of the time (39 of the 78 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency — the edge is real but nothing declares it. Read the pair before acting: if one registers itself into the other through a hook or an initialiser, the missing dependency is DELIBERATE — the registration is the link, and it is meant not to be an import — and the thing to add is a comment on each side naming the other, not a merge; if they simply belong together, co-locate them; if neither holds, the coupling is hidden and worth breaking. You can check this without leaving the row: of the 39 shared commits counted here, the most recent 3 are `026b3838` Support `@dataclass(eq=..., frozen=...)` (#650); `35626ebc` Native `@dataclass` defined inside the sandbox (#626) (at that commit the file was still `crates/monty/src/heap.rs`); `06f2e7df` Add `itertools` foundation with `count` and `repeat` (#632) (at that commit the file was still `crates/monty/src/heap.rs`) — run `git show` on any of them.
  • Change coupling: __init__.py ↔ lib.rs crates/monty-python/python/pydantic_monty/__init__.py:1 — `crates/monty-python/python/pydantic_monty/__init__.py` and `crates/monty-python/src/lib.rs` change together 50% of the time (7 of the 14 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 7 shared commits counted here, the most recent 3 are `33556ba6` refactor telemetry bridge to receive language-specific otel component…; `5e714d01` Add a `ShutdownDump` turn-ender and cheap frame classification (#630); `82633d12` reintroduce `feed_start` API to both python & JS (#507) — run `git show` on any of them.
  • Change coupling: bytes.rs ↔ str__methods.py crates/monty/src/types/bytes.rs:1 — `crates/monty/src/types/bytes.rs` and `crates/monty/test_cases/str__methods.py` change together 50% of the time (5 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 5 shared commits counted here, the most recent 3 are `c8adc325` Match CPython's odd padding split in `str.center` and `bytes.center` …; `0a6d11aa` Dispatch `__index__` for indexing, slicing and integer arguments (#654); `3b40c477` fix further panics in integer operations (#444) — run `git show` on any of them.
D30 · Dependency Vulnerabilities · Medium vulnerability · ×8
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D1 · Cyclomatic Complexity · Decimal · ×7
  • Decimal::pow (cyclomatic 22) crates/monty/src/types/decimal/pow.rs:34 — Decimal::pow has cyclomatic complexity 22 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • Decimal::power_exact (cyclomatic 22) crates/monty/src/types/decimal/pow.rs:220 — Decimal::power_exact has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Decimal::format_spec (cyclomatic 20) crates/monty/src/types/decimal/format.rs:21 — Decimal::format_spec has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • Decimal::fix (cyclomatic 20) crates/monty/src/types/decimal/mod.rs:366 — Decimal::fix has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Decimal::quantize (cyclomatic 19) crates/monty/src/types/decimal/methods.rs:20 — Decimal::quantize has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Decimal::add (cyclomatic 18) crates/monty/src/types/decimal/arith.rs:18 — Decimal::add has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Decimal::exp (cyclomatic 16) crates/monty/src/types/decimal/trans.rs:95 — Decimal::exp has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · VM · ×7
  • VM::run (cognitive 111) crates/monty/src/bytecode/vm/mod.rs:1244 — VM::run has cognitive complexity 111 (threshold 15). Drivers by points: if/else 22 (61 pts), match/switch 15 (44 pts), loops 2 (4 pts), boolean chains 2 (nesting depth added 70). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • VM::handle_exception_step (cognitive 44) crates/monty/src/bytecode/vm/exceptions.rs:321 — VM::handle_exception_step has cognitive complexity 44 (threshold 15). Drivers by points: if/else 14 (29 pts), loops 3 (7 pts), match/switch 2 (7 pts), boolean chains 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • VM::dict_merge_inner (cognitive 22) crates/monty/src/bytecode/vm/collections.rs:216 — VM::dict_merge_inner has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 2 (4 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • VM::check_exc_match (cognitive 17) crates/monty/src/bytecode/vm/exceptions.rs:521 — VM::check_exc_match has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (8 pts), match/switch 2 (5 pts), loops 1 (3 pts), boolean chains 1 (nesting depth added 10). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • VM::convert_value (cognitive 17) crates/monty/src/bytecode/vm/format.rs:164 — VM::convert_value has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 1 (2 pts), match/switch 1 (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • VM::step_gather_commit (cognitive 16) crates/monty/src/bytecode/vm/async_exec.rs:223 — VM::step_gather_commit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), match/switch 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • VM::snippet_namespace (cognitive 16) crates/monty/src/bytecode/vm/namespace.rs:114 — VM::snippet_namespace has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 6 (13 pts), if/else 1 (3 pts) (nesting depth added 9). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D4 · Code Duplication · Duplicated block (14 lines × 2) · ×6
  • Duplicated block (14 lines × 2) crates/monty-python/src/pool.rs:620 — crates/monty-python/src/pool.rs:620-633 | crates/monty-python/src/pool.rs:781-794 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/monty-python/src/snapshot.rs:732 — crates/monty-python/src/snapshot.rs:732-745 | crates/monty-python/src/snapshot.rs:1127-1140 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/monty/src/builtins/min_max.rs:98 — crates/monty/src/builtins/min_max.rs:98-111 | crates/monty/src/builtins/min_max.rs:139-152 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/monty/src/bytecode/compiler.rs:2432 — crates/monty/src/bytecode/compiler.rs:2432-2445 | crates/monty/src/bytecode/compiler.rs:2567-2580 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/monty/src/bytecode/vm/call.rs:260 — crates/monty/src/bytecode/vm/call.rs:260-273 | crates/monty/src/bytecode/vm/call.rs:313-326 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (14 lines × 2) crates/monty/src/types/set.rs:954 — crates/monty/src/types/set.rs:954-967 | crates/monty/src/types/set.rs:1092-1105 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (13 lines × 2) · ×6
  • Duplicated block (13 lines × 2) crates/monty-js/src/telemetry.rs:79 — crates/monty-js/src/telemetry.rs:79-91 | crates/monty-js/src/telemetry.rs:101-113 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/monty/src/bytecode/vm/call.rs:468 — crates/monty/src/bytecode/vm/call.rs:468-480 | crates/monty/src/bytecode/vm/call.rs:504-516 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/monty/src/types/decimal/arith.rs:200 — crates/monty/src/types/decimal/arith.rs:200-212 | crates/monty/src/types/decimal/arith.rs:246-258 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (13 lines × 2) crates/monty/src/types/namedtuple.rs:482 — crates/monty/src/types/namedtuple.rs:482-494 | crates/monty/src/types/tuple.rs:347-359 — before extracting anything, compare `crates/monty/src/types/namedtuple.rs` and `crates/monty/src/types/tuple.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) crates/monty/src/types/namedtuple.rs:709 — crates/monty/src/types/namedtuple.rs:709-721 | crates/monty/src/types/tuple.rs:546-558 — before extracting anything, compare `crates/monty/src/types/namedtuple.rs` and `crates/monty/src/types/tuple.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (13 lines × 2) crates/monty/src/types/str.rs:1331 — crates/monty/src/types/str.rs:1331-1343 | crates/monty/src/types/str.rs:1380-1392 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D1 · Cyclomatic Complexity · monty_datatest · ×5
  • monty_datatest::dispatch_os_call (cyclomatic 54) crates/monty-datatest/src/main.rs:1029 — monty_datatest::dispatch_os_call has cyclomatic complexity 54 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • monty_datatest::try_run_test (cyclomatic 25) crates/monty-datatest/src/main.rs:1396 — monty_datatest::try_run_test has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • monty_datatest::try_run_cpython_test (cyclomatic 23) crates/monty-datatest/src/main.rs:2476 — monty_datatest::try_run_cpython_test has cyclomatic complexity 23 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • monty_datatest::try_run_iter_test (cyclomatic 21) crates/monty-datatest/src/main.rs:1584 — monty_datatest::try_run_iter_test has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • monty_datatest::run_iter_loop (cyclomatic 17) crates/monty-datatest/src/main.rs:1878 — monty_datatest::run_iter_loop has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: monty_datatest::dispatch_external_call (cyclomatic 20) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Compiler · ×5
  • Compiler::compile_expr (cyclomatic 53) crates/monty/src/bytecode/compiler.rs:1141 — Compiler::compile_expr has cyclomatic complexity 53 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • Compiler::compile_stmt (cyclomatic 31) crates/monty/src/bytecode/compiler.rs:645 — Compiler::compile_stmt has cyclomatic complexity 31 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • Compiler::compile_call (cyclomatic 24) crates/monty/src/bytecode/compiler.rs:1813 — Compiler::compile_call has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Compiler::compile_method_call (cyclomatic 24) crates/monty/src/bytecode/compiler.rs:2306 — Compiler::compile_method_call has cyclomatic complexity 24 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
  • Compiler::compile_call_args (cyclomatic 17) crates/monty/src/bytecode/compiler.rs:1980 — Compiler::compile_call_args has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D2 · Cognitive Complexity · monty_datatest · ×5
  • monty_datatest::dispatch_os_call (cognitive 58) crates/monty-datatest/src/main.rs:1029 — monty_datatest::dispatch_os_call has cognitive complexity 58 (threshold 15). Drivers by points: if/else 27 (46 pts), match/switch 5 (10 pts), boolean chains 2 (nesting depth added 24). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • monty_datatest::try_run_test (cognitive 55) crates/monty-datatest/src/main.rs:1396 — monty_datatest::try_run_test has cognitive complexity 55 (threshold 15). Drivers by points: if/else 16 (44 pts), match/switch 5 (11 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty_datatest::try_run_iter_test (cognitive 33) crates/monty-datatest/src/main.rs:1584 — monty_datatest::try_run_iter_test has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (29 pts), match/switch 3 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty_datatest::try_run_cpython_test (cognitive 33) crates/monty-datatest/src/main.rs:2476 — monty_datatest::try_run_cpython_test has cognitive complexity 33 (threshold 15). Drivers by points: if/else 18 (27 pts), match/switch 3 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty_datatest::get_virtual_dir_entries (cognitive 17) crates/monty-datatest/src/main.rs:963 — monty_datatest::get_virtual_dir_entries has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2, boolean chains 1, match/switch 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · Parser · ×5
  • Parser::parse_statement_impl (cognitive 39) crates/monty/src/parse.rs:618 — Parser::parse_statement_impl has cognitive complexity 39 (threshold 15). Drivers by points: match/switch 10 (19 pts), if/else 8 (15 pts), boolean chains 3, loops 1 (2 pts) (nesting depth added 17). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • Parser::parse_class_def (cognitive 35) crates/monty/src/parse.rs:1079 — Parser::parse_class_def has cognitive complexity 35 (threshold 15). Drivers by points: if/else 11 (26 pts), loops 2 (4 pts), boolean chains 3, match/switch 1 (2 pts) (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Parser::parse_expression_impl (cognitive 33) crates/monty/src/parse.rs:1472 — Parser::parse_expression_impl has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 5 (10 pts), match/switch 4 (7 pts) (nesting depth added 15). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • Parser::process_char (cognitive 24) crates/monty/src/types/csv/reader.rs:194 — Parser::process_char has cognitive complexity 24 (threshold 15). Drivers by points: match/switch 7 (13 pts), if/else 7 (11 pts) (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • Parser::parse_format_spec (cognitive 19) crates/monty/src/parse.rs:2365 — Parser::parse_format_spec has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (8 pts), match/switch 3 (7 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · monty_runtime · ×5
  • monty_runtime::run::run_repl (cognitive 27) crates/monty-runtime/src/run.rs:318 — monty_runtime::run::run_repl has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (18 pts), match/switch 3 (5 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty_runtime::run::execute_repl_with_mounts (cognitive 20) crates/monty-runtime/src/run.rs:461 — monty_runtime::run::execute_repl_with_mounts has cognitive complexity 20 (threshold 15). Drivers by points: match/switch 7 (16 pts), if/else 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • monty_runtime::run::run_cli (cognitive 16) crates/monty-runtime/src/run.rs:97 — monty_runtime::run::run_cli has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), match/switch 5 (6 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty_runtime::run::run_script (cognitive 16) crates/monty-runtime/src/run.rs:208 — monty_runtime::run::run_script has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), match/switch 4 (7 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty_runtime::run::run_until_complete (cognitive 16) crates/monty-runtime/src/run.rs:528 — monty_runtime::run::run_until_complete has cognitive complexity 16 (threshold 15). Drivers by points: match/switch 3 (8 pts), if/else 3 (6 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D4 · Code Duplication · Duplicated block (12 lines × 2) · ×5
  • Duplicated block (12 lines × 2) crates/monty/src/prepare.rs:3130 — crates/monty/src/prepare.rs:3130-3141 | crates/monty/src/prepare.rs:3240-3251 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/monty/src/types/bytes.rs:1397 — crates/monty/src/types/bytes.rs:1397-1408 | crates/monty/src/types/bytes.rs:1438-1449 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/monty/src/types/bytes.rs:1420 — crates/monty/src/types/bytes.rs:1420-1431 | crates/monty/src/types/bytes.rs:1461-1472 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (12 lines × 2) crates/monty/src/types/list.rs:956 — crates/monty/src/types/list.rs:956-967 | crates/monty/src/types/tuple.rs:560-571 — before extracting anything, compare `crates/monty/src/types/list.rs` and `crates/monty/src/types/tuple.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 2) crates/monty/src/object_bridge.rs:902 — crates/monty/src/object_bridge.rs:902-913 | crates/monty/src/object_bridge.rs:934-945 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (9 lines × 3) · ×5
  • Duplicated block (9 lines × 3) crates/monty/src/builtins/bin.rs:11 — crates/monty/src/builtins/bin.rs:11-19 | crates/monty/src/builtins/hex.rs:11-19 | crates/monty/src/builtins/oct.rs:11-19 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
  • Duplicated block (9 lines × 3) crates/monty/src/repl.rs:986 — crates/monty/src/repl.rs:986-995 | crates/monty/src/repl.rs:1259-1267 | crates/monty/src/repl.rs:1349-1357 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (9 lines × 3) crates/monty/src/types/list.rs:509 — crates/monty/src/types/list.rs:509-517 | crates/monty/src/types/namedtuple.rs:371-379 | crates/monty/src/types/tuple.rs:294-302 — before extracting anything, compare `crates/monty/src/types/list.rs` and `crates/monty/src/types/tuple.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) crates/monty/src/types/list.rs:446 — crates/monty/src/types/list.rs:446-454 | crates/monty/src/types/namedtuple.rs:312-320 | crates/monty/src/types/tuple.rs:235-243 — before extracting anything, compare `crates/monty/src/types/list.rs` and `crates/monty/src/types/tuple.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (9 lines × 3) crates/monty/src/bytecode/compiler.rs:1889 — crates/monty/src/bytecode/compiler.rs:1889-1899 | crates/monty/src/bytecode/compiler.rs:2011-2019 | crates/monty/src/bytecode/compiler.rs:2349-2359 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (5 lines × 3) · ×5
  • Duplicated block (5 lines × 3) crates/monty/src/types/long_int/arithmetic.rs:101 — crates/monty/src/types/long_int/arithmetic.rs:101-105 | crates/monty/src/types/long_int/arithmetic.rs:131-135 | crates/monty/src/types/long_int/arithmetic.rs:152-156 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) crates/monty/src/types/re_pattern.rs:194 — crates/monty/src/types/re_pattern.rs:194-198 | crates/monty/src/types/re_pattern.rs:209-213 | crates/monty/src/types/re_pattern.rs:224-228 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) crates/monty/src/types/list.rs:485 — crates/monty/src/types/list.rs:485-489 | crates/monty/src/types/namedtuple.rs:345-349 | crates/monty/src/types/tuple.rs:271-275 — before extracting anything, compare `crates/monty/src/types/list.rs` and `crates/monty/src/types/tuple.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (5 lines × 3) crates/monty/src/modules/collections/counter.rs:540 — crates/monty/src/modules/collections/counter.rs:540-544 | crates/monty/src/modules/collections/counter.rs:743-747 | crates/monty/src/modules/collections/counter.rs:766-770 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (5 lines × 3) crates/monty/src/types/long_int/arithmetic.rs:62 — crates/monty/src/types/long_int/arithmetic.rs:62-66 | crates/monty/src/types/long_int/arithmetic.rs:87-91 | crates/monty/src/types/long_int/arithmetic.rs:116-120 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D1 · Cyclomatic Complexity · Parser · ×4
  • Parser::parse_expression_impl (cyclomatic 50) crates/monty/src/parse.rs:1472 — Parser::parse_expression_impl has cyclomatic complexity 50 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • Parser::parse_statement_impl (cyclomatic 49) crates/monty/src/parse.rs:618 — Parser::parse_statement_impl has cyclomatic complexity 49 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • Parser::process_char (cyclomatic 32) crates/monty/src/types/csv/reader.rs:194 — Parser::process_char has cyclomatic complexity 32 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • Parser::parse_class_def (cyclomatic 22) crates/monty/src/parse.rs:1079 — Parser::parse_class_def has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: monty::parse::describe_expr_kind (cyclomatic 33) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D2 · Cognitive Complexity · Compiler · ×4
  • Compiler::compile_expr (cognitive 74) crates/monty/src/bytecode/compiler.rs:1141 — Compiler::compile_expr has cognitive complexity 74 (threshold 15). Drivers by points: if/else 19 (39 pts), loops 8 (24 pts), match/switch 5 (11 pts) (nesting depth added 42). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • Compiler::compile_method_call (cognitive 40) crates/monty/src/bytecode/compiler.rs:2306 — Compiler::compile_method_call has cognitive complexity 40 (threshold 15). Drivers by points: if/else 8 (16 pts), loops 6 (15 pts), match/switch 3 (8 pts), boolean chains 1 (nesting depth added 22). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • Compiler::compile_call (cognitive 38) crates/monty/src/bytecode/compiler.rs:1813 — Compiler::compile_call has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (21 pts), loops 4 (12 pts), boolean chains 3, match/switch 2 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Compiler::compile_call_args (cognitive 25) crates/monty/src/bytecode/compiler.rs:1980 — Compiler::compile_call_args has cognitive complexity 25 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 4 (10 pts), boolean chains 1, match/switch 1 (nesting depth added 13). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D4 · Code Duplication · Duplicated block (6 lines × 3) · ×4
  • Duplicated block (6 lines × 3) crates/monty-types/src/object.rs:720 — crates/monty-types/src/object.rs:720-726 | crates/monty-types/src/object.rs:736-741 | crates/monty/src/types/time.rs:528-533 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
  • Duplicated block (6 lines × 3) crates/monty/src/types/class.rs:157 — crates/monty/src/types/class.rs:157-162 | crates/monty/src/types/host_class.rs:153-158 | crates/monty/src/types/instance.rs:365-370 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once.
  • Duplicated block (6 lines × 3) crates/monty/src/types/namedtuple.rs:277 — crates/monty/src/types/namedtuple.rs:277-282 | crates/monty/src/types/namedtuple.rs:484-489 | crates/monty/src/types/tuple.rs:349-354 — before extracting anything, compare `crates/monty/src/types/namedtuple.rs` and `crates/monty/src/types/tuple.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (6 lines × 3) crates/monty/src/modules/math.rs:725 — crates/monty/src/modules/math.rs:725-730 | crates/monty/src/modules/math.rs:794-799 | crates/monty/src/modules/math.rs:901-906 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D5 · Coupling · Off the main sequence · ×4
  • Off the main sequence: monty-typeshed — monty-typeshed: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 1 project(s), so it's rigid to change.
  • Off the main sequence: monty-types — monty-types: abstractness 0.07, instability 0.08, distance 0.85 — zone of pain — concrete and depended on by 12 project(s), so it's rigid to change.
  • Off the main sequence: monty-fs — monty-fs: abstractness 0.00, instability 0.17, distance 0.83 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
  • Off the main sequence: monty-alloc — monty-alloc: abstractness 0.00, instability 0.25, distance 0.75 — zone of pain — concrete and depended on by 3 project(s), so it's rigid to change.
D1 · Cyclomatic Complexity · VM · ×3
  • VM::run (cyclomatic 175) crates/monty/src/bytecode/vm/mod.rs:1244 — VM::run has cyclomatic complexity 175 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • VM::resume (cyclomatic 22) crates/monty/src/bytecode/vm/mod.rs:2080 — VM::resume has cyclomatic complexity 22 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • VM::handle_exception_step (cyclomatic 20) crates/monty/src/bytecode/vm/exceptions.rs:321 — VM::handle_exception_step has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D2 · Cognitive Complexity · monty_fs · ×3
  • monty_fs::overlay::rename (cognitive 32) crates/monty-fs/src/overlay.rs:1214 — monty_fs::overlay::rename has cognitive complexity 32 (threshold 15). Drivers by points: if/else 11 (13 pts), match/switch 4 (10 pts), loops 5 (8 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty_fs::overlay::collect_real_descendants (cognitive 21) crates/monty-fs/src/overlay.rs:1504 — monty_fs::overlay::collect_real_descendants has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (17 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty_fs::overlay::scan_list (cognitive 19) crates/monty-fs/src/overlay.rs:411 — monty_fs::overlay::scan_list has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), match/switch 3 (5 pts), loops 2 (3 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · monty_macros · ×3
  • monty_macros::from_args::resolve_field_roles (cognitive 27) crates/monty-macros/src/from_args.rs:561 — monty_macros::from_args::resolve_field_roles has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (23 pts), match/switch 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty_macros::from_args::parse_struct_attrs (cognitive 25) crates/monty-macros/src/from_args.rs:766 — monty_macros::from_args::parse_struct_attrs has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13 (21 pts), match/switch 1 (3 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty_macros::from_args::parse_field_attrs (cognitive 20) crates/monty-macros/src/from_args.rs:863 — monty_macros::from_args::parse_field_attrs has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (19 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · pydantic_monty_client · ×3
  • pydantic_monty_client::pool::drive_sync (cognitive 22) crates/monty-python/src/pool.rs:1490 — pydantic_monty_client::pool::drive_sync has cognitive complexity 22 (threshold 15). Drivers by points: match/switch 7 (18 pts), if/else 1 (3 pts), loops 1 (nesting depth added 13). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • pydantic_monty_client::pool::drive_async_inner (cognitive 18) crates/monty-python/src/pool.rs:1752 — pydantic_monty_client::pool::drive_async_inner has cognitive complexity 18 (threshold 15). Drivers by points: match/switch 6 (14 pts), if/else 1 (3 pts), loops 1 (nesting depth added 10). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • pydantic_monty_client::snapshot::parse_external_result (cognitive 17) crates/monty-python/src/snapshot.rs:520 — pydantic_monty_client::snapshot::parse_external_result has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13 (17 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · Child · ×3
  • Child::handle_resume_stubs (cognitive 18) crates/monty-proto/src/worker.rs:642 — Child::handle_resume_stubs has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 4 (6 pts), loops 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • Child::handle_resume_call (cognitive 17) crates/monty-proto/src/worker.rs:728 — Child::handle_resume_call has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (11 pts), match/switch 4 (6 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
  • Child::drive (cognitive 16) crates/monty-proto/src/worker.rs:995 — Child::drive has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 1 (3 pts), boolean chains 1, match/switch 1 (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D29 · Static Analysis (SAST) · REDACTED
  • REDACTED
  • REDACTED
  • REDACTED
D30 · Dependency Vulnerabilities · Medium CVE · ×3
  • REDACTED
  • REDACTED
  • REDACTED
D4 · Code Duplication · Members sharing a duplicated core (4 members, 50+ identical tokens) · ×3
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/monty/src/run_progress.rs:454 — crates/monty/src/run_progress.rs:454-488 | crates/monty/src/run_progress.rs:792-834 | crates/monty/src/run_progress.rs:873-899 | crates/monty/src/run_progress.rs:1015-1032 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/monty/src/types/bytes.rs:1954 — crates/monty/src/types/bytes.rs:1954-1980 | crates/monty/src/types/bytes.rs:1985-2005 | crates/monty/src/types/bytes.rs:2010-2030 | crates/monty/src/types/bytes.rs:2078-2112 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
  • Members sharing a duplicated core (4 members, 50+ identical tokens) crates/monty/src/types/set.rs:882 — crates/monty/src/types/set.rs:882-903 | crates/monty/src/types/set.rs:950-980 | crates/monty/src/types/set.rs:1089-1118 | crates/monty/src/types/set.rs:1342-1361 — These 4 members share a duplicated core: a run of at least 50 identical tokens appears in every one of them. That run is NOT broken out as duplicated-block rows below — it is what admitted this row, and the blocks below cover only the part of it that clears the block floor, so they understate the correspondence. Read the members as one construct written 4 times. The repair is at the members' grain — factor the shared implementation out once and have all of them call it with their differences as parameters or as an injected step, or, where the difference is systematic, generate them from one template. Extracting the individual blocks below is not the same fix: it leaves every body in place and the next edit still has to be made 4 times.
D4 · Code Duplication · Duplicated block (10–11 lines × 2) · ×3
  • Duplicated block (10–11 lines × 2) crates/monty/src/repl.rs:984 — crates/monty/src/repl.rs:984-994 | crates/monty/src/repl.rs:1347-1356 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (10–11 lines × 2) crates/monty/src/types/host_class.rs:254 — crates/monty/src/types/host_class.rs:254-264 | crates/monty/src/types/instance.rs:417-426 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
  • Duplicated block (10–11 lines × 2) crates/monty/src/types/host_class.rs:258 — crates/monty/src/types/host_class.rs:258-267 | crates/monty/src/types/host_class.rs:578-588 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R4 · Test Coverage · No test reaches this file · ×3
  • No test reaches this file crates/monty-js/scripts/assemble-packages.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file crates/monty-js/scripts/create-platform-packages.mjs:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
  • No test reaches this file crates/monty-js/ts/worker/nodeWorkerEntry.ts:1 — No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
D1 · Cyclomatic Complexity · Signature · ×2
  • Signature::bind (cyclomatic 55) crates/monty/src/args/bind_python.rs:251 — Signature::bind has cyclomatic complexity 55 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • Signature::validate (cyclomatic 31) crates/monty-macros/src/from_args.rs:216 — Signature::validate has cyclomatic complexity 31 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · monty_proto · ×2
  • monty_proto::python::exceptions::exc_monty_to_py (cyclomatic 53) crates/monty-proto/src/python/exceptions.rs:23 — monty_proto::python::exceptions::exc_monty_to_py has cyclomatic complexity 53 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • monty_proto::python::exceptions::py_err_to_exc_type (cyclomatic 42) crates/monty-proto/src/python/exceptions.rs:353 — monty_proto::python::exceptions::py_err_to_exc_type has cyclomatic complexity 42 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GraphEncoder · ×2
  • GraphEncoder::encode (cyclomatic 38) crates/monty-proto/src/python/encode.rs:163 — GraphEncoder::encode has cyclomatic complexity 38 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • GraphEncoder::encode (cyclomatic 21) crates/monty-js/src/convert.rs:637 — GraphEncoder::encode has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: monty_js::convert::decode_node (cyclomatic 31) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · HeapObjectRead · ×2
  • HeapObjectRead::py_call_attr (cyclomatic 24) crates/monty/src/types/dict.rs:1473 — HeapObjectRead::py_call_attr has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
  • HeapObjectRead::py_call_attr (cyclomatic 17) crates/monty/src/types/datetime.rs:1321 — HeapObjectRead::py_call_attr has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · monty_macros · ×2
  • monty_macros::from_args::parse_struct_attrs (cyclomatic 20) crates/monty-macros/src/from_args.rs:766 — monty_macros::from_args::parse_struct_attrs has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • monty_macros::from_args::resolve_field_roles (cyclomatic 16) crates/monty-macros/src/from_args.rs:561 — monty_macros::from_args::resolve_field_roles has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · Recorder · ×2
  • Recorder::event (cyclomatic 19) crates/monty-pool/src/telemetry/tracing.rs:280 — Recorder::event has cyclomatic complexity 19 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: monty_pool::telemetry::tracing::os_call_span (cyclomatic 35) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
  • Recorder::begin_turn (cyclomatic 17) crates/monty-pool/src/telemetry/tracing.rs:101 — Recorder::begin_turn has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: monty_pool::telemetry::tracing::os_call_span (cyclomatic 35) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · monty_runtime · ×2
  • monty_runtime::run::run_repl (cyclomatic 19) crates/monty-runtime/src/run.rs:318 — monty_runtime::run::run_repl has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
  • monty_runtime::run::execute_repl_with_mounts (cyclomatic 17) crates/monty-runtime/src/run.rs:461 — monty_runtime::run::execute_repl_with_mounts has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D2 · Cognitive Complexity · Signature · ×2
  • Signature::bind (cognitive 105) crates/monty/src/args/bind_python.rs:251 — Signature::bind has cognitive complexity 105 (threshold 15). Drivers by points: if/else 33 (72 pts), loops 12 (25 pts), boolean chains 6, match/switch 1 (2 pts) (nesting depth added 53). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Signature::validate (cognitive 40) crates/monty-macros/src/from_args.rs:216 — Signature::validate has cognitive complexity 40 (threshold 15). Drivers by points: if/else 20 (30 pts), boolean chains 7, loops 2, match/switch 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · monty_proto · ×2
  • monty_proto::python::exceptions::py_err_to_exc_type (cognitive 68) crates/monty-proto/src/python/exceptions.rs:353 — monty_proto::python::exceptions::py_err_to_exc_type has cognitive complexity 68 (threshold 15). Drivers by points: if/else 51 (68 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty_proto::python::exceptions::exc_monty_to_py (cognitive 24) crates/monty-proto/src/python/exceptions.rs:23 — monty_proto::python::exceptions::exc_monty_to_py has cognitive complexity 24 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 6, match/switch 1 (nesting depth added 6). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Prepare · ×2
  • Prepare::prepare_nodes (cognitive 53) crates/monty/src/prepare.rs:651 — Prepare::prepare_nodes has cognitive complexity 53 (threshold 15). Drivers by points: if/else 9 (27 pts), match/switch 6 (18 pts), loops 3 (8 pts) (nesting depth added 35). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • Prepare::get_id_impl (cognitive 16) crates/monty/src/prepare.rs:2224 — Prepare::get_id_impl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 2, loops 1, match/switch 1 (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · GraphEncoder · ×2
  • GraphEncoder::encode (cognitive 43) crates/monty-proto/src/python/encode.rs:163 — GraphEncoder::encode has cognitive complexity 43 (threshold 15). Drivers by points: if/else 35 (36 pts), match/switch 3 (6 pts), boolean chains 1 (nesting depth added 4). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
  • GraphEncoder::encode (cognitive 23) crates/monty-js/src/convert.rs:637 — GraphEncoder::encode has cognitive complexity 23 (threshold 15). Drivers by points: if/else 11 (17 pts), match/switch 2 (3 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 8). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · GlobSelector · ×2
  • GlobSelector::select_recursive (cognitive 32) crates/monty-types/src/scan.rs:743 — GlobSelector::select_recursive has cognitive complexity 32 (threshold 15). Drivers by points: if/else 9 (26 pts), boolean chains 3, loops 2 (3 pts) (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
  • GlobSelector::run (cognitive 23) crates/monty-types/src/scan.rs:700 — GlobSelector::run has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (16 pts), loops 2 (4 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ParsedFormatSpec · ×2
  • ParsedFormatSpec::parse_runtime (cognitive 22) crates/monty/src/fstring.rs:451 — ParsedFormatSpec::parse_runtime has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (16 pts), match/switch 3 (5 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • ParsedFormatSpec::to_spec_string (cognitive 20) crates/monty/src/fstring.rs:574 — ParsedFormatSpec::to_spec_string has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (15 pts), match/switch 2 (4 pts), boolean chains 1 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · monty_apidoc · ×2
  • monty_apidoc::render::render_page (cognitive 21) crates/monty-apidoc/src/render.rs:23 — monty_apidoc::render::render_page has cognitive complexity 21 (threshold 15). Drivers by points: match/switch 3 (8 pts), if/else 5 (7 pts), loops 4 (5 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
  • monty_apidoc::symbols::index_subtree (cognitive 18) crates/monty-apidoc/src/symbols.rs:127 — monty_apidoc::symbols::index_subtree has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (7 pts), if/else 3 (6 pts), match/switch 3 (5 pts) (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · SigCtx · ×2
  • SigCtx::struct_decl (cognitive 19) crates/monty-apidoc/src/sig.rs:295 — SigCtx::struct_decl has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (10 pts), match/switch 3 (6 pts), loops 1 (3 pts) (nesting depth added 11). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
  • SigCtx::trait_decl (cognitive 16) crates/monty-apidoc/src/sig.rs:403 — SigCtx::trait_decl has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (12 pts), match/switch 2 (3 pts), loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · monty_type_checking · ×2
  • monty_type_checking::imports::collect (cognitive 16) crates/monty-type-checking/src/imports.rs:54 — monty_type_checking::imports::collect has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 1 (3 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 9). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
  • monty_type_checking::type_check::stub_files (cognitive 16) crates/monty-type-checking/src/type_check.rs:269 — monty_type_checking::type_check::stub_files has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D4 · Code Duplication · Duplicated block (20 lines × 2) · ×2
  • Duplicated block (20 lines × 2) crates/monty/src/bytecode/vm/call.rs:665 — crates/monty/src/bytecode/vm/call.rs:665-684 | crates/monty/src/bytecode/vm/call.rs:736-755 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (20 lines × 2) crates/monty/src/types/datetime.rs:96 — crates/monty/src/types/datetime.rs:96-115 | crates/monty/src/types/time.rs:280-299 — before extracting anything, compare `crates/monty/src/types/datetime.rs` and `crates/monty/src/types/time.rs` as WHOLE FILES: this scan already matched 3 separate duplicated blocks between them, totalling at least 38 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (18 lines × 2) · ×2
  • Duplicated block (18 lines × 2) crates/monty/src/types/itertools/mod.rs:216 — crates/monty/src/types/itertools/mod.rs:216-233 | crates/monty/src/types/itertools/mod.rs:245-262 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (18 lines × 2) crates/monty/test_cases/bytes__percent_format.py:2 — crates/monty/test_cases/bytes__percent_format.py:2-19 | crates/monty/test_cases/str__percent_format.py:5-22 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (16 lines × 2) · ×2
  • Duplicated block (16 lines × 2) crates/monty/src/bytecode/compiler.rs:1939 — crates/monty/src/bytecode/compiler.rs:1939-1954 | crates/monty/src/bytecode/compiler.rs:2397-2412 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (16 lines × 2) crates/monty/src/types/namedtuple.rs:505 — crates/monty/src/types/namedtuple.rs:505-520 | crates/monty/src/types/tuple.rs:371-386 — before extracting anything, compare `crates/monty/src/types/namedtuple.rs` and `crates/monty/src/types/tuple.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 80 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (9–10 lines × 2) · ×2
  • Duplicated block (9–10 lines × 2) crates/monty-fs/src/overlay.rs:254 — crates/monty-fs/src/overlay.rs:254-262 | crates/monty-fs/src/overlay.rs:768-777 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (9–10 lines × 2) crates/monty-types/src/object.rs:720 — crates/monty-types/src/object.rs:720-729 | crates/monty-types/src/object.rs:736-744 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (8–10 lines × 2) · ×2
  • Duplicated block (8–10 lines × 2) crates/monty/src/bytecode/compiler.rs:3265 — crates/monty/src/bytecode/compiler.rs:3265-3272 | crates/monty/src/bytecode/compiler.rs:3335-3344 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
  • Duplicated block (8–10 lines × 2) crates/monty/src/bytecode/vm/async_exec.rs:387 — crates/monty/src/bytecode/vm/async_exec.rs:387-396 | crates/monty/src/bytecode/vm/async_exec.rs:662-669 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (12 lines × 3) · ×2
  • Duplicated block (12 lines × 3) crates/monty/src/types/deque.rs:633 — crates/monty/src/types/deque.rs:633-644 | crates/monty/src/types/list.rs:729-741 | crates/monty/src/types/tuple.rs:521-533 — before extracting anything, compare `crates/monty/src/types/list.rs` and `crates/monty/src/types/tuple.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
  • Duplicated block (12 lines × 3) crates/monty/src/prepare.rs:1755 — crates/monty/src/prepare.rs:1755-1770 | crates/monty/src/prepare.rs:1926-1937 | crates/monty/src/prepare.rs:2079-2090 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (10 lines × 3) · ×2
  • Duplicated block (10 lines × 3) crates/monty/src/bytecode/compiler.rs:1874 — crates/monty/src/bytecode/compiler.rs:1874-1884 | crates/monty/src/bytecode/compiler.rs:1997-2006 | crates/monty/src/bytecode/compiler.rs:2334-2344 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
  • Duplicated block (10 lines × 3) crates/monty/src/bytecode/compiler.rs:1215 — crates/monty/src/bytecode/compiler.rs:1215-1224 | crates/monty/src/bytecode/compiler.rs:1246-1255 | crates/monty/src/bytecode/compiler.rs:1310-1319 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D6 · Cohesion (LCOM4) · Low cohesion · ×2
  • Low cohesion: HeapObjectRead (LCOM4 158) crates/monty/src/heap/mod.rs:364 — HeapObjectRead's methods fall into 158 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 158 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
  • Low cohesion: VM (LCOM4 9) crates/monty/src/bytecode/vm/mod.rs:741 — VM's methods fall into 9 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 9 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
D1 · Cyclomatic Complexity · Opcode · ×1
  • Opcode::stack_effect (cyclomatic 72) crates/monty/src/bytecode/op.rs:860 — Opcode::stack_effect has cyclomatic complexity 72 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ObjectRef · ×1
  • ObjectRef::leaf_repr_fmt (cyclomatic 48) crates/monty-types/src/object.rs:694 — ObjectRef::leaf_repr_fmt has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · GraphExporter · ×1
  • GraphExporter::convert_heap_object (cyclomatic 44) crates/monty/src/object_bridge.rs:248 — GraphExporter::convert_heap_object has cyclomatic complexity 44 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: MontyType::from_internal_static (cyclomatic 89) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · Prepare · ×1
  • Prepare::prepare_nodes (cyclomatic 44) crates/monty/src/prepare.rs:651 — Prepare::prepare_nodes has cyclomatic complexity 44 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · value.decodeNode (cyclomatic 41) · ×1
  • value.decodeNode (cyclomatic 41) crates/monty-js/ts/worker/value.ts:504 — value.decodeNode has cyclomatic complexity 41 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Type · ×1
  • Type::call_native (cyclomatic 39) crates/monty/src/types/type.rs:807 — Type::call_native has cyclomatic complexity 39 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Decoder · ×1
  • Decoder::decode (cyclomatic 39) crates/monty-proto/src/python/decode.rs:82 — Decoder::decode has cyclomatic complexity 39 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Checkout · ×1
  • Checkout::turn_io (cyclomatic 34) crates/monty-pool/src/checkout.rs:1685 — Checkout::turn_io has cyclomatic complexity 34 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · monty_fs · ×1
  • monty_fs::overlay::rename (cyclomatic 25) crates/monty-fs/src/overlay.rs:1214 — monty_fs::overlay::rename has cyclomatic complexity 25 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
D1 · Cyclomatic Complexity · Value · ×1
  • Value::py_eq_impl (cyclomatic 24) crates/monty/src/value.rs:274 — Value::py_eq_impl has cyclomatic complexity 24 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: Value::py_cmp (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · check_imports.mask_line (cyclomatic 24) · ×1
  • check_imports.mask_line (cyclomatic 24) scripts/check_imports.py:196 — check_imports.mask_line has cyclomatic complexity 24 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ArenaEncoder.encodeMarked (cyclomatic 23) · ×1
  • ArenaEncoder.encodeMarked (cyclomatic 23) crates/monty-js/ts/worker/value.ts:141 — ArenaEncoder.encodeMarked has cyclomatic complexity 23 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · ArenaEncoder.encode (cyclomatic 21) · ×1
  • ArenaEncoder.encode (cyclomatic 21) crates/monty-js/ts/worker/value.ts:97 — ArenaEncoder.encode has cyclomatic complexity 21 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · FormatSpec · ×1
  • FormatSpec::parse (cyclomatic 20) crates/monty/src/types/decimal/format.rs:194 — FormatSpec::parse has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · codecov_diff.fetch_codecov_coverage (cyclomatic 20) · ×1
  • codecov_diff.fetch_codecov_coverage (cyclomatic 20) scripts/codecov_diff.py:304 — codecov_diff.fetch_codecov_coverage has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · run_traceback.run_file_and_get_traceback (cyclomatic 20) · ×1
  • run_traceback.run_file_and_get_traceback (cyclomatic 20) scripts/run_traceback.py:23 — run_traceback.run_file_and_get_traceback has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · errors.pyTypeName (cyclomatic 20) · ×1
  • errors.pyTypeName (cyclomatic 20) crates/monty-js/ts/errors.ts:366 — errors.pyTypeName has cyclomatic complexity 20 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · ParsedFormatSpec · ×1
  • ParsedFormatSpec::to_spec_string (cyclomatic 19) crates/monty/src/fstring.rs:574 — ParsedFormatSpec::to_spec_string has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages. This is NOT this file's highest cyclomatic complexity: monty::fstring::decode_format_spec (cyclomatic 26) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · AbstractOS.path_scan (cyclomatic 19) · ×1
  • AbstractOS.path_scan (cyclomatic 19) crates/monty-python/python/pydantic_monty/os_access.py:540 — AbstractOS.path_scan has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file's highest cyclomatic complexity: AbstractOS.dispatch (cyclomatic 30) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · options.encodeOsPolicy (cyclomatic 19) · ×1
  • options.encodeOsPolicy (cyclomatic 19) crates/monty-js/ts/options.ts:184 — options.encodeOsPolicy has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · WorkerTransport.run (cyclomatic 18) · ×1
  • WorkerTransport.run (cyclomatic 18) crates/monty-js/ts/worker/transport.ts:393 — WorkerTransport.run has cyclomatic complexity 18 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · monty_apidoc · ×1
  • monty_apidoc::symbols::index_subtree (cyclomatic 17) crates/monty-apidoc/src/symbols.rs:127 — monty_apidoc::symbols::index_subtree has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · TurnMetrics · ×1
  • TurnMetrics::event (cyclomatic 17) crates/monty-pool/src/telemetry/metrics.rs:580 — TurnMetrics::event has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing. This is NOT this file's highest cyclomatic complexity: monty_pool::telemetry::metrics::os_call (cyclomatic 33) is higher and carries no row of its own — it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded function is counted neither in this dimension's figures nor in its score.
D1 · Cyclomatic Complexity · OsPolicy · ×1
  • OsPolicy::try_from (cyclomatic 17) crates/monty-proto/src/convert/os_policy.rs:75 — OsPolicy::try_from has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · pydantic_monty_client · ×1
  • pydantic_monty_client::pool::drive_sync (cyclomatic 17) crates/monty-python/src/pool.rs:1490 — pydantic_monty_client::pool::drive_sync has cyclomatic complexity 17 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · types.canonicalFileMode (cyclomatic 17) · ×1
  • types.canonicalFileMode (cyclomatic 17) crates/monty-js/ts/types.ts:132 — types.canonicalFileMode has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
D1 · Cyclomatic Complexity · SigCtx · ×1
  • SigCtx::type_str (cyclomatic 16) crates/monty-apidoc/src/sig.rs:158 — SigCtx::type_str has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · Child · ×1
  • Child::handle_resume_stubs (cyclomatic 16) crates/monty-proto/src/worker.rs:642 — Child::handle_resume_stubs has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D1 · Cyclomatic Complexity · PyAsyncFunctionSnapshot · ×1
  • PyAsyncFunctionSnapshot::resume_auto (cyclomatic 16) crates/monty-python/src/snapshot.rs:890 — PyAsyncFunctionSnapshot::resume_auto has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform — the same kind of value, with no behaviour of its own — a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing.
D1 · Cyclomatic Complexity · transport.componentOsPolicy (cyclomatic 16) · ×1
  • transport.componentOsPolicy (cyclomatic 16) crates/monty-js/ts/worker/transport.ts:567 — transport.componentOsPolicy has cyclomatic complexity 16 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D10 · Test Quality · Skipped test · ×1
  • Skipped test: ${name} (${skip}) crates/monty-js/__test__/node_docs.spec.ts:91 — Skipped — switched off by test.skip
D17 · Explicit Debt · HackComment · ×1
  • HackComment crates/monty-bench/benches/python/pyperformance_meteor_contest.py:180 — # Hack to use a fast local variable to avoid a global lookup — a workaround marked in source: record what it is compensating for and what would allow its removal (the upstream fix, the API it is waiting on, the invariant it restores), so the next reader can judge whether it is still needed rather than rediscovering why it is there.
D2 · Cognitive Complexity · Checkout · ×1
  • Checkout::turn_io (cognitive 53) crates/monty-pool/src/checkout.rs:1685 — Checkout::turn_io has cognitive complexity 53 (threshold 15). Drivers by points: match/switch 9 (27 pts), if/else 9 (21 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 32). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · check_imports.mask_line (cognitive 46) · ×1
  • check_imports.mask_line (cognitive 46) scripts/check_imports.py:196 — check_imports.mask_line has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (37 pts), boolean chains 6, ternaries 1 (2 pts), loops 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · codecov_diff.fetch_codecov_coverage (cognitive 43) · ×1
  • codecov_diff.fetch_codecov_coverage (cognitive 43) scripts/codecov_diff.py:304 — codecov_diff.fetch_codecov_coverage has cognitive complexity 43 (threshold 15). Drivers by points: if/else 17 (37 pts), boolean chains 3, ternaries 1 (2 pts), loops 1 (nesting depth added 21). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
D2 · Cognitive Complexity · PoolInner · ×1
  • PoolInner::acquire_worker_inner (cognitive 36) crates/monty-pool/src/pool.rs:243 — PoolInner::acquire_worker_inner has cognitive complexity 36 (threshold 15). Drivers by points: if/else 13 (27 pts), loops 3 (6 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ObjectRef · ×1
  • ObjectRef::leaf_repr_fmt (cognitive 34) crates/monty-types/src/object.rs:694 — ObjectRef::leaf_repr_fmt has cognitive complexity 34 (threshold 15). Drivers by points: if/else 16 (29 pts), boolean chains 4, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · AbstractOS.path_scan (cognitive 32) · ×1
  • AbstractOS.path_scan (cognitive 32) crates/monty-python/python/pydantic_monty/os_access.py:540 — AbstractOS.path_scan has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (16 pts), ternaries 3 (6 pts), boolean chains 5, loops 2 (3 pts), error handling 1 (2 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · run_traceback.run_file_and_get_traceback (cognitive 31) · ×1
  • run_traceback.run_file_and_get_traceback (cognitive 31) scripts/run_traceback.py:23 — run_traceback.run_file_and_get_traceback has cognitive complexity 31 (threshold 15). Drivers by points: if/else 8 (21 pts), boolean chains 3, error handling 3, loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · TypeChecker · ×1
  • TypeChecker::run_with (cognitive 28) crates/monty-type-checking/src/type_check.rs:84 — TypeChecker::run_with has cognitive complexity 28 (threshold 15). Drivers by points: loops 5 (17 pts), if/else 8 (10 pts), boolean chains 1 (nesting depth added 14). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · errors.pyTypeName (cognitive 27) · ×1
  • errors.pyTypeName (cognitive 27) crates/monty-js/ts/errors.ts:366 — errors.pyTypeName has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 5 (13 pts), if/else 6 (11 pts), boolean chains 2, match/switch 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WalkIterator · ×1
  • WalkIterator::step (cognitive 25) crates/monty/src/types/dir_scan.rs:595 — WalkIterator::step has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 3, loops 2 (3 pts), match/switch 1 (2 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FrameRecv · ×1
  • FrameRecv::recv (cognitive 25) crates/monty-pool/src/worker.rs:527 — FrameRecv::recv has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (23 pts), boolean chains 1, loops 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · MultiPattern · ×1
  • MultiPattern::matches (cognitive 24) crates/monty-types/src/scan.rs:1161 — MultiPattern::matches has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (14 pts), loops 3 (7 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · FormatSpec · ×1
  • FormatSpec::parse (cognitive 23) crates/monty/src/types/decimal/format.rs:194 — FormatSpec::parse has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (13 pts), boolean chains 7, loops 2 (3 pts) (nesting depth added 2). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
D2 · Cognitive Complexity · options.encodeOsPolicy (cognitive 23) · ×1
  • options.encodeOsPolicy (cognitive 23) crates/monty-js/ts/options.ts:184 — options.encodeOsPolicy has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13 (19 pts), boolean chains 4 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · types.canonicalFileMode (cognitive 23) · ×1
  • types.canonicalFileMode (cognitive 23) crates/monty-js/ts/types.ts:132 — types.canonicalFileMode has cognitive complexity 23 (threshold 15). Drivers by points: if/else 12 (19 pts), boolean chains 2, loops 1, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArenaEncoder.encode (cognitive 23) · ×1
  • ArenaEncoder.encode (cognitive 23) crates/monty-js/ts/worker/value.ts:97 — ArenaEncoder.encode has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13, ternaries 3 (6 pts), boolean chains 4 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · rewrap_md.rewrap (cognitive 22) · ×1
  • rewrap_md.rewrap (cognitive 22) .agents/skills/writing-style/rewrap_md.py:93 — rewrap_md.rewrap has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 3, loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · OSAccess.__init__ (cognitive 21) · ×1
  • OSAccess.__init__ (cognitive 21) crates/monty-python/python/pydantic_monty/os_access.py:1021 — OSAccess.__init__ has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (3 pts), boolean chains 2, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · ArgExprs · ×1
  • ArgExprs::new_with_var_kwargs (cognitive 19) crates/monty/src/args/mod.rs:650 — ArgExprs::new_with_var_kwargs has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 2 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HeapReadMut · ×1
  • HeapReadMut::setitem_slice (cognitive 19) crates/monty/src/types/list.rs:139 — HeapReadMut::setitem_slice has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 3, loops 1 (3 pts), match/switch 1 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · FormatFloat · ×1
  • FormatFloat::fmt (cognitive 19) crates/monty-types/src/format.rs:155 — FormatFloat::fmt has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), loops 2 (5 pts) (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · PyAsyncFunctionSnapshot · ×1
  • PyAsyncFunctionSnapshot::resume_auto (cognitive 18) crates/monty-python/src/snapshot.rs:890 — PyAsyncFunctionSnapshot::resume_auto has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (9 pts), match/switch 5 (7 pts), boolean chains 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · StackFrame · ×1
  • StackFrame::fmt (cognitive 18) crates/monty-types/src/exceptions.rs:771 — StackFrame::fmt has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10 (15 pts), loops 1 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · WorkerTransport.run (cognitive 18) · ×1
  • WorkerTransport.run (cognitive 18) crates/monty-js/ts/worker/transport.ts:393 — WorkerTransport.run has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (9 pts), ternaries 2 (4 pts), boolean chains 3, error handling 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · transport.componentOsPolicy (cognitive 18) · ×1
  • transport.componentOsPolicy (cognitive 18) crates/monty-js/ts/worker/transport.ts:567 — transport.componentOsPolicy has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, ternaries 3 (6 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
D2 · Cognitive Complexity · ScanEffect · ×1
  • ScanEffect::apply (cognitive 17) crates/monty/src/types/dir_scan.rs:767 — ScanEffect::apply has cognitive complexity 17 (threshold 15). Drivers by points: match/switch 6 (9 pts), if/else 5 (7 pts), boolean chains 1 (nesting depth added 5). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · monty_types · ×1
  • monty_types::scan::compile_step (cognitive 17) crates/monty-types/src/scan.rs:852 — monty_types::scan::compile_step has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), loops 3 (7 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · pool.nativeOsPolicy (cognitive 17) · ×1
  • pool.nativeOsPolicy (cognitive 17) crates/monty-js/ts/pool.ts:258 — pool.nativeOsPolicy has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15 (17 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
D2 · Cognitive Complexity · ExcTypeExt · ×1
  • ExcTypeExt::too_many_positional_range_msg (cognitive 16) crates/monty/src/exception_private.rs:575 — ExcTypeExt::too_many_positional_range_msg has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12 (16 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D2 · Cognitive Complexity · HeapRead · ×1
  • HeapRead::compare_operand (cognitive 16) crates/monty/src/types/set.rs:355 — HeapRead::compare_operand has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 1 (3 pts), match/switch 2 (3 pts) (nesting depth added 9). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · Decoder · ×1
  • Decoder::decode (cognitive 16) crates/monty-proto/src/python/decode.rs:82 — Decoder::decode has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 2 (4 pts), match/switch 2 (3 pts) (nesting depth added 7). The drivers above price the dispatch low by construction — a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full — so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident.
D2 · Cognitive Complexity · MontyException · ×1
  • MontyException::fmt (cognitive 16) crates/monty-types/src/exceptions.rs:36 — MontyException::fmt has cognitive complexity 16 (threshold 15). Drivers by points: loops 4 (9 pts), if/else 5 (6 pts), boolean chains 1 (nesting depth added 6). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
D2 · Cognitive Complexity · FileMode · ×1
  • FileMode::from_str (cognitive 16) crates/monty-types/src/file_mode.rs:161 — FileMode::from_str has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (11 pts), match/switch 2 (3 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
D29 · Static Analysis (SAST) · REDACTED · ×1
  • REDACTED
D3 · God Classes · TooManyFunctions · ×1
  • TooManyFunctions: monty_fs::common crates/monty-fs/src/common.rs:30 — TooManyFunctions — 31 free functions. The bar is 30 free functions; this is 1 over it, 1.03× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
D30 · Dependency Vulnerabilities · Medium advisory (unmaintained) · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D4 · Code Duplication · Near-duplicate member pair (94 shared lines) · ×1
  • Near-duplicate member pair (94 shared lines) crates/monty/src/prepare.rs:1710 — crates/monty/src/prepare.rs:1710-1850 | crates/monty/src/prepare.rs:2028-2175 — These two members are variants of one another: 94 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (90 shared lines) · ×1
  • Near-duplicate member pair (90 shared lines) crates/monty-datatest/src/main.rs:1396 — crates/monty-datatest/src/main.rs:1396-1578 | crates/monty-datatest/src/main.rs:1589-1729 — These two members are variants of one another: 90 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (48 shared lines) · ×1
  • Near-duplicate member pair (48 shared lines) crates/monty/src/bytecode/compiler.rs:1813 — crates/monty/src/bytecode/compiler.rs:1813-1974 | crates/monty/src/bytecode/compiler.rs:2311-2474 — These two members are variants of one another: 48 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Near-duplicate member pair (25 shared lines) · ×1
  • Near-duplicate member pair (25 shared lines) crates/monty/src/types/set.rs:1211 — crates/monty/src/types/set.rs:1211-1287 | crates/monty/src/types/set.rs:1549-1594 — These two members are variants of one another: 25 of their lines are already reported as duplicated blocks below, spread through both bodies rather than gathered into one. Read them as a single construct written twice. The repair is at the members' grain — factor the shared pipeline into one implementation the two call with their differences as parameters or as an injected step, or, where the difference is systematic (sync against async, one transport against another), generate one from the other. Extracting the individual blocks below is not the same fix: it leaves the two bodies in place and the next edit still has to be made twice.
D4 · Code Duplication · Edited copy of a member (21 corresponding lines) · ×1
  • Edited copy of a member (21 corresponding lines) crates/monty/src/types/datetime.rs:95 — crates/monty/src/types/datetime.rs:95-156 | crates/monty/src/types/time.rs:279-314 — These two members are one piece of code written twice and then edited apart: 21 consecutive lines correspond almost exactly, broken only by small local edits. Most of that correspondence is NOT reported as duplicated blocks below — the edits cut it into fragments and only the largest of them clear the block floor, so the rows below understate it. The repair is at the members' grain — factor the shared implementation into one the two call with their differences as parameters or as an injected step, or, where the difference is systematic (an extra return value, one transport against another), generate one from the other. Left alone, the next edit has to be made twice and the two will drift further apart.
D4 · Code Duplication · Duplicated block (51–54 lines × 2) · ×1
  • Duplicated block (51–54 lines × 2) crates/monty/src/bytecode/compiler.rs:1858 — crates/monty/src/bytecode/compiler.rs:1858-1911 | crates/monty/src/bytecode/compiler.rs:1981-2031 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (47–51 lines × 2) · ×1
  • Duplicated block (47–51 lines × 2) crates/monty-datatest/src/main.rs:1461 — crates/monty-datatest/src/main.rs:1461-1511 | crates/monty-datatest/src/main.rs:1648-1694 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (37–38 lines × 2) · ×1
  • Duplicated block (37–38 lines × 2) crates/monty/src/prepare.rs:1790 — crates/monty/src/prepare.rs:1790-1827 | crates/monty/src/prepare.rs:2110-2146 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (32 lines × 3) · ×1
  • Duplicated block (32 lines × 3) crates/monty-datatest/src/main.rs:1513 — crates/monty-datatest/src/main.rs:1513-1544 | crates/monty-datatest/src/main.rs:1696-1727 | crates/monty-datatest/src/main.rs:1786-1817 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (25 lines × 3) · ×1
  • Duplicated block (25 lines × 3) crates/monty/src/bytecode/compiler.rs:2109 — crates/monty/src/bytecode/compiler.rs:2109-2133 | crates/monty/src/bytecode/compiler.rs:2218-2242 | crates/monty/src/bytecode/compiler.rs:2495-2519 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (19–22 lines × 2) · ×1
  • Duplicated block (19–22 lines × 2) crates/monty/src/prepare.rs:1717 — crates/monty/src/prepare.rs:1717-1738 | crates/monty/src/prepare.rs:2044-2062 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (21 lines × 2) · ×1
  • Duplicated block (21 lines × 2) crates/monty/src/args/mod.rs:474 — crates/monty/src/args/mod.rs:474-494 | crates/monty/src/args/mod.rs:549-569 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (20–21 lines × 2) · ×1
  • Duplicated block (20–21 lines × 2) crates/monty/src/types/type.rs:527 — crates/monty/src/types/type.rs:527-546 | crates/monty/src/types/type.rs:835-855 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (16–20 lines × 2) · ×1
  • Duplicated block (16–20 lines × 2) crates/monty/src/prepare.rs:1744 — crates/monty/src/prepare.rs:1744-1763 | crates/monty/src/prepare.rs:2068-2083 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (17–20 lines × 2) · ×1
  • Duplicated block (17–20 lines × 2) crates/monty/src/prepare.rs:2456 — crates/monty/src/prepare.rs:2456-2472 | crates/monty/src/prepare.rs:3157-3176 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15–19 lines × 3) · ×1
  • Duplicated block (15–19 lines × 3) crates/monty/src/types/deque.rs:504 — crates/monty/src/types/deque.rs:504-519 | crates/monty/src/types/list.rs:359-373 | crates/monty/src/types/tuple.rs:413-431 — before extracting anything, compare `crates/monty/src/types/list.rs` and `crates/monty/src/types/tuple.rs` as WHOLE FILES: this scan already matched 9 separate duplicated blocks between them, totalling at least 95 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13–18 lines × 3) · ×1
  • Duplicated block (13–18 lines × 3) crates/monty/src/prepare.rs:1725 — crates/monty/src/prepare.rs:1725-1742 | crates/monty/src/prepare.rs:1901-1913 | crates/monty/src/prepare.rs:2052-2066 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (17 lines × 2) · ×1
  • Duplicated block (17 lines × 2) crates/monty/src/prepare.rs:1765 — crates/monty/src/prepare.rs:1765-1781 | crates/monty/src/prepare.rs:2085-2101 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (13–16 lines × 2) · ×1
  • Duplicated block (13–16 lines × 2) crates/monty/src/parse.rs:1646 — crates/monty/src/parse.rs:1646-1658 | crates/monty/src/parse.rs:1705-1720 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (15 lines × 2) · ×1
  • Duplicated block (15 lines × 2) crates/monty/src/bytecode/compiler.rs:1200 — crates/monty/src/bytecode/compiler.rs:1200-1214 | crates/monty/src/bytecode/compiler.rs:1230-1244 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (14 lines × 3) · ×1
  • Duplicated block (14 lines × 3) crates/monty-python/src/pool.rs:358 — crates/monty-python/src/pool.rs:358-371 | crates/monty-python/src/pool.rs:909-922 | crates/monty-python/src/pool.rs:946-959 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (13–14 lines × 2) · ×1
  • Duplicated block (13–14 lines × 2) crates/monty-js/src/convert.rs:594 — crates/monty-js/src/convert.rs:594-606 | crates/monty-proto/src/python/encode.rs:117-130 — before extracting anything, compare `crates/monty-js/src/convert.rs` and `crates/monty-proto/src/python/encode.rs` as WHOLE FILES: this scan already matched 5 separate duplicated blocks between them, totalling at least 50 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. The two sit in different directories, so one cannot simply be deleted in favour of the other while both are reached separately: hoist the shared part into a location both already depend on and have each file call it, and retire whichever file turns out to have no caller of its own left. Extracting one helper per block leaves the fork in place.
D4 · Code Duplication · Duplicated block (13 lines × 4) · ×1
  • Duplicated block (13 lines × 4) crates/monty-datatest/src/main.rs:1525 — crates/monty-datatest/src/main.rs:1525-1537 | crates/monty-datatest/src/main.rs:1557-1569 | crates/monty-datatest/src/main.rs:1708-1720 | crates/monty-datatest/src/main.rs:1798-1810 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (11–13 lines × 3) · ×1
  • Duplicated block (11–13 lines × 3) crates/monty-types/src/os.rs:209 — crates/monty-types/src/os.rs:209-221 | crates/monty-types/src/os.rs:321-332 | crates/monty-types/src/os.rs:372-382 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (9–13 lines × 2) · ×1
  • Duplicated block (9–13 lines × 2) crates/monty-pool/src/checkout.rs:1610 — crates/monty-pool/src/checkout.rs:1610-1618 | crates/monty-pool/src/checkout.rs:1686-1698 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (11–12 lines × 3) · ×1
  • Duplicated block (11–12 lines × 3) crates/monty/src/bytecode/compiler.rs:2136 — crates/monty/src/bytecode/compiler.rs:2136-2147 | crates/monty/src/bytecode/compiler.rs:2245-2255 | crates/monty/src/bytecode/compiler.rs:2522-2532 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (7–12 lines × 2) · ×1
  • Duplicated block (7–12 lines × 2) crates/monty-apidoc/src/sig.rs:125 — crates/monty-apidoc/src/sig.rs:125-136 | crates/monty-apidoc/src/sig.rs:616-622 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
D4 · Code Duplication · Duplicated block (10–11 lines × 4) · ×1
  • Duplicated block (10–11 lines × 4) crates/monty/src/run_progress.rs:465 — crates/monty/src/run_progress.rs:465-475 | crates/monty/src/run_progress.rs:807-817 | crates/monty/src/run_progress.rs:880-889 | crates/monty/src/run_progress.rs:1016-1025 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (8–11 lines × 3) · ×1
  • Duplicated block (8–11 lines × 3) crates/monty/src/types/str.rs:1702 — crates/monty/src/types/str.rs:1702-1712 | crates/monty/src/types/str.rs:1733-1740 | crates/monty/src/types/str.rs:1755-1762 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (7–9 lines × 2) · ×1
  • Duplicated block (7–9 lines × 2) crates/monty-types/src/object.rs:733 — crates/monty-types/src/object.rs:733-741 | crates/monty/src/types/time.rs:527-533 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (8–9 lines × 2) · ×1
  • Duplicated block (8–9 lines × 2) crates/monty/src/modules/copy.rs:393 — crates/monty/src/modules/copy.rs:393-400 | crates/monty/src/types/dict.rs:2212-2220 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
D4 · Code Duplication · Duplicated block (8 lines × 4) · ×1
  • Duplicated block (8 lines × 4) crates/monty/src/types/bytes.rs:1957 — crates/monty/src/types/bytes.rs:1957-1964 | crates/monty/src/types/bytes.rs:1988-1995 | crates/monty/src/types/bytes.rs:2013-2020 | crates/monty/src/types/bytes.rs:2089-2096 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (8 lines × 3) · ×1
  • Duplicated block (8 lines × 3) crates/monty/src/types/dict_view.rs:695 — crates/monty/src/types/dict_view.rs:695-702 | crates/monty/src/types/dict_view.rs:715-722 | crates/monty/src/types/dict_view.rs:739-746 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (5–6 lines × 4) · ×1
  • Duplicated block (5–6 lines × 4) crates/monty/src/types/set.rs:887 — crates/monty/src/types/set.rs:887-892 | crates/monty/src/types/set.rs:954-958 | crates/monty/src/types/set.rs:1092-1096 | crates/monty/src/types/set.rs:1346-1350 — all 4 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited.
D4 · Code Duplication · Duplicated block (5 lines × 4) · ×1
  • Duplicated block (5 lines × 4) crates/monty/src/hash.rs:146 — crates/monty/src/hash.rs:146-150 | crates/monty/src/hash.rs:176-180 | crates/monty/src/hash.rs:187-191 | crates/monty/src/heap_data.rs:601-605 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (7 lines × 4) · ×1
  • Duplicated block (7 lines × 4) crates/monty/src/repl.rs:832 — crates/monty/src/repl.rs:832-838 | crates/monty/src/repl.rs:907-913 | crates/monty/src/run_progress.rs:221-227 | crates/monty/src/run_progress.rs:319-325 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart.
D4 · Code Duplication · Duplicated block (5 lines × 5) · ×1
  • Duplicated block (5 lines × 5) crates/monty/src/types/date.rs:224 — crates/monty/src/types/date.rs:224-228 | crates/monty/src/types/datetime.rs:1226-1230 | crates/monty/src/types/slice.rs:223-227 | crates/monty/src/types/timedelta.rs:376-380 | crates/monty/src/types/timezone.rs:310-314 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 5 call sites, so a change lands once.
D4 · Code Duplication · Duplicated block (17–19 lines × 2) · ×1
  • Duplicated block (17–19 lines × 2) scripts/startup_performance.py:175 — scripts/startup_performance.py:175-191 | scripts/startup_performance.py:315-333 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication · Duplicated block (7 lines × 3) · ×1
  • Duplicated block (7 lines × 3) scripts/startup_performance.py:113 — scripts/startup_performance.py:113-119 | scripts/startup_performance.py:158-164 | scripts/startup_performance.py:214-220 — all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites — resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at `scripts/startup_performance.py:113` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
D4 · Code Duplication · Duplicated block (27 lines × 3) · ×1
  • Duplicated block (27 lines × 3) crates/monty/test_cases/async__sleep.py:10 — crates/monty/test_cases/async__sleep.py:10-69 | crates/monty/test_cases/time__module.py:10-104 | crates/monty/test_cases/time__struct_time.py:7-33 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from all 3 call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `crates/monty/test_cases/async__sleep.py:10` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
D44 · Platform End-of-Life · End-of-life runtime · ×1
  • End-of-life runtime: Node.js 20 crates/monty-js/package.json:48 — crates/monty-js/package.json declares Node.js 20 as this project's engines.node, and Node.js 20, support ended 2026-04-30. An unsupported runtime receives no security patches, so every vulnerability disclosed in it since 2026-04-30 is present and unfixable without moving off it. This is a migration rather than an upgrade: there is no newer release of a runtime that has ended.
D8 · Code Coverage · Coverage not measured · ×1
  • Coverage not measured — JavaScript/TypeScript suite — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — crates/monty-js/ runs vitest but declares no coverage provider, so the suite can run and still produce no lcov — add `@vitest/coverage-v8` (or `@vitest/coverage-istanbul`) as a devDependency. Coverage is excluded from the score rather than counted as a near-zero. The named suite step is one the repository's maintainers can perform; once it passes, the real number is measured on the next scan. Alternatively, commit the lcov/Cobertura report your CI produces and it is read without a re-run.
R10 · Code Duplication · Duplicated block with local edits (22 matched lines × 2 locations) · ×1
  • Duplicated block with local edits (22 matched lines × 2 locations) crates/monty-js/ts/pool.ts:194 — crates/monty-js/ts/pool.ts:194 · crates/monty-js/ts/websocket.ts:100 — the two spans are one implementation copied and then locally edited — 120 tokens are still identical, in the same order in both files, with only local edits between them. The copies have already begun to drift, which is this row's finding: an edit made to one and not the other changes behaviour silently. Diff the two spans first to learn what genuinely differs, then extract the shared core into one module both sites use, passing the differences in as parameters — or, if one copy exists only because the other could not be imported from its context, make one of them the single source the other is generated or re-exported from. If one copy is no longer reachable, delete it rather than letting it shadow the live one.
R10 · Code Duplication · Duplicated block (12 lines × 2 locations) · ×1
  • Duplicated block (12 lines × 2 locations) crates/monty-js/ts/worker/value.ts:261 — crates/monty-js/ts/worker/value.ts:261 · crates/monty-js/ts/worker/value.ts:280 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (11 lines × 2 locations) · ×1
  • Duplicated block (11 lines × 2 locations) crates/monty-js/ts/classInstance.ts:827 — crates/monty-js/ts/classInstance.ts:827 · crates/monty-js/ts/classInstance.ts:856 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
R10 · Code Duplication · Duplicated block (8 lines × 2 locations) · ×1
  • Duplicated block (8 lines × 2 locations) crates/monty-js/ts/session.ts:610 — crates/monty-js/ts/session.ts:610 · crates/monty-js/ts/session.ts:750 — all 2 copies are in the same file, and what repeats is a LIST OF ENTRIES rather than behaviour — the same entries written out more than once. Extract them into one shared, exported constant and spread that constant into each site, rather than into a function the sites call: a list like this often lives in declarative metadata (a decorator's options object, a static configuration table) that a build step must be able to read statically, where a function call is not allowed. Adding an entry to one copy and not the other is the failure this prevents.
R2 · Cyclomatic Complexity · Complex function decodeNode (cyclomatic 42, cognitive 13) · ×1
  • Complex function decodeNode (cyclomatic 42, cognitive 13) crates/monty-js/ts/worker/value.ts:504 — decodeNode has cyclomatic complexity 42 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function encodeMarked (cyclomatic 24, cognitive 14) · ×1
  • Complex function encodeMarked (cyclomatic 24, cognitive 14) crates/monty-js/ts/worker/value.ts:141 — encodeMarked has cyclomatic complexity 24 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function encode (cyclomatic 22, cognitive 24) · ×1
  • Complex function encode (cyclomatic 22, cognitive 24) crates/monty-js/ts/worker/value.ts:97 — encode has cyclomatic complexity 22 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function pyTypeName (cyclomatic 21, cognitive 28) · ×1
  • Complex function pyTypeName (cyclomatic 21, cognitive 28) crates/monty-js/ts/errors.ts:366 — pyTypeName has cyclomatic complexity 21 and cognitive complexity 28; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function run (cyclomatic 20, cognitive 24) · ×1
  • Complex function run (cyclomatic 20, cognitive 24) crates/monty-js/ts/worker/transport.ts:393 — run has cyclomatic complexity 20 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function encodeOsPolicy (cyclomatic 19, cognitive 23) · ×1
  • Complex function encodeOsPolicy (cyclomatic 19, cognitive 23) crates/monty-js/ts/options.ts:184 — encodeOsPolicy has cyclomatic complexity 19 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function canonicalFileMode (cyclomatic 17, cognitive 23) · ×1
  • Complex function canonicalFileMode (cyclomatic 17, cognitive 23) crates/monty-js/ts/types.ts:132 — canonicalFileMode has cyclomatic complexity 17 and cognitive complexity 23; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function componentOsPolicy (cyclomatic 16, cognitive 17) · ×1
  • Complex function componentOsPolicy (cyclomatic 16, cognitive 17) crates/monty-js/ts/worker/transport.ts:567 — componentOsPolicy has cyclomatic complexity 16 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function nativeOsPolicy (cyclomatic 15, cognitive 17) · ×1
  • Complex function nativeOsPolicy (cyclomatic 15, cognitive 17) crates/monty-js/ts/pool.ts:258 — nativeOsPolicy has cyclomatic complexity 15 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function toTurn (cyclomatic 15, cognitive 10) · ×1
  • Complex function toTurn (cyclomatic 15, cognitive 10) crates/monty-js/ts/worker/transport.ts:468 — toTurn has cyclomatic complexity 15 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function feedRun (cyclomatic 14, cognitive 14) · ×1
  • Complex function feedRun (cyclomatic 14, cognitive 14) crates/monty-js/ts/session.ts:218 — feedRun has cyclomatic complexity 14 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function captureTelemetryContext (cyclomatic 13, cognitive 13) · ×1
  • Complex function captureTelemetryContext (cyclomatic 13, cognitive 13) crates/monty-js/ts/telemetry.ts:326 — captureTelemetryContext has cyclomatic complexity 13 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function prepareObject (cyclomatic 12, cognitive 11) · ×1
  • Complex function prepareObject (cyclomatic 12, cognitive 11) crates/monty-js/ts/classInstance.ts:626 — prepareObject has cyclomatic complexity 12 and cognitive complexity 11; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function answerInContext (cyclomatic 11, cognitive 13) · ×1
  • Complex function answerInContext (cyclomatic 11, cognitive 13) crates/monty-js/ts/session.ts:537 — answerInContext has cyclomatic complexity 11 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function answerOsCall (cyclomatic 11, cognitive 12) · ×1
  • Complex function answerOsCall (cyclomatic 11, cognitive 12) crates/monty-js/ts/session.ts:808 — answerOsCall has cyclomatic complexity 11 and cognitive complexity 12; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity · Complex function run (cyclomatic 11, cognitive 10) · ×1
  • Complex function run (cyclomatic 11, cognitive 10) crates/monty-js/__test__/helpers.ts:32 — run has cyclomatic complexity 11 and cognitive complexity 10; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R3 · Large Files · crates/monty-js/ts/session.ts · ×1
  • crates/monty-js/ts/session.ts: 1560 lines of code crates/monty-js/ts/session.ts:1 — crates/monty-js/ts/session.ts has 1560 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · crates/monty-js/ts/classInstance.ts · ×1
  • crates/monty-js/ts/classInstance.ts: 964 lines of code crates/monty-js/ts/classInstance.ts:1 — crates/monty-js/ts/classInstance.ts has 964 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · crates/monty-js/ts/worker/transport.ts · ×1
  • crates/monty-js/ts/worker/transport.ts: 700 lines of code crates/monty-js/ts/worker/transport.ts:1 — crates/monty-js/ts/worker/transport.ts has 700 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · crates/monty-js/ts/worker/value.ts · ×1
  • crates/monty-js/ts/worker/value.ts: 605 lines of code crates/monty-js/ts/worker/value.ts:1 — crates/monty-js/ts/worker/value.ts has 605 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R3 · Large Files · crates/monty-js/ts/telemetry.ts · ×1
  • crates/monty-js/ts/telemetry.ts: 525 lines of code crates/monty-js/ts/telemetry.ts:1 — crates/monty-js/ts/telemetry.ts has 525 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
R7 · Dead Code · Dead file (~22 LoC) · ×1
  • Dead file (~22 LoC) crates/monty-js/ts/worker/nodeWorkerEntry.ts — no import path from any entry point (15 application, 6 tooling, 42 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
R8 · Dependency Hygiene · Unused dependency '@napi-rs/wasm-runtime' · ×1
  • Unused dependency '@napi-rs/wasm-runtime' — Declared in crates/monty-js/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@opentelemetry/sdk-node' · ×1
  • Unused dependency '@opentelemetry/sdk-node' — Declared in crates/monty-js/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
R8 · Dependency Hygiene · Unused dependency '@tybys/wasm-util' · ×1
  • Unused dependency '@tybys/wasm-util' — Declared in crates/monty-js/package.json but never imported anywhere in that package or its workspace members — no static import reaches it. Usually that is dead weight and attack surface, but two shapes are indistinguishable from source and are NOT dead: an optional or native peer that another dependency loads dynamically at runtime, and a package a build, docs or test step installs and invokes separately. Confirm which of the three this is before removing it.
X2 · Cancellation propagation · Async function without AbortSignal · ×1
  • Async function without AbortSignal: loadModule crates/monty-js/ts/worker/loadModule.browser.ts:8 — `loadModule` awaits `fetch(…)` but neither accepts an AbortSignal nor passes one on, so its caller cannot stop the request once it has started. Accept `{ signal }` and pass it through: `fetch(url, { signal })`.
X3 · Exception handling · Swallowed exception (empty catch) · ×1
  • Swallowed exception (empty catch) crates/monty-js/ts/session.ts:391 — An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Minor — 608 finding(s)
D10 · Test Quality · No direct assertions · ×580
  • No direct assertions: sequential coroutines use one suspension per call crates/monty-js/__test__/async.spec.ts:15 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: run with sync external function crates/monty-js/__test__/async.spec.ts:27 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: run with async external function crates/monty-js/__test__/async.spec.ts:37 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: run with multiple async calls crates/monty-js/__test__/async.spec.ts:51 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: run async external function with inputs crates/monty-js/__test__/async.spec.ts:73 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: run async external function with args and kwargs crates/monty-js/__test__/async.spec.ts:84 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: sync external function throws exception crates/monty-js/__test__/async.spec.ts:100 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: async external function throws exception crates/monty-js/__test__/async.spec.ts:120 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: async external function exception caught in try/except crates/monty-js/__test__/async.spec.ts:141 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: missing external function raises NameError crates/monty-js/__test__/async.spec.ts:164 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: missing external function caught in try/except crates/monty-js/__test__/async.spec.ts:172 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: async external function returns complex types crates/monty-js/__test__/async.spec.ts:187 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: async external function with list input crates/monty-js/__test__/async.spec.ts:203 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: mixed sync and async external functions crates/monty-js/__test__/async.spec.ts:220 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: chained async external calls crates/monty-js/__test__/async.spec.ts:239 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: run without external functions crates/monty-js/__test__/async.spec.ts:260 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: run pure computation crates/monty-js/__test__/async.spec.ts:264 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: run with printCallback crates/monty-js/__test__/async.spec.ts:279 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: printCallback with external functions crates/monty-js/__test__/async.spec.ts:294 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: printCallback with multiple prints crates/monty-js/__test__/async.spec.ts:311 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: time.sleep reaches the os callback and evaluates to None crates/monty-js/__test__/async.spec.ts:327 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: an async os callback answers asyncio.sleep as a future, so gathered sleeps overlap crates/monty-js/__test__/async.spec.ts:340 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: an async os callback answering time.sleep is awaited before the sandbox resumes crates/monty-js/__test__/async.spec.ts:369 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: sleeping under call_host without an os callback is refused crates/monty-js/__test__/async.spec.ts:380 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • No direct assertions: simple expression crates/monty-js/__test__/basic.spec.ts:13 — No conventional assertion call was detected, and 582 of 588 tests in `crates/monty-js` read the same way — so this is treated as that project's convention rather than a broken test, and it does not drag the score. Two things look like this: verification that happens indirectly (an approval/verifier harness or BDD step methods), or a project of runnable samples compiled as tests, where a run that does not throw is the only check. If it is the latter, these methods genuinely verify nothing.
  • + 555 more in this group — see findings.md.
X7 · Silent fallback defaults · Silent fallback default on Err · ×5
  • Silent fallback default on Err crates/monty/src/types/date.rs:88 — `max_day_for_month` turns every `Err` into `31` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/monty-proto/src/python/class_instance.rs:261 — `__eq__` turns every `Err` into `Ok(false)` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/monty-proto/src/python/external_module.rs:75 — `__eq__` turns every `Err` into `Ok(false)` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/monty-proto/src/python/convert.rs:503 — `get_name` turns every `Err` into `"<unknown>".to_string()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
  • Silent fallback default on Err crates/monty-type-checking/src/imports.rs:32 — `scan_imports` turns every `Err` into `SnippetImports::default()` — a failure becomes a plausible value and a silent behavior change with no trail. Log the error or propagate it with `?`. If that constant is the correct answer rather than a stand-in for a value that could not be read, say so in a comment on the arm or in the doc comment, and the row stops firing.
D16 · Bus Factor · Off-boarding risk · ×2
  • Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 48 significant file(s) lose their only recent owner: crates/monty/src/codecs.rs, crates/monty-fs/src/mount_table.rs, crates/monty/test_cases/str__percent_format.py, crates/monty/test_cases/itertools__combinatoric.py, crates/monty-types/src/os_policy.rs, crates/monty-fs/src/error.rs, crates/monty/test_cases/os__functions.py, scripts/codecov_diff.py (+40 more). Pair on, review, or document these before any departure.
  • Off-boarding risk: anonymized user #2 — If anonymized user #2 becomes unavailable, 10 significant file(s) lose their only recent owner: crates/monty/test_cases/collections__deque.py, crates/monty/test_cases/base64__all.py, crates/monty/test_cases/binascii__all.py, crates/monty/test_cases/refcount__itertools_adaptors.py, crates/monty/test_cases/time__core.py, crates/monty/test_cases/star__unpack_iterables.py, crates/monty/test_cases/dataclass__options.py, crates/monty/test_cases/sequence__search_bounds.py (+2 more). Pair on, review, or document these before any departure.
D29 · Static Analysis (SAST) · REDACTED · ×2
  • REDACTED
  • REDACTED
D34 · Knowledge Freshness · Orphaned file · ×2
  • Orphaned file crates/monty/test_cases/closure__pep448.py:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
  • Orphaned file crates/monty-js/ts/print.ts:1 — No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
X10 · Duplicated predicate · Duplicated predicate · ×2
  • Duplicated predicate crates/monty-types/src/object.rs:777 — `tz.offset_seconds == 0 && tz.name.is_none()` appears character-identically in 5 files — crates/monty-types/src/object.rs, crates/monty/src/object_bridge.rs, crates/monty/src/types/datetime.rs, crates/monty/src/types/time.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
  • Duplicated predicate crates/monty-proto/src/wire.rs:1251 — `year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)` appears character-identically in 2 files — crates/monty-proto/src/wire.rs, crates/monty-wasm-runtime/src/value.rs. It is one line, so the duplication detector's token window never sees it; the copies drift when only one is corrected. Give the condition a name and one home.
D16 · Bus Factor · Further sole-owners (lower concentration) · ×1
  • Further sole-owners (lower concentration) — 1 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (59 single-owned of 526 analysed files in total, counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 526 of the 1150 production source files in this repository met that bar). They are anonymized user #3 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above. The files folded here: crates/monty-js/ts/worker/host.ts.
D20 · ADR Quality · No ADRs found · ×1
  • No ADRs found — No ADRs found. No recognised ADR directory (`docs/adr/`, `docs/decisions/`, `adr/`, `docs/rfcs/`, an `ADR0001/` folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (`docs/adr/use-postgres.md`, `docs/adr/2024/0001-x.md`); or a file anywhere whose name is ADR-shaped (`0001-use-postgres.md`, `adr-012-caching.md`); or, when neither turned anything up, a document carrying the decision-record signature (an "Architecture Decision Record" heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these — unnumbered files outside any recognised directory, without those headings — is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in `docs/adr/`.
D26 · Project Cohesion · Projects may be oversized for their cohesion · ×1
  • Projects may be oversized for their cohesion — 3 of 18 project(s) overshoot their size bounds, lowering Project Cohesion to 7.1/10. The most over is `crates/monty` (174732 LoC, 1034 module-visible types across 20 directories). Review these for cohesion — draw the boundary inside the module first (group each responsibility into its own package or directory and keep the cross-boundary members non-public), since splitting a published package moves types between packages and breaks consumers.
D28 · Secrets (history) · Rotate the exposed credentials · ×1
  • REDACTED
D34 · Knowledge Freshness · Orphaned files with no living knowledge · ×1
  • Orphaned files with no living knowledge — 2 of 526 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 526 of the 1150 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: crates/monty/test_cases/closure__pep448.py, crates/monty-js/ts/print.ts. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
D36 · Supply-chain Provenance & Signing · REDACTED · ×1
  • REDACTED
M2 · Architecture documentation · No ADRs · ×1
  • No ADRs — No Architecture Decision Records found — no conventional ADR directory, no numbered `NNNN-title` documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer.
P2 · Observability · Logging is not universal · ×1
  • Logging is not universal — Only 2/7 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `.`, `crates/monty-apidoc`, `crates/monty-datatest`, `crates/monty-proto`, `crates/monty-python`.
P6 · Release Hygiene · No changelog · ×1
  • No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
R7 · Dead Code · Unused export 'decodeValue' · ×1
  • Unused export 'decodeValue' crates/monty-js/ts/worker/value.ts:31 — Nothing imports this binding — it is safe to review for removal.
X2 · Cancellation propagation · Not all async functions that make a request accept an AbortSignal · ×1
  • Not all async functions that make a request accept an AbortSignal — Only 0/1 async functions that make a cancellable request (fetch, axios, ky, ofetch) accept an AbortSignal or pass one on, so a request keeps running after whatever wanted it has given up — a page navigated away from, an unmounted component, a timed-out job. Take a `signal` (or an options object that carries one) and hand it to the request; where nothing could ever cancel the call, omitting it is a deliberate choice — judge against how the function is used.
X5 · Nullable reference types · Null assertions (`!`) reduce the strict null checking score · ×1
  • Null assertions (`!`) reduce the strict null checking score — ~2.0 `!` null assertions per 1k TypeScript source lines — 16 assertion(s) across the 7834 source line(s) of the 36 TypeScript file(s) read, which is the only code the operator asserts anything in (a `!` in a `.js` file is not this operator and was not counted, and one in a file whose null checking is off silences nothing). Densest: crates/monty-js/ts/classInstance.ts (6), crates/monty-js/ts/worker/value.ts (5), crates/monty-js/ts/worker/channel.ts (2). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce.
Minor — 19 finding(s)
D12 · Dependency Hygiene · Outdated · ×16
  • Outdated: arbitrary — `arbitrary` is locked at 1.4.2 but 1.5.0 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/fuzz/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p arbitrary` and commit the updated REDACTED.
  • Outdated: clap — `clap` is locked at 4.6.6 but 4.6.7 is the current stable release on crates.io, and it already satisfies the `"4"` requirement declared in crates/monty-runtime/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p clap` and commit the updated REDACTED.
  • Outdated: jiff — `jiff` is locked at 0.2.37 but 0.2.38 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in crates/monty-types/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p jiff` and commit the updated REDACTED.
  • Outdated: minicbor-serde — `minicbor-serde` is locked at 0.7.1 but 0.7.2 is the current stable release on crates.io, and it already satisfies the `"0.7"` requirement declared in crates/monty/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p minicbor-serde` and commit the updated REDACTED.
  • Outdated: napi — `napi` is locked at 3.12.4 but 3.15.0 is the current stable release on crates.io, and it already satisfies the `"3.8"` requirement declared in crates/monty-js/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p napi` and commit the updated REDACTED.
  • Outdated: napi-build — `napi-build` is locked at 2.4.2 but 2.6.0 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in crates/monty-js/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p napi-build` and commit the updated REDACTED.
  • Outdated: napi-derive — `napi-derive` is locked at 3.6.5 but 3.6.13 is the current stable release on crates.io, and it already satisfies the `"3.0.0"` requirement declared in crates/monty-js/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p napi-derive` and commit the updated REDACTED.
  • Outdated: rustix — `rustix` is locked at 1.1.4 but 1.1.6 is the current stable release on crates.io, and it already satisfies the `"1.1"` requirement declared in crates/monty-fs/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rustix` and commit the updated REDACTED.
  • Outdated: rustls — `rustls` is locked at 0.23.44 but 0.23.46 is the current stable release on crates.io, and it already satisfies the `"0.23"` requirement declared in crates/monty-pool/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p rustls` and commit the updated REDACTED.
  • Outdated: salsa — `salsa` is locked at 0.28.2 but 0.28.5 is the current stable release on crates.io, and it already satisfies the `"0.28.2"` requirement declared in crates/monty-type-checking/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p salsa` and commit the updated REDACTED.
  • Outdated: serde_json — `serde_json` is locked at 1.0.151 but 1.0.154 is the current stable release on crates.io, and it already satisfies the `"1.0"` requirement declared in crates/monty-apidoc/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p serde_json` and commit the updated REDACTED.
  • Outdated: sha2 — `sha2` is locked at 0.11.0 but 0.11.1 is the current stable release on crates.io, and it already satisfies the `"0.11"` requirement declared in crates/monty/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p sha2` and commit the updated REDACTED.
  • Outdated: smallvec — `smallvec` is locked at 1.16.1 but 1.16.4 is the current stable release on crates.io, and it already satisfies the `"1.13"` requirement declared in crates/monty/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p smallvec` and commit the updated REDACTED.
  • Outdated: tokio — `tokio` is locked at 1.53.1 but 1.54.1 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/monty-bench/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tokio` and commit the updated REDACTED.
  • Outdated: toml — `toml` is locked at 1.1.6+spec-1.1.0 but 1.1.8+spec-1.1.0 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/monty-fixture/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p toml` and commit the updated REDACTED.
  • Outdated: unicode-normalization — `unicode-normalization` is locked at 0.1.25 but 0.1.26 is the current stable release on crates.io, and it already satisfies the `"0.1"` requirement declared in crates/monty/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p unicode-normalization` and commit the updated REDACTED.
D10 · Test Quality · Skipped (documented) · ×3
  • Skipped (documented): a mount follows its directory across feeds, not its path crates/monty-js/__test__/mount.spec.ts:61 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): special files in mounts are rejected without blocking crates/monty-js/__test__/pool.spec.ts:401 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call
  • Skipped (documented): worker environment is empty crates/monty-js/__test__/pool.spec.ts:451 — Skipped with a documented reason — a deferral, not lazy debt: skipped at run time by a this.skip()/t.skip() call

Appendix B — Reproduction & audit trail

Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.

DimensionToolVersionCommandFindingsRaw output
D28 · Secrets (history)gitleaks—gitleaks detect --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-a9e665263ed84fad8d9f959c0b972833/history.json --exit-code 0 --source .1artifacts/raw/gitleaks-history.json
D28 · Secrets (history)gitleaks—gitleaks detect --no-git --no-banner --config /opt/gitleaks-rules/watchdog-gitleaks.toml --report-format json --report-path /tmp/watchdog-gitleaks-a9e665263ed84fad8d9f959c0b972833/tree.json --exit-code 0 --source .1artifacts/raw/gitleaks-tree.json
D29 · Static Analysis (SAST)semgrep—semgrep --config /opt/semgrep-rules/security-audit.yml --config /opt/semgrep-rules/owasp-top-ten.yml --config /opt/semgrep-rules/watchdog-sast.yml --json --quiet --timeout 10 --timeout-threshold 3 --metrics off --exclude *.arrow --exclude *.avro --exclude *.csv --exclude *.dat --exclude *.db --exclude *.feather --exclude *.geojson --exclude *.h5 --exclude *.hdf5 --exclude *.jsonl --exclude *.log --exclude *.ndjson --exclude *.npy --exclude *.npz --exclude *.orc --exclude *.parquet --exclude *.pickle --exclude *.pkl --exclude *.psv --exclude *.sqlite --exclude *.sqlite3 --exclude *.tfrecord --exclude *.tsv --exclude *.txt --exclude crates/monty-js/ts/worker/component --exclude crates/monty-proto/tests/oracle .33artifacts/raw/semgrep.json
D30 · Dependency Vulnerabilitiestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update31artifacts/raw/trivy-fs.json
D31 · IaC & Container Securitytrivy—trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.0—
D32 · Data Compliance (PII/GDPR)semgrep—semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 3 file(s) — `crates/monty-js/ts/classInstance.ts`, `crates/monty-js/ts/mount.ts`, `crates/monty-js/ts/session.ts` — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.0—
D37 · Vulnerability-disclosure Policydisclosure—disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.0—
D40 · Network Egress Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.0—
D41 · Kernel & Syscall Confinementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.0—
D42 · Runtime Threat Enforcementruntime-hardening—runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.0—
D43 · Malicious Dependenciestrivy—trivy fs --scanners vuln --format json --quiet --severity CRITICAL,HIGH,MEDIUM,LOW --skip-dirs **/bin/** --skip-dirs **/obj/** . --skip-db-update0artifacts/raw/trivy-fs.json

Run 01a17ce7-76ac-748b-9b8f-844f1cd50d6e · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.

Downloadable artifacts

Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.

⬇ Findings, MITRE CWE-tagged .sarif⬇ Health changelog .md