Public report of run-llama/liteparse, published 14 November 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 reportMeasured under the Code Assurance Index, an open standard for code quality, using its published scoring rules (rubric version 2026.11.4). 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, 14 November 2026, 15:40 UTC · Survey ID cd_a6ebc5f5756e418984891ef32ec2c783
run-llama/liteparse
Measured 14 November 2026, 15:38 UTC, at code version 89735b9
Code coverage is not measured: JavaScript/TypeScript suite (CouldNotMeasureRepoBuildError).
Test reliability is not measured: The JS/TS suite's lockfile was refused.
CAI scoreAt riskNo change 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 medium codebase: 68,865 lines of product code in 15 projects, tests not counted · Estimated rebuild effort: about 0.5 person-years · Weakest lens: Code Health, 40
Findings by how serious they are
165 critical503 serious34 minor
13 dimensions are left out of the score. For each one, we either couldn't measure it in this code, or found no evidence of the safeguard we look 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
Canine Code Analyzer
Producer
Canine Development
Analyzer
Canine Code Analyzer engine 1.0.0
Measured
14 November 2026, 15:38 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 the Canine Code Analyzer. It is open to any tool that
implements it, and today the Canine Code Analyzer 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. We work 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 ▸
64of 64 dimensions measured by tools.
671of 702 findings point to an exact file and line, so you can open each one in the code. The other 31 concern the repository as a whole, such as missing documentation.
64dimensions across 7 lenses, read from 68,865 lines of product code in 15 projects.
run-llama/liteparse is rated At risk because critical security findings are open, most of them in the build pipeline. It scores 56 out of 100, which the At risk rating leaves unchanged.
Code Health, at 40, is the weakest lens and counts most in the score. The best first step is splitting the oversized files, worth about 7 points. Removing the copied code comes next, worth about 4 points. Raising Code Health to 70 would lift the score to about 67.
123 pipeline tools are referenced by a changeable name, so the build pipeline can be tampered with. Fourteen pipeline steps put outside input straight into a shell command, so an attacker can run commands in the build pipeline, and eleven settings leave the servers or containers unsafe. Pinning each tool to an exact version, passing outside input through environment variables and correcting the unsafe settings would close these risks. Updating the vulnerable packages would fix the four packages with a known security hole, and the eight pipeline steps that install packages without pinning their versions need the packages they install pinned to exact versions. The form field without a label needs a label.
The product code is 68,865 lines, about €75,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 forThe 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.
If Code Health rose from 40 to 70, the lowest score rated Strong, the score would rise from 56 to about 67.
Code composition: what the lines of code are
Product code 93%Tests 7%
New since the last survey: 141 findings
These 141 critical or serious findings weren't in the previous survey, on 27 October 2026. The first 100 are listed here, and the findings file in the download package lists them all.
We compare 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: 42 findings
These 42 critical or serious findings were in the previous survey, on 27 October 2026, and are gone from this one.
Page structure · Page without a main landmark scripts/browser-compat/wasm-test.html
A11y enforcement · Accessibility enforcement below the top rung
Rebuild cost: about €75,000 · Estimate
Cost to rebuild
€25,000 to €120,000, for 414 to 1,312 hours of work, about 0.5 person-years for one engineer
Difficulty of the problem
Standard, 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 56. 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.
Size
Medium: 68,865 lines of product code
What it is not
Not 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: We price 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
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Raises the score by about 7 points · Medium effort · Large Files
2
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.
Raises the score by about 4 points · Medium effort · Code Duplication
3
Resolve the 1 finding(s) in Type Safety.
Raises the score by about 2 points · Medium effort · Type Safety
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 €75,000 to build again, about 0.5 person-years of work. Its weakest lens is Code Health, at 40 (Weak). Code Health is about how easy the code is to read and change safely, and code that is hard to read is slow and risky to change, so every future change costs more than it should. Because the weakest lens counts most in the score, work on Code Health also moves the score most.
Based on: the rebuild estimate · the Code Health grade · how much each lens counts
What to do: Start with the Code Health actions in Top priorities.
If you do one thing first · First action
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package. Of all the actions in this report, it raises the score most for the work it takes: about 7 points for medium effort. The next survey will show the change in the score.
Based on: the ranked actions in Top priorities, by score gain and effort
What hard-to-read code costs each year · Cost
Four dimensions measure how easy the code is to work in: two measure how tangled its logic is, one how much of it is copied, and one how well each part sticks to a single job. In this codebase they average 5.4 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 7% to 15% on every change. The history of the code shows how much it changes: about 50,918 lines over the last 90 days, which is about 206,501 lines a year. At that pace, the extra work comes to an estimated 33.6 to 201.4 engineer-days a year, and it grows as more code changes.
How this is estimated: The number of changed lines is measured from the history of the code. The rest rests on two assumptions of our own: code scoring 8 out of 10 or more adds no extra work, and each point below 8 adds 2.5% to 5.6% to every change, never less than 2% to 5% and never more than 40% to 60% in all; and an engineer changes 150 to 400 lines in a day. The result is a range for planning, not a measurement.
Based on: Cyclomatic Complexity · Cognitive Complexity · Code Duplication · Cohesion (LCOM4) · the code's change history
What to do: Start with the files listed under Churn × Complexity Hotspots, which change often and are hard to read, because that is where the extra work is paid most often.
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.
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.
101 modules, with 106 dependencies between them. 2 loops run through 8 of the modules, marked above the diagonal.
The table shows the 40 modules with the most connections; 61 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.
dataset_eval_utils.src.liteparse_eval uses dataset_eval_utils.src.liteparse_eval.providers.parsers.base, so a change to dataset_eval_utils.src.liteparse_eval.providers.parsers.base can break dataset_eval_utils.src.liteparse_eval, while a change to dataset_eval_utils.src.liteparse_eval can't break dataset_eval_utils.src.liteparse_eval.providers.parsers.base.
Position
Below the diagonal: dataset_eval_utils.src.liteparse_eval uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in dataset_eval_utils.src.liteparse_eval.providers.llm.anthropic uses a type in dataset_eval_utils.src.liteparse_eval.providers.llm.base.
dataset_eval_utils.src.liteparse_eval.providers.llm.anthropic uses dataset_eval_utils.src.liteparse_eval.providers.llm.base, so a change to dataset_eval_utils.src.liteparse_eval.providers.llm.base can break dataset_eval_utils.src.liteparse_eval.providers.llm.anthropic, while a change to dataset_eval_utils.src.liteparse_eval.providers.llm.anthropic can't break dataset_eval_utils.src.liteparse_eval.providers.llm.base.
Position
Below the diagonal: dataset_eval_utils.src.liteparse_eval.providers.llm.anthropic uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in dataset_eval_utils.src.liteparse_eval.providers.parsers.liteparse uses a type in dataset_eval_utils.src.liteparse_eval.providers.parsers.base.
dataset_eval_utils.src.liteparse_eval.providers.parsers.liteparse uses dataset_eval_utils.src.liteparse_eval.providers.parsers.base, so a change to dataset_eval_utils.src.liteparse_eval.providers.parsers.base can break dataset_eval_utils.src.liteparse_eval.providers.parsers.liteparse, while a change to dataset_eval_utils.src.liteparse_eval.providers.parsers.liteparse can't break dataset_eval_utils.src.liteparse_eval.providers.parsers.base.
Position
Below the diagonal: dataset_eval_utils.src.liteparse_eval.providers.parsers.liteparse uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in dataset_eval_utils.src.liteparse_eval.providers.parsers.markitdown uses a type in dataset_eval_utils.src.liteparse_eval.providers.parsers.base.
dataset_eval_utils.src.liteparse_eval.providers.parsers.markitdown uses dataset_eval_utils.src.liteparse_eval.providers.parsers.base, so a change to dataset_eval_utils.src.liteparse_eval.providers.parsers.base can break dataset_eval_utils.src.liteparse_eval.providers.parsers.markitdown, while a change to dataset_eval_utils.src.liteparse_eval.providers.parsers.markitdown can't break dataset_eval_utils.src.liteparse_eval.providers.parsers.base.
Position
Below the diagonal: dataset_eval_utils.src.liteparse_eval.providers.parsers.markitdown uses a module listed above it, which is the healthy direction.
1 pair of types, where a type in dataset_eval_utils.src.liteparse_eval.providers.parsers.opendataloader uses a type in dataset_eval_utils.src.liteparse_eval.providers.parsers.base.
dataset_eval_utils.src.liteparse_eval.providers.parsers.opendataloader uses dataset_eval_utils.src.liteparse_eval.providers.parsers.base, so a change to dataset_eval_utils.src.liteparse_eval.providers.parsers.base can break dataset_eval_utils.src.liteparse_eval.providers.parsers.opendataloader, while a change to dataset_eval_utils.src.liteparse_eval.providers.parsers.opendataloader can't break dataset_eval_utils.src.liteparse_eval.providers.parsers.base.
Position
Below the diagonal: dataset_eval_utils.src.liteparse_eval.providers.parsers.opendataloader uses a module listed above it, which is the healthy direction.
15→26 liteparse.markdown_layout.paragraphs uses liteparse.typespart of a loop✕
Connections
3 pairs of types, where a type in liteparse.markdown_layout.paragraphs uses a type in liteparse.types.
liteparse.markdown_layout.paragraphs uses liteparse.types, so a change to liteparse.types can break liteparse.markdown_layout.paragraphs, while a change to liteparse.markdown_layout.paragraphs can't break liteparse.types.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
liteparse.ocr uses liteparse.ocr.image, so a change to liteparse.ocr.image can break liteparse.ocr, while a change to liteparse.ocr can't break liteparse.ocr.image.
Position
Below the diagonal: liteparse.ocr uses a module listed above it, which is the healthy direction.
liteparse_pdfium.page_object uses liteparse_pdfium.bitmap, so a change to liteparse_pdfium.bitmap can break liteparse_pdfium.page_object, while a change to liteparse_pdfium.page_object can't break liteparse_pdfium.bitmap.
Position
Below the diagonal: liteparse_pdfium.page_object uses a module listed above it, which is the healthy direction.
liteparse_pdfium.page_object uses liteparse_pdfium.types, so a change to liteparse_pdfium.types can break liteparse_pdfium.page_object, while a change to liteparse_pdfium.page_object can't break liteparse_pdfium.types.
Position
Below the diagonal: liteparse_pdfium.page_object uses a module listed above it, which is the healthy direction.
17→23 liteparse_pdfium.page_object uses liteparse_pdfium.pagepart of a loop✕
Connections
1 pair of types, where a type in liteparse_pdfium.page_object uses a type in liteparse_pdfium.page.
liteparse_pdfium.page_object uses liteparse_pdfium.page, so a change to liteparse_pdfium.page can break liteparse_pdfium.page_object, while a change to liteparse_pdfium.page_object can't break liteparse_pdfium.page.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
liteparse_pdfium.struct_tree uses liteparse_pdfium.types, so a change to liteparse_pdfium.types can break liteparse_pdfium.struct_tree, while a change to liteparse_pdfium.struct_tree can't break liteparse_pdfium.types.
Position
Below the diagonal: liteparse_pdfium.struct_tree uses a module listed above it, which is the healthy direction.
18→23 liteparse_pdfium.struct_tree uses liteparse_pdfium.pagepart of a loop✕
Connections
2 pairs of types, where a type in liteparse_pdfium.struct_tree uses a type in liteparse_pdfium.page.
liteparse_pdfium.struct_tree uses liteparse_pdfium.page, so a change to liteparse_pdfium.page can break liteparse_pdfium.struct_tree, while a change to liteparse_pdfium.struct_tree can't break liteparse_pdfium.page.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
packages.node.src.lib uses packages.node.src.native, so a change to packages.node.src.native can break packages.node.src.lib, while a change to packages.node.src.lib can't break packages.node.src.native.
Position
Below the diagonal: packages.node.src.lib uses a module listed above it, which is the healthy direction.
liteparse.markdown_layout.blocks uses liteparse.markdown_layout.paragraphs, so a change to liteparse.markdown_layout.paragraphs can break liteparse.markdown_layout.blocks, while a change to liteparse.markdown_layout.blocks can't break liteparse.markdown_layout.paragraphs.
Position
Below the diagonal: liteparse.markdown_layout.blocks uses a module listed above it, which is the healthy direction.
20→26 liteparse.markdown_layout.blocks uses liteparse.typespart of a loop✕
Connections
4 pairs of types, where a type in liteparse.markdown_layout.blocks uses a type in liteparse.types.
liteparse.markdown_layout.blocks uses liteparse.types, so a change to liteparse.types can break liteparse.markdown_layout.blocks, while a change to liteparse.markdown_layout.blocks can't break liteparse.types.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
liteparse.ocr.http_simple uses liteparse.ocr.image, so a change to liteparse.ocr.image can break liteparse.ocr.http_simple, while a change to liteparse.ocr.http_simple can't break liteparse.ocr.image.
Position
Below the diagonal: liteparse.ocr.http_simple uses a module listed above it, which is the healthy direction.
liteparse.ocr.http_simple uses liteparse.ocr, so a change to liteparse.ocr can break liteparse.ocr.http_simple, while a change to liteparse.ocr.http_simple can't break liteparse.ocr.
Position
Below the diagonal: liteparse.ocr.http_simple uses a module listed above it, which is the healthy direction.
liteparse.ocr_merge uses liteparse.ocr.image, so a change to liteparse.ocr.image can break liteparse.ocr_merge, while a change to liteparse.ocr_merge can't break liteparse.ocr.image.
Position
Below the diagonal: liteparse.ocr_merge uses a module listed above it, which is the healthy direction.
liteparse.ocr_merge uses liteparse.ocr, so a change to liteparse.ocr can break liteparse.ocr_merge, while a change to liteparse.ocr_merge can't break liteparse.ocr.
Position
Below the diagonal: liteparse.ocr_merge uses a module listed above it, which is the healthy direction.
22→26 liteparse.ocr_merge uses liteparse.typespart of a loop✕
Connections
6 pairs of types, where a type in liteparse.ocr_merge uses a type in liteparse.types.
liteparse.ocr_merge uses liteparse.types, so a change to liteparse.types can break liteparse.ocr_merge, while a change to liteparse.ocr_merge can't break liteparse.types.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
liteparse_pdfium.page uses liteparse_pdfium.bitmap, so a change to liteparse_pdfium.bitmap can break liteparse_pdfium.page, while a change to liteparse_pdfium.page can't break liteparse_pdfium.bitmap.
Position
Below the diagonal: liteparse_pdfium.page uses a module listed above it, which is the healthy direction.
liteparse_pdfium.page uses liteparse_pdfium.types, so a change to liteparse_pdfium.types can break liteparse_pdfium.page, while a change to liteparse_pdfium.page can't break liteparse_pdfium.types.
Position
Below the diagonal: liteparse_pdfium.page uses a module listed above it, which is the healthy direction.
liteparse_pdfium.page uses liteparse_pdfium.page_object, so a change to liteparse_pdfium.page_object can break liteparse_pdfium.page, while a change to liteparse_pdfium.page can't break liteparse_pdfium.page_object.
Position
Below the diagonal: liteparse_pdfium.page uses a module listed above it, which is the healthy direction.
liteparse_pdfium.page uses liteparse_pdfium.struct_tree, so a change to liteparse_pdfium.struct_tree can break liteparse_pdfium.page, while a change to liteparse_pdfium.page can't break liteparse_pdfium.struct_tree.
Position
Below the diagonal: liteparse_pdfium.page uses a module listed above it, which is the healthy direction.
packages.node.src uses packages.node.src.native, so a change to packages.node.src.native can break packages.node.src, while a change to packages.node.src can't break packages.node.src.native.
Position
Below the diagonal: packages.node.src uses a module listed above it, which is the healthy direction.
packages.node.src uses packages.node.src.lib, so a change to packages.node.src.lib can break packages.node.src, while a change to packages.node.src can't break packages.node.src.lib.
Position
Below the diagonal: packages.node.src uses a module listed above it, which is the healthy direction.
liteparse.layout uses liteparse.markdown_layout.blocks, so a change to liteparse.markdown_layout.blocks can break liteparse.layout, while a change to liteparse.layout can't break liteparse.markdown_layout.blocks.
Position
Below the diagonal: liteparse.layout uses a module listed above it, which is the healthy direction.
25→26 liteparse.layout uses liteparse.typespart of a loop✕
Connections
4 pairs of types, where a type in liteparse.layout uses a type in liteparse.types.
liteparse.layout uses liteparse.types, so a change to liteparse.types can break liteparse.layout, while a change to liteparse.layout can't break liteparse.types.
Position
Above the diagonal, so it is part of a loop. Neither module can be changed, tested or released on its own until one of these dependencies is removed.
liteparse.types uses liteparse.ocr_merge, so a change to liteparse.ocr_merge can break liteparse.types, while a change to liteparse.types can't break liteparse.ocr_merge.
Position
Below the diagonal: liteparse.types uses a module listed above it, which is the healthy direction.
liteparse.types uses liteparse.layout, so a change to liteparse.layout can break liteparse.types, while a change to liteparse.types can't break liteparse.layout.
Position
Below the diagonal: liteparse.types uses a module listed above it, which is the healthy direction.
liteparse.conversion uses liteparse.types, so a change to liteparse.types can break liteparse.conversion, while a change to liteparse.conversion can't break liteparse.types.
Position
Below the diagonal: liteparse.conversion uses a module listed above it, which is the healthy direction.
liteparse.extract uses liteparse.config, so a change to liteparse.config can break liteparse.extract, while a change to liteparse.extract can't break liteparse.config.
Position
Below the diagonal: liteparse.extract uses a module listed above it, which is the healthy direction.
liteparse.extract uses liteparse.tex_math, so a change to liteparse.tex_math can break liteparse.extract, while a change to liteparse.extract can't break liteparse.tex_math.
Position
Below the diagonal: liteparse.extract uses a module listed above it, which is the healthy direction.
liteparse.extract uses liteparse.types, so a change to liteparse.types can break liteparse.extract, while a change to liteparse.extract can't break liteparse.types.
Position
Below the diagonal: liteparse.extract uses a module listed above it, which is the healthy direction.
liteparse.markdown_layout.tables uses liteparse.markdown_layout.blocks, so a change to liteparse.markdown_layout.blocks can break liteparse.markdown_layout.tables, while a change to liteparse.markdown_layout.tables can't break liteparse.markdown_layout.blocks.
Position
Below the diagonal: liteparse.markdown_layout.tables uses a module listed above it, which is the healthy direction.
liteparse.markdown_layout.tables uses liteparse.types, so a change to liteparse.types can break liteparse.markdown_layout.tables, while a change to liteparse.markdown_layout.tables can't break liteparse.types.
Position
Below the diagonal: liteparse.markdown_layout.tables uses a module listed above it, which is the healthy direction.
liteparse_wasm uses liteparse.types, so a change to liteparse.types can break liteparse_wasm, while a change to liteparse_wasm can't break liteparse.types.
Position
Below the diagonal: liteparse_wasm uses a module listed above it, which is the healthy direction.
liteparse.markdown_layout.classify uses liteparse.config, so a change to liteparse.config can break liteparse.markdown_layout.classify, while a change to liteparse.markdown_layout.classify can't break liteparse.config.
Position
Below the diagonal: liteparse.markdown_layout.classify uses a module listed above it, which is the healthy direction.
liteparse.markdown_layout.classify uses liteparse.markdown_layout.paragraphs, so a change to liteparse.markdown_layout.paragraphs can break liteparse.markdown_layout.classify, while a change to liteparse.markdown_layout.classify can't break liteparse.markdown_layout.paragraphs.
Position
Below the diagonal: liteparse.markdown_layout.classify uses a module listed above it, which is the healthy direction.
liteparse.markdown_layout.classify uses liteparse.markdown_layout.blocks, so a change to liteparse.markdown_layout.blocks can break liteparse.markdown_layout.classify, while a change to liteparse.markdown_layout.classify can't break liteparse.markdown_layout.blocks.
Position
Below the diagonal: liteparse.markdown_layout.classify uses a module listed above it, which is the healthy direction.
liteparse.markdown_layout.classify uses liteparse.types, so a change to liteparse.types can break liteparse.markdown_layout.classify, while a change to liteparse.markdown_layout.classify can't break liteparse.types.
Position
Below the diagonal: liteparse.markdown_layout.classify uses a module listed above it, which is the healthy direction.
liteparse.markdown_layout.classify uses liteparse.markdown_layout.tables, so a change to liteparse.markdown_layout.tables can break liteparse.markdown_layout.classify, while a change to liteparse.markdown_layout.classify can't break liteparse.markdown_layout.tables.
Position
Below the diagonal: liteparse.markdown_layout.classify uses a module listed above it, which is the healthy direction.
liteparse.markdown_layout.cross_region uses liteparse.types, so a change to liteparse.types can break liteparse.markdown_layout.cross_region, while a change to liteparse.markdown_layout.cross_region can't break liteparse.types.
Position
Below the diagonal: liteparse.markdown_layout.cross_region uses a module listed above it, which is the healthy direction.
liteparse.markdown_layout.cross_region uses liteparse.markdown_layout.tables, so a change to liteparse.markdown_layout.tables can break liteparse.markdown_layout.cross_region, while a change to liteparse.markdown_layout.cross_region can't break liteparse.markdown_layout.tables.
Position
Below the diagonal: liteparse.markdown_layout.cross_region uses a module listed above it, which is the healthy direction.
liteparse.raw_text uses liteparse.types, so a change to liteparse.types can break liteparse.raw_text, while a change to liteparse.raw_text can't break liteparse.types.
Position
Below the diagonal: liteparse.raw_text uses a module listed above it, which is the healthy direction.
liteparse.raw_text uses liteparse.extract, so a change to liteparse.extract can break liteparse.raw_text, while a change to liteparse.raw_text can't break liteparse.extract.
Position
Below the diagonal: liteparse.raw_text uses a module listed above it, which is the healthy direction.
liteparse.stages uses liteparse.config, so a change to liteparse.config can break liteparse.stages, while a change to liteparse.stages can't break liteparse.config.
Position
Below the diagonal: liteparse.stages uses a module listed above it, which is the healthy direction.
liteparse.stages uses liteparse.markdown_layout.blocks, so a change to liteparse.markdown_layout.blocks can break liteparse.stages, while a change to liteparse.stages can't break liteparse.markdown_layout.blocks.
Position
Below the diagonal: liteparse.stages uses a module listed above it, which is the healthy direction.
liteparse.stages uses liteparse.ocr_merge, so a change to liteparse.ocr_merge can break liteparse.stages, while a change to liteparse.stages can't break liteparse.ocr_merge.
Position
Below the diagonal: liteparse.stages uses a module listed above it, which is the healthy direction.
liteparse.stages uses liteparse.layout, so a change to liteparse.layout can break liteparse.stages, while a change to liteparse.stages can't break liteparse.layout.
Position
Below the diagonal: liteparse.stages uses a module listed above it, which is the healthy direction.
liteparse.stages uses liteparse.types, so a change to liteparse.types can break liteparse.stages, while a change to liteparse.stages can't break liteparse.types.
Position
Below the diagonal: liteparse.stages uses a module listed above it, which is the healthy direction.
liteparse.stages uses liteparse.extract, so a change to liteparse.extract can break liteparse.stages, while a change to liteparse.stages can't break liteparse.extract.
Position
Below the diagonal: liteparse.stages uses a module listed above it, which is the healthy direction.
liteparse.text_clip uses liteparse.types, so a change to liteparse.types can break liteparse.text_clip, while a change to liteparse.text_clip can't break liteparse.types.
Position
Below the diagonal: liteparse.text_clip uses a module listed above it, which is the healthy direction.
liteparse.text_clip uses liteparse.extract, so a change to liteparse.extract can break liteparse.text_clip, while a change to liteparse.text_clip can't break liteparse.extract.
Position
Below the diagonal: liteparse.text_clip uses a module listed above it, which is the healthy direction.
liteparse.parser uses liteparse.config, so a change to liteparse.config can break liteparse.parser, while a change to liteparse.parser can't break liteparse.config.
Position
Below the diagonal: liteparse.parser uses a module listed above it, which is the healthy direction.
liteparse.parser uses liteparse.markdown_layout.blocks, so a change to liteparse.markdown_layout.blocks can break liteparse.parser, while a change to liteparse.parser can't break liteparse.markdown_layout.blocks.
Position
Below the diagonal: liteparse.parser uses a module listed above it, which is the healthy direction.
liteparse.parser uses liteparse.ocr_merge, so a change to liteparse.ocr_merge can break liteparse.parser, while a change to liteparse.parser can't break liteparse.ocr_merge.
Position
Below the diagonal: liteparse.parser uses a module listed above it, which is the healthy direction.
liteparse.parser uses liteparse.types, so a change to liteparse.types can break liteparse.parser, while a change to liteparse.parser can't break liteparse.types.
Position
Below the diagonal: liteparse.parser uses a module listed above it, which is the healthy direction.
liteparse.parser uses liteparse.conversion, so a change to liteparse.conversion can break liteparse.parser, while a change to liteparse.parser can't break liteparse.conversion.
Position
Below the diagonal: liteparse.parser uses a module listed above it, which is the healthy direction.
liteparse.parser uses liteparse.extract, so a change to liteparse.extract can break liteparse.parser, while a change to liteparse.parser can't break liteparse.extract.
Position
Below the diagonal: liteparse.parser uses a module listed above it, which is the healthy direction.
liteparse.parser uses liteparse.stages, so a change to liteparse.stages can break liteparse.parser, while a change to liteparse.parser can't break liteparse.stages.
Position
Below the diagonal: liteparse.parser uses a module listed above it, which is the healthy direction.
liteparse.output.json uses liteparse.ocr_merge, so a change to liteparse.ocr_merge can break liteparse.output.json, while a change to liteparse.output.json can't break liteparse.ocr_merge.
Position
Below the diagonal: liteparse.output.json uses a module listed above it, which is the healthy direction.
liteparse.output.json uses liteparse.layout, so a change to liteparse.layout can break liteparse.output.json, while a change to liteparse.output.json can't break liteparse.layout.
Position
Below the diagonal: liteparse.output.json uses a module listed above it, which is the healthy direction.
liteparse.output.json uses liteparse.types, so a change to liteparse.types can break liteparse.output.json, while a change to liteparse.output.json can't break liteparse.types.
Position
Below the diagonal: liteparse.output.json uses a module listed above it, which is the healthy direction.
liteparse.output.json uses liteparse.parser, so a change to liteparse.parser can break liteparse.output.json, while a change to liteparse.output.json can't break liteparse.parser.
Position
Below the diagonal: liteparse.output.json uses a module listed above it, which is the healthy direction.
liteparse_napi.types uses liteparse.config, so a change to liteparse.config can break liteparse_napi.types, while a change to liteparse_napi.types can't break liteparse.config.
Position
Below the diagonal: liteparse_napi.types uses a module listed above it, which is the healthy direction.
liteparse_napi.types uses liteparse.ocr_merge, so a change to liteparse.ocr_merge can break liteparse_napi.types, while a change to liteparse_napi.types can't break liteparse.ocr_merge.
Position
Below the diagonal: liteparse_napi.types uses a module listed above it, which is the healthy direction.
liteparse_napi.types uses liteparse.layout, so a change to liteparse.layout can break liteparse_napi.types, while a change to liteparse_napi.types can't break liteparse.layout.
Position
Below the diagonal: liteparse_napi.types uses a module listed above it, which is the healthy direction.
liteparse_napi.types uses liteparse.types, so a change to liteparse.types can break liteparse_napi.types, while a change to liteparse_napi.types can't break liteparse.types.
Position
Below the diagonal: liteparse_napi.types uses a module listed above it, which is the healthy direction.
liteparse_napi.types uses liteparse.parser, so a change to liteparse.parser can break liteparse_napi.types, while a change to liteparse_napi.types can't break liteparse.parser.
Position
Below the diagonal: liteparse_napi.types uses a module listed above it, which is the healthy direction.
liteparse_python uses liteparse.config, so a change to liteparse.config can break liteparse_python, while a change to liteparse_python can't break liteparse.config.
Position
Below the diagonal: liteparse_python uses a module listed above it, which is the healthy direction.
liteparse_python uses liteparse.ocr_merge, so a change to liteparse.ocr_merge can break liteparse_python, while a change to liteparse_python can't break liteparse.ocr_merge.
Position
Below the diagonal: liteparse_python uses a module listed above it, which is the healthy direction.
liteparse_python uses liteparse.layout, so a change to liteparse.layout can break liteparse_python, while a change to liteparse_python can't break liteparse.layout.
Position
Below the diagonal: liteparse_python uses a module listed above it, which is the healthy direction.
liteparse_python uses liteparse.types, so a change to liteparse.types can break liteparse_python, while a change to liteparse_python can't break liteparse.types.
Position
Below the diagonal: liteparse_python uses a module listed above it, which is the healthy direction.
liteparse_python uses liteparse.parser, so a change to liteparse.parser can break liteparse_python, while a change to liteparse_python can't break liteparse.parser.
Position
Below the diagonal: liteparse_python uses a module listed above it, which is the healthy direction.
liteparse_napi uses liteparse.config, so a change to liteparse.config can break liteparse_napi, while a change to liteparse_napi can't break liteparse.config.
Position
Below the diagonal: liteparse_napi uses a module listed above it, which is the healthy direction.
liteparse_napi uses liteparse_napi.types, so a change to liteparse_napi.types can break liteparse_napi, while a change to liteparse_napi can't break liteparse_napi.types.
Position
Below the diagonal: liteparse_napi uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 40% · Weak · gated by D1, D2, R10, R3 ·
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 category
Findings
Severity
A05:2025 — Injection
155
High / Critical
A03:2025 — Software Supply Chain Failures
42
High / Critical
A02:2025 — Security Misconfiguration
25
High / Critical
Roadmap
Top priorities: Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package; 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; Resolve the 1 finding(s) in Type Safety.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
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.
Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
Bring the 18 bodies over 60 down to 60 or less in Cognitive Complexity — start with liteparse::projection::project_to_grid (cognitive 522), liteparse::projection::form_lines (cognitive 172), liteparse::extract::extract_page_text_items (cognitive 169).
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 — 165
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 — 503
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 — 34
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 13
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
This survey 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. All 64 evaluated dimensions are computed by tools and static analysis; no language model sets or judges any of them. Overall confidence is 0.9, the weighted average across measured dimensions.
Every figure here is one of two 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. 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.
What we checked — 64 dimensions across the health lenses
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
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, 671 of 702 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.)
Is there a tool behind the number? Every score below names the method that produced it: Roslyn, git or a scanner, not a narrative.
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.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
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 — We measured this, but not all of it. What we 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 23 test(s) behind this row are the ones the JavaScript/TypeScript census could read, and this repository also carries at least 25 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.
D14 License Compliance — measured, with a gap in what it reached — We measured this, but not all of it. What we 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 REDACTED/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 — We measured this, but not all of it. What we 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 — We 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 naming rules read C# through Roslyn and every other language through its sidecar model; these languages are left out (PHP's reading is its own change, a Roslyn-loaded VB or F# project has no population builder yet). Their declarations carry no naming verdict this run — this says nothing about whether their names are consistent.
D22 Internal API Consistency — not measured this run — We 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 — measured, with a gap in what it reached — We measured this, but not all of it. What we 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 source language's comment syntax, and the code a comment annotates in it, needs its own proof before D24 judges it. Until then those comments are left unread, not counted as clean.
D27 Navigability — not measured this run — We 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.
AX6 Interface segregation — not measured this run — We 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 most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
AXR1 Runtime accessibility — not measured this run — We 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 REDACTED (REDACTED). docker build failed (exit 1) — 10 | # this upstream build can.) 11 | >>> FROM ghcr.io/ggml-org/llama.cpp:server-cuda 12 | 13 | # Bring uv in from its official image (no external install script needed). -------------------- ERROR: failed to solve: failed to register layer: write /usr/lib/x86_64-linux-gnu/libgfortran.so.5.0.0: no space left on device; runtime evidence skipped.
GD1 Unfinished & placeholder code — not measured this run — We 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, c 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 — We 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, c 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.
M4 Documentation accuracy — measured, with a gap in what it reached — We measured this, but not all of it. What we 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. M4 checks only the claim kinds adjudicated at or above 95 % precision: links and versions (PREREGISTRATION version 9), and artefact counts an order of magnitude off. Paths, command arguments, installs, environment variables, settings, projects, packages, routes, cd targets, infrastructure products and removed modules are read but not checked, and none of them is reported or counted.
P5 DR & Backup — not measured this run — This is a true statement about the repository that carries nothing for its owner to act on, so it is reported here rather than as a defect in their code. No backup/snapshot/replication config, RTO/RPO or restore-procedure documentation was found — and no production persistence was detected either (no data-access packages, no data-store services, no database resources), so there is nothing in this repository whose loss a DR control would recover. If this system's data lives in a platform or ops repo we can't see, that's where the DR evidence belongs.
X12 Unreachable branch — not measured this run — We 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 most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X13 Undrained process stream — not measured this run — We 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 most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X16 Unfloored truncation loop — not measured this run — We 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 most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X19 Unrestored process-global state — not measured this run — We 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 most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X24 Document value interpolated into markup unescaped — not measured this run — We 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 most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
X3 Exception handling — not measured this run — We 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 most of the languages this repository's product is written in. What it read is kept, but it is too small a share to grade the product by. That is a gap in this analyzer's language reach — not a finding about this repository.
Repo exclusion declarations: 6 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
We assess the repository exactly as committed, and only the repository. By design we do 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.
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 checks the structure of the decision records present: it cannot know about decisions made and never recorded, and it does not judge how well a record argues its case. Records in a language the section lexicon does not cover are not evaluated.
D24 Comment Value: Comment value is measured as redundancy only: a comment that repeats its code's words is found, but a paraphrase in other words, a vague comment, or one the code contradicts is not, and whether a comment is valuable is not claimed. Comments in other scripts or languages, and outside C#, are not judged.
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.
D31 IaC & Container Security: IaC scanning checks Dockerfiles/Terraform/Kubernetes against best-practice rules — it cannot see the live cloud account, runtime configuration, or drift between the committed config and what is actually deployed.
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 REDACTED (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.
AC2 Forms & labels: Label association is read from static markup — a label wired up at runtime (JS-set aria-labelledby, framework-injected ids) reads as missing, a present label says nothing about whether its text is correct. A known UI-library field component (e.g. a JSX <TextField>) is now checked conservatively — flagged only when it carries NO label/aria-label/aria-labelledby/id/name — but wrapper/context-labelled libraries (Chakra/Radix FormControl+FormLabel) aren't statically visible (possible false positive) and non-JSX lowercased components are still skipped. A click handler on a plain element is now asked for a name too (it is a control the author declared), but the subtree test that answers it is deliberately generous: any DYNAMIC text expression in the subtree counts as a name, so an icon chosen by a ternary ({cond ? <IconA/> : <IconB/>}) reads as named, and a glyph component from a library the icon-import list does not know still names its parent. A clean result is "no unlabelled control found", not a labelling proof.
AC3 Page structure: Page structure is read from the static markup tree — landmarks, headings and lang injected at runtime aren't seen, heading ORDER is checked structurally (not against the rendered visual hierarchy), and lang/title/main fire only on full documents, never partials, and the data-table check sees header-cell presence (a <th> exists), not whether each header correctly associates with its cells. Static readiness, not conformance.
AC6 Visual & motion safety: Contrast and motion safety are PARTIAL by construction — literal colours (hex/rgb/hsl/named) in inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS top-level declarations are read (same-rule/same-element colour+background pairs only); computed/runtime/theme colour, external-CDN stylesheets, CSS-in-JS dynamic (${…}) and nested-selector colours, cross-element pairs and image contrast stay out of reach, so a clean result is bounded by what the static CSS itself shows.
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.
M4 Documentation accuracy: Documentation accuracy checks links, versions and artefact counts against the tree: other claims (paths, commands, settings, routes) are read but not checked, and it cannot run the onboarding or measure how long a real new joiner takes.
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".
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.
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.
80 method(s) exceeded the cyclomatic complexity threshold of 15; the worst was liteparse::projection::project_to_grid at 180. A further 7 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 liteparse::tex_math::symbol at 103 — they are counted neither in the figure above nor in this dimension's score. 2 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/liteparse/src/tex_math/encodings.rs (liteparse::tex_math::encodings::oms at 103), crates/liteparse/src/ocr/tesseract.rs (TesseractOcrEngine::normalize_language_code at 16). 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.
+ 10 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 1 body over 120 down to 120 or less in Cyclomatic Complexity — start with liteparse::projection::project_to_grid (cyclomatic 180). — Refactoring it lifts Cyclomatic Complexity from 2.0 to about 2.6/10.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 17 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 18 bodies over 60 down to 60 or less in Cognitive Complexity — start with liteparse::projection::project_to_grid (cognitive 522), liteparse::projection::form_lines (cognitive 172), liteparse::extract::extract_page_text_items (cognitive 169). — 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 18 together lifts Cognitive Complexity from 2.0 to about 3.2/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.4 / 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.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 27 FunctionTooLong finding(s) in God Classes — start with projection.rs (6), tables.rs (6), extract.rs (3). — One of this dimension's main actionable groups (27 warning-level).
Resolve the 17 FileTooLong finding(s) in God Classes — start with lib.rs (2), tables.rs, projection.rs. — One of this dimension's main actionable groups (17 warning-level).
Resolve the 8 TooManyFields finding(s) in God Classes — start with types.rs (2), lib.rs (2), dynamic.rs. — One of this dimension's main actionable groups (8 warning-level).
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How much of the production code is copy-pasted: the share of production lines inside a reported copy (every copy of a duplicated block or of an edited member, each line once), 10 at none and 0 at a quarter of the lines.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), scored on the share of production lines inside a reported copy (each line once; 10 at none, 0 at a quarter). Deterministic.
86 duplicated block group(s) detected. 6.0 % of the production lines (4,139 of 68,865) are in a reported copy. A further 47 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.
+ 68 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 8 Duplicated block (9 lines × 2) finding(s) in Code Duplication — start with cli.rs (2), lib.rs (2), projection.rs (2). — One of this dimension's main actionable groups (8 warning-level).
Resolve the 6 Duplicated block (6 lines × 2) finding(s) in Code Duplication — start with types.rs, tables.rs, projection.rs. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 6 Duplicated block (5 lines × 2) finding(s) in Code Duplication — start with projection.rs (2), types.rs, repetition.rs. — One of this dimension's main actionable groups (6 warning-level).
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D5 · Coupling8.9 / 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.
15 production modules (Cargo+npm+Python), 0 dependency cycle(s), 0 unstable depended-on module(s). Read from the build's own module declarations; 2 module(s) off the main sequence, with abstractness counted on 14 of the 15 (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: liteparse-pdfium-sys · ×2
What to do
Resolve the 2 Off the main sequence finding(s) in Coupling. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d5_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
D10 · Test Quality10.0 / 10Exemplary✓ 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.
0 skipped, 0 zero-assertion, no mocking-framework packages referenced (hand-written doubles or no mocking) across 23 tests. Measured on the JavaScript/TypeScript suite only — at least 25 test source file(s) (.py, .rs) went unread, so its test quality is unmeasured and is not in these counts.
What it measures: Whether dependencies are current, not deprecated, and not bloated. Known vulnerabilities are D30's.
Method: Manifest scan via dotnet list package across all projects; worst-signal-per-package deduction (capped-linear for deprecation, prerelease and outdated) per KLoC. Known-vulnerable packages are D30's and are not charged here (rubric-2026.11.2). Exhaustive.
14 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: blake3 · ×14
✓ On the Gold path — maintain.
Detailed fixes: d12_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
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.
0 of 545 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 Apache-2.0, 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 REDACTED/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.
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.
Resolve the 16 Hotspot finding(s) in Churn × Complexity Hotspots — start with lib.rs (2), projection.rs, extract.rs. — One of this dimension's main actionable groups (16 warning-level).
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor7.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.
17 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is crates/liteparse/src/markdown_layout/blocks.rs. Counted over 81 of the 108 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
Further sole-owners (lower concentration)
What to do
Resolve the 1 Off-boarding risk finding(s) in Bus Factor. — One of this dimension's main actionable groups (1 recommendation-level).
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.
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.
0 deducted task-comment markers across 68865 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.
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.
1 of 1 documentation facets pass in full. 28 document(s) read across 3 unit(s).
✓ On the Gold path — maintain.
Detailed fixes: d19_recommendation.md.
Do you agree with this assessment?
D20 · ADR Quality0.0 / 10Critical✓ Tool-verified
What it measures: Whether architecture decisions are recorded well (context, decision, consequences).
Method: Every ADR read by its section structure: nine located rules (a missing Decision, Context or Consequences section, a stale status, two records deciding the same question, a dangling supersede link, a number-only title, a single option, no named cost, no status where the log uses one, no enforcement field where the log adopted one), each a fixed deduction from 10; the score is the mean over evaluated records. Deterministic, no model. Advisory.
Resolve the 1 No ADRs found finding(s) in ADR Quality — start with REDACTED. — 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.
What it measures: Whether comments are worth it — explaining WHY (valuable) rather than WHAT (redundant).
Method: Every inline C# comment compared word by word with the identifiers, literals and constructs of the code it annotates (taken from the syntax); a comment whose words that code already contains is redundant, as are closing-brace labels and generator template text. Comments giving a reason or a reference are kept; other scripts and languages are not judged. Deterministic, exhaustive, advisory.
1 of 15 build units (Cargo, Python, npm) flagged as possibly oversized/incoherent.
Projects may be oversized for their cohesion
What to do
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.
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.
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).
155 finding(s): 0 critical, 148 high, 7 medium, 0 low. 123 unpinned-GitHub-Actions row(s) are reported here but scored by D36 (supply-chain provenance), which measures that posture as `pinned_actions` — one pinning decision is charged once, not once per lens. semgrep hit a parse error in 3 file(s) — `packages/python/scripts/download-pdfium.sh` (line 14), `scripts/build-glibc-cli.sh` (line 19), `scripts/build-glibc-node.sh` (line 20) — 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 7 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
Resolve the 14 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (4), REDACTED (3), REDACTED (3). — One of this dimension's main actionable groups (14 issue-level).
Resolve the 8 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (2), REDACTED (2), REDACTED. — One of this dimension's main actionable groups (8 issue-level).
No action in Static Analysis (SAST) — all 123 REDACTED finding(s) are reported here at file:line but scored by D36 (supply-chain provenance), so none is charged to this dimension. — One of this dimension's main actionable groups (123 issue-level, 0 of them charged here).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
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. Advisory since rubric-2026.11.2 (CAI decision 0006): every row is a match against a vulnerability database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 11 Medium advisory (unsound) finding(s) in Dependency Vulnerabilities — start with REDACTED (11). — One of this dimension's main actionable groups (11 warning-level).
Resolve the 3 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 issue-level).
Resolve the 1 Critical CVE finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Detailed fixes: d30_recommendation.md · top locations in Appendix A, every location in findings.md.
Resolve the 11 High IaC finding(s) in IaC & Container Security — start with REDACTED (9), REDACTED (2). — One of this dimension's main actionable groups (11 issue-level).
Resolve the 9 Medium IaC finding(s) in IaC & Container Security — start with REDACTED (7), REDACTED (2). — One of this dimension's main actionable groups (9 warning-level).
Resolve the 5 Low IaC finding(s) in IaC & Container Security — start with REDACTED (5). — One of this dimension's main actionable groups (5 recommendation-level).
Detailed fixes: d31_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
Every significant source file has living knowledge — recently and meaningfully worked. Counted over 81 of the 108 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over.
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.
Resolve the 2 Change-coupling hub finding(s) in Change Coupling — start with json.rs, cli.ts. — One of this dimension's main actionable groups (2 warning-level).
Resolve the 2 Change coupling finding(s) in Change Coupling — start with extract.rs, native.ts. — One of this dimension's main actionable groups (2 warning-level).
Resolve the 1 Change coupling clique finding(s) in Change Coupling — start with http_simple.rs. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d35_recommendation.md · top locations in Appendix A, every location in findings.md.
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.
+ 2 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 4 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED, REDACTED, REDACTED. — One of this dimension's main actionable groups (4 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 REDACTED finding(s) in Supply-chain Provenance & Signing — start with REDACTED. — One of this dimension's main actionable groups (1 warning-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
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. Reported 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. Advisory since rubric-2026.11.2 (CAI decision 0006): the malicious-package feed is a database that changes daily, so the reading is shown and never moves a scored dimension, lens or the headline.
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.
0 end-of-life runtime(s) and 0 end-of-life framework(s), read from 0 platform declaration(s) and 17 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.
✓ On the Gold path — maintain.
Detailed fixes: d44_recommendation.md.
Do you agree with this assessment?
Frontend & cross-cutting dimensions
R = React/JS · M = Maturity · P = Readiness.
AC2 · Forms & labels5.4 / 10Adequate✓ Tool-verified
Other · Accessibility — Whether form controls have a programmatic label (an associated label, aria-label or aria-labelledby), buttons have text, links have an accessible name, a click handler on a plain element names the control it declares, fieldsets have a non-empty legend, known UI-library field components carry a label prop, and a placeholder isn't used as the only label. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: inputs/selects/textareas checked for an associated label[for]/wrapping label/aria-label/aria-labelledby (per document), buttons for accessible text, fieldsets for a legend; placeholder-only labelling flagged. Deterministic, hard fact per control.
Coverage: Population: form controls, buttons, links, fieldsets and known UI-library field components in the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and spread/dynamic-attribute elements are skipped, so a control whose label arrives through a spread or a runtime expression is deliberately not judged. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it. — wasm-demo-site/index.html:362
What to do
Give every control a programmatic label (a <label for> / wrapping <label> / aria-label) and every button text — a placeholder is not a label.
Other · Accessibility — Whether pages declare a language (well-formed BCP-47) and a non-empty title, expose exactly one main landmark and a sane heading order with non-empty headings, keep zoom enabled, title their iframes, give data tables header cells, and avoid meta-refresh. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: html lang, document <title>, a main landmark and heading order on full documents only, plus zoom-disabling viewports, untitled iframes and meta-refresh anywhere. Deterministic, per structural checkpoint.
Coverage: Population: the PARSED MARKUP documents (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx). The page-level checks — lang, title, single main landmark — fire ONCE PER FULL DOCUMENT (an <html> root) and never on a partial or component fragment, so a repo of fragments is assessed only on the per-element checks (heading order, table headers, iframe titles, meta-refresh, zoom). Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
Other · Accessibility — Whether focus outlines aren't removed without a replacement, motion respects prefers-reduced-motion, and literal CSS colour pairs meet contrast — PARTIAL: inline styles, in-repo <style> blocks, in-repo .css files, var() tokens, Tailwind neutral utilities and CSS-in-JS literals are read (hex/rgb/hsl/named), never computed/runtime/external-CDN colour. Static markup readiness, not a WCAG conformance claim.
Method: Static markup/CSS scan: inline outline:none/0, literal inline colour/background contrast against the 4.5:1 AA floor, and <style>-block animation without a prefers-reduced-motion guard. Deterministic but PARTIAL — only inline styles and in-repo CSS literals are visible.
Coverage: Population: styled elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx), plus in-repo <style> blocks, in-repo .css files and CSS-in-JS literals. Colour contrast is computed from LITERAL colour pairs only (hex/rgb/hsl/named, including var() tokens and Tailwind neutral utilities) — computed, runtime-themed and external-CDN colour is never resolved, so this is a partial read of contrast by construction. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is not read at all.
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.
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.
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.
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.
Maturity · Maturity — Whether the repository and its projects have a README, and whether it is substantive.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
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.
Maturity · Maturity — Whether the repository is organised deliberately: production code and tests are set apart in a way its ecosystem or the repository itself declares.
Method: Filesystem scan: src/test folder separation and namespace-prefix consistency (majority RootNamespace agreement). Exhaustive across projects, deterministic.
Maturity · Maturity — Whether the project's current-state documentation describes the code that exists.
Method: Every current-state document's checkable claims looked up in the tree (links, versions, and artefact counts an order of magnitude off), plus two README checks: an advertised infrastructure product with no footprint, and a module the CHANGELOG records as removed. Deterministic, no model. Advisory.
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.
Do you agree with this assessment?
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's code 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.
Do you agree with this assessment?
P2 · Observability6.7 / 10Adequate✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
Only 5/9 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `crates/liteparse`, `dataset_eval_utils`, `packages/node`, `packages/python`.
What to do
Extend structured logging to the remaining runnable modules so everything you run is diagnosable in production.
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.
`packages/node/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`. — packages/node/package.json:57
What to do
Enable Dependabot/Renovate or a dependency-review gate.
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
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.
Readiness · Readiness — Whether outbound HTTP calls are wrapped in resilience (retry/timeout/circuit-breaker) so a failing dependency doesn't cascade.
Method: Source scan: outbound HTTP clients and what bounds them — resilience handlers (Polly, AddStandardResilienceHandler) on .NET; on Go, the JVM, Python, JavaScript/TypeScript, Ruby, PHP, Rust, Elixir, Swift, Dart and Erlang, a timeout, deadline, retry or breaker beside each call, or a process-wide client default (a framework-wide deadline such as Drupal core's, Laravel's or actix's awc counts). Exhaustive, deterministic.
`reqwest::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout. — crates/liteparse/src/ocr/tesseract.rs:200
What to do
Give every client a whole-request bound: `reqwest::Client::builder().timeout(Duration::from_secs(10))` (never `reqwest::get` or `Client::new()`, which have none), ureq's `timeout_global`, or wrap the call in `tokio::time::timeout`; add retry with back-off (`reqwest-retry`'s `RetryTransientMiddleware`, `backoff`) around dependencies that fail.
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 each language's code 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.
Do you agree with this assessment?
R1 · Type Safety4.4 / 10Weak✓ 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.
7 typed · 9 plain JS — the untyped files are packages/node/scripts/clean-dist.mjs, packages/node/tests/cli-batch.test.mjs, packages/node/tests/cli-text.test.mjs, packages/node/tests/exports.test.mjs, packages/node/tests/pool.test.mjs, packages/wasm/scripts/patch-wasi-imports.js (+3 more).
React / JS · Code Health — The share of the scored frontend lines inside a near-exact copy-pasted block of substantial extent (the D4 clone algorithm over JS/TS tokens, D-386; each line once, 10 at none and 0 at a quarter of the lines, as D4): 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. Scored on the share of the scored frontend lines inside a reported copy, on the same curve as D4. Deterministic.
packages/node/src/lib.ts:210 · packages/node/src/native.ts:87 — the two spans are one implementation copied and then locally edited — 887 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. — packages/node/src/lib.ts:210
packages/node/src/cli.ts:101 · packages/node/src/cli.ts:388 — the two spans are one implementation copied and then locally edited — 273 tokens are still identical, in the same order in both spans, 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. — packages/node/src/cli.ts:101
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.
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.
constructor has cyclomatic complexity 46 and cognitive complexity 45; 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. — packages/node/src/lib.ts:680
(anonymous) has cyclomatic complexity 38 and cognitive complexity 44; 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. — packages/node/src/cli.ts:409
(anonymous) has cyclomatic complexity 37 and cognitive complexity 38; 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. — packages/node/src/cli.ts:151
textItemToCliJson has cyclomatic complexity 17 and cognitive complexity 16; 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. — packages/node/src/cli-json.ts:13
(anonymous) has cyclomatic complexity 13 and cognitive complexity 21; 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. — packages/node/src/cli.ts:316
formFieldToCliJson 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. — packages/node/src/cli-json.ts:156
(anonymous) 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. — packages/node/src/cli.ts:252
Do you agree with this assessment?
R3 · Large Files0.0 / 10Critical✓ 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.
packages/node/src/lib.ts has 1065 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/node/src/lib.ts:1
packages/node/src/cli.ts has 579 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/node/src/cli.ts:1
packages/node/src/native.ts has 411 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — packages/node/src/native.ts:1
What to do
Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package.
Do you agree with this assessment?
R4 · Test Coverage7.8 / 10Strong✓ 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. (×2) — packages/wasm/scripts/patch-wasi-imports.js:1, packages/node/scripts/clean-dist.mjs:1
What to do
Add tests that import the unreached modules (directly or through their public entry).
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.
Do you agree with this assessment?
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.
Do you agree with this assessment?
R7 · Dead Code10.0 / 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.
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.
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.
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.
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.
Do you agree with this assessment?
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.
Do you agree with this assessment?
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.
Do you agree with this assessment?
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.
Do you agree with this assessment?
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.
Other · Code Health — Whether log calls use message templates (queryable) rather than interpolated strings.
Method: Roslyn syntax scan: every log call-site counted; interpolated-string first-argument violations flagged. Population is all log calls, not estimated. 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 `trace`/`debug`/`info`/`warn`/`error`/`fatal`/`verbose`/`silly`/`http`/`log` call on a receiver named for a logger, in a package whose own or an enclosing `package.json` declares a logger that carries values as fields (pino, pino-http, nestjs-pino, Fastify, winston, bunyan, tslog, LogTape, roarr), whose first deciding argument is a template literal with substitutions; an object-literal fields argument is stepped over, a plain string message clears the call. Python is read the same way: a `debug`/`info`/`warning`/`error`/`exception`/`critical`/`log` call on a logger in a file that imports the standard library’s `logging` or structlog (loguru, which formats at the call, is not judged), whose message is a whole f-string with a non-constant field; a `%`-formatted, `.format()`-ed or concatenated message is not convicted, as in C#. PHP is read the same way: a PSR-3 level call (`emergency`…`debug`, `log`) on a logger (`$logger`, `$this->logger`, Laravel’s `Log::`, `logger()`, `\Drupal::logger()`) in a package whose `composer.json` requires a PSR-3 logger or a framework that hands one out (psr/log, Monolog, Laravel, Symfony, Drupal, CakePHP), or a file that imports one, whose message is a double-quoted string interpolating a variable; a single-quoted message clears the call, and `sprintf` or `.` concatenation is not convicted, as in C#. Dart is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on Sentry’s structured logger (`Sentry.logger`) whose message is a whole string literal interpolating a value (`$name`, `${…}`); the `Sentry.logger.fmt` template API clears the call. Dart that logs only through loggers with one message and no fields (package:logging, package:logger, talker, dart:developer) is not applicable rather than a reach gap. Ruby is read the same way: a `trace`/`debug`/`info`/`warn`/`error`/`fatal` call on the console gem’s `Console` (declared by a Gemfile, gemspec or Gemfile.lock, or required) or, where SemanticLogger, Ougai or dry-logger is declared or required, on a receiver named for a logger (`logger`, `@logger`, `Rails.logger`, `log`), whose first deciding argument is, as the whole argument, a double-quoted string interpolating a non-constant value (`#{…}`, `#@ivar`); a plain literal clears the call, keyword arguments are the fields, and a block, `%`-format or `+` concatenation is not convicted. Ruby that logs only through the standard Logger (Rails.logger) is not applicable rather than a reach gap. Deterministic.
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.8 `!` null assertions per 1k TypeScript source lines — 8 assertion(s) across the 2837 source line(s) of the 7 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: packages/node/src/pool-worker.ts (5), packages/node/src/pool.ts (3). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
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 `?`).
Do you agree with this assessment?
WCAG coverage — what static analysis assessed
Statically assessed 10 of 55 WCAG 2.2 Level A/AA success criteria (18%; ≈20% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 45 require runtime or manual evaluation. Partial signal only (a clean result is necessary, not sufficient; static analysis fully verifies none). This is accessibility readiness, not a conformance claim — a WCAG conformance claim requires manual evaluation (WCAG-EM 1.0).
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.
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 — 1 observation(s) recorded · Advisory — this card reports evidence and never carries a score.
Not evidenced — 1 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.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 61 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 image/media element found in the parsed markup — AC1 not applicable here.
AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
AC5 ARIA correctness — No ARIA usage found in the parsed markup — AC5 not applicable here.
AX1 Captive dependencies — Not applicable: this repository's Python imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's; Rust with no dependency-injection crate has no container to hand one lifetime's instance to another — every value is owned by the code that builds it, and the borrow checker rejects a longer-lived value keeping a borrow of a shorter-lived one; this repository's TypeScript imports no dependency-injection container and defines no container of its own — nothing that both registers and resolves bindings, and nothing that names two lifetimes — so nothing holds one lifetime's instance while handing out another's.
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
AX6 Interface segregation — AX6 reached only 4% of this repository's production lines — rust (61,258 lines), python (4,963 lines), c (11 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXR1 Runtime accessibility — docker build failed (exit 1) — 10 | # this upstream build can.) 11 | >>> FROM ghcr.io/ggml-org/llama.cpp:server-cuda 12 | 13 | # Bring uv in from its official image (no external install script needed). -------------------- ERROR: failed to solve: failed to register layer: write /usr/lib/x86_64-linux-gnu/libgfortran.so.5.0.0: no space left on device; runtime evidence skipped 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 — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no data at rest for these controls to protect.
C2 Access Controls — No access-control surface detected in the analyzed source — this repository starts no server another machine can reach (no actix-web HttpServer, axum::serve, Rocket launch, warp::serve, poem or salvo Server, tonic Server::builder, hyper or tiny_http server outside examples and tests, none bound beyond loopback). Access control is therefore N/A here — a crate is authorized by the application that serves it, not by itself. If this codebase grows request handlers, the dimension reactivates and a default-deny posture is expected then.
C3 Audit Trail — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no sensitive data whose changes an audit trail would record. If it does (through a store configured outside this repository, for instance), the trail belongs to wherever that data is stored.
C4 Data Retention — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data whose lifetime a retention limit would bound.
C5 Data-Subject Rights — No personal data detected in a persisted data model — no PII-named field (email, first_name, date_of_birth, phone, …) or stored credential in a Diesel schema, a SeaORM entity, a Diesel or sqlx row struct, or a SQL CREATE TABLE or ALTER TABLE — and no database or data-store crate (sqlx, Diesel, SeaORM, rusqlite, tokio-postgres, MongoDB, …) in the source either, so this repository keeps no personal data for a data subject to erase, export or consent over.
D11 Test Reliability — Test reliability NOT MEASURED: the JavaScript/TypeScript suite's dependency install refused the committed lockfile, so no test ever ran and flakiness could not be exercised — the dependency install for packages/node/ refused the committed lockfile (npm error code EUSAGE), so the suite never ran. It is excluded from the score rather than counted as a defect; a lockfile in sync with package.json is what lets the suite be re-run.
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 does not read html yet; not measured.
D22 Internal API Consistency — API consistency is measured on C# only; the exposed Rust 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+ sibling projects each declaring an entity of their own or taking another project's integration events. 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"]`.
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.
D32 Data Compliance (PII/GDPR) — 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.
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 — the dependency install for packages/node/ refused the committed lockfile (npm error code EUSAGE), so the suite never ran. 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.
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (37 value object(s))
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
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, and the automatic-re-run check to any GitHub-Actions workflow, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
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 — coverage not measured: this check compares the coverage of the analyzer's own test run across the domain and web layers, and that run measured none here — Test coverage (D8) says why
PF1 Benchmark discipline — Not applicable: no benchmark suite was found. This check searched for `#[bench]`, criterion's `bench_function`/`bench_with_input`, `#[divan::bench]` or `#[library_benchmark]` in any `.rs` file, or criterion, divan, iai or a `[[bench]]` target in a Cargo.toml, and for a `*benchmark*` script that this repository's CI runs. Benchmarks are credited as a bonus, so their absence is neither scored nor deducted.
PF2 Allocation hygiene — Not scored: this check counted allocation-aware idioms (Span, pools, stackalloc) per line, which describes what kind of code a repository is rather than whether it has an allocation problem, so it was withdrawn. Nothing here is a finding about your code.
R11 Import Boundaries — No recognizable feature-sliced/layered src layout — boundary rules not applicable.
S1 Web-Security Posture — No web surface: 68 Rust file(s) were read for weak hashes and ciphers, key material fixed in the source, disabled TLS certificate validation and obsolete TLS versions, and none was found. This repository serves no HTTP of its own — no HTTP-server crate (actix-web, axum, Rocket, warp, poem, tide, salvo, tonic, a hyper server, …) among its Cargo manifests' run-time dependencies, and no server started in its production source — so HTTPS enforcement, HSTS, cookie flags and input validation are N/A here, as they are for a C# library or worker. If this codebase starts serving HTTP, the dimension reactivates automatically.
X12 Unreachable branch — X12 reached only 11% of this repository's production lines — rust (61,258 lines), c (11 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X13 Undrained process stream — X13 reached only 11% of this repository's production lines — rust (61,258 lines), c (11 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X14 Bypassable address classification — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X15 Unvalidated length from an untrusted reader — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X16 Unfloored truncation loop — X16 reached only 4% of this repository's production lines — rust (61,258 lines), python (4,963 lines), c (11 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X17 Uncapped recursion over a caller-supplied document — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X18 Disposal-pattern correctness — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X19 Unrestored process-global state — X19 reached only 11% of this repository's production lines — rust (61,258 lines), c (11 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X2 Cancellation propagation — no C# was loaded; this repository's Python and Rust were read, and no request in it can be cancelled by a caller — a Python request takes no token: asyncio cancels the task and trio or anyio the scope that made it, from outside the call, and requests, httpx, aiohttp and gRPC take a timeout, not a cancellation; a Rust request takes no token: a future is cancelled by dropping it, from outside the call (select!, a timeout, an aborted task), and reqwest, hyper and tonic take none
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.
X22 Contradicted release guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X23 Unguarded diagnostic materialisation — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X24 Document value interpolated into markup unescaped — X24 reached only 11% of this repository's production lines — rust (61,258 lines), c (11 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
X25 Inert configuration knob — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X26 Unsynchronised callback handoff — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X3 Exception handling — X3 reached only 11% of this repository's production lines — rust (61,258 lines), c (11 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
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.
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.
AC2 · Forms & labels· <input> without a programmatic label · ×1
<input> without a programmatic label wasm-demo-site/index.html:362— This control has no associated label. Add a <label for> / wrapping <label> / aria-label / aria-labelledby so assistive tech can name it.
D11 · Test Reliability· Test suite cannot be installed from its own lockfile · ×1
Test suite cannot be installed from its own lockfile: packages/node/ — The node:test suite in packages/node/ was never exercised because its dependency install refused the committed lockfile — the dependency install for packages/node/ refused the committed lockfile (npm error code EUSAGE), so the suite never ran. The suite is declared and committed but cannot be installed from what the repository ships, so neither this scan nor a new contributor can run it. The ask is the one the owner performs: run the install locally and commit the lockfile it writes.
liteparse::projection::project_to_grid (cognitive 522) crates/liteparse/src/projection.rs:1904— liteparse::projection::project_to_grid has cognitive complexity 522 (threshold 15). Drivers by points: if/else 97 (359 pts), loops 41 (105 pts), boolean chains 33, match/switch 9 (25 pts) (nesting depth added 342). 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. This file is where this pass's cognitive complexity CONCENTRATES: crates/liteparse/src/projection.rs holds 18 of the 135 functions over the threshold — including the worst — and 1271 of the 3550 points over it (36%), 2.8× the next-largest file (crates/liteparse/src/markdown_layout/tables.rs at 461). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
liteparse::projection::form_lines (cognitive 172) crates/liteparse/src/projection.rs:491— liteparse::projection::form_lines has cognitive complexity 172 (threshold 15). Drivers by points: if/else 53 (115 pts), boolean chains 37, loops 13 (20 pts) (nesting depth added 69). Of this number, 134 points are the body's own statements and 38 belong to 4 function items inside it that branch. 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. This file is where this pass's cognitive complexity CONCENTRATES: crates/liteparse/src/projection.rs holds 18 of the 135 functions over the threshold — including the worst — and 1271 of the 3550 points over it (36%), 2.8× the next-largest file (crates/liteparse/src/markdown_layout/tables.rs at 461). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
liteparse::extract::extract_page_text_items (cognitive 169) crates/liteparse/src/extract.rs:1593— liteparse::extract::extract_page_text_items has cognitive complexity 169 (threshold 15). Drivers by points: if/else 49 (123 pts), boolean chains 34, match/switch 4 (11 pts), loops 1 (nesting depth added 81). 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.
liteparse::projection::xy_find_column_cut (cognitive 168) crates/liteparse/src/projection.rs:3926— liteparse::projection::xy_find_column_cut has cognitive complexity 168 (threshold 15). Drivers by points: if/else 57 (114 pts), loops 17 (29 pts), boolean chains 24, match/switch 1 (nesting depth added 69). 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. This file is where this pass's cognitive complexity CONCENTRATES: crates/liteparse/src/projection.rs holds 18 of the 135 functions over the threshold — including the worst — and 1271 of the 3550 points over it (36%), 2.8× the next-largest file (crates/liteparse/src/markdown_layout/tables.rs at 461). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
liteparse::projection::xy_cut_rec (cognitive 148) crates/liteparse/src/projection.rs:4646— liteparse::projection::xy_cut_rec has cognitive complexity 148 (threshold 15). Drivers by points: if/else 39 (88 pts), loops 8 (29 pts), boolean chains 26, match/switch 2 (5 pts) (nesting depth added 73). 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. This file is where this pass's cognitive complexity CONCENTRATES: crates/liteparse/src/projection.rs holds 18 of the 135 functions over the threshold — including the worst — and 1271 of the 3550 points over it (36%), 2.8× the next-largest file (crates/liteparse/src/markdown_layout/tables.rs at 461). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
liteparse::projection::handle_rotation_reading_order (cognitive 115) crates/liteparse/src/projection.rs:141— liteparse::projection::handle_rotation_reading_order has cognitive complexity 115 (threshold 15). Drivers by points: if/else 25 (66 pts), loops 15 (39 pts), boolean chains 10 (nesting depth added 65). 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. This file is where this pass's cognitive complexity CONCENTRATES: crates/liteparse/src/projection.rs holds 18 of the 135 functions over the threshold — including the worst — and 1271 of the 3550 points over it (36%), 2.8× the next-largest file (crates/liteparse/src/markdown_layout/tables.rs at 461). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
liteparse::markdown_layout::tables::assign_cells (cognitive 114) crates/liteparse/src/markdown_layout/tables.rs:4279— liteparse::markdown_layout::tables::assign_cells has cognitive complexity 114 (threshold 15). Drivers by points: if/else 34 (85 pts), loops 7 (18 pts), boolean chains 7, match/switch 2 (4 pts) (nesting depth added 64). 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.
liteparse::markdown_layout::cross_region::find_cross_region_table_merge (cognitive 106) crates/liteparse/src/markdown_layout/cross_region.rs:473— liteparse::markdown_layout::cross_region::find_cross_region_table_merge has cognitive complexity 106 (threshold 15). Drivers by points: if/else 27 (76 pts), loops 8 (23 pts), boolean chains 7 (nesting depth added 64). 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.
liteparse::markdown_layout::classify::classify_region (cognitive 100) crates/liteparse/src/markdown_layout/classify.rs:614— liteparse::markdown_layout::classify::classify_region has cognitive complexity 100 (threshold 15). Drivers by points: if/else 32 (72 pts), boolean chains 21, loops 3 (5 pts), match/switch 1 (2 pts) (nesting depth added 43). 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.
liteparse::ocr_merge::merge_ocr_results (cognitive 89) crates/liteparse/src/ocr_merge.rs:1452— liteparse::ocr_merge::merge_ocr_results has cognitive complexity 89 (threshold 15). Drivers by points: if/else 30 (67 pts), match/switch 5 (10 pts), boolean chains 6, loops 3 (6 pts) (nesting depth added 45). 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.
liteparse::tex_math::spans_in_line (cognitive 89) crates/liteparse/src/tex_math/mod.rs:837— liteparse::tex_math::spans_in_line has cognitive complexity 89 (threshold 15). Drivers by points: boolean chains 36, if/else 15 (31 pts), loops 12 (22 pts) (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.
liteparse::markdown_layout::tables::union_header_from_above (cognitive 78) crates/liteparse/src/markdown_layout/tables.rs:2777— liteparse::markdown_layout::tables::union_header_from_above has cognitive complexity 78 (threshold 15). Drivers by points: if/else 30 (58 pts), boolean chains 13, loops 4 (7 pts) (nesting depth added 31). 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.
liteparse::markdown_layout::tables::try_detect_table (cognitive 72) crates/liteparse/src/markdown_layout/tables.rs:1393— liteparse::markdown_layout::tables::try_detect_table has cognitive complexity 72 (threshold 15). Drivers by points: if/else 22 (53 pts), loops 3 (10 pts), boolean chains 9 (nesting depth added 38). 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.
liteparse::markdown_layout::classify::classify_page_with_filters (cognitive 69) crates/liteparse/src/markdown_layout/classify.rs:180— liteparse::markdown_layout::classify::classify_page_with_filters has cognitive complexity 69 (threshold 15). Drivers by points: if/else 22 (40 pts), loops 13 (19 pts), boolean chains 10 (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.
liteparse::markdown_layout::blocks::split_repeated_header_tables (cognitive 66) crates/liteparse/src/markdown_layout/blocks.rs:358— liteparse::markdown_layout::blocks::split_repeated_header_tables has cognitive complexity 66 (threshold 15). Drivers by points: if/else 13 (36 pts), loops 8 (27 pts), match/switch 1 (2 pts), boolean chains 1 (nesting depth added 43). 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.
liteparse::main (cognitive 63) crates/liteparse/src/main.rs:419— liteparse::main has cognitive complexity 63 (threshold 15). Drivers by points: if/else 21 (44 pts), match/switch 7 (15 pts), loops 2 (4 pts) (nesting depth added 33). 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.
liteparse::markdown_layout::tables::try_detect_table_inferred (cognitive 62) crates/liteparse/src/markdown_layout/tables.rs:1127— liteparse::markdown_layout::tables::try_detect_table_inferred has cognitive complexity 62 (threshold 15). Drivers by points: if/else 36 (54 pts), boolean chains 6, loops 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.
liteparse::tex_math::build (cognitive 59) crates/liteparse/src/tex_math/mod.rs:985— liteparse::tex_math::build has cognitive complexity 59 (threshold 15). Drivers by points: if/else 16 (44 pts), loops 5 (11 pts), boolean chains 4 (nesting depth added 34). 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.
liteparse::ocr_merge::render_pages_for_ocr_capped (cognitive 57) crates/liteparse/src/ocr_merge.rs:1145— liteparse::ocr_merge::render_pages_for_ocr_capped has cognitive complexity 57 (threshold 15). Drivers by points: if/else 20 (43 pts), match/switch 3 (7 pts), boolean chains 6, loops 1 (nesting depth added 27). 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.
liteparse::extract::dedup_overlapping_items (cognitive 56) crates/liteparse/src/extract.rs:2411— liteparse::extract::dedup_overlapping_items has cognitive complexity 56 (threshold 15). Drivers by points: if/else 11 (30 pts), loops 9 (25 pts), boolean chains 1 (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.
liteparse::markdown_layout::tables::absorb_header_lines (cognitive 52) crates/liteparse/src/markdown_layout/tables.rs:1693— liteparse::markdown_layout::tables::absorb_header_lines has cognitive complexity 52 (threshold 15). Drivers by points: if/else 16 (37 pts), loops 4 (7 pts), boolean chains 4, match/switch 1 (4 pts) (nesting depth added 27). 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.
liteparse::projection::detect_and_render_flowing_lines (cognitive 52) crates/liteparse/src/projection.rs:1760— liteparse::projection::detect_and_render_flowing_lines has cognitive complexity 52 (threshold 15). Drivers by points: if/else 11 (24 pts), match/switch 3 (12 pts), loops 8 (11 pts), boolean chains 5 (nesting depth added 25). 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. This file is where this pass's cognitive complexity CONCENTRATES: crates/liteparse/src/projection.rs holds 18 of the 135 functions over the threshold — including the worst — and 1271 of the 3550 points over it (36%), 2.8× the next-largest file (crates/liteparse/src/markdown_layout/tables.rs at 461). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
liteparse::tex_math::lines (cognitive 51) crates/liteparse/src/tex_math/mod.rs:527— liteparse::tex_math::lines has cognitive complexity 51 (threshold 15). Drivers by points: if/else 11 (29 pts), loops 9 (14 pts), boolean chains 4, match/switch 2 (4 pts) (nesting depth added 25). 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.
liteparse::font_cmap::reverse_cmap (cognitive 48) crates/liteparse/src/font_cmap.rs:14— liteparse::font_cmap::reverse_cmap has cognitive complexity 48 (threshold 15). Drivers by points: if/else 11 (24 pts), loops 7 (15 pts), match/switch 4 (5 pts), boolean chains 4 (nesting depth added 22). 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.
liteparse::render::find_solid_rects_rgba (cognitive 48) crates/liteparse/src/render.rs:141— liteparse::render::find_solid_rects_rgba has cognitive complexity 48 (threshold 15). Drivers by points: if/else 10 (23 pts), loops 6 (17 pts), boolean chains 8 (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.
liteparse::projection::project_to_grid (cyclomatic 180) crates/liteparse/src/projection.rs:1904— liteparse::projection::project_to_grid has cyclomatic complexity 180 (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 file is where this pass's cyclomatic complexity CONCENTRATES: crates/liteparse/src/projection.rs holds 12 of the 80 functions over the threshold — including the worst — and 468 of the 1279 points over it (37%), 2.9× the next-largest file (crates/liteparse/src/markdown_layout/tables.rs at 162). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
liteparse::projection::form_lines (cyclomatic 95) crates/liteparse/src/projection.rs:491— liteparse::projection::form_lines has cyclomatic complexity 95 (threshold 15). Of this number, 65 points are the body's own statements and 30 belong to 4 function items inside it that branch. 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 file is where this pass's cyclomatic complexity CONCENTRATES: crates/liteparse/src/projection.rs holds 12 of the 80 functions over the threshold — including the worst — and 468 of the 1279 points over it (37%), 2.9× the next-largest file (crates/liteparse/src/markdown_layout/tables.rs at 162). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
liteparse::projection::xy_find_column_cut (cyclomatic 90) crates/liteparse/src/projection.rs:3926— liteparse::projection::xy_find_column_cut has cyclomatic complexity 90 (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 file is where this pass's cyclomatic complexity CONCENTRATES: crates/liteparse/src/projection.rs holds 12 of the 80 functions over the threshold — including the worst — and 468 of the 1279 points over it (37%), 2.9× the next-largest file (crates/liteparse/src/markdown_layout/tables.rs at 162). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
liteparse::extract::extract_page_text_items (cyclomatic 86) crates/liteparse/src/extract.rs:1593— liteparse::extract::extract_page_text_items has cyclomatic complexity 86 (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.
liteparse::projection::xy_cut_rec (cyclomatic 66) crates/liteparse/src/projection.rs:4646— liteparse::projection::xy_cut_rec has cyclomatic complexity 66 (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 file is where this pass's cyclomatic complexity CONCENTRATES: crates/liteparse/src/projection.rs holds 12 of the 80 functions over the threshold — including the worst — and 468 of the 1279 points over it (37%), 2.9× the next-largest file (crates/liteparse/src/markdown_layout/tables.rs at 162). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
liteparse::tex_math::spans_in_line (cyclomatic 63) crates/liteparse/src/tex_math/mod.rs:837— liteparse::tex_math::spans_in_line has cyclomatic complexity 63 (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 is NOT this file's highest cyclomatic complexity: liteparse::tex_math::symbol (cyclomatic 103) 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.
liteparse::markdown_layout::classify::classify_region (cyclomatic 53) crates/liteparse/src/markdown_layout/classify.rs:614— liteparse::markdown_layout::classify::classify_region has cyclomatic complexity 53 (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.
liteparse::markdown_layout::tables::assign_cells (cyclomatic 49) crates/liteparse/src/markdown_layout/tables.rs:4279— liteparse::markdown_layout::tables::assign_cells has cyclomatic complexity 49 (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.
liteparse::projection::handle_rotation_reading_order (cyclomatic 46) crates/liteparse/src/projection.rs:141— liteparse::projection::handle_rotation_reading_order has cyclomatic complexity 46 (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 file is where this pass's cyclomatic complexity CONCENTRATES: crates/liteparse/src/projection.rs holds 12 of the 80 functions over the threshold — including the worst — and 468 of the 1279 points over it (37%), 2.9× the next-largest file (crates/liteparse/src/markdown_layout/tables.rs at 162). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
liteparse::markdown_layout::classify::classify_page_with_filters (cyclomatic 43) crates/liteparse/src/markdown_layout/classify.rs:180— liteparse::markdown_layout::classify::classify_page_with_filters has cyclomatic complexity 43 (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.
liteparse::markdown_layout::tables::union_header_from_above (cyclomatic 43) crates/liteparse/src/markdown_layout/tables.rs:2777— liteparse::markdown_layout::tables::union_header_from_above has cyclomatic complexity 43 (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.
liteparse::markdown_layout::tables::try_detect_table_inferred (cyclomatic 42) crates/liteparse/src/markdown_layout/tables.rs:1127— liteparse::markdown_layout::tables::try_detect_table_inferred 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.
liteparse::markdown_layout::cross_region::find_cross_region_table_merge (cyclomatic 40) crates/liteparse/src/markdown_layout/cross_region.rs:473— liteparse::markdown_layout::cross_region::find_cross_region_table_merge has cyclomatic complexity 40 (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.
liteparse::ocr_merge::merge_ocr_results (cyclomatic 40) crates/liteparse/src/ocr_merge.rs:1452— liteparse::ocr_merge::merge_ocr_results has cyclomatic complexity 40 (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.
liteparse::projection::build_one_line (cyclomatic 37) crates/liteparse/src/projection.rs:5260— liteparse::projection::build_one_line has cyclomatic complexity 37 (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 file is where this pass's cyclomatic complexity CONCENTRATES: crates/liteparse/src/projection.rs holds 12 of the 80 functions over the threshold — including the worst — and 468 of the 1279 points over it (37%), 2.9× the next-largest file (crates/liteparse/src/markdown_layout/tables.rs at 162). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
liteparse::main (cyclomatic 33) crates/liteparse/src/main.rs:419— liteparse::main 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.
liteparse::markdown_layout::tables::try_detect_table (cyclomatic 33) crates/liteparse/src/markdown_layout/tables.rs:1393— liteparse::markdown_layout::tables::try_detect_table 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.
liteparse::projection::detect_and_render_flowing_lines (cyclomatic 31) crates/liteparse/src/projection.rs:1760— liteparse::projection::detect_and_render_flowing_lines 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. This file is where this pass's cyclomatic complexity CONCENTRATES: crates/liteparse/src/projection.rs holds 12 of the 80 functions over the threshold — including the worst — and 468 of the 1279 points over it (37%), 2.9× the next-largest file (crates/liteparse/src/markdown_layout/tables.rs at 162). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
liteparse::markdown_layout::tables::try_merge_pair (cyclomatic 30) crates/liteparse/src/markdown_layout/tables.rs:3359— liteparse::markdown_layout::tables::try_merge_pair has cyclomatic complexity 30 (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.
liteparse::font_cmap::reverse_cmap (cyclomatic 29) crates/liteparse/src/font_cmap.rs:14— liteparse::font_cmap::reverse_cmap has cyclomatic complexity 29 (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.
liteparse::markdown_layout::tables::build_ruled_table_from (cyclomatic 27) crates/liteparse/src/markdown_layout/tables.rs:5089— liteparse::markdown_layout::tables::build_ruled_table_from has cyclomatic complexity 27 (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.
liteparse::ocr_merge::render_pages_for_ocr_capped (cyclomatic 27) crates/liteparse/src/ocr_merge.rs:1145— liteparse::ocr_merge::render_pages_for_ocr_capped has cyclomatic complexity 27 (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.
liteparse::tex_math::lines (cyclomatic 27) crates/liteparse/src/tex_math/mod.rs:527— liteparse::tex_math::lines has cyclomatic complexity 27 (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: liteparse::tex_math::symbol (cyclomatic 103) 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.
liteparse::markdown_layout::tables::try_detect_description_list (cyclomatic 26) crates/liteparse/src/markdown_layout/tables.rs:2290— liteparse::markdown_layout::tables::try_detect_description_list has cyclomatic complexity 26 (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.
liteparse::projection::mark_script_items (cyclomatic 26) crates/liteparse/src/projection.rs:3209— liteparse::projection::mark_script_items has cyclomatic complexity 26 (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 file is where this pass's cyclomatic complexity CONCENTRATES: crates/liteparse/src/projection.rs holds 12 of the 80 functions over the threshold — including the worst — and 468 of the 1279 points over it (37%), 2.9× the next-largest file (crates/liteparse/src/markdown_layout/tables.rs at 162). No single row can show this, because each is measured only against the threshold: reducing this one file moves this dimension further than any other file in the repository.
FunctionTooLong: liteparse::projection::project_to_grid crates/liteparse/src/projection.rs:1904— FunctionTooLong — liteparse::projection::project_to_grid runs 724 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 624 over it, 7.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.
FunctionTooLong: liteparse::projection::form_lines crates/liteparse/src/projection.rs:491— FunctionTooLong — liteparse::projection::form_lines runs 399 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 299 over it, 3.99× 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: liteparse::extract::extract_page_text_items crates/liteparse/src/extract.rs:1593— FunctionTooLong — liteparse::extract::extract_page_text_items runs 323 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 223 over it, 3.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.
FunctionTooLong: liteparse::projection::xy_find_column_cut crates/liteparse/src/projection.rs:3926— FunctionTooLong — liteparse::projection::xy_find_column_cut runs 290 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 190 over it, 2.90× 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: liteparse::main crates/liteparse/src/main.rs:419— FunctionTooLong — liteparse::main runs 214 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 114 over it, 2.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: liteparse::ocr_merge::merge_ocr_results crates/liteparse/src/ocr_merge.rs:1452— FunctionTooLong — liteparse::ocr_merge::merge_ocr_results runs 204 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 104 over it, 2.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.
FunctionTooLong: liteparse_python::cli::run_cli crates/liteparse-python/src/cli.rs:275— FunctionTooLong — liteparse_python::cli::run_cli runs 200 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 100 over it, 2.00× 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: liteparse::projection::xy_cut_rec crates/liteparse/src/projection.rs:4646— FunctionTooLong — liteparse::projection::xy_cut_rec 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.
FunctionTooLong: liteparse_wasm::to_js_result crates/liteparse-wasm/src/lib.rs:1182— FunctionTooLong — liteparse_wasm::to_js_result 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: liteparse::markdown_layout::tables::build_ruled_table_from crates/liteparse/src/markdown_layout/tables.rs:5089— FunctionTooLong — liteparse::markdown_layout::tables::build_ruled_table_from runs 174 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 74 over it, 1.74× 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: liteparse::projection::handle_rotation_reading_order crates/liteparse/src/projection.rs:141— FunctionTooLong — liteparse::projection::handle_rotation_reading_order runs 171 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 71 over it, 1.71× 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: liteparse::markdown_layout::tables::try_detect_table crates/liteparse/src/markdown_layout/tables.rs:1393— FunctionTooLong — liteparse::markdown_layout::tables::try_detect_table runs 170 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 70 over it, 1.70× 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: liteparse::markdown_layout::cross_region::find_cross_region_table_merge crates/liteparse/src/markdown_layout/cross_region.rs:473— FunctionTooLong — liteparse::markdown_layout::cross_region::find_cross_region_table_merge runs 168 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 68 over it, 1.68× 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: liteparse::conversion::convert_image_to_pdf crates/liteparse/src/conversion.rs:849— FunctionTooLong — liteparse::conversion::convert_image_to_pdf runs 166 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 66 over it, 1.66× 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: liteparse::projection::build_one_line crates/liteparse/src/projection.rs:5260— FunctionTooLong — liteparse::projection::build_one_line runs 164 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 64 over it, 1.64× 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: liteparse::ocr_merge::render_pages_for_ocr_capped crates/liteparse/src/ocr_merge.rs:1145— FunctionTooLong — liteparse::ocr_merge::render_pages_for_ocr_capped runs 160 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 60 over it, 1.60× 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: liteparse::markdown_layout::tables::union_header_from_above crates/liteparse/src/markdown_layout/tables.rs:2777— FunctionTooLong — liteparse::markdown_layout::tables::union_header_from_above runs 158 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 58 over it, 1.58× 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: liteparse::markdown_layout::tables::assign_cells crates/liteparse/src/markdown_layout/tables.rs:4279— FunctionTooLong — liteparse::markdown_layout::tables::assign_cells runs 158 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 58 over it, 1.58× 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: liteparse::extract::extract_single_page crates/liteparse/src/extract.rs:233— FunctionTooLong — liteparse::extract::extract_single_page runs 157 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 57 over it, 1.57× 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: liteparse::markdown_layout::tables::try_detect_table_inferred crates/liteparse/src/markdown_layout/tables.rs:1127— FunctionTooLong — liteparse::markdown_layout::tables::try_detect_table_inferred runs 139 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 39 over it, 1.39× 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: liteparse::extract::page_math_spans crates/liteparse/src/extract.rs:2118— FunctionTooLong — liteparse::extract::page_math_spans 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: liteparse::raw_text::build_item crates/liteparse/src/raw_text.rs:374— FunctionTooLong — liteparse::raw_text::build_item 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: liteparse::markdown_layout::tables::try_merge_pair crates/liteparse/src/markdown_layout/tables.rs:3359— FunctionTooLong — liteparse::markdown_layout::tables::try_merge_pair runs 111 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 11 over it, 1.11× 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: liteparse::ocr_merge::garbled_scope crates/liteparse/src/ocr_merge.rs:2093— FunctionTooLong — liteparse::ocr_merge::garbled_scope runs 111 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 11 over it, 1.11× 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: liteparse::tex_math::symbol crates/liteparse/src/tex_math/mod.rs:269— FunctionTooLong — liteparse::tex_math::symbol 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.
FileTooLong: markdown_layout/tables.rs crates/liteparse/src/markdown_layout/tables.rs— FileTooLong — 3467 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 104 free functions. The bar is 500 significant lines; this is 2967 over it, 6.93× 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/projection.rs crates/liteparse/src/projection.rs— FileTooLong — 3399 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 69 free functions. The bar is 500 significant lines; this is 2899 over it, 6.80× 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/extract.rs crates/liteparse/src/extract.rs— FileTooLong — 2644 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), declaring 58 free functions. The bar is 500 significant lines; this is 2144 over it, 5.29× 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/ocr_merge.rs crates/liteparse/src/ocr_merge.rs— FileTooLong — 1558 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 1058 over it, 3.12× 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/lib.rs crates/liteparse-python/src/lib.rs— FileTooLong — 1540 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 1040 over it, 3.08× 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/page.rs crates/pdfium/src/page.rs— FileTooLong — 1391 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 891 over it, 2.78× 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/lib.rs crates/liteparse-wasm/src/lib.rs— FileTooLong — 1206 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 706 over it, 2.41× 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/types.rs crates/liteparse-napi/src/types.rs— FileTooLong — 1002 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 502 over it, 2.00× 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: tex_math/mod.rs crates/liteparse/src/tex_math/mod.rs— FileTooLong — 862 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 362 over it, 1.72× 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/dynamic.rs crates/pdfium-sys/src/dynamic.rs— FileTooLong — 862 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 85% of them inside a single declaration: PdfiumBindings (2 blocks, 38-833). The bar is 500 significant lines; this is 362 over it, 1.72× 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: markdown_layout/classify.rs crates/liteparse/src/markdown_layout/classify.rs— FileTooLong — 792 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 292 over it, 1.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: src/parser.rs crates/liteparse/src/parser.rs— FileTooLong — 733 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), about 81% of them inside a single declaration: LiteParse (2 blocks, 182-1196). The bar is 500 significant lines; this is 233 over it, 1.47× 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: liteparse/parser.py packages/python/liteparse/parser.py— FileTooLong — 700 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 200 over it, 1.40× 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/conversion.rs crates/liteparse/src/conversion.rs— FileTooLong — 699 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 199 over it, 1.40× 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/lib.ts packages/node/src/lib.ts— FileTooLong — 645 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 145 over it, 1.29× 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/raw_text.rs crates/liteparse/src/raw_text.rs— FileTooLong — 552 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 52 over it, 1.10× 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: markdown_layout/blocks.rs crates/liteparse/src/markdown_layout/blocks.rs— FileTooLong — 518 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 18 over it, 1.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.
Hotspot: crates/liteparse/src/projection.rs crates/liteparse/src/projection.rs:1904— crates/liteparse/src/projection.rs changed 46 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 180 in liteparse::projection::project_to_grid at line 1904. 21 of those changes were fix/bug commits, and the other 25 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:14:28 -06:00' --until='2026-11-13 09:14:28 -06:00' --full-history --no-merges -- crates/liteparse/src/projection.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/liteparse/src/extract.rs crates/liteparse/src/extract.rs:1593— crates/liteparse/src/extract.rs changed 27 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 86 in liteparse::extract::extract_page_text_items at line 1593. 14 of those changes were fix/bug commits, so the churn is repair rather than feature work. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:14:28 -06:00' --until='2026-11-13 09:14:28 -06:00' --full-history --no-merges -- crates/liteparse/src/extract.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/liteparse/src/ocr_merge.rs crates/liteparse/src/ocr_merge.rs:1452— crates/liteparse/src/ocr_merge.rs changed 45 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in liteparse::ocr_merge::merge_ocr_results at line 1452. 8 of those changes were fix/bug commits, and the other 37 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:14:28 -06:00' --until='2026-11-13 09:14:28 -06:00' --full-history --no-merges -- crates/liteparse/src/ocr_merge.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/liteparse-napi/src/types.rs crates/liteparse-napi/src/types.rs:168— crates/liteparse-napi/src/types.rs changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in JsLiteParseConfig::into_rust at line 168. 4 of those changes were fix/bug commits, and the other 18 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:14:28 -06:00' --until='2026-11-13 09:14:28 -06:00' --full-history --no-merges -- crates/liteparse-napi/src/types.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/liteparse/src/parser.rs crates/liteparse/src/parser.rs:625— crates/liteparse/src/parser.rs changed 44 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in LiteParse::parse_resolved at line 625. 5 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:14:28 -06:00' --until='2026-11-13 09:14:28 -06:00' --full-history --no-merges -- crates/liteparse/src/parser.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: packages/python/liteparse/parser.py packages/python/liteparse/parser.py:465— packages/python/liteparse/parser.py changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in LiteParse.__init__ at line 465. 1 of those changes was a fix/bug commit, and the other 21 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:14:28 -06:00' --until='2026-11-13 09:14:28 -06:00' --full-history --no-merges -- packages/python/liteparse/parser.py`: 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/liteparse/src/markdown_layout/classify.rs crates/liteparse/src/markdown_layout/classify.rs:614— crates/liteparse/src/markdown_layout/classify.rs changed 17 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 53 in liteparse::markdown_layout::classify::classify_region at line 614. 9 of those changes were fix/bug commits, so the churn is repair rather than feature work. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:14:28 -06:00' --until='2026-11-13 09:14:28 -06:00' --full-history --no-merges -- crates/liteparse/src/markdown_layout/classify.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/liteparse/src/markdown_layout/tables.rs crates/liteparse/src/markdown_layout/tables.rs:4279— crates/liteparse/src/markdown_layout/tables.rs changed 18 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in liteparse::markdown_layout::tables::assign_cells at line 4279. 11 of those changes were fix/bug commits, so the churn is repair rather than feature work. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:14:28 -06:00' --until='2026-11-13 09:14:28 -06:00' --full-history --no-merges -- crates/liteparse/src/markdown_layout/tables.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/liteparse-python/src/lib.rs crates/liteparse-python/src/lib.rs:1532— crates/liteparse-python/src/lib.rs changed 16 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in LiteParse::new at line 1532. 3 of those changes were fix/bug commits, and the other 13 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:14:28 -06:00' --until='2026-11-13 09:14:28 -06:00' --full-history --no-merges -- crates/liteparse-python/src/lib.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/liteparse-wasm/src/lib.rs crates/liteparse-wasm/src/lib.rs:151— crates/liteparse-wasm/src/lib.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in LiteParseConfig::into_core at line 151. 3 of those changes were fix/bug commits, and the other 10 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:14:28 -06:00' --until='2026-11-13 09:14:28 -06:00' --full-history --no-merges -- crates/liteparse-wasm/src/lib.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: packages/node/src/cli.ts packages/node/src/cli.ts:151— packages/node/src/cli.ts changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 37 in cli.program.command("parse").description("Parse a document and extract text").argument("<file>","Path to the document file") at line 151. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:14:28 -06:00' --until='2026-11-13 09:14:28 -06:00' --full-history --no-merges -- packages/node/src/cli.ts`: 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/liteparse/src/raw_text.rs crates/liteparse/src/raw_text.rs:374— crates/liteparse/src/raw_text.rs changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in liteparse::raw_text::build_item at line 374. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:14:28 -06:00' --until='2026-11-13 09:14:28 -06:00' --full-history --no-merges -- crates/liteparse/src/raw_text.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/liteparse/src/markdown_layout/cross_region.rs crates/liteparse/src/markdown_layout/cross_region.rs:473— crates/liteparse/src/markdown_layout/cross_region.rs changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 40 in liteparse::markdown_layout::cross_region::find_cross_region_table_merge at line 473. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:14:28 -06:00' --until='2026-11-13 09:14:28 -06:00' --full-history --no-merges -- crates/liteparse/src/markdown_layout/cross_region.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/liteparse/src/main.rs crates/liteparse/src/main.rs:419— crates/liteparse/src/main.rs changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in liteparse::main at line 419. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:14:28 -06:00' --until='2026-11-13 09:14:28 -06:00' --full-history --no-merges -- crates/liteparse/src/main.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/liteparse-python/src/cli.rs crates/liteparse-python/src/cli.rs:275— crates/liteparse-python/src/cli.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in liteparse_python::cli::run_cli at line 275. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:14:28 -06:00' --until='2026-11-13 09:14:28 -06:00' --full-history --no-merges -- crates/liteparse-python/src/cli.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/liteparse/src/markdown_layout/inline.rs crates/liteparse/src/markdown_layout/inline.rs:235— crates/liteparse/src/markdown_layout/inline.rs changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in liteparse::markdown_layout::inline::render_line_inline at line 235. 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-08-15..2026-11-13, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-15 09:14:28 -06:00' --until='2026-11-13 09:14:28 -06:00' --full-history --no-merges -- crates/liteparse/src/markdown_layout/inline.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.
D30 · Dependency Vulnerabilities· Medium advisory (unsound) · ×11
TooManyFields: PdfiumBindings crates/pdfium-sys/src/dynamic.rs:38— TooManyFields — 192 stored fields beside 1 method. The bar is 30 stored fields; this is 162 over it, 6.40× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: SegmentBuilder crates/liteparse/src/extract.rs:3483— TooManyFields — 47 stored fields beside 16 methods. The bar is 30 stored fields; this is 17 over it, 1.57× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: JsLiteParseConfig crates/liteparse-napi/src/types.rs:23— TooManyFields — 42 stored fields beside 2 methods. The bar is 30 stored fields; this is 12 over it, 1.40× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: PyLiteParseConfig crates/liteparse-python/src/lib.rs:1233— TooManyFields — 42 stored fields beside 2 methods. The bar is 30 stored fields; this is 12 over it, 1.40× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: LiteParseConfig crates/liteparse-wasm/src/lib.rs:45— TooManyFields — 38 stored fields beside 2 methods. The bar is 30 stored fields; this is 8 over it, 1.27× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: TextItem crates/liteparse/src/types.rs:62— TooManyFields — 31 stored fields beside 1 method. The bar is 30 stored fields; this is 1 over it, 1.03× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: ParseCommand crates/liteparse-python/src/cli.rs:32— TooManyFields — 31 stored fields. The bar is 30 stored fields; this is 1 over it, 1.03× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
TooManyFields: ParseCommand crates/liteparse/src/main.rs:41— TooManyFields — 31 stored fields. The bar is 30 stored fields; this is 1 over it, 1.03× the bar. This is width in DATA, not behaviour: every reader that takes the whole type couples to all of its fields, so a change to any one of them is a change every reader has to be checked against. To reduce it, group the fields that are read together by the same callers into a smaller type of their own, and have this one hold that type as a single member — each reader then names only the group it uses.
Duplicated block (9 lines × 2) crates/liteparse-napi/src/types.rs:322— crates/liteparse-napi/src/types.rs:322-330 | crates/liteparse-wasm/src/lib.rs:297-305 — before extracting anything, compare `crates/liteparse-napi/src/types.rs` and `crates/liteparse-wasm/src/lib.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 105 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse-napi/src/types.rs:322` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `cfg` to `&LiteParseConfig` in one and `&CoreConfig` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (9 lines × 2) crates/liteparse-python/src/cli.rs:225— crates/liteparse-python/src/cli.rs:225-233 | crates/liteparse/src/main.rs:377-385 — before extracting anything, compare `crates/liteparse-python/src/cli.rs` and `crates/liteparse/src/main.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 304 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) crates/liteparse-python/src/cli.rs:571— crates/liteparse-python/src/cli.rs:571-579 | crates/liteparse/src/main.rs:742-750 — before extracting anything, compare `crates/liteparse-python/src/cli.rs` and `crates/liteparse/src/main.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 304 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (9 lines × 2) crates/liteparse-python/src/lib.rs:451— crates/liteparse-python/src/lib.rs:451-459 | crates/liteparse-python/src/lib.rs:1917-1925 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse-python/src/lib.rs:451` 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.
Duplicated block (9 lines × 2) crates/liteparse/src/projection.rs:1735— crates/liteparse/src/projection.rs:1735-1743 | crates/liteparse/src/projection.rs:1771-1779 — 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/liteparse-python/src/lib.rs:1732— crates/liteparse-python/src/lib.rs:1732-1740 | crates/liteparse-python/src/lib.rs:1774-1782 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse-python/src/lib.rs:1732` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, 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.
Duplicated block (9 lines × 2) crates/pdfium/src/page.rs:1818— crates/pdfium/src/page.rs:1818-1826 | crates/pdfium/src/page.rs:2055-2063 — 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/liteparse/src/projection.rs:2181— crates/liteparse/src/projection.rs:2181-2189 | crates/liteparse/src/projection.rs:2244-2252 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/projection.rs:2181` 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.
MethodTooLong: PdfiumBindings.load crates/pdfium-sys/src/dynamic.rs:604— MethodTooLong — load runs 214 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 114 over it, 2.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.
MethodTooLong: LiteParse.parse_resolved crates/liteparse/src/parser.rs:625— MethodTooLong — parse_resolved runs 207 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 107 over it, 2.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: Page.form_fields crates/pdfium/src/page.rs:1215— MethodTooLong — form_fields runs 117 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 17 over it, 1.17× 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: GlyphDecoder.decode crates/liteparse/src/extract.rs:2711— MethodTooLong — decode 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.
MethodTooLong: Page.image_objects crates/pdfium/src/page.rs:601— MethodTooLong — image_objects 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.
MethodTooLong: SegmentBuilder.start crates/liteparse/src/extract.rs:3716— MethodTooLong — start 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: JsLiteParseConfig.into_rust crates/liteparse-napi/src/types.rs:168— MethodTooLong — into_rust 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.
D30 · Dependency Vulnerabilities· Medium vulnerability · ×6
Duplicated block (6 lines × 2) crates/liteparse-napi/src/types.rs:549— crates/liteparse-napi/src/types.rs:549-554 | crates/liteparse-python/src/lib.rs:486-491 — 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/liteparse/src/markdown_layout/tables.rs:660— crates/liteparse/src/markdown_layout/tables.rs:660-670 | crates/liteparse/src/markdown_layout/tables.rs:2707-2712 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/markdown_layout/tables.rs:660` 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.
Duplicated block (6 lines × 2) crates/liteparse/src/projection.rs:2448— crates/liteparse/src/projection.rs:2448-2453 | crates/liteparse/src/projection.rs:2680-2685 — 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/liteparse/src/tex_math/structures.rs:111— crates/liteparse/src/tex_math/structures.rs:111-116 | crates/liteparse/src/tex_math/structures.rs:137-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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/tex_math/structures.rs:111` 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.
Duplicated block (6 lines × 2) crates/pdfium/src/page_object.rs:168— crates/pdfium/src/page_object.rs:168-173 | crates/pdfium/src/page_object.rs:309-314 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/pdfium/src/page_object.rs:168` 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.
Duplicated block (6 lines × 2) crates/liteparse-python/src/cli.rs:558— crates/liteparse-python/src/cli.rs:558-563 | crates/liteparse/src/main.rs:729-734 — before extracting anything, compare `crates/liteparse-python/src/cli.rs` and `crates/liteparse/src/main.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 304 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse-python/src/cli.rs:558` 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.
Duplicated block (5 lines × 2) crates/liteparse-napi/src/types.rs:547— crates/liteparse-napi/src/types.rs:547-551 | crates/liteparse-python/src/lib.rs:519-524 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse-napi/src/types.rs:547` 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.
Duplicated block (5 lines × 2) crates/liteparse/src/markdown_layout/repetition.rs:376— crates/liteparse/src/markdown_layout/repetition.rs:376-380 | crates/liteparse/src/markdown_layout/repetition.rs:387-391 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/markdown_layout/repetition.rs:376` 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.
Duplicated block (5 lines × 2) crates/liteparse/src/projection.rs:2684— crates/liteparse/src/projection.rs:2684-2688 | crates/liteparse/src/projection.rs:2698-2702 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/projection.rs:2684` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, 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.
Duplicated block (5 lines × 2) crates/pdfium/src/document.rs:437— crates/pdfium/src/document.rs:437-441 | crates/pdfium/src/page_object.rs:280-284 — 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/liteparse/src/projection.rs:984— crates/liteparse/src/projection.rs:984-988 | crates/liteparse/src/projection.rs:997-1001 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/projection.rs:984` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, 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. 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.
Duplicated block (5 lines × 2) crates/liteparse-python/src/lib.rs:1789— crates/liteparse-python/src/lib.rs:1789-1793 | crates/liteparse-python/src/lib.rs:1802-1806 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse-python/src/lib.rs:1789` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, 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.
Duplicated block (11 lines × 2) crates/liteparse-python/src/cli.rs:262— crates/liteparse-python/src/cli.rs:262-272 | crates/liteparse/src/main.rs:364-374 — before extracting anything, compare `crates/liteparse-python/src/cli.rs` and `crates/liteparse/src/main.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 304 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (11 lines × 2) crates/liteparse/src/projection.rs:2020— crates/liteparse/src/projection.rs:2020-2030 | crates/liteparse/src/projection.rs:2033-2043 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/projection.rs:2020` 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.
Duplicated block (11 lines × 2) crates/liteparse/src/projection.rs:3869— crates/liteparse/src/projection.rs:3869-3879 | crates/liteparse/src/projection.rs:4203-4213 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/projection.rs:3869` 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.
Duplicated block (11 lines × 2) crates/liteparse/src/projection.rs:318— crates/liteparse/src/projection.rs:318-328 | crates/liteparse/src/projection.rs:337-347 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/projection.rs:318` 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.
Duplicated block (11 lines × 2) crates/liteparse-python/src/cli.rs:235— crates/liteparse-python/src/cli.rs:235-245 | crates/liteparse/src/main.rs:347-357 — before extracting anything, compare `crates/liteparse-python/src/cli.rs` and `crates/liteparse/src/main.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 304 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/liteparse/src/extract.rs:3763— crates/liteparse/src/extract.rs:3763-3769 | crates/liteparse/src/extract.rs:3919-3925 — 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/pdfium/src/page.rs:1031— crates/pdfium/src/page.rs:1031-1037 | crates/pdfium/src/page.rs:1182-1188 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/pdfium/src/page.rs:1031` 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.
Duplicated block (7 lines × 2) crates/pdfium/src/page.rs:1079— crates/pdfium/src/page.rs:1079-1085 | crates/pdfium/src/page.rs:1181-1187 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/pdfium/src/page.rs:1079` 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. 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.
Duplicated block (7 lines × 2) crates/liteparse/src/figure_cluster.rs:319— crates/liteparse/src/figure_cluster.rs:319-325 | crates/liteparse/src/markdown_layout/tables.rs:3753-3759 — 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/liteparse/src/figure_cluster.rs:327— crates/liteparse/src/figure_cluster.rs:327-333 | crates/liteparse/src/markdown_layout/tables.rs:3761-3767 — 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.
Page::annotations (cognitive 29) crates/pdfium/src/page.rs:934— Page::annotations has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (23 pts), loops 2 (4 pts), match/switch 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.
Page::image_objects (cognitive 28) crates/pdfium/src/page.rs:601— Page::image_objects has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 4, loops 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.
Page::form_fields (cognitive 22) crates/pdfium/src/page.rs:1215— Page::form_fields has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), boolean chains 2, 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.
Page::links (cognitive 18) crates/pdfium/src/page.rs:853— Page::links has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (15 pts), loops 2 (3 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.
ClassTooLong: PdfiumBindings crates/pdfium-sys/src/dynamic.rs:38— ClassTooLong — 737 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 1 methods, 2 blocks, lines 38-833. The bar is 400 significant lines; this is 337 over it, 1.84× 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: Page crates/pdfium/src/page.rs:243— ClassTooLong — 724 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 36 methods, 4 blocks, lines 243-2148. The bar is 400 significant lines; this is 324 over it, 1.81× 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: LiteParse crates/liteparse/src/parser.rs:182— ClassTooLong — 593 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 26 methods, 2 blocks, lines 182-1196. The bar is 400 significant lines; this is 193 over it, 1.48× 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: SegmentBuilder crates/liteparse/src/extract.rs:3483— ClassTooLong — 427 significant lines (blank, comment-only and punctuation-only lines excluded, and inline test code — #[cfg(test)] modules and bare #[test] functions — not counted), 16 methods, 2 blocks, lines 3483-4121. The bar is 400 significant lines; this is 27 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.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×4
Edited copy of a member (25 corresponding lines) crates/liteparse/src/markdown_layout/tables.rs:3993— crates/liteparse/src/markdown_layout/tables.rs:3993-4021 | crates/liteparse/src/markdown_layout/tables.rs:4028-4052 — These two members are one piece of code written twice and then edited apart: 25 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.
Edited copy of a member (25 corresponding lines) crates/liteparse-napi/src/types.rs:477— crates/liteparse-napi/src/types.rs:477-501 | crates/liteparse-python/src/lib.rs:450-474 — These two members are one piece of code written twice and then edited apart: 25 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.
Edited copy of a member (25 corresponding lines) crates/liteparse-napi/src/types.rs:507— crates/liteparse-napi/src/types.rs:507-535 | crates/liteparse-python/src/lib.rs:476-500 — These two members are one piece of code written twice and then edited apart: 25 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.
Edited copy of a member (25 corresponding lines) ocr/indraocr/server.py:112— ocr/indraocr/server.py:112-136 | ocr/minicpmocr/server.py:233-261 — These two members are one piece of code written twice and then edited apart: 25 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· Edited copy of a member (10 corresponding lines) · ×4
Edited copy of a member (10 corresponding lines) crates/liteparse/src/ocr_merge.rs:2253— crates/liteparse/src/ocr_merge.rs:2253-2262 | crates/liteparse/src/ocr_merge.rs:2274-2286 — These two members are one piece of code written twice and then edited apart: 10 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.
Edited copy of a member (10 corresponding lines) crates/pdfium/src/page.rs:417— crates/pdfium/src/page.rs:417-427 | crates/pdfium/src/page.rs:2113-2122 — These two members are one piece of code written twice and then edited apart: 10 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.
Edited copy of a member (10 corresponding lines) crates/pdfium/src/page_object.rs:92— crates/pdfium/src/page_object.rs:92-101 | crates/pdfium/src/page_object.rs:251-260 — These two members are one piece of code written twice and then edited apart: 10 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.
Edited copy of a member (10 corresponding lines) crates/liteparse-python/src/lib.rs:13— crates/liteparse-python/src/lib.rs:13-22 | crates/liteparse-napi/src/types.rs:404-413 — These two members are one piece of code written twice and then edited apart: 10 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.
Duplicated block (14 lines × 2) crates/liteparse-python/src/cli.rs:498— crates/liteparse-python/src/cli.rs:498-511 | crates/liteparse/src/main.rs:655-668 — before extracting anything, compare `crates/liteparse-python/src/cli.rs` and `crates/liteparse/src/main.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 304 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse-python/src/cli.rs:498` 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.
Duplicated block (14 lines × 2) crates/liteparse/src/markdown_layout/headings.rs:219— crates/liteparse/src/markdown_layout/headings.rs:219-232 | crates/liteparse/src/markdown_layout/headings.rs:281-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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/markdown_layout/headings.rs:219` 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.
Duplicated block (14 lines × 2) crates/pdfium/src/font.rs:203— crates/pdfium/src/font.rs:203-216 | crates/pdfium/src/font.rs:239-252 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/pdfium/src/font.rs:203` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, 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.
Duplicated block (14 lines × 2) crates/pdfium/src/page.rs:1798— crates/pdfium/src/page.rs:1798-1811 | crates/pdfium/src/struct_tree.rs:334-347 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/pdfium/src/page.rs:1798` 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.
Duplicated block (13 lines × 2) crates/liteparse/src/markdown_layout/tables.rs:672— crates/liteparse/src/markdown_layout/tables.rs:672-684 | crates/liteparse/src/markdown_layout/tables.rs:2718-2730 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/markdown_layout/tables.rs:672` 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.
Duplicated block (13 lines × 2) crates/liteparse/src/markdown_layout/tables.rs:3998— crates/liteparse/src/markdown_layout/tables.rs:3998-4010 | crates/liteparse/src/markdown_layout/tables.rs:4034-4046 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/markdown_layout/tables.rs:3998` 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.
Duplicated block (13 lines × 2) crates/pdfium/src/bitmap.rs:155— crates/pdfium/src/bitmap.rs:155-167 | crates/pdfium/src/bitmap.rs:178-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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/pdfium/src/bitmap.rs:155` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/pdfium/src/bitmap.rs:168` calls `push` and `crates/pdfium/src/bitmap.rs:191` does not — after which the two agree again for 4 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (13 lines × 2) crates/pdfium/src/document.rs:370— crates/pdfium/src/document.rs:370-382 | crates/pdfium/src/document.rs:419-431 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/pdfium/src/document.rs:370` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (8 lines × 2) crates/liteparse/src/projection.rs:2695— crates/liteparse/src/projection.rs:2695-2702 | crates/liteparse/src/projection.rs:2707-2714 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/projection.rs:2695` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, 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.
Duplicated block (8 lines × 2) crates/liteparse/src/projection.rs:3652— crates/liteparse/src/projection.rs:3652-3659 | crates/liteparse/src/projection.rs:3679-3686 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/projection.rs:3652` 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.
Duplicated block (8 lines × 2) crates/liteparse-napi/src/types.rs:879— crates/liteparse-napi/src/types.rs:879-886 | crates/liteparse-python/src/lib.rs:144-151 — 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `rect` to `&Rect` in one and `liteparse::types::Rect` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (8 lines × 2) crates/pdfium/src/page.rs:890— crates/pdfium/src/page.rs:890-897 | crates/pdfium/src/page.rs:969-976 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/pdfium/src/page.rs:890` 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.
liteparse_pdfium::page::collect_filled_paths (cognitive 26) crates/pdfium/src/page.rs:1941— liteparse_pdfium::page::collect_filled_paths has cognitive complexity 26 (threshold 15). Drivers by points: if/else 12 (17 pts), loops 2 (4 pts), boolean chains 3, match/switch 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.
liteparse_pdfium::struct_tree::read_attributes (cognitive 21) crates/pdfium/src/struct_tree.rs:178— liteparse_pdfium::struct_tree::read_attributes has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (17 pts), loops 2 (3 pts), boolean chains 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.
liteparse_pdfium::page::collect_path_objects (cognitive 20) crates/pdfium/src/page.rs:1757— liteparse_pdfium::page::collect_path_objects has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 3 (4 pts), match/switch 1 (2 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.
D4 · Code Duplication· Edited copy of a member (19 corresponding lines) · ×3
Edited copy of a member (19 corresponding lines) crates/pdfium/src/bitmap.rs:154— crates/pdfium/src/bitmap.rs:154-173 | crates/pdfium/src/bitmap.rs:177-195 — These two members are one piece of code written twice and then edited apart: 19 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.
Edited copy of a member (19 corresponding lines) crates/pdfium/src/page_object.rs:198— crates/pdfium/src/page_object.rs:198-216 | crates/pdfium/src/text_page.rs:437-465 — These two members are one piece of code written twice and then edited apart: 19 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.
Edited copy of a member (19 corresponding lines) crates/pdfium/src/page.rs:363— crates/pdfium/src/page.rs:363-381 | crates/pdfium/src/text_page.rs:411-435 — These two members are one piece of code written twice and then edited apart: 19 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· Edited copy of a member (11 corresponding lines) · ×3
Edited copy of a member (11 corresponding lines) crates/liteparse/src/markdown_layout/classify.rs:37— crates/liteparse/src/markdown_layout/classify.rs:37-47 | crates/liteparse/src/markdown_layout/classify.rs:49-59 — These two members are one piece of code written twice and then edited apart: 11 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.
Edited copy of a member (11 corresponding lines) crates/liteparse-napi/src/lib.rs:244— crates/liteparse-napi/src/lib.rs:244-254 | crates/liteparse-python/src/lib.rs:1939-1949 — These two members are one piece of code written twice and then edited apart: 11 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.
Edited copy of a member (11 corresponding lines) crates/liteparse/src/main.rs:387— crates/liteparse/src/main.rs:387-398 | crates/liteparse-python/src/cli.rs:247-257 — These two members are one piece of code written twice and then edited apart: 11 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· Edited copy of a member (9 corresponding lines) · ×3
Edited copy of a member (9 corresponding lines) crates/liteparse-wasm/src/lib.rs:1163— crates/liteparse-wasm/src/lib.rs:1163-1175 | crates/liteparse-wasm/src/lib.rs:1392-1400 — These two members are one piece of code written twice and then edited apart: 9 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.
Edited copy of a member (9 corresponding lines) crates/liteparse/src/markdown_layout/classify.rs:26— crates/liteparse/src/markdown_layout/classify.rs:26-35 | crates/liteparse/src/markdown_layout/tables.rs:3118-3126 — These two members are one piece of code written twice and then edited apart: 9 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.
Edited copy of a member (9 corresponding lines) crates/liteparse-napi/src/types.rs:431— crates/liteparse-napi/src/types.rs:431-439 | crates/liteparse-python/src/lib.rs:54-62 — These two members are one piece of code written twice and then edited apart: 9 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.
Duplicated block (17 lines × 2) crates/liteparse-napi/src/types.rs:1029— crates/liteparse-napi/src/types.rs:1029-1045 | crates/liteparse-wasm/src/lib.rs:651-667 — before extracting anything, compare `crates/liteparse-napi/src/types.rs` and `crates/liteparse-wasm/src/lib.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 105 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse-napi/src/types.rs:1029` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `block` to `&LayoutBlock` in one and `&liteparse::layout::LayoutBlock` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (17 lines × 2) crates/liteparse-napi/src/types.rs:1167— crates/liteparse-napi/src/types.rs:1167-1183 | crates/liteparse-wasm/src/lib.rs:925-941 — before extracting anything, compare `crates/liteparse-napi/src/types.rs` and `crates/liteparse-wasm/src/lib.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 105 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (17 lines × 2) crates/liteparse/src/conversion.rs:513— crates/liteparse/src/conversion.rs:513-529 | crates/liteparse/src/conversion.rs:612-628 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/conversion.rs:513` 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. 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.
Duplicated block (15 lines × 2) crates/liteparse-napi/src/types.rs:256— crates/liteparse-napi/src/types.rs:256-270 | crates/liteparse-wasm/src/lib.rs:221-235 — before extracting anything, compare `crates/liteparse-napi/src/types.rs` and `crates/liteparse-wasm/src/lib.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 105 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 (15 lines × 2) crates/liteparse-napi/src/types.rs:926— crates/liteparse-napi/src/types.rs:926-940 | crates/liteparse-wasm/src/lib.rs:699-713 — before extracting anything, compare `crates/liteparse-napi/src/types.rs` and `crates/liteparse-wasm/src/lib.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 105 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse-napi/src/types.rs:926` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `field` to `&FormField` in one and `&liteparse::types::FormField` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (15 lines × 2) crates/liteparse-python/src/lib.rs:1127— crates/liteparse-python/src/lib.rs:1127-1141 | crates/liteparse-wasm/src/lib.rs:1503-1517 — 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (10 lines × 2) crates/liteparse-napi/src/types.rs:228— crates/liteparse-napi/src/types.rs:228-237 | crates/liteparse-wasm/src/lib.rs:199-208 — before extracting anything, compare `crates/liteparse-napi/src/types.rs` and `crates/liteparse-wasm/src/lib.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 105 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/liteparse-napi/src/types.rs:753— crates/liteparse-napi/src/types.rs:753-762 | crates/liteparse-wasm/src/lib.rs:777-786 — before extracting anything, compare `crates/liteparse-napi/src/types.rs` and `crates/liteparse-wasm/src/lib.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 105 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse-napi/src/types.rs:753` 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. Note first that the copies are not typed on the same thing: the declarations holding them bind `element` to `&StructureTreeElement` in one and `&liteparse::types::StructureTreeElement` in another, and the duplicated lines use it. The extracted unit therefore needs a parameter type that fits BOTH — their common supertype where they have one, or a new abstraction over them where they do not — and settling that is the step that comes BEFORE the extraction above. Where the two types are deliberately unrelated, the duplication is the price of that separation and the honest resolution is to record the decision rather than to extract.
Duplicated block (10 lines × 2) crates/liteparse/src/projection.rs:3892— crates/liteparse/src/projection.rs:3892-3901 | crates/liteparse/src/projection.rs:4235-4244 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/projection.rs:3892` 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.
Duplicated block (7 lines × 3) crates/liteparse/src/projection.rs:3962— crates/liteparse/src/projection.rs:3962-3968 | crates/liteparse/src/projection.rs:4789-4795 | crates/liteparse/src/projection.rs:5139-5145 — 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 (7 lines × 3) crates/liteparse/src/figure_cluster.rs:266— crates/liteparse/src/figure_cluster.rs:266-272 | crates/liteparse/src/projection.rs:3667-3673 | crates/liteparse/src/projection.rs:3768-3774 — 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. 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.
Duplicated block (7 lines × 3) crates/liteparse/src/projection.rs:3871— crates/liteparse/src/projection.rs:3871-3877 | crates/liteparse/src/projection.rs:3978-3984 | crates/liteparse/src/projection.rs:4205-4211 — 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 `crates/liteparse/src/projection.rs:3871` 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.
LiteParse::new (cyclomatic 45) crates/liteparse-python/src/lib.rs:1532— LiteParse::new has cyclomatic complexity 45 (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.
LiteParse::parse_resolved (cyclomatic 23) crates/liteparse/src/parser.rs:625— LiteParse::parse_resolved 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.
SegmentBuilder::start (cyclomatic 18) crates/liteparse/src/extract.rs:3716— SegmentBuilder::start 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.
SegmentBuilder::place_rtl_mark (cyclomatic 16) crates/liteparse/src/extract.rs:3960— SegmentBuilder::place_rtl_mark 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.
LiteParse::new (cognitive 44) crates/liteparse-python/src/lib.rs:1532— LiteParse::new has cognitive complexity 44 (threshold 15). Drivers by points: if/else 42, match/switch 1 (2 pts) (nesting depth added 1). 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.
LiteParse::parse_resolved (cognitive 36) crates/liteparse/src/parser.rs:625— LiteParse::parse_resolved has cognitive complexity 36 (threshold 15). Drivers by points: if/else 14 (20 pts), loops 4 (8 pts), boolean chains 5, match/switch 1 (3 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.
SegmentBuilder::start (cognitive 26) crates/liteparse/src/extract.rs:3716— SegmentBuilder::start has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18 (22 pts), boolean chains 4 (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.
SegmentBuilder::place_rtl_mark (cognitive 21) crates/liteparse/src/extract.rs:3960— SegmentBuilder::place_rtl_mark has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 6, loops 2 (4 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.
Change-coupling hub: json.rs → lib.rs, extract.rs, native.ts crates/liteparse/src/output/json.rs— `crates/liteparse/src/output/json.rs` changes together with 3 other files — `crates/liteparse-python/src/lib.rs`, `crates/liteparse/src/extract.rs`, `packages/node/src/native.ts` — none of which declares a dependency on it: one file is the hub of 3 separate couplings, not 3 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 3.
Change-coupling hub: cli.ts → types.rs, cli.rs, main.rs, native.ts packages/node/src/cli.ts— `packages/node/src/cli.ts` changes together with 4 other files — `crates/liteparse-napi/src/types.rs`, `crates/liteparse-python/src/cli.rs`, `crates/liteparse/src/main.rs`, `packages/node/src/native.ts` — none of which declares a dependency on it: one file is the hub of 4 separate couplings, not 4 unrelated pairs. Read the hub first: if the others each duplicate a part of what it does, the shared concern belongs in ONE unit and extracting it clears every edge at once; if the hub is a registry, dispatcher or barrel that must name each of them, the coupling is structural and the question is whether that list can be discovered instead of enumerated. Fixing the hub is one change; breaking the couplings one pair at a time is 4.
Change coupling: extract.rs ↔ lib.rs crates/liteparse/src/extract.rs:1— `crates/liteparse/src/extract.rs` and `crates/pdfium/src/lib.rs` change together 73% of the time (8 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) 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 `1fd6136c` feat(pdfium): facts a faithful annotation/form/struct-tree consumer n…; `2625dbe6` fix: reduce memory and latency for large docs; `6a0ea0d3` Revert "fix: reduce memory and latency for large docs" — run `git show` on any of them.
Change coupling: native.ts ↔ types.py packages/node/src/native.ts:1— `packages/node/src/native.ts` and `packages/python/liteparse/types.py` change together 66% of the time (29 of the 44 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 29 shared commits counted here, the most recent 3 are `956234d8` Limit supplied OCR page images to the Rust API; `3c637134` Infer OCR image resolution from page geometry; `7027b174` Reuse supplied page images for OCR — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (22 corresponding lines) · ×2
Edited copy of a member (22 corresponding lines) crates/liteparse-napi/src/types.rs:1027— crates/liteparse-napi/src/types.rs:1027-1048 | crates/liteparse-wasm/src/lib.rs:647-670 — These two members are one piece of code written twice and then edited apart: 22 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.
Edited copy of a member (22 corresponding lines) crates/pdfium/src/page.rs:758— crates/pdfium/src/page.rs:758-782 | crates/pdfium/src/page.rs:826-847 — These two members are one piece of code written twice and then edited apart: 22 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· Edited copy of a member (21 corresponding lines) · ×2
Edited copy of a member (21 corresponding lines) crates/liteparse-napi/src/types.rs:925— crates/liteparse-napi/src/types.rs:925-945 | crates/liteparse-wasm/src/lib.rs:698-723 — 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.
Edited copy of a member (21 corresponding lines) crates/pdfium/src/page_object.rs:221— crates/pdfium/src/page_object.rs:221-241 | crates/pdfium/src/struct_tree.rs:333-356 — 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· Edited copy of a member (6 corresponding lines) · ×2
Edited copy of a member (6 corresponding lines) crates/liteparse/src/markdown_layout/classify.rs:1251— crates/liteparse/src/markdown_layout/classify.rs:1251-1256 | crates/pdfium/src/user_unit.rs:113-133 — These two members are one piece of code written twice and then edited apart: 6 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.
Edited copy of a member (6 corresponding lines) crates/liteparse-napi/src/types.rs:1018— crates/liteparse-napi/src/types.rs:1018-1023 | crates/liteparse-wasm/src/lib.rs:638-643 — These two members are one piece of code written twice and then edited apart: 6 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.
Duplicated block (18 lines × 2) crates/liteparse-python/src/cli.rs:349— crates/liteparse-python/src/cli.rs:349-366 | crates/liteparse/src/main.rs:490-507 — before extracting anything, compare `crates/liteparse-python/src/cli.rs` and `crates/liteparse/src/main.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 304 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse-python/src/cli.rs:349` 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.
Duplicated block (18 lines × 2) packages/python/liteparse/parser.py:407— packages/python/liteparse/parser.py:407-424 | packages/python/liteparse/parser.py:962-979 — 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–14 lines × 2) crates/liteparse/src/projection.rs:3880— crates/liteparse/src/projection.rs:3880-3889 | crates/liteparse/src/projection.rs:4216-4229 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/projection.rs:3880` 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.
Duplicated block (10–14 lines × 2) packages/python/liteparse/parser.py:98— packages/python/liteparse/parser.py:98-107 | packages/python/liteparse/parser.py:284-297 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `packages/python/liteparse/parser.py:98` 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.
Duplicated block (12 lines × 2) crates/liteparse-napi/src/types.rs:241— crates/liteparse-napi/src/types.rs:241-252 | crates/liteparse-wasm/src/lib.rs:209-220 — before extracting anything, compare `crates/liteparse-napi/src/types.rs` and `crates/liteparse-wasm/src/lib.rs` as WHOLE FILES: this scan already matched 8 separate duplicated blocks between them, totalling at least 105 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 (12 lines × 2) crates/liteparse/src/extract.rs:2979— crates/liteparse/src/extract.rs:2979-2990 | crates/liteparse/src/extract.rs:3375-3386 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/extract.rs:2979` 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.
Off the main sequence: liteparse-pdfium-sys — liteparse-pdfium-sys: abstractness 0.00, instability 0.00, distance 1.00 — zone of pain — concrete and depended on by 5 project(s), so it's rigid to change.
Off the main sequence: liteparse-pdfium — liteparse-pdfium: 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.
R4 · Test Coverage· No test reaches this file · ×2
No test reaches this file packages/wasm/scripts/patch-wasi-imports.js: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 packages/node/scripts/clean-dist.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.
JsLiteParseConfig::into_rust (cyclomatic 46) crates/liteparse-napi/src/types.rs:168— JsLiteParseConfig::into_rust has cyclomatic complexity 46 (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.
LiteParse.__init__ (cyclomatic 46) packages/python/liteparse/parser.py:465— LiteParse.__init__ has cyclomatic complexity 46 (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.
LiteParseConfig::into_core (cyclomatic 43) crates/liteparse-wasm/src/lib.rs:151— LiteParseConfig::into_core has cyclomatic complexity 43 (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· cli.program.command("parse").description("Parse a document and extract text").argument("<file>","Path to the document file") (cyclomatic 37) · ×1
cli.program.command("parse").description("Parse a document and extract text").argument("<file>","Path to the document file") (cyclomatic 37) packages/node/src/cli.ts:151— cli.program.command("parse").description("Parse a document and extract text").argument("<file>","Path to the document file") has cyclomatic complexity 37 (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.
cli.program.command("batch-parse").description("Parse multiple documents in batch mode").argument("<input-dir>","Input direc (cyclomatic 37) packages/node/src/cli.ts:409— cli.program.command("batch-parse").description("Parse multiple documents in batch mode").argument("<input-dir>","Input direc has cyclomatic complexity 37 (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.
liteparse_python::cli::run_cli (cyclomatic 32) crates/liteparse-python/src/cli.rs:275— liteparse_python::cli::run_cli has cyclomatic complexity 32 (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.
benchmark.run_benchmark (cyclomatic 24) dataset_eval_utils/src/liteparse_eval/benchmark.py:185— benchmark.run_benchmark 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.
Benchmark.run_full_benchmark (cyclomatic 23) dataset_eval_utils/src/liteparse_eval/evaluation.py:197— Benchmark.run_full_benchmark 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.
GlyphDecoder::decode (cyclomatic 22) crates/liteparse/src/extract.rs:2711— GlyphDecoder::decode 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.
liteparse_pdfium::page::collect_filled_paths (cyclomatic 21) crates/pdfium/src/page.rs:1941— liteparse_pdfium::page::collect_filled_paths 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.
benchmark.format_table (cyclomatic 20) dataset_eval_utils/src/liteparse_eval/benchmark.py:94— benchmark.format_table 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.
cli-json.textItemToCliJson (cyclomatic 16) packages/node/src/cli-json.ts:13— cli-json.textItemToCliJson 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.
D11 · Test Reliability· Test reliability not measured · ×1
Test reliability not measured — JavaScript/TypeScript suite install refused the lockfile — Test reliability NOT MEASURED: the JavaScript/TypeScript suite's dependency install refused the committed lockfile, so no test ever ran and flakiness could not be exercised — the dependency install for packages/node/ refused the committed lockfile (npm error code EUSAGE), so the suite never ran. It is excluded from the score rather than counted as a defect; a lockfile in sync with package.json is what lets the suite be re-run.
liteparse_python::cli::run_cli (cognitive 65) crates/liteparse-python/src/cli.rs:275— liteparse_python::cli::run_cli has cognitive complexity 65 (threshold 15). Drivers by points: if/else 21 (44 pts), match/switch 7 (15 pts), loops 3 (6 pts) (nesting depth added 34). 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.
benchmark.run_benchmark (cognitive 48) dataset_eval_utils/src/liteparse_eval/benchmark.py:185— benchmark.run_benchmark has cognitive complexity 48 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 6 (12 pts), ternaries 4 (10 pts), error handling 3 (9 pts), boolean chains 2 (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.
JsLiteParseConfig::into_rust (cognitive 46) crates/liteparse-napi/src/types.rs:168— JsLiteParseConfig::into_rust has cognitive complexity 46 (threshold 15). Drivers by points: if/else 42, loops 1 (2 pts), match/switch 1 (2 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.
cli.program.command("batch-parse").description("Parse multiple documents in batch mode").argument("<input-dir>","Input direc (cognitive 46) packages/node/src/cli.ts:409— cli.program.command("batch-parse").description("Parse multiple documents in batch mode").argument("<input-dir>","Input direc has cognitive complexity 46 (threshold 15). Drivers by points: if/else 25 (26 pts), ternaries 8 (16 pts), error handling 2 (3 pts), loops 1 (nesting depth added 10). 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.
LiteParse.__init__ (cognitive 45) packages/python/liteparse/parser.py:465— LiteParse.__init__ has cognitive complexity 45 (threshold 15). Drivers by points: if/else 44, boolean chains 1. 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.
LiteParseConfig::into_core (cognitive 41) crates/liteparse-wasm/src/lib.rs:151— LiteParseConfig::into_core has cognitive complexity 41 (threshold 15). Drivers by points: if/else 37, match/switch 2 (4 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.
Benchmark.run_full_benchmark (cognitive 40) dataset_eval_utils/src/liteparse_eval/evaluation.py:197— Benchmark.run_full_benchmark has cognitive complexity 40 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 4 (8 pts), error handling 3 (7 pts), loops 4 (6 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.
benchmark.format_table (cognitive 39) dataset_eval_utils/src/liteparse_eval/benchmark.py:94— benchmark.format_table has cognitive complexity 39 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 8 (13 pts), ternaries 2 (5 pts), boolean chains 2 (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.
D2 · Cognitive Complexity· cli.program.command("parse").description("Parse a document and extract text").argument("<file>","Path to the document file") (cognitive 39) · ×1
cli.program.command("parse").description("Parse a document and extract text").argument("<file>","Path to the document file") (cognitive 39) packages/node/src/cli.ts:151— cli.program.command("parse").description("Parse a document and extract text").argument("<file>","Path to the document file") has cognitive complexity 39 (threshold 15). Drivers by points: if/else 32, ternaries 3 (5 pts), error handling 1, loops 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.
GlyphDecoder::decode (cognitive 24) crates/liteparse/src/extract.rs:2711— GlyphDecoder::decode has cognitive complexity 24 (threshold 15). Drivers by points: if/else 13 (14 pts), boolean chains 9, match/switch 1 (nesting depth added 1). 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.
MiniCPMOCRServer._ocr (cognitive 23) ocr/minicpmocr/server.py:175— MiniCPMOCRServer._ocr has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (18 pts), boolean chains 4, 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.
ObjectClips::walk (cognitive 21) crates/liteparse/src/text_clip.rs:165— ObjectClips::walk has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts), match/switch 2 (3 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.
parser._convert_native_result (cognitive 21) packages/python/liteparse/parser.py:170— parser._convert_native_result has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 11 (20 pts), loops 1 (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.
D2 · Cognitive Complexity· cli.program.command("screenshot").description("Generate screenshots of document pages").argument("<file>","Path to the docum (cognitive 21) · ×1
cli.program.command("screenshot").description("Generate screenshots of document pages").argument("<file>","Path to the docum (cognitive 21) packages/node/src/cli.ts:316— cli.program.command("screenshot").description("Generate screenshots of document pages").argument("<file>","Path to the docum has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (11 pts), loops 3 (7 pts), ternaries 1 (2 pts), error handling 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.
FontDbResolver::load_shard (cognitive 20) crates/liteparse/src/font_db_resolver.rs:79— FontDbResolver::load_shard has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (12 pts), match/switch 4 (7 pts), loops 1 (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.
PageObject::clip_paths (cognitive 18) crates/pdfium/src/page_object.rs:127— PageObject::clip_paths has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 2 (3 pts), match/switch 1 (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.
cli.collectFilesInner (cognitive 18) packages/node/src/cli.ts:601— cli.collectFilesInner has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 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.
TooManyMethods: Page crates/pdfium/src/page.rs:243— TooManyMethods — 36 methods, declared across 3 files: src/page.rs (31), src/struct_tree.rs (3), src/page_object.rs (2). The bar is 30 methods; this is 6 over it, 1.20× 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.
Change coupling clique: http_simple.rs, tesseract.rs, ocr_merge.rs crates/liteparse/src/ocr/http_simple.rs— 3 files — `crates/liteparse/src/ocr/http_simple.rs`, `crates/liteparse/src/ocr/tesseract.rs`, `crates/liteparse/src/ocr_merge.rs` — all change together with no explicit dependency: a fully-connected co-change clique, not 3 separate couplings. They share one concern (thin parallel siblings over a common abstraction), so extract the shared part into ONE unit and the whole clique's coupling clears at once — you do not need to break each pair individually.
Near-duplicate member pair (226 shared lines) crates/liteparse-python/src/cli.rs:275— crates/liteparse-python/src/cli.rs:275-552 | crates/liteparse/src/main.rs:419-722 — These two members are variants of one another: 226 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 (152 corresponding lines) · ×1
Edited copy of a member (152 corresponding lines) crates/liteparse-napi/src/types.rs:168— crates/liteparse-napi/src/types.rs:168-319 | crates/liteparse-python/src/lib.rs:1575-1727 — These two members are one piece of code written twice and then edited apart: 152 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· Edited copy of a member (129 corresponding lines) · ×1
Edited copy of a member (129 corresponding lines) crates/liteparse/src/ocr_merge.rs:510— crates/liteparse/src/ocr_merge.rs:510-645 | crates/liteparse/src/ocr_merge.rs:671-799 — These two members are one piece of code written twice and then edited apart: 129 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· Edited copy of a member (67 corresponding lines) · ×1
Edited copy of a member (67 corresponding lines) crates/liteparse-napi/src/types.rs:321— crates/liteparse-napi/src/types.rs:321-401 | crates/liteparse-wasm/src/lib.rs:296-362 — These two members are one piece of code written twice and then edited apart: 67 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· Edited copy of a member (46 corresponding lines) · ×1
Edited copy of a member (46 corresponding lines) crates/liteparse-napi/src/types.rs:1052— crates/liteparse-napi/src/types.rs:1052-1097 | crates/liteparse-python/src/lib.rs:692-738 — These two members are one piece of code written twice and then edited apart: 46 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· Edited copy of a member (36 corresponding lines) · ×1
Edited copy of a member (36 corresponding lines) crates/liteparse-napi/src/types.rs:840— crates/liteparse-napi/src/types.rs:840-875 | crates/liteparse-python/src/lib.rs:636-671 — These two members are one piece of code written twice and then edited apart: 36 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· Edited copy of a member (35 corresponding lines) · ×1
Edited copy of a member (35 corresponding lines) crates/liteparse-napi/src/types.rs:752— crates/liteparse-napi/src/types.rs:752-786 | crates/liteparse-python/src/lib.rs:219-257 — These two members are one piece of code written twice and then edited apart: 35 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· Edited copies of one member (3 members, 25+ corresponding lines) · ×1
Edited copies of one member (3 members, 25+ corresponding lines) crates/pdfium/src/document.rs:351— crates/pdfium/src/document.rs:351-388 | crates/pdfium/src/document.rs:397-434 | crates/pdfium/src/document.rs:652-676 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 25 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (20 corresponding lines) · ×1
Edited copy of a member (20 corresponding lines) crates/pdfium/src/page.rs:1521— crates/pdfium/src/page.rs:1521-1540 | crates/pdfium/src/page.rs:1646-1679 — These two members are one piece of code written twice and then edited apart: 20 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· Edited copy of a member (28 corresponding lines) · ×1
Edited copy of a member (28 corresponding lines) crates/pdfium/src/page.rs:61— crates/pdfium/src/page.rs:61-98 | crates/pdfium/src/page_object.rs:360-387 — These two members are one piece of code written twice and then edited apart: 28 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· Edited copies of one member (4 members, 24+ corresponding lines) · ×1
Edited copies of one member (4 members, 24+ corresponding lines) crates/pdfium/src/font.rs:43— crates/pdfium/src/font.rs:43-72 | crates/pdfium/src/font.rs:193-216 | crates/pdfium/src/font.rs:222-252 | crates/pdfium/src/text_page.rs:250-283 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 24 lines, 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 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (32 corresponding lines) · ×1
Edited copy of a member (32 corresponding lines) crates/pdfium/src/struct_tree.rs:228— crates/pdfium/src/struct_tree.rs:228-260 | crates/pdfium/src/struct_tree.rs:262-293 — These two members are one piece of code written twice and then edited apart: 32 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· Edited copy of a member (24 corresponding lines) · ×1
Edited copy of a member (24 corresponding lines) crates/pdfium/src/text_page.rs:124— crates/pdfium/src/text_page.rs:124-168 | crates/pdfium/src/text_page.rs:171-194 — These two members are one piece of code written twice and then edited apart: 24 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· Edited copies of one member (3 members, 22+ corresponding lines) · ×1
Edited copies of one member (3 members, 22+ corresponding lines) crates/liteparse-napi/src/types.rs:1360— crates/liteparse-napi/src/types.rs:1360-1384 | crates/liteparse-python/src/lib.rs:1200-1224 | crates/liteparse-wasm/src/lib.rs:1553-1574 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 22 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (18 corresponding lines) · ×1
Edited copy of a member (18 corresponding lines) crates/liteparse/src/markdown_layout/tables.rs:3714— crates/liteparse/src/markdown_layout/tables.rs:3714-3731 | crates/liteparse/src/markdown_layout/tables.rs:3733-3750 — These two members are one piece of code written twice and then edited apart: 18 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· Edited copies of one member (3 members, 10+ corresponding lines) · ×1
Edited copies of one member (3 members, 10+ corresponding lines) crates/liteparse/src/text_clip.rs:292— crates/liteparse/src/text_clip.rs:292-301 | crates/pdfium/src/page.rs:1743-1752 | crates/pdfium/src/page.rs:1929-1938 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 10 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (12 corresponding lines) · ×1
Edited copy of a member (12 corresponding lines) crates/liteparse/src/figure_cluster.rs:237— crates/liteparse/src/figure_cluster.rs:237-248 | crates/liteparse/src/types.rs:622-633 — These two members are one piece of code written twice and then edited apart: 12 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· Edited copy of a member (16 corresponding lines) · ×1
Edited copy of a member (16 corresponding lines) crates/liteparse-napi/src/lib.rs:37— crates/liteparse-napi/src/lib.rs:37-52 | crates/liteparse-napi/src/lib.rs:113-128 — These two members are one piece of code written twice and then edited apart: 16 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· Edited copies of one member (4 members, 26+ corresponding lines) · ×1
Edited copies of one member (4 members, 26+ corresponding lines) crates/pdfium/src/text_page.rs:96— crates/pdfium/src/text_page.rs:96-121 | crates/pdfium/src/text_page.rs:314-339 | crates/pdfium/src/text_page.rs:342-367 | crates/pdfium/src/text_page.rs:384-409 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 26 lines, 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 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (30 corresponding lines) · ×1
Edited copy of a member (30 corresponding lines) packages/python/liteparse/parser.py:825— packages/python/liteparse/parser.py:825-873 | packages/python/liteparse/parser.py:896-925 — These two members are one piece of code written twice and then edited apart: 30 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· Edited copies of one member (4 members, 7+ corresponding lines) · ×1
Edited copies of one member (4 members, 7+ corresponding lines) crates/liteparse-python/src/lib.rs:1730— crates/liteparse-python/src/lib.rs:1730-1740 | crates/liteparse-python/src/lib.rs:1772-1782 | crates/liteparse-python/src/lib.rs:1787-1793 | crates/liteparse-python/src/lib.rs:1800-1806 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 7 lines, 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 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. Left alone, the next edit has to be made 4 times and the copies will drift further apart.
D4 · Code Duplication· Edited copies of one member (3 members, 17+ corresponding lines) · ×1
Edited copies of one member (3 members, 17+ corresponding lines) crates/liteparse/src/markdown_layout/headings.rs:890— crates/liteparse/src/markdown_layout/headings.rs:890-910 | crates/liteparse/src/markdown_layout/paragraphs.rs:36-54 | crates/liteparse/src/markdown_layout/repetition.rs:35-51 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 17 lines, 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 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. Left alone, the next edit has to be made 3 times and the copies will drift further apart.
D4 · Code Duplication· Edited copy of a member (15 corresponding lines) · ×1
Edited copy of a member (15 corresponding lines) crates/liteparse/src/extract.rs:2567— crates/liteparse/src/extract.rs:2567-2583 | crates/liteparse/src/raw_text.rs:346-360 — These two members are one piece of code written twice and then edited apart: 15 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· Edited copy of a member (5 corresponding lines) · ×1
Edited copy of a member (5 corresponding lines) crates/liteparse/src/bidi.rs:20— crates/liteparse/src/bidi.rs:20-31 | crates/liteparse/src/ocr_merge.rs:2242-2246 — These two members are one piece of code written twice and then edited apart: 5 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.
Duplicated block (45–47 lines × 2) crates/liteparse-python/src/cli.rs:398— crates/liteparse-python/src/cli.rs:398-442 | crates/liteparse/src/main.rs:541-587 — before extracting anything, compare `crates/liteparse-python/src/cli.rs` and `crates/liteparse/src/main.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 304 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse-python/src/cli.rs:398` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (45–46 lines × 2) crates/liteparse-python/src/cli.rs:453— crates/liteparse-python/src/cli.rs:453-497 | crates/liteparse/src/main.rs:600-645 — before extracting anything, compare `crates/liteparse-python/src/cli.rs` and `crates/liteparse/src/main.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 304 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse-python/src/cli.rs:453` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, 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.
Duplicated block (40–42 lines × 2) crates/liteparse-python/src/cli.rs:279— crates/liteparse-python/src/cli.rs:279-318 | crates/liteparse/src/main.rs:422-463 — before extracting anything, compare `crates/liteparse-python/src/cli.rs` and `crates/liteparse/src/main.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 304 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse-python/src/cli.rs:279` 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.
Duplicated block (36–38 lines × 2) crates/liteparse/src/ocr_merge.rs:544— crates/liteparse/src/ocr_merge.rs:544-581 | crates/liteparse/src/ocr_merge.rs:702-737 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/ocr_merge.rs:544` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (29–30 lines × 2) crates/liteparse-python/src/cli.rs:369— crates/liteparse-python/src/cli.rs:369-397 | crates/liteparse/src/main.rs:510-539 — before extracting anything, compare `crates/liteparse-python/src/cli.rs` and `crates/liteparse/src/main.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 304 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse-python/src/cli.rs:369` it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows — the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members' bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run — a one-line delegation has no helper inside it to lift — so generate the run from the set it enumerates, or accept it and keep each member's own documentation with it.
Duplicated block (18–28 lines × 2) crates/liteparse/src/markdown_layout/paragraphs.rs:176— crates/liteparse/src/markdown_layout/paragraphs.rs:176-193 | crates/liteparse/src/markdown_layout/paragraphs.rs:220-247 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/markdown_layout/paragraphs.rs:176` 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.
Duplicated block (26–27 lines × 2) crates/liteparse/src/projection.rs:2461— crates/liteparse/src/projection.rs:2461-2487 | crates/liteparse/src/projection.rs:2720-2745 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/projection.rs:2461` 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.
Duplicated block (21–25 lines × 2) crates/liteparse-python/src/cli.rs:587— crates/liteparse-python/src/cli.rs:587-607 | crates/liteparse/src/main.rs:758-782 — before extracting anything, compare `crates/liteparse-python/src/cli.rs` and `crates/liteparse/src/main.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 304 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. Each matched range is the entire body of the declaration above it, so the region is already a complete unit: move that whole declaration to the shared location and have each site call it, rather than lifting the lines out of their bodies. Any `return` inside it is the body's own exit and keeps its meaning in the moved unit.
Duplicated block (21 lines × 2) crates/liteparse-python/src/cli.rs:514— crates/liteparse-python/src/cli.rs:514-534 | crates/liteparse/src/main.rs:671-691 — before extracting anything, compare `crates/liteparse-python/src/cli.rs` and `crates/liteparse/src/main.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 304 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse-python/src/cli.rs:514` 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.
Duplicated block (18–21 lines × 2) crates/liteparse-python/src/lib.rs:1201— crates/liteparse-python/src/lib.rs:1201-1221 | crates/liteparse-wasm/src/lib.rs:1554-1571 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse-python/src/lib.rs:1201` 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. 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.
Duplicated block (18–19 lines × 3) crates/liteparse/src/projection.rs:1797— crates/liteparse/src/projection.rs:1797-1815 | crates/liteparse/src/projection.rs:1830-1847 | crates/liteparse/src/projection.rs:1862-1879 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/liteparse/src/projection.rs:1791` calls `last`, `unwrap_or` and `crates/liteparse/src/projection.rs:1829` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (19 lines × 2) crates/pdfium/src/text_page.rs:321— crates/pdfium/src/text_page.rs:321-339 | crates/pdfium/src/text_page.rs:349-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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/pdfium/src/text_page.rs:321` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, 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.
Duplicated block (16–18 lines × 2) crates/liteparse/src/markdown_layout/classify.rs:1034— crates/liteparse/src/markdown_layout/classify.rs:1034-1049 | crates/liteparse/src/markdown_layout/classify.rs:1167-1184 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/markdown_layout/classify.rs:1034` 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. 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.
Duplicated block (15–16 lines × 2) crates/liteparse-wasm/src/lib.rs:1235— crates/liteparse-wasm/src/lib.rs:1235-1250 | crates/liteparse-wasm/src/lib.rs:1663-1677 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse-wasm/src/lib.rs:1235` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, 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.
Duplicated block (12–16 lines × 2) crates/pdfium/src/text_page.rs:153— crates/pdfium/src/text_page.rs:153-168 | crates/pdfium/src/text_page.rs:183-194 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/pdfium/src/text_page.rs:153` 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.
Duplicated block (14–15 lines × 2) crates/liteparse-python/src/cli.rs:331— crates/liteparse-python/src/cli.rs:331-344 | crates/liteparse/src/main.rs:469-483 — before extracting anything, compare `crates/liteparse-python/src/cli.rs` and `crates/liteparse/src/main.rs` as WHOLE FILES: this scan already matched 14 separate duplicated blocks between them, totalling at least 304 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse-python/src/cli.rs:331` 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.
Duplicated block (11–15 lines × 2) crates/liteparse/src/markdown_layout/tables.rs:1264— crates/liteparse/src/markdown_layout/tables.rs:1264-1274 | crates/liteparse/src/markdown_layout/tables.rs:1424-1438 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/markdown_layout/tables.rs:1264` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `crates/liteparse/src/markdown_layout/tables.rs:1439` calls `clear` and `crates/liteparse/src/markdown_layout/tables.rs:1275` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (14 lines × 3) crates/pdfium/src/page.rs:554— crates/pdfium/src/page.rs:554-567 | crates/pdfium/src/page.rs:633-646 | crates/pdfium/src/page.rs:2033-2046 — 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 `crates/pdfium/src/page.rs:554` 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.
Duplicated block (11–12 lines × 2) crates/pdfium/src/page.rs:618— crates/pdfium/src/page.rs:618-629 | crates/pdfium/src/page.rs:788-798 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/pdfium/src/page.rs:618` 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. 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.
Duplicated block (11 lines × 3) crates/liteparse/src/ocr_merge.rs:555— crates/liteparse/src/ocr_merge.rs:555-565 | crates/liteparse/src/ocr_merge.rs:713-723 | crates/liteparse/src/ocr_merge.rs:1902-1912 — 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–11 lines × 2) crates/liteparse-wasm/src/lib.rs:1220— crates/liteparse-wasm/src/lib.rs:1220-1230 | crates/liteparse/src/output/json.rs:148-156 — 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. 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just before the matched lines, `crates/liteparse/src/output/json.rs:145` calls `then_some`, `clone` and `crates/liteparse-wasm/src/lib.rs:1218` does not — after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live.
Duplicated block (10 lines × 3) crates/liteparse/src/projection.rs:2008— crates/liteparse/src/projection.rs:2008-2017 | crates/liteparse/src/projection.rs:2020-2030 | crates/liteparse/src/projection.rs:2033-2043 — 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 `crates/liteparse/src/projection.rs:2008` 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.
Duplicated block (7–8 lines × 3) crates/liteparse/src/tex_math/structures.rs:41— crates/liteparse/src/tex_math/structures.rs:41-47 | crates/liteparse/src/tex_math/structures.rs:238-245 | crates/liteparse/src/tex_math/structures.rs:306-312 — 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 (7–8 lines × 2) crates/liteparse/src/markdown_layout/tables.rs:327— crates/liteparse/src/markdown_layout/tables.rs:327-333 | crates/liteparse/src/markdown_layout/tables.rs:4421-4428 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/markdown_layout/tables.rs:327` 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.
Duplicated block (5 lines × 3) crates/liteparse/src/text_clip.rs:297— crates/liteparse/src/text_clip.rs:297-301 | crates/pdfium/src/page.rs:1748-1752 | crates/pdfium/src/page.rs:1934-1938 — 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. Read the line range as the matched WINDOW rather than a finished unit: at `crates/liteparse/src/text_clip.rs:297` it runs out through the closing brace of the declaration holding it — the window is that declaration's tail, not a fragment that begins part-way through something, 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.
Duplicated block (15–17 lines × 2) ocr/minicpmocr/server.py:233— ocr/minicpmocr/server.py:233-247 | ocr/suryaocr/server.py:135-151 — 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.
Coverage not measured — JavaScript/TypeScript suite — Coverage NOT MEASURED: the JavaScript/TypeScript half could not be measured — the dependency install for packages/node/ refused the committed lockfile (npm error code EUSAGE), so the suite never ran. 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.
Outbound HTTP without resilience crates/liteparse/src/ocr/tesseract.rs:200— `reqwest::get(` makes an outbound HTTP call, and nothing bounds it: no timeout, deadline, retry or circuit breaker is set for it here, and the client has no process-wide default. A slow or failing dependency will hold this service's request, thread or connection until the call gives up on its own — or never, for a client with no default timeout.
Type Safety — 7 typed · 9 plain JS — the untyped files are packages/node/scripts/clean-dist.mjs, packages/node/tests/cli-batch.test.mjs, packages/node/tests/cli-text.test.mjs, packages/node/tests/exports.test.mjs, packages/node/tests/pool.test.mjs, packages/wasm/scripts/patch-wasi-imports.js (+3 more).
R10 · Code Duplication· Duplicated block with local edits (204 matched lines × 2 locations) · ×1
Duplicated block with local edits (204 matched lines × 2 locations) packages/node/src/lib.ts:210— packages/node/src/lib.ts:210 · packages/node/src/native.ts:87 — the two spans are one implementation copied and then locally edited — 887 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 with local edits (43 matched lines × 2 locations) · ×1
Duplicated block with local edits (43 matched lines × 2 locations) packages/node/src/cli.ts:101— packages/node/src/cli.ts:101 · packages/node/src/cli.ts:388 — the two spans are one implementation copied and then locally edited — 273 tokens are still identical, in the same order in both spans, 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.
Complex function constructor (cyclomatic 46, cognitive 45) packages/node/src/lib.ts:680— constructor has cyclomatic complexity 46 and cognitive complexity 45; 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.
Complex function (anonymous) (cyclomatic 38, cognitive 44) packages/node/src/cli.ts:409— (anonymous) has cyclomatic complexity 38 and cognitive complexity 44; 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.
Complex function (anonymous) (cyclomatic 37, cognitive 38) packages/node/src/cli.ts:151— (anonymous) has cyclomatic complexity 37 and cognitive complexity 38; 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.
Complex function textItemToCliJson (cyclomatic 17, cognitive 16) packages/node/src/cli-json.ts:13— textItemToCliJson has cyclomatic complexity 17 and cognitive complexity 16; 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.
Complex function (anonymous) (cyclomatic 13, cognitive 21) packages/node/src/cli.ts:316— (anonymous) has cyclomatic complexity 13 and cognitive complexity 21; 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.
Complex function formFieldToCliJson (cyclomatic 12, cognitive 11) packages/node/src/cli-json.ts:156— formFieldToCliJson 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.
Complex function (anonymous) (cyclomatic 11, cognitive 12) packages/node/src/cli.ts:252— (anonymous) 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.
packages/node/src/lib.ts: 1065 lines of code packages/node/src/lib.ts:1— packages/node/src/lib.ts has 1065 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
packages/node/src/cli.ts: 579 lines of code packages/node/src/cli.ts:1— packages/node/src/cli.ts has 579 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· packages/node/src/native.ts · ×1
packages/node/src/native.ts: 411 lines of code packages/node/src/native.ts:1— packages/node/src/native.ts has 411 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
Duplicated predicate crates/liteparse/src/markdown_layout/classify.rs:121— `!text.is_empty() && !text.ends_with(' ')` appears character-identically in 2 files — crates/liteparse/src/markdown_layout/classify.rs, crates/liteparse/src/projection.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/liteparse/src/markdown_layout/classify.rs:407— `e < lines.len() && lines[e].region_path == *path` appears character-identically in 2 files — crates/liteparse/src/markdown_layout/classify.rs, crates/liteparse/src/markdown_layout/cross_region.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.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 13 significant file(s) lose their only recent owner: crates/liteparse/src/markdown_layout/blocks.rs, crates/liteparse/src/markdown_layout/headings.rs, dataset_eval_utils/src/liteparse_eval/evaluation.py, crates/liteparse/src/markdown_layout/paragraphs.rs, crates/liteparse/src/glyph_names.rs, dataset_eval_utils/src/liteparse_eval/benchmark.py, crates/pdfium/src/font.rs, packages/node/src/pool.ts (+5 more). Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 4 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 (17 single-owned of 81 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; 81 of the 108 production source files in this repository met that bar). They are anonymized user #2 (1 file(s)), anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)), anonymized user #5 (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/liteparse/src/text_clip.rs, ocr/suryaocr/server.py, scripts/bump-version.py, ocr/indraocr/server.py.
No ADRs found packages/python/pyproject.toml:37— 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/`. ADRs are expected here because `packages/python/pyproject.toml` makes this repository a deployable product (line 37).
D26 · Project Cohesion· Projects may be oversized for their cohesion · ×1
Projects may be oversized for their cohesion — 1 of 15 project(s) overshoot their size bounds, lowering Project Cohesion to 8.7/10. The most over is `crates/liteparse` (45622 LoC, 125 module-visible types across 5 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.
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.
Logging is not universal — Only 5/9 runnable modules use logging (modules with no entry point or server are excluded — they are libraries a runnable module hosts). Silent: `crates/liteparse`, `dataset_eval_utils`, `packages/node`, `packages/python`.
No dependency-update automation packages/node/package.json:57— `packages/node/package.json` declares packages, and nothing in the repository keeps them current: no Dependabot or Renovate configuration that schedules updates, and no dependency-review gate on pull requests. A pinned dependency stays at the version it was added at until someone notices — including after an advisory is published against it. Add a `.github/dependabot.yml` with one `package-ecosystem` entry per ecosystem the tree uses (or an enabled `renovate.json`), and gate pull requests with `actions/dependency-review-action`.
Null assertions (`!`) override strict null checking — ~2.8 `!` null assertions per 1k TypeScript source lines — 8 assertion(s) across the 2837 source line(s) of the 7 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: packages/node/src/pool-worker.ts (5), packages/node/src/pool.ts (3). Each one tells the compiler to trust the author about null, suppressing the very diagnostic `strictNullChecks` exists to produce. Many are correct: each is a claim the checker could not verify, and it is wrong only where the value can in fact be missing, so review the densest places first.
Silent fallback default on Err crates/liteparse/src/ocr_merge.rs:485— `invisible_text_share` turns every `Err` into `0.0` — 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.
Outdated: blake3 — `blake3` is locked at 1.8.5 but 1.8.7 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/liteparse/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p blake3` and commit the updated REDACTED.
Outdated: clap — `clap` is locked at 4.6.2 but 4.6.7 is the current stable release on crates.io, and it already satisfies the `"4.5.55"` requirement declared in crates/liteparse-python/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p clap` and commit the updated REDACTED.
Outdated: flate2 — `flate2` is locked at 1.1.9 but 1.1.11 is the current stable release on crates.io, and it already satisfies the `"1.1.9"` requirement declared in crates/liteparse/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p flate2` and commit the updated REDACTED.
Outdated: futures-util — `futures-util` is locked at 0.3.33 but 0.3.34 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in crates/liteparse/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p futures-util` and commit the updated REDACTED.
Outdated: js-sys — `js-sys` is locked at 0.3.103 but 0.3.107 is the current stable release on crates.io, and it already satisfies the `"0.3"` requirement declared in crates/liteparse-wasm/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p js-sys` and commit the updated REDACTED.
Outdated: napi-build — `napi-build` is locked at 2.3.2 but 2.6.0 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in crates/liteparse-napi/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: ordered-float — `ordered-float` is locked at 5.3.0 but 5.5.1 is the current stable release on crates.io, and it already satisfies the `"5.3.0"` requirement declared in crates/liteparse/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p ordered-float` and commit the updated REDACTED.
Outdated: reqwest — `reqwest` is locked at 0.13.4 but 0.13.5 is the current stable release on crates.io, and it already satisfies the `"0.13.3"` requirement declared in crates/liteparse/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p reqwest` 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"` requirement declared in crates/liteparse-napi/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: thiserror — `thiserror` is locked at 2.0.19 but 2.0.21 is the current stable release on crates.io, and it already satisfies the `"2"` requirement declared in crates/liteparse/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p thiserror` and commit the updated REDACTED.
Outdated: tokio — `tokio` is locked at 1.53.3 but 1.54.1 is the current stable release on crates.io, and it already satisfies the `"1"` requirement declared in crates/liteparse-napi/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p tokio` and commit the updated REDACTED.
Outdated: ureq — `ureq` is locked at 3.3.0 but 3.5.2 is the current stable release on crates.io, and it already satisfies the `"3"` requirement declared in crates/pdfium-sys/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p ureq` and commit the updated REDACTED.
Outdated: wasm-bindgen — `wasm-bindgen` is locked at 0.2.126 but 0.2.130 is the current stable release on crates.io, and it already satisfies the `"0.2"` requirement declared in crates/liteparse-wasm/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p wasm-bindgen` and commit the updated REDACTED.
Outdated: wasm-bindgen-futures — `wasm-bindgen-futures` is locked at 0.4.76 but 0.4.80 is the current stable release on crates.io, and it already satisfies the `"0.4"` requirement declared in crates/liteparse-wasm/Cargo.toml — so the lockfile is behind this repository's own declared range. Run `cargo update -p wasm-bindgen-futures` and commit the updated REDACTED.
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.
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.
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.
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.
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.
Run 01a1dab5-a92f-7630-8b13-268d3f8e549a · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 165 · Warnings: 503 · Recommendations: 20 · Info: 14 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 14-11-2026 @ 15:38 UTC.
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.