Public report of Alishahryar1/free-claude-code, 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, 02:00 UTC · Survey ID cd_7ff5a15f49ce4bbb8ab6dcdd0cec674f
Alishahryar1/free-claude-code
Measured 14 November 2026, 01:59 UTC, at code version 5662101
CAI scoreAt riskUp 1 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: 77,506 lines of product code in 1 project, tests not counted · Estimated rebuild effort: about 1.3 person-years · Weakest lens: Code Health, 30
Findings by how serious they are
23 critical686 serious53 minor
17 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, 01:59 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.
751of 762 findings point to an exact file and line, so you can open each one in the code. The other 11 concern the repository as a whole, such as missing documentation.
64dimensions across 7 lenses, read from 77,506 lines of product code in 1 project.
Alishahryar1/free-claude-code is rated At risk because critical security findings are open. It scores 45 out of 100, which the At risk rating leaves unchanged.
Code Health, at 30, is the weakest lens and counts most in the score. The best first step is splitting the oversized files, worth about 5 points. Adding type checking comes next, worth about 4 points. Raising Code Health to 70 would lift the score to about 57.
Ten known security holes in the packages the code depends on can be used by attackers. Nine pipeline steps run downloads nobody checks, and two weaknesses in the code could be used by an attacker. Updating the vulnerable packages, checking each download against a checksum and fixing the weaknesses the scanner points to would close these risks. Setting a waiting period for automatic updates would fix the automatic dependency update that takes a new release at once. The set of files in separate parts that keep changing together needs that dependency made explicit.
The product code is 77,506 lines, about €190,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 30 to 70, the lowest score rated Strong, the score would rise from 45 to about 57.
Code composition: what the lines of code are
Product code 32%Tests 68%
New since the last survey: 219 findings
These 219 critical or serious findings weren't in the previous survey, on 25 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: 50 findings
These 50 critical or serious findings were in the previous survey, on 25 October 2026, and are gone from this one.
A11y enforcement · Accessibility enforcement below the top rung
Rebuild cost: about €190,000 · Estimate
Cost to rebuild
€63,000 to €320,000, for 1,055 to 3,345 hours of work, about 1.3 person-years for 1 to 3 engineers
Difficulty of the problem
Low, 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.7 at a score of 45. 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: 77,506 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 5 points · Medium effort · Large Files
2
Resolve the 1 finding(s) in Type Safety.
Raises the score by about 4 points · Medium effort · Type Safety
3
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 `?`).
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 €190,000 to build again, about 1.3 person-years of work. Its weakest lens is Code Health, at 30 (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 5 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 6.4 out of 10. Code at that level is slower to change than clean code, and we estimate the extra work at 4% to 9% on every change. The history of the code shows how much it changes: about 320,533 lines over the last 90 days, which is about 1,299,939 lines a year. At that pace, the extra work comes to an estimated 129.1 to 774.9 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: 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.
315 modules, with 568 dependencies between them. Every module uses only modules listed above it, so there are no loops.
The table shows the 40 modules with the most connections; 275 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.
application.model_metadata uses core.reasoning, so a change to core.reasoning can break application.model_metadata, while a change to application.model_metadata can't break core.reasoning.
Position
Below the diagonal: application.model_metadata uses a module listed above it, which is the healthy direction.
core.anthropic uses core.anthropic.models, so a change to core.anthropic.models can break core.anthropic, while a change to core.anthropic can't break core.anthropic.models.
Position
Below the diagonal: core.anthropic uses a module listed above it, which is the healthy direction.
core.anthropic uses core.history_replay, so a change to core.history_replay can break core.anthropic, while a change to core.anthropic can't break core.history_replay.
Position
Below the diagonal: core.anthropic uses a module listed above it, which is the healthy direction.
core.gemini.models uses core.reasoning, so a change to core.reasoning can break core.gemini.models, while a change to core.gemini.models can't break core.reasoning.
Position
Below the diagonal: core.gemini.models uses a module listed above it, which is the healthy direction.
core.openai_tool_names uses core.anthropic.models, so a change to core.anthropic.models can break core.openai_tool_names, while a change to core.openai_tool_names can't break core.anthropic.models.
Position
Below the diagonal: core.openai_tool_names uses a module listed above it, which is the healthy direction.
messaging.trees.snapshot uses messaging.models, so a change to messaging.models can break messaging.trees.snapshot, while a change to messaging.trees.snapshot can't break messaging.models.
Position
Below the diagonal: messaging.trees.snapshot uses a module listed above it, which is the healthy direction.
messaging.trees.transitions uses messaging.models, so a change to messaging.models can break messaging.trees.transitions, while a change to messaging.trees.transitions can't break messaging.models.
Position
Below the diagonal: messaging.trees.transitions uses a module listed above it, which is the healthy direction.
providers.openai_chat.profiles uses core.anthropic.models, so a change to core.anthropic.models can break providers.openai_chat.profiles, while a change to providers.openai_chat.profiles can't break core.anthropic.models.
Position
Below the diagonal: providers.openai_chat.profiles uses a module listed above it, which is the healthy direction.
providers.openai_chat.profiles uses core.reasoning, so a change to core.reasoning can break providers.openai_chat.profiles, while a change to providers.openai_chat.profiles can't break core.reasoning.
Position
Below the diagonal: providers.openai_chat.profiles uses a module listed above it, which is the healthy direction.
providers.openai_chat.stream_output uses core.failures, so a change to core.failures can break providers.openai_chat.stream_output, while a change to providers.openai_chat.stream_output can't break core.failures.
Position
Below the diagonal: providers.openai_chat.stream_output uses a module listed above it, which is the healthy direction.
application.ports uses config.settings, so a change to config.settings can break application.ports, while a change to application.ports can't break config.settings.
Position
Below the diagonal: application.ports uses a module listed above it, which is the healthy direction.
application.ports uses core.anthropic.models, so a change to core.anthropic.models can break application.ports, while a change to application.ports can't break core.anthropic.models.
Position
Below the diagonal: application.ports uses a module listed above it, which is the healthy direction.
application.ports uses core.chat_completions.request, so a change to core.chat_completions.request can break application.ports, while a change to application.ports can't break core.chat_completions.request.
Position
Below the diagonal: application.ports uses a module listed above it, which is the healthy direction.
application.ports uses core.openai_responses.models, so a change to core.openai_responses.models can break application.ports, while a change to application.ports can't break core.openai_responses.models.
Position
Below the diagonal: application.ports uses a module listed above it, which is the healthy direction.
application.ports uses core.reasoning, so a change to core.reasoning can break application.ports, while a change to application.ports can't break core.reasoning.
Position
Below the diagonal: application.ports uses a module listed above it, which is the healthy direction.
application.ports uses core.gemini.models, so a change to core.gemini.models can break application.ports, while a change to application.ports can't break core.gemini.models.
Position
Below the diagonal: application.ports uses a module listed above it, which is the healthy direction.
application.routing uses config.settings, so a change to config.settings can break application.routing, while a change to application.routing can't break config.settings.
Position
Below the diagonal: application.routing uses a module listed above it, which is the healthy direction.
application.routing uses core.anthropic.models, so a change to core.anthropic.models can break application.routing, while a change to application.routing can't break core.anthropic.models.
Position
Below the diagonal: application.routing uses a module listed above it, which is the healthy direction.
application.routing uses core.chat_completions.request, so a change to core.chat_completions.request can break application.routing, while a change to application.routing can't break core.chat_completions.request.
Position
Below the diagonal: application.routing uses a module listed above it, which is the healthy direction.
application.routing uses core.openai_responses.models, so a change to core.openai_responses.models can break application.routing, while a change to application.routing can't break core.openai_responses.models.
Position
Below the diagonal: application.routing uses a module listed above it, which is the healthy direction.
application.routing uses core.reasoning, so a change to core.reasoning can break application.routing, while a change to application.routing can't break core.reasoning.
Position
Below the diagonal: application.routing uses a module listed above it, which is the healthy direction.
application.routing uses core.gemini.models, so a change to core.gemini.models can break application.routing, while a change to application.routing can't break core.gemini.models.
Position
Below the diagonal: application.routing uses a module listed above it, which is the healthy direction.
core.gemini uses core.anthropic.models, so a change to core.anthropic.models can break core.gemini, while a change to core.gemini can't break core.anthropic.models.
Position
Below the diagonal: core.gemini uses a module listed above it, which is the healthy direction.
core.gemini uses core.chat_completions.request, so a change to core.chat_completions.request can break core.gemini, while a change to core.gemini can't break core.chat_completions.request.
Position
Below the diagonal: core.gemini uses a module listed above it, which is the healthy direction.
core.gemini uses core.history_replay, so a change to core.history_replay can break core.gemini, while a change to core.gemini can't break core.history_replay.
Position
Below the diagonal: core.gemini uses a module listed above it, which is the healthy direction.
core.gemini uses core.openai_responses.models, so a change to core.openai_responses.models can break core.gemini, while a change to core.gemini can't break core.openai_responses.models.
Position
Below the diagonal: core.gemini uses a module listed above it, which is the healthy direction.
core.gemini uses core.gemini.models, so a change to core.gemini.models can break core.gemini, while a change to core.gemini can't break core.gemini.models.
Position
Below the diagonal: core.gemini uses a module listed above it, which is the healthy direction.
core.openai_responses uses core.anthropic.models, so a change to core.anthropic.models can break core.openai_responses, while a change to core.openai_responses can't break core.anthropic.models.
Position
Below the diagonal: core.openai_responses uses a module listed above it, which is the healthy direction.
core.openai_responses uses core.failures, so a change to core.failures can break core.openai_responses, while a change to core.openai_responses can't break core.failures.
Position
Below the diagonal: core.openai_responses uses a module listed above it, which is the healthy direction.
core.openai_responses uses core.openai_responses.models, so a change to core.openai_responses.models can break core.openai_responses, while a change to core.openai_responses can't break core.openai_responses.models.
Position
Below the diagonal: core.openai_responses uses a module listed above it, which is the healthy direction.
core.openai_responses uses core.reasoning, so a change to core.reasoning can break core.openai_responses, while a change to core.openai_responses can't break core.reasoning.
Position
Below the diagonal: core.openai_responses uses a module listed above it, which is the healthy direction.
core.openai_responses uses core.openai_tool_names, so a change to core.openai_tool_names can break core.openai_responses, while a change to core.openai_responses can't break core.openai_tool_names.
Position
Below the diagonal: core.openai_responses uses a module listed above it, which is the healthy direction.
messaging.trees.runtime uses messaging.models, so a change to messaging.models can break messaging.trees.runtime, while a change to messaging.trees.runtime can't break messaging.models.
Position
Below the diagonal: messaging.trees.runtime uses a module listed above it, which is the healthy direction.
messaging.trees.runtime uses messaging.trees.snapshot, so a change to messaging.trees.snapshot can break messaging.trees.runtime, while a change to messaging.trees.runtime can't break messaging.trees.snapshot.
Position
Below the diagonal: messaging.trees.runtime uses a module listed above it, which is the healthy direction.
messaging.trees.runtime uses messaging.trees.transitions, so a change to messaging.trees.transitions can break messaging.trees.runtime, while a change to messaging.trees.runtime can't break messaging.trees.transitions.
Position
Below the diagonal: messaging.trees.runtime uses a module listed above it, which is the healthy direction.
providers.anthropic_messages.transport uses core.anthropic.models, so a change to core.anthropic.models can break providers.anthropic_messages.transport, while a change to providers.anthropic_messages.transport can't break core.anthropic.models.
Position
Below the diagonal: providers.anthropic_messages.transport uses a module listed above it, which is the healthy direction.
providers.anthropic_messages.transport uses core.chat_completions.request, so a change to core.chat_completions.request can break providers.anthropic_messages.transport, while a change to providers.anthropic_messages.transport can't break core.chat_completions.request.
Position
Below the diagonal: providers.anthropic_messages.transport uses a module listed above it, which is the healthy direction.
providers.anthropic_messages.transport uses core.openai_responses.models, so a change to core.openai_responses.models can break providers.anthropic_messages.transport, while a change to providers.anthropic_messages.transport can't break core.openai_responses.models.
Position
Below the diagonal: providers.anthropic_messages.transport uses a module listed above it, which is the healthy direction.
providers.anthropic_messages.transport uses core.reasoning, so a change to core.reasoning can break providers.anthropic_messages.transport, while a change to providers.anthropic_messages.transport can't break core.reasoning.
Position
Below the diagonal: providers.anthropic_messages.transport uses a module listed above it, which is the healthy direction.
providers.anthropic_messages.transport uses providers.endpoint_types, so a change to providers.endpoint_types can break providers.anthropic_messages.transport, while a change to providers.anthropic_messages.transport can't break providers.endpoint_types.
Position
Below the diagonal: providers.anthropic_messages.transport uses a module listed above it, which is the healthy direction.
providers.anthropic_messages.transport uses core.gemini.models, so a change to core.gemini.models can break providers.anthropic_messages.transport, while a change to providers.anthropic_messages.transport can't break core.gemini.models.
Position
Below the diagonal: providers.anthropic_messages.transport uses a module listed above it, which is the healthy direction.
providers.base uses core.anthropic.models, so a change to core.anthropic.models can break providers.base, while a change to providers.base can't break core.anthropic.models.
Position
Below the diagonal: providers.base uses a module listed above it, which is the healthy direction.
providers.base uses core.chat_completions.request, so a change to core.chat_completions.request can break providers.base, while a change to providers.base can't break core.chat_completions.request.
Position
Below the diagonal: providers.base uses a module listed above it, which is the healthy direction.
providers.base uses core.openai_responses.models, so a change to core.openai_responses.models can break providers.base, while a change to providers.base can't break core.openai_responses.models.
Position
Below the diagonal: providers.base uses a module listed above it, which is the healthy direction.
providers.base uses core.reasoning, so a change to core.reasoning can break providers.base, while a change to providers.base can't break core.reasoning.
Position
Below the diagonal: providers.base uses a module listed above it, which is the healthy direction.
providers.base uses core.gemini.models, so a change to core.gemini.models can break providers.base, while a change to providers.base can't break core.gemini.models.
Position
Below the diagonal: providers.base uses a module listed above it, which is the healthy direction.
providers.openai_chat.behavior uses core.anthropic.models, so a change to core.anthropic.models can break providers.openai_chat.behavior, while a change to providers.openai_chat.behavior can't break core.anthropic.models.
Position
Below the diagonal: providers.openai_chat.behavior uses a module listed above it, which is the healthy direction.
providers.openai_chat.behavior uses core.history_replay, so a change to core.history_replay can break providers.openai_chat.behavior, while a change to providers.openai_chat.behavior can't break core.history_replay.
Position
Below the diagonal: providers.openai_chat.behavior uses a module listed above it, which is the healthy direction.
providers.openai_chat.behavior uses core.reasoning, so a change to core.reasoning can break providers.openai_chat.behavior, while a change to providers.openai_chat.behavior can't break core.reasoning.
Position
Below the diagonal: providers.openai_chat.behavior uses a module listed above it, which is the healthy direction.
providers.openai_chat.behavior uses providers.openai_chat.profiles, so a change to providers.openai_chat.profiles can break providers.openai_chat.behavior, while a change to providers.openai_chat.behavior can't break providers.openai_chat.profiles.
Position
Below the diagonal: providers.openai_chat.behavior uses a module listed above it, which is the healthy direction.
providers.openai_chat.behavior uses providers.openai_chat.stream_output, so a change to providers.openai_chat.stream_output can break providers.openai_chat.behavior, while a change to providers.openai_chat.behavior can't break providers.openai_chat.stream_output.
Position
Below the diagonal: providers.openai_chat.behavior uses a module listed above it, which is the healthy direction.
providers.openai_responses.transport uses core.anthropic.models, so a change to core.anthropic.models can break providers.openai_responses.transport, while a change to providers.openai_responses.transport can't break core.anthropic.models.
Position
Below the diagonal: providers.openai_responses.transport uses a module listed above it, which is the healthy direction.
providers.openai_responses.transport uses core.chat_completions.request, so a change to core.chat_completions.request can break providers.openai_responses.transport, while a change to providers.openai_responses.transport can't break core.chat_completions.request.
Position
Below the diagonal: providers.openai_responses.transport uses a module listed above it, which is the healthy direction.
providers.openai_responses.transport uses core.openai_responses.models, so a change to core.openai_responses.models can break providers.openai_responses.transport, while a change to providers.openai_responses.transport can't break core.openai_responses.models.
Position
Below the diagonal: providers.openai_responses.transport uses a module listed above it, which is the healthy direction.
providers.openai_responses.transport uses core.reasoning, so a change to core.reasoning can break providers.openai_responses.transport, while a change to providers.openai_responses.transport can't break core.reasoning.
Position
Below the diagonal: providers.openai_responses.transport uses a module listed above it, which is the healthy direction.
providers.openai_responses.transport uses core.gemini.models, so a change to core.gemini.models can break providers.openai_responses.transport, while a change to providers.openai_responses.transport can't break core.gemini.models.
Position
Below the diagonal: providers.openai_responses.transport uses a module listed above it, which is the healthy direction.
api uses application.code_sessions.models, so a change to application.code_sessions.models can break api, while a change to api can't break application.code_sessions.models.
Position
Below the diagonal: api uses a module listed above it, which is the healthy direction.
api uses core.chat_completions.request, so a change to core.chat_completions.request can break api, while a change to api can't break core.chat_completions.request.
Position
Below the diagonal: api uses a module listed above it, which is the healthy direction.
api uses core.openai_responses.models, so a change to core.openai_responses.models can break api, while a change to api can't break core.openai_responses.models.
Position
Below the diagonal: api uses a module listed above it, which is the healthy direction.
application uses core.anthropic.models, so a change to core.anthropic.models can break application, while a change to application can't break core.anthropic.models.
Position
Below the diagonal: application uses a module listed above it, which is the healthy direction.
application uses core.chat_completions.request, so a change to core.chat_completions.request can break application, while a change to application can't break core.chat_completions.request.
Position
Below the diagonal: application uses a module listed above it, which is the healthy direction.
application uses core.openai_responses.models, so a change to core.openai_responses.models can break application, while a change to application can't break core.openai_responses.models.
Position
Below the diagonal: application uses a module listed above it, which is the healthy direction.
application uses core.gemini.models, so a change to core.gemini.models can break application, while a change to application can't break core.gemini.models.
Position
Below the diagonal: application uses a module listed above it, which is the healthy direction.
application uses application.ports, so a change to application.ports can break application, while a change to application can't break application.ports.
Position
Below the diagonal: application uses a module listed above it, which is the healthy direction.
messaging.trees.manager uses messaging.models, so a change to messaging.models can break messaging.trees.manager, while a change to messaging.trees.manager can't break messaging.models.
Position
Below the diagonal: messaging.trees.manager uses a module listed above it, which is the healthy direction.
messaging.trees.manager uses messaging.trees.snapshot, so a change to messaging.trees.snapshot can break messaging.trees.manager, while a change to messaging.trees.manager can't break messaging.trees.snapshot.
Position
Below the diagonal: messaging.trees.manager uses a module listed above it, which is the healthy direction.
messaging.trees.manager uses messaging.trees.transitions, so a change to messaging.trees.transitions can break messaging.trees.manager, while a change to messaging.trees.manager can't break messaging.trees.transitions.
Position
Below the diagonal: messaging.trees.manager uses a module listed above it, which is the healthy direction.
messaging.trees.manager uses messaging.trees.runtime, so a change to messaging.trees.runtime can break messaging.trees.manager, while a change to messaging.trees.manager can't break messaging.trees.runtime.
Position
Below the diagonal: messaging.trees.manager uses a module listed above it, which is the healthy direction.
providers.anthropic.provider uses core.anthropic.models, so a change to core.anthropic.models can break providers.anthropic.provider, while a change to providers.anthropic.provider can't break core.anthropic.models.
Position
Below the diagonal: providers.anthropic.provider uses a module listed above it, which is the healthy direction.
providers.anthropic.provider uses core.chat_completions.request, so a change to core.chat_completions.request can break providers.anthropic.provider, while a change to providers.anthropic.provider can't break core.chat_completions.request.
Position
Below the diagonal: providers.anthropic.provider uses a module listed above it, which is the healthy direction.
providers.anthropic.provider uses core.openai_responses.models, so a change to core.openai_responses.models can break providers.anthropic.provider, while a change to providers.anthropic.provider can't break core.openai_responses.models.
Position
Below the diagonal: providers.anthropic.provider uses a module listed above it, which is the healthy direction.
providers.anthropic.provider uses core.reasoning, so a change to core.reasoning can break providers.anthropic.provider, while a change to providers.anthropic.provider can't break core.reasoning.
Position
Below the diagonal: providers.anthropic.provider uses a module listed above it, which is the healthy direction.
providers.anthropic.provider uses providers.endpoint_types, so a change to providers.endpoint_types can break providers.anthropic.provider, while a change to providers.anthropic.provider can't break providers.endpoint_types.
Position
Below the diagonal: providers.anthropic.provider uses a module listed above it, which is the healthy direction.
providers.anthropic.provider uses core.gemini.models, so a change to core.gemini.models can break providers.anthropic.provider, while a change to providers.anthropic.provider can't break core.gemini.models.
Position
Below the diagonal: providers.anthropic.provider uses a module listed above it, which is the healthy direction.
providers.anthropic.provider uses providers.anthropic_messages.transport, so a change to providers.anthropic_messages.transport can break providers.anthropic.provider, while a change to providers.anthropic.provider can't break providers.anthropic_messages.transport.
Position
Below the diagonal: providers.anthropic.provider uses a module listed above it, which is the healthy direction.
providers.anthropic.provider uses providers.base, so a change to providers.base can break providers.anthropic.provider, while a change to providers.anthropic.provider can't break providers.base.
Position
Below the diagonal: providers.anthropic.provider uses a module listed above it, which is the healthy direction.
providers.custom uses core.anthropic.models, so a change to core.anthropic.models can break providers.custom, while a change to providers.custom can't break core.anthropic.models.
Position
Below the diagonal: providers.custom uses a module listed above it, which is the healthy direction.
providers.custom uses core.chat_completions.request, so a change to core.chat_completions.request can break providers.custom, while a change to providers.custom can't break core.chat_completions.request.
Position
Below the diagonal: providers.custom uses a module listed above it, which is the healthy direction.
providers.custom uses core.openai_responses.models, so a change to core.openai_responses.models can break providers.custom, while a change to providers.custom can't break core.openai_responses.models.
Position
Below the diagonal: providers.custom uses a module listed above it, which is the healthy direction.
providers.custom uses core.reasoning, so a change to core.reasoning can break providers.custom, while a change to providers.custom can't break core.reasoning.
Position
Below the diagonal: providers.custom uses a module listed above it, which is the healthy direction.
providers.custom uses providers.endpoint_types, so a change to providers.endpoint_types can break providers.custom, while a change to providers.custom can't break providers.endpoint_types.
Position
Below the diagonal: providers.custom uses a module listed above it, which is the healthy direction.
providers.custom uses core.gemini.models, so a change to core.gemini.models can break providers.custom, while a change to providers.custom can't break core.gemini.models.
Position
Below the diagonal: providers.custom uses a module listed above it, which is the healthy direction.
providers.custom uses providers.base, so a change to providers.base can break providers.custom, while a change to providers.custom can't break providers.base.
Position
Below the diagonal: providers.custom uses a module listed above it, which is the healthy direction.
providers.openai_chat.provider uses core.anthropic.models, so a change to core.anthropic.models can break providers.openai_chat.provider, while a change to providers.openai_chat.provider can't break core.anthropic.models.
Position
Below the diagonal: providers.openai_chat.provider uses a module listed above it, which is the healthy direction.
providers.openai_chat.provider uses core.chat_completions.request, so a change to core.chat_completions.request can break providers.openai_chat.provider, while a change to providers.openai_chat.provider can't break core.chat_completions.request.
Position
Below the diagonal: providers.openai_chat.provider uses a module listed above it, which is the healthy direction.
providers.openai_chat.provider uses core.openai_responses.models, so a change to core.openai_responses.models can break providers.openai_chat.provider, while a change to providers.openai_chat.provider can't break core.openai_responses.models.
Position
Below the diagonal: providers.openai_chat.provider uses a module listed above it, which is the healthy direction.
providers.openai_chat.provider uses core.reasoning, so a change to core.reasoning can break providers.openai_chat.provider, while a change to providers.openai_chat.provider can't break core.reasoning.
Position
Below the diagonal: providers.openai_chat.provider uses a module listed above it, which is the healthy direction.
providers.openai_chat.provider uses core.gemini.models, so a change to core.gemini.models can break providers.openai_chat.provider, while a change to providers.openai_chat.provider can't break core.gemini.models.
Position
Below the diagonal: providers.openai_chat.provider uses a module listed above it, which is the healthy direction.
providers.openai_chat.provider uses providers.base, so a change to providers.base can break providers.openai_chat.provider, while a change to providers.openai_chat.provider can't break providers.base.
Position
Below the diagonal: providers.openai_chat.provider uses a module listed above it, which is the healthy direction.
providers.openai_chat.transport uses core.anthropic.models, so a change to core.anthropic.models can break providers.openai_chat.transport, while a change to providers.openai_chat.transport can't break core.anthropic.models.
Position
Below the diagonal: providers.openai_chat.transport uses a module listed above it, which is the healthy direction.
providers.openai_chat.transport uses core.chat_completions.request, so a change to core.chat_completions.request can break providers.openai_chat.transport, while a change to providers.openai_chat.transport can't break core.chat_completions.request.
Position
Below the diagonal: providers.openai_chat.transport uses a module listed above it, which is the healthy direction.
providers.openai_chat.transport uses core.openai_responses.models, so a change to core.openai_responses.models can break providers.openai_chat.transport, while a change to providers.openai_chat.transport can't break core.openai_responses.models.
Position
Below the diagonal: providers.openai_chat.transport uses a module listed above it, which is the healthy direction.
providers.openai_chat.transport uses core.reasoning, so a change to core.reasoning can break providers.openai_chat.transport, while a change to providers.openai_chat.transport can't break core.reasoning.
Position
Below the diagonal: providers.openai_chat.transport uses a module listed above it, which is the healthy direction.
providers.openai_chat.transport uses core.gemini.models, so a change to core.gemini.models can break providers.openai_chat.transport, while a change to providers.openai_chat.transport can't break core.gemini.models.
Position
Below the diagonal: providers.openai_chat.transport uses a module listed above it, which is the healthy direction.
providers.openai_chat.transport uses core.openai_tool_names, so a change to core.openai_tool_names can break providers.openai_chat.transport, while a change to providers.openai_chat.transport can't break core.openai_tool_names.
Position
Below the diagonal: providers.openai_chat.transport uses a module listed above it, which is the healthy direction.
providers.openai_chat.transport uses providers.openai_chat.profiles, so a change to providers.openai_chat.profiles can break providers.openai_chat.transport, while a change to providers.openai_chat.transport can't break providers.openai_chat.profiles.
Position
Below the diagonal: providers.openai_chat.transport uses a module listed above it, which is the healthy direction.
providers.openai_chat.transport uses providers.openai_chat.stream_output, so a change to providers.openai_chat.stream_output can break providers.openai_chat.transport, while a change to providers.openai_chat.transport can't break providers.openai_chat.stream_output.
Position
Below the diagonal: providers.openai_chat.transport uses a module listed above it, which is the healthy direction.
providers.openai_chat.transport uses providers.openai_chat.behavior, so a change to providers.openai_chat.behavior can break providers.openai_chat.transport, while a change to providers.openai_chat.transport can't break providers.openai_chat.behavior.
Position
Below the diagonal: providers.openai_chat.transport uses a module listed above it, which is the healthy direction.
providers.opencode.provider uses core.anthropic.models, so a change to core.anthropic.models can break providers.opencode.provider, while a change to providers.opencode.provider can't break core.anthropic.models.
Position
Below the diagonal: providers.opencode.provider uses a module listed above it, which is the healthy direction.
providers.opencode.provider uses core.chat_completions.request, so a change to core.chat_completions.request can break providers.opencode.provider, while a change to providers.opencode.provider can't break core.chat_completions.request.
Position
Below the diagonal: providers.opencode.provider uses a module listed above it, which is the healthy direction.
providers.opencode.provider uses core.openai_responses.models, so a change to core.openai_responses.models can break providers.opencode.provider, while a change to providers.opencode.provider can't break core.openai_responses.models.
Position
Below the diagonal: providers.opencode.provider uses a module listed above it, which is the healthy direction.
providers.opencode.provider uses core.reasoning, so a change to core.reasoning can break providers.opencode.provider, while a change to providers.opencode.provider can't break core.reasoning.
Position
Below the diagonal: providers.opencode.provider uses a module listed above it, which is the healthy direction.
providers.opencode.provider uses core.gemini.models, so a change to core.gemini.models can break providers.opencode.provider, while a change to providers.opencode.provider can't break core.gemini.models.
Position
Below the diagonal: providers.opencode.provider uses a module listed above it, which is the healthy direction.
providers.opencode.provider uses providers.openai_chat.profiles, so a change to providers.openai_chat.profiles can break providers.opencode.provider, while a change to providers.opencode.provider can't break providers.openai_chat.profiles.
Position
Below the diagonal: providers.opencode.provider uses a module listed above it, which is the healthy direction.
providers.opencode.provider uses providers.base, so a change to providers.base can break providers.opencode.provider, while a change to providers.opencode.provider can't break providers.base.
Position
Below the diagonal: providers.opencode.provider uses a module listed above it, which is the healthy direction.
runtime.provider_manager uses config.settings, so a change to config.settings can break runtime.provider_manager, while a change to runtime.provider_manager can't break config.settings.
Position
Below the diagonal: runtime.provider_manager uses a module listed above it, which is the healthy direction.
runtime.provider_manager uses application.model_metadata, so a change to application.model_metadata can break runtime.provider_manager, while a change to runtime.provider_manager can't break application.model_metadata.
Position
Below the diagonal: runtime.provider_manager uses a module listed above it, which is the healthy direction.
runtime.provider_manager uses application.ports, so a change to application.ports can break runtime.provider_manager, while a change to runtime.provider_manager can't break application.ports.
Position
Below the diagonal: runtime.provider_manager uses a module listed above it, which is the healthy direction.
runtime.provider_manager uses providers.base, so a change to providers.base can break runtime.provider_manager, while a change to runtime.provider_manager can't break providers.base.
Position
Below the diagonal: runtime.provider_manager uses a module listed above it, which is the healthy direction.
messaging.workflow uses messaging.models, so a change to messaging.models can break messaging.workflow, while a change to messaging.workflow can't break messaging.models.
Position
Below the diagonal: messaging.workflow uses a module listed above it, which is the healthy direction.
messaging.workflow uses messaging.trees.transitions, so a change to messaging.trees.transitions can break messaging.workflow, while a change to messaging.workflow can't break messaging.trees.transitions.
Position
Below the diagonal: messaging.workflow uses a module listed above it, which is the healthy direction.
messaging.workflow uses messaging.trees.manager, so a change to messaging.trees.manager can break messaging.workflow, while a change to messaging.workflow can't break messaging.trees.manager.
Position
Below the diagonal: messaging.workflow uses a module listed above it, which is the healthy direction.
providers uses core.anthropic.models, so a change to core.anthropic.models can break providers, while a change to providers can't break core.anthropic.models.
Position
Below the diagonal: providers uses a module listed above it, which is the healthy direction.
providers uses core.history_replay, so a change to core.history_replay can break providers, while a change to providers can't break core.history_replay.
Position
Below the diagonal: providers uses a module listed above it, which is the healthy direction.
providers uses providers.openai_chat.provider, so a change to providers.openai_chat.provider can break providers, while a change to providers can't break providers.openai_chat.provider.
Position
Below the diagonal: providers uses a module listed above it, which is the healthy direction.
providers.github_copilot.provider uses core.anthropic.models, so a change to core.anthropic.models can break providers.github_copilot.provider, while a change to providers.github_copilot.provider can't break core.anthropic.models.
Position
Below the diagonal: providers.github_copilot.provider uses a module listed above it, which is the healthy direction.
providers.github_copilot.provider uses core.chat_completions.request, so a change to core.chat_completions.request can break providers.github_copilot.provider, while a change to providers.github_copilot.provider can't break core.chat_completions.request.
Position
Below the diagonal: providers.github_copilot.provider uses a module listed above it, which is the healthy direction.
providers.github_copilot.provider uses core.openai_responses.models, so a change to core.openai_responses.models can break providers.github_copilot.provider, while a change to providers.github_copilot.provider can't break core.openai_responses.models.
Position
Below the diagonal: providers.github_copilot.provider uses a module listed above it, which is the healthy direction.
providers.github_copilot.provider uses core.reasoning, so a change to core.reasoning can break providers.github_copilot.provider, while a change to providers.github_copilot.provider can't break core.reasoning.
Position
Below the diagonal: providers.github_copilot.provider uses a module listed above it, which is the healthy direction.
providers.github_copilot.provider uses providers.endpoint_types, so a change to providers.endpoint_types can break providers.github_copilot.provider, while a change to providers.github_copilot.provider can't break providers.endpoint_types.
Position
Below the diagonal: providers.github_copilot.provider uses a module listed above it, which is the healthy direction.
providers.github_copilot.provider uses core.gemini.models, so a change to core.gemini.models can break providers.github_copilot.provider, while a change to providers.github_copilot.provider can't break core.gemini.models.
Position
Below the diagonal: providers.github_copilot.provider uses a module listed above it, which is the healthy direction.
providers.github_copilot.provider uses providers.base, so a change to providers.base can break providers.github_copilot.provider, while a change to providers.github_copilot.provider can't break providers.base.
Position
Below the diagonal: providers.github_copilot.provider uses a module listed above it, which is the healthy direction.
providers.github_copilot.provider uses providers.openai_chat.transport, so a change to providers.openai_chat.transport can break providers.github_copilot.provider, while a change to providers.github_copilot.provider can't break providers.openai_chat.transport.
Position
Below the diagonal: providers.github_copilot.provider uses a module listed above it, which is the healthy direction.
providers.google_openai.provider uses core.history_replay, so a change to core.history_replay can break providers.google_openai.provider, while a change to providers.google_openai.provider can't break core.history_replay.
Position
Below the diagonal: providers.google_openai.provider uses a module listed above it, which is the healthy direction.
providers.google_openai.provider uses core.reasoning, so a change to core.reasoning can break providers.google_openai.provider, while a change to providers.google_openai.provider can't break core.reasoning.
Position
Below the diagonal: providers.google_openai.provider uses a module listed above it, which is the healthy direction.
providers.google_openai.provider uses providers.openai_chat.profiles, so a change to providers.openai_chat.profiles can break providers.google_openai.provider, while a change to providers.google_openai.provider can't break providers.openai_chat.profiles.
Position
Below the diagonal: providers.google_openai.provider uses a module listed above it, which is the healthy direction.
providers.google_openai.provider uses providers.openai_chat.stream_output, so a change to providers.openai_chat.stream_output can break providers.google_openai.provider, while a change to providers.google_openai.provider can't break providers.openai_chat.stream_output.
Position
Below the diagonal: providers.google_openai.provider uses a module listed above it, which is the healthy direction.
providers.google_openai.provider uses providers.base, so a change to providers.base can break providers.google_openai.provider, while a change to providers.google_openai.provider can't break providers.base.
Position
Below the diagonal: providers.google_openai.provider uses a module listed above it, which is the healthy direction.
providers.google_openai.provider uses providers.openai_chat.behavior, so a change to providers.openai_chat.behavior can break providers.google_openai.provider, while a change to providers.google_openai.provider can't break providers.openai_chat.behavior.
Position
Below the diagonal: providers.google_openai.provider uses a module listed above it, which is the healthy direction.
providers.google_openai.provider uses providers.openai_chat.provider, so a change to providers.openai_chat.provider can break providers.google_openai.provider, while a change to providers.google_openai.provider can't break providers.openai_chat.provider.
Position
Below the diagonal: providers.google_openai.provider uses a module listed above it, which is the healthy direction.
At a glance — Code Health · 30% · Weak · gated by D2, R1, R2, R3, X5 ·
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
A03:2025 — Software Supply Chain Failures
16
High / Critical
A05:2025 — Injection
14
High / Critical
Roadmap
Top priorities: Split each oversized file along the responsibilities already in it, into smaller focused modules in the same package; Resolve the 1 finding(s) in Type Safety; 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 `?`).
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.
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 `?`).
Automate the release in CI — a deploy stage for a service (Helm/Kubernetes manifests or an equivalent rollout), or a tag-triggered publish job for an artifact — so releases are repeatable and reversible.
Bring the 31 bodies over 60 down to 60 or less in Cognitive Complexity — start with AnthropicMessagesTransport._run (cognitive 139), request._build (cognitive 137), OpenAIResponsesTransport._run_execution (cognitive 129).
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 — 23
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 — 686
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 — 53
Recorded, with no effect on how the codebase functions.
Present so the survey is complete, not because it needs doing.
Could not be resolved — 17
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, 751 of 762 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.
D8 Code Coverage — 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. Coverage NOT MEASURED: test source is present (.py) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo.
D11 Test Reliability — 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. Test source is present (.py) and this repository declares a Python test suite (repository root, 529 test files), but it was not re-run: its dependency install failed (pip exit 1: Package 'free-claude-code' requires a different Python: 3.12.3 not in '==3.14.10'), so its suite was not run against dependencies it does not declare. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
D12 Dependency Hygiene — 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. This repository's 3 shipped Python distribution(s) across 1 manifest(s) WERE read; what went unanswered is the currency half, because it grades an EXACT pin against the newest release and every declaration here is a floor or a range — which installs the newest release it admits and so cannot be behind one. So pypi.org was never asked. This is a true statement about the repository, and the healthy one, NOT a gap on our side: no reader we could write would find a currency question here.
D16 Bus Factor — 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. Single-maintainer repository — bus factor is not applicable (54 contributor(s) across 1250 commit(s) sampled, automation and bot accounts excluded). One of them holds 89% of the history; the other 53 hold 0.2% each on average, below the 5% at which there is somebody to hand the work to. That is a single maintainer with drive-by contributors, not a team whose knowledge has concentrated — so the bus factor is not applicable and there is nothing here for the owner to act on.
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.
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 — 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. 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.
D26 Project Cohesion — 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. `(repository root)` (82520 LoC, 904 module-visible types across 56 directories) is over its size bounds, and whether one unit is a coherent whole or a grab-bag is read from its type references: the parts of it that reach the rest only through its shared core. Those are read over the C#/VB code model, which this unit's source did not supply. Its size alone is no verdict on its cohesion, so none is published.
D32 Data Compliance (PII/GDPR) — 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. `e2e/code_support.py`, `smoke/lib/dsh_provider.py`, `src/free_claude_code/api/generation_paths.py`, `src/free_claude_code/application/code_sessions/models.py`, `src/free_claude_code/application/code_sessions/ports.py`, … (+47 more) produced a parse error, so every rule in this engine's `gdpr.yml` was absent there. That absence is NOT a clean result: these rules detect personal data crossing a boundary into a log sink, a URL or browser storage, and a file that was never parsed cannot report any of the three. The rest of the tree analysed normally and its rows above stand; only these files are unaccounted for. You can widen what we reach: fix the syntax error (or exclude the file deliberately) and re-scan to cover it.
AXB1 Runtime evidence locked — no reproducible boot — 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. Subject: 3 markup document(s) — HTML, Razor, JSX, Vue, Svelte or server templates. The Runtime Evidence tier boots an app only via docker-compose, an Aspire AppHost, a Dockerfile, an npm dev script, a web service's own toolchain entry point (cargo, go, dotnet, Python, Spring Boot), or an Android app's own Gradle wrapper (run on an emulator); an Apple or Flutter app needs a host it lacks. None applied, so no live runtime a11y/egress/header evidence was collected. You can widen what we reach: add a docker-compose.yml (or an Aspire AppHost) that brings the app up with its dependencies. We then boot it in an isolated sandbox and gathers real runtime evidence — you change nothing in your pipeline (no CI step, no SDK).
C1 Data Protection — 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. These personal data controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks personal data controls.
C3 Audit Trail — 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. 'sqlite3' is imported (src/free_claude_code/runtime/code_sessions_sqlite.py:5), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
C4 Data Retention — 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. 'sqlite3' is imported (src/free_claude_code/runtime/code_sessions_sqlite.py:5), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
C5 Data-Subject Rights — 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. 'sqlite3' is imported (src/free_claude_code/runtime/code_sessions_sqlite.py:5), but no entity, schema, table or model declaration this check reads was found beside it, so whether personal data is stored could not be decided.
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 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 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.
P8 Schema migrations — 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. The schema may be created by a runner, a deploy script or a config file outside what this check reads, so an absence here is our blind spot rather than a missing migration strategy. The card abstains instead of scoring. You can widen what we reach: if the schema is created and evolved by a tool this check does not name, naming it lets us teach the detector to read it.
S1 Web-Security Posture — 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. These web-security controls are read from declarative annotations, request middleware, entity/column names and guard methods in a C# source model, and none was loaded on this run, so there was nothing to gather. That is a gap in this analyzer's language reach — not a finding that the repository lacks web-security controls.
X10 Duplicated predicate — 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. 8 further occurrence(s) are not listed individually; the score already reflects all 48.
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.
X4 Structured logging — 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, and JavaScript/TypeScript, Java, Kotlin, Python, PHP, Dart, Ruby, Scala and Rust source only, and no C# was loaded, and this repository's JavaScript/TypeScript, Python and PHP log through no library that carries a message's values as fields (pino, winston, bunyan, tslog, LogTape, roarr; Python's logging, structlog; PHP's PSR-3 loggers), so its log calls cannot be judged, 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.
Repo exclusion declarations: 1 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.
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.
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.
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.
D27 Navigability: Indirection/navigability is structural — it measures hops to follow a call, not whether that indirection buys real flexibility or just ceremony.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D30 Dependency Vulnerabilities: CVE matching depends on accurate package/version metadata and on the advisory databases — a vulnerability with no published advisory, or in code not declared as a dependency, is not seen. Coverage needs a RESOLVED graph: an unpinned requirements.txt, or a pom without a resolved build, yields partial coverage rather than a clean verdict. An ecosystem the analyzer cannot scan is reported as unmeasured, never as clean.
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
D43 Malicious Dependencies: Only packages some vulnerability database has already NAMED as malicious are seen — a compromise published in the last hours, or never reported at all, is invisible here, and this dimension reading 10 is not evidence that a dependency is trustworthy. There is no typosquat or dependency-confusion analysis: a package nobody has reported is simply absent from the feeds. Coverage is the dependency scan's: an ecosystem that could not be scanned is disclosed as unmeasured, never as clean.
D44 Platform End-of-Life: The support table is FROZEN, so it goes out of date by losing RECALL: a release that ended support after the table was written is missed until the table is refreshed, and this dimension reading 10 is not evidence that a platform is current. Only platforms the repository DECLARES in a place this pass reads are seen — a runtime named only in a Dockerfile (D31's subject), in a CI workflow (D29's), or in a file this pass does not parse (go.mod, a Gemfile ruby directive) is invisible here, which is why a repository declaring none of them abstains rather than scoring. Only frameworks with a PUBLISHED support policy are tracked: React, Flask and Express publish none, so their age cannot be judged and their absence from a report is not a statement that they are supported.
AC1 Text alternatives: Alt-text is detected structurally — the scan sees that an alternative EXISTS, not whether it meaningfully describes the image, and decorative-vs-missing is judged by attribute shape; runtime-injected images and a non-role=img decorative svg are out of scope. This is accessibility readiness, never a WCAG conformance claim.
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.
AC5 ARIA correctness: ARIA correctness is checked against the static role/attribute shape — roles/attributes set dynamically aren't seen, a valid role says nothing about whether it matches the element's real behaviour, and required-state checks are suppressed when a JSX spread could supply them. The two-branch toggle check (a control whose state is conveyed only by which of two mutually exclusive branches renders) reads CONDITIONALS THAT ARE ATTRIBUTES — Vue v-if/v-else/v-show and Alpine x-if/x-show — so the same toggle written as a Svelte {#if} block or a JSX ternary is control flow the markup model never projects as a branch and is not seen at all.
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.
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.
+ 159 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 2 bodies over 60 down to 60 or less in Cyclomatic Complexity — start with admin.apply (cyclomatic 65), request_policy.resolve_messages_options (cyclomatic 63). — 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 2 together lifts Cyclomatic Complexity from 5.0 to about 5.2/10, projected with the scoring formula itself and assuming each lands exactly at 60; a cleaner split scores higher.
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.
+ 250 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Bring the 31 bodies over 60 down to 60 or less in Cognitive Complexity — start with AnthropicMessagesTransport._run (cognitive 139), request._build (cognitive 137), OpenAIResponsesTransport._run_execution (cognitive 129). — 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 31 together lifts Cognitive Complexity from 2.0 to about 3.8/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.1 / 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.
Resolve the 30 FileTooLong finding(s) in God Classes — start with transport.py (3), admin.js, code_sessions.js. — One of this dimension's main actionable groups (30 warning-level).
Resolve the 8 TooManyMethods finding(s) in God Classes — start with application.py, integration_service.py, state.py. — One of this dimension's main actionable groups (8 warning-level).
Resolve the 2 FunctionTooLong finding(s) in God Classes — start with code_sessions.js (2). — One of this dimension's main actionable groups (2 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.
35 duplicated block group(s) detected. 3.0 % of the production lines (2,349 of 77,506) are in a reported copy. A further 48 rows report members as variants of one another; the share counts each copied line once, however many rows cite it.
Edited copy of a member (10 corresponding lines) · ×5src/free_claude_code/core/chat_completions/responses_stream.py:30
Edited copy of a member (9 corresponding lines) · ×5src/free_claude_code/core/chat_completions/request.py:255
Edited copy of a member (16 corresponding lines) · ×3smoke/lib/e2e.py:126
Edited copy of a member (13 corresponding lines) · ×3src/free_claude_code/messaging/trees/runtime.py:390
+ 44 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 5 Edited copy of a member (10 corresponding lines) finding(s) in Code Duplication — start with responses_stream.py, conversion.py, failure_policy.py. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 5 Edited copy of a member (9 corresponding lines) finding(s) in Code Duplication — start with client.py (3), request.py, provider.py. — One of this dimension's main actionable groups (5 warning-level).
Resolve the 4 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with execution.py, buffer.py, client.py. — One of this dimension's main actionable groups (4 warning-level).
Detailed fixes: d4_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.
Resolve the 2 Low cohesion finding(s) in Cohesion (LCOM4) — start with e2e.py, ledger.py. — One of this dimension's main actionable groups (2 warning-level).
Detailed fixes: d6_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.
Secret scan ran and found no leaked secrets. 1 detection(s) were excluded as holding no minted credential in material that runs: a name, reference or comparison rather than a value, a readable phrase or pattern, a value that declares itself fake, or development, test, example, mock or demo material.
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 13 shipped Python distribution(s) use a banned license. Licences were resolved from PyPI over the distributions a consumer installs — this repository's 3 declared runtime requirement(s) closed transitively over each distribution's published `requires_dist` (10 reached that way). Requirements it states ONLY under an extra, a PEP 735 dependency group, a Poetry dev group or a dev-named requirements file are excluded: pip does not install any of them for a consumer. ★ This repository commits no dependency lockfile that this pass reads, so each licence is the one PyPI publishes for the distribution's CURRENT release rather than for a pinned version. This repository publishes itself under AGPL-3.0-only, which is its own choice and is not judged here.
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 41 Hotspot finding(s) in Churn × Complexity Hotspots — start with transport.py (4), history_replay.py (2), request.py (2). — One of this dimension's main actionable groups (41 warning-level).
Detailed fixes: d15_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 77506 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. 4 document(s) read across 1 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: How far you must trace to follow a call — low indirection and co-located slices read easier.
Method: Call indirection (interface hops, cross-namespace calls, slice-locality scaled) over a sampled set of method invocations, size-aware baseline. Sampled; confidence discounted by symbol-resolution gaps. C# also names each pass-through layer (a class whose every public method only forwards its own parameters to one collaborator) as a located finding; the score is not affected.
Coverage: Slice locality from the first namespace segments, SAMPLED (≤400 methods) — not exhaustive.
92 % of calls cross a namespace and 5 % go through an interface, but 99 % of collaborators are co-located — so a call's collaborators sit together and tracing stays easy. Baseline: small — navigation cost is tolerated.
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).
14 finding(s): 0 critical, 12 high, 2 medium, 0 low. semgrep hit a parse error in 54 file(s) — `e2e/code_support.py` (lines 13–24, lines 45–48), `scripts/install.sh` (line 1453), `smoke/lib/dsh_provider.py` (line 183), `src/free_claude_code/api/generation_paths.py` (line 5), `src/free_claude_code/application/code_sessions/models.py` (line 11, line 15), … (+49 more) — so no absence of findings in the named regions is evidence of anything; rows reported elsewhere in those files are real. Fix the syntax error (or exclude the file deliberately) and re-scan to cover them. Separately, one or more rules could not re-parse an embedded snippet in 1 file(s) (e.g. a workflow `run:` block read as shell). Those files WERE scanned and their other rows are unaffected; only those rules' view of those snippets is missing.
REDACTED
REDACTED
REDACTED
REDACTED
REDACTED
+ 1 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 9 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED (9). — One of this dimension's main actionable groups (9 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 1 REDACTED finding(s) in Static Analysis (SAST) — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
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.
Resolve the 9 High CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (9). — One of this dimension's main actionable groups (9 issue-level).
Resolve the 1 Critical vulnerability finding(s) in Dependency Vulnerabilities — start with REDACTED. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 3 Medium CVE finding(s) in Dependency Vulnerabilities — start with REDACTED (3). — One of this dimension's main actionable groups (3 warning-level).
Detailed fixes: d30_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.
1 of 295 significant source file(s) are orphaned — their living knowledge has decayed to nothing, so no one currently understands them. The largest is src/free_claude_code/messaging/rendering/discord_markdown.py. Counted over 295 of the 470 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 1 Boundary-crossing change coupling finding(s) in Change Coupling — start with config.py. — One of this dimension's main actionable groups (1 issue-level).
Resolve the 6 Change coupling finding(s) in Change Coupling — start with settings.py (2), capabilities.py, discord.py. — One of this dimension's main actionable groups (6 warning-level).
Resolve the 1 Change-coupling hub finding(s) in Change Coupling — start with provider_manifest.py. — 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.
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 1 platform declaration(s) and 3 dependency declaration(s). This dimension reads what the repository says about ITSELF — a pinned target framework, a version file, a capped requires-python, a Rust toolchain pin, a framework major a constraint cannot move off. A FLOOR is deliberately never charged: `requires-python = ">=3.8"` states what the package SUPPORTS, not what it runs on, and a well-maintained library declares exactly that while running its own CI on a current release. The end-of-life facts are FROZEN and dated, so this dimension needs no network and answers identically inside a closed scan fence; as the table ages it loses recall and never precision, because a statement about support that ended in the past cannot become false. The OS layer of a container image is D31's question and the toolchain a CI workflow installs is D29's; this row is neither.
✓ 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.
AC1 · Text alternatives10.0 / 10Exemplary○ Nothing flagged
Other · Accessibility — Whether non-text content carries a text alternative — img/area/input[type=image] have alt, a meaningful svg has a title or aria-label, video has a captions track, and object/embed/canvas have a name or fallback content. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: every img/area/input[type=image] checked for alt, svg[role=img] for a title/aria-label, video for a captions <track>. Components skipped, spreads suppressed. Deterministic, hard fact per element.
Coverage: Population: image/media elements — img, area, input[type=image], svg, video, object, embed, canvas — across the PARSED MARKUP files only (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx); components, hidden subtrees and dynamic-attribute elements are skipped. Markup built in script — tagged-template (html`…`) UIs and hyperscript DOM factories — is NOT read by any producer, so it contributes no element to this population; where such a frontend is present the card discloses it as an analyzer gap rather than scoring around it.
Do you agree with this assessment?
AC2 · Forms & labels10.0 / 10Exemplary○ Nothing flagged
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.
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.
An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative. — src/free_claude_code/api/admin_static/index.html:282
What to do
Declare <html lang>, a document <title> and a <main> landmark, keep headings in order, leave zoom enabled, title iframes and drop meta-refresh.
Other · Accessibility — Whether ARIA is used correctly — valid non-abstract roles, the ARIA state a role requires, valid (non-misspelled) aria-* attribute names, in-enum values for token-typed aria-* attributes, and no aria-hidden on (or wrapping) a focusable element. Static markup readiness, not a WCAG conformance claim.
Method: Static markup-model scan: role values checked against the WAI-ARIA role set (abstract/invalid flagged), required ARIA state for a role, and aria-hidden on a focusable element. Deterministic, role/attribute level.
Coverage: Population: elements in the PARSED MARKUP files (.html/.htm/.cshtml/.razor/.vue/.svelte/.jsx/.tsx) that carry a role or an aria-* attribute; roles and token values are checked against the ARIA enums exhaustively within that set. An expression-valued (dynamic) role or aria-* value is skipped rather than guessed, and 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.
`.session-composer textarea` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible. — src/free_claude_code/api/admin_static/session_layout.css:445
What to do
Keep a visible focus style (don't remove the outline without a replacement), guard animation with prefers-reduced-motion, and raise low-contrast colour pairs to at least 4.5:1.
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 singleton services avoid mutable shared instance state that concurrent callers would race on.
Method: Roslyn scan: singleton field mutations unguarded by lock or Interlocked, per type; syntax-based guard detection. Deterministic, traceable per field.
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 the codebase has a recognisable, scale-appropriate structure (a named architectural style, or modular enough for its size) rather than being an ad-hoc ball of mud.
Method: Roslyn plus csproj analysis: architecture style detection (DDD, clean, vertical-slice, CQRS) and structure fitness for repo size. Deterministic.
Other · Security — Whether access is authorized by default — a framework authorization attribute/decorator or policy, or imperative guard methods (throw-on-violation) called from handlers.
Method: Roslyn scan: [Authorize] usage and authorization policies, plus imperative throw-on-violation guard methods detected via syntax. Deterministic.
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.
What to do
Explain in the README how to run the tests. Add a section called Testing to the README in the repository's top folder, saying how to run the test suite.
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.
Do you agree with this assessment?
P1 · CI/CD gates8.0 / 10Strong✓ Tool-verified
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.
A CI pipeline exists but no build step was matched — changes may merge without the build ever running. A build step may be invoked directly as a command, or declared as a task that a runner named in the pipeline resolves.
What to do
Add an explicit build step to your CI pipeline — your stack's own build command, or, if the pipeline delegates to a task runner, a build task that runner executes in CI — so every change is built before merge.
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 · Observability8.0 / 10Strong✓ Tool-verified
Readiness · Readiness — Whether the code is diagnosable in production — structured logging, tracing/metrics, health checks.
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.
No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 4 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner. — .github/workflows/tests.yml:22
What to do
Add a SAST step to CI running what this repository's stack ships: bandit, `semgrep --config=p/python`, or CodeQL's python pack — so a security regression fails the build instead of landing.
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.
No release automation was found in CI — neither a deploy stage (Helm/Kubernetes/compose manifests, an orchestrated rollout) nor a publish job that ships the built artifact. Releases appear to be run by hand, which is slower, less repeatable and harder to reverse.
What to do
Automate the release in CI — a deploy stage for a service (Helm/Kubernetes manifests or an equivalent rollout), or a tag-triggered publish job for an artifact — so releases are repeatable and reversible.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
What to do
Keep a changelog (e.g. Keep-a-Changelog) recording what shipped in each release.
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.
`requests.Session(` 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. — src/free_claude_code/providers/vertex/auth.py:69
What to do
Pass `timeout=` on every `requests`/`httpx` call (requests has no default and will wait forever), mount an `HTTPAdapter(max_retries=Retry(...))` on shared sessions, and wrap calls to flaky dependencies in `tenacity` retries or a `pybreaker` circuit breaker.
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 Safety1.2 / 10Critical✓ 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.
1 typed · 7 plain JS — the untyped files are smoke/lib/dsh_desktop.cjs, src/free_claude_code/api/admin_static/admin.js, src/free_claude_code/api/admin_static/api_key_editor.js, src/free_claude_code/api/admin_static/code_sessions.js, src/free_claude_code/api/admin_static/form_controls.js, src/free_claude_code/api/admin_static/model_combobox.js (+1 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.
src/free_claude_code/api/admin_static/admin.js:2073 · src/free_claude_code/api/admin_static/admin.js:2279 · src/free_claude_code/api/admin_static/admin.js:2380 · src/free_claude_code/api/admin_static/admin.js:2477 — all 4 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/free_claude_code/api/admin_static/admin.js:2073
src/free_claude_code/api/admin_static/admin.js:2095 · src/free_claude_code/api/admin_static/admin.js:2201 · src/free_claude_code/api/admin_static/admin.js:2300 · src/free_claude_code/api/admin_static/admin.js:2402 · +2 more site(s) not listed — all 6 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/free_claude_code/api/admin_static/admin.js:2095
src/free_claude_code/api/admin_static/admin.js:2528 · src/free_claude_code/api/admin_static/admin.js:2648 — 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. — src/free_claude_code/api/admin_static/admin.js:2528
src/free_claude_code/api/admin_static/admin.js:2232 · src/free_claude_code/api/admin_static/admin.js:2334 · src/free_claude_code/api/admin_static/admin.js:2431 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/free_claude_code/api/admin_static/admin.js:2232
src/free_claude_code/api/admin_static/admin.js:1948 · src/free_claude_code/api/admin_static/admin.js:2099 · src/free_claude_code/api/admin_static/admin.js:2205 · src/free_claude_code/api/admin_static/admin.js:2304 · +4 more site(s) not listed — all 8 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. — src/free_claude_code/api/admin_static/admin.js:1948
src/free_claude_code/api/admin_static/admin.js:2179 · src/free_claude_code/api/admin_static/admin.js:2700 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/free_claude_code/api/admin_static/admin.js:2179
src/free_claude_code/api/admin_static/admin.js:2386 · src/free_claude_code/api/admin_static/admin.js:2584 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported. — src/free_claude_code/api/admin_static/admin.js:2386
smoke/lib/dsh_desktop.cjs:80 · smoke/lib/dsh_desktop.cjs:85 — the two spans are one implementation copied and then locally edited — 66 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. — smoke/lib/dsh_desktop.cjs:80
src/free_claude_code/api/admin_static/admin.js:2112 · src/free_claude_code/api/admin_static/admin.js:2221 — 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. — src/free_claude_code/api/admin_static/admin.js:2112
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.
apply has cyclomatic complexity 64 and cognitive complexity 72; 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. — src/free_claude_code/api/admin_static/admin.js:1570
renderControls has cyclomatic complexity 50 and cognitive complexity 32; 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. — src/free_claude_code/api/admin_static/code_sessions.js:1256
render has cyclomatic complexity 32 and cognitive complexity 47; 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. — src/free_claude_code/api/admin_static/code_sessions.js:1152
refreshStartup has cyclomatic complexity 30 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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. — src/free_claude_code/api/admin_static/admin.js:153
buildPrompt has cyclomatic complexity 25 and cognitive complexity 75; 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. — src/free_claude_code/api/admin_static/code_sessions.js:1459
merge has cyclomatic complexity 25 and cognitive complexity 31; 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. — src/free_claude_code/api/admin_static/code_sessions.js:164
updateProviderCard has cyclomatic complexity 24 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/free_claude_code/api/admin_static/admin.js:375
renderItem has cyclomatic complexity 21 and cognitive complexity 29; 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. — src/free_claude_code/api/admin_static/code_sessions.js:1366
inputForField has cyclomatic complexity 20 and cognitive complexity 22; 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. — src/free_claude_code/api/admin_static/admin.js:1022
renderCodexIntegration has cyclomatic complexity 18 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. — src/free_claude_code/api/admin_static/admin.js:2316
handleKeydown has cyclomatic complexity 17 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/free_claude_code/api/admin_static/model_combobox.js:166
openCustomProviderDialog has cyclomatic complexity 17 and cognitive complexity 20; 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. — src/free_claude_code/api/admin_static/admin.js:489
synchronize has cyclomatic complexity 17 and cognitive complexity 20; 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. — src/free_claude_code/api/admin_static/code_sessions.js:430
detail has cyclomatic complexity 17 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/free_claude_code/api/admin_static/code_sessions.js:333
renderClaudeDesktopIntegration 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. — src/free_claude_code/api/admin_static/admin.js:2514
readBootstrap 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. — src/free_claude_code/api/admin_static/code_sessions.js:377
renderField has cyclomatic complexity 17 and cognitive complexity 15; 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. — src/free_claude_code/api/admin_static/admin.js:930
renderAntigravityIntegration has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/free_claude_code/api/admin_static/admin.js:2111
list has cyclomatic complexity 15 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/free_claude_code/api/admin_static/code_sessions.js:279
(anonymous) has cyclomatic complexity 14 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/free_claude_code/api/admin_static/admin.js:1672
renderDshDesktopIntegration has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/free_claude_code/api/admin_static/admin.js:2634
activate has cyclomatic complexity 13 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/free_claude_code/api/admin_static/code_sessions.js:554
startConnectedAccountLogin has cyclomatic complexity 13 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/free_claude_code/api/admin_static/admin.js:673
renderClaudeIntegration has cyclomatic complexity 13 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/free_claude_code/api/admin_static/admin.js:2014
projectFccModels has cyclomatic complexity 13 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/free_claude_code/cli/launchers/pi_extension.ts:69
renderVSCodeChatIntegration has cyclomatic complexity 13 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 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. — src/free_claude_code/api/admin_static/admin.js:2217
(anonymous) has cyclomatic complexity 12 and cognitive complexity 15; 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. — src/free_claude_code/api/admin_static/admin.js:2693
refreshIntegrationUpdates has cyclomatic complexity 12 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/free_claude_code/api/admin_static/admin.js:1988
readFieldValue has cyclomatic complexity 12 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/free_claude_code/api/admin_static/admin.js:1377
renderJetBrainsIntegration 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. — src/free_claude_code/api/admin_static/admin.js:2418
deliver has cyclomatic complexity 11 and cognitive complexity 15; 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. — src/free_claude_code/api/admin_static/code_sessions.js:603
updateSettings has cyclomatic complexity 11 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes. — src/free_claude_code/api/admin_static/code_sessions.js:823
populateConnectedAccountActions 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. — src/free_claude_code/api/admin_static/admin.js:588
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.
src/free_claude_code/api/admin_static/admin.js has 2591 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/free_claude_code/api/admin_static/admin.js:1
src/free_claude_code/api/admin_static/code_sessions.js has 1721 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module. — src/free_claude_code/api/admin_static/code_sessions.js: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 Coverage3.8 / 10Weak✓ 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. (×5) — src/free_claude_code/api/admin_static/code_sessions.js:1, src/free_claude_code/api/admin_static/api_key_editor.js:1, src/free_claude_code/api/admin_static/session_ui.js:1, …
What to do
Add tests that import the unreached modules (directly or through their public entry).
Do you agree with this assessment?
R7 · Dead Code9.3 / 10Exemplary✓ Tool-verified
React / JS · Code Health — Files unreachable from every application/tooling/test entry point, and exports nothing imports (module-graph reachability, D-386).
Method: Dead code: files unreachable from every application/tooling/test entry point plus exports nothing imports, via module-graph reachability. Deterministic, exhaustive over the import graph.
Unreachable from the 7 application, 0 tooling and 1 test entry point(s) detected in this repo. This repository declares no build, type-check or test script, so nothing here would fail on a wrong deletion — confirm by hand that nothing loads each file (including by a path built at runtime) before removing it. An undetected custom entry would make these reachable.
no import path from any entry point (7 application, 0 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make — smoke/lib/dsh_desktop.cjs
What to do
Delete the dead files and unused exports — every line is maintenance cost and rebuild-estimate inflation with zero runtime value.
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 any branch is dead by construction — a switch arm whose label can never equal a case-normalised subject, or an `else if` whose predicate the arm above has already swallowed.
Method: Roslyn syntax + semantics: switch labels compared against the subject's own case normaliser, and if/else-if chains checked for a literal an earlier arm's containment test already swallows. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X13 · Undrained process stream10.0 / 10Exemplary○ Nothing flagged
Other · Code Health — Whether a child process that has BOTH standard streams redirected drains both — reading one to the end while the other is never read deadlocks once the child fills the unread pipe.
Method: Roslyn syntax + semantics: ProcessStartInfo launches with both streams redirected, checked for a drain of each stream across the enclosing type. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `spawn` imported from `child_process` whose stdout and stderr are both pipes (no options, no `stdio`, or `stdio` of `'pipe'`), bound to a local that never leaves its scope, where exactly one of the two streams is read, the other never, and the child’s `close`/`exit` (or the read stream’s end) is awaited; a shell redirect in the call’s arguments or a `kill` of the child suppresses it. The same rule reads Python’s `subprocess.Popen`, Dart’s `Process.start`, Ruby’s `Open3.popen3`, and Scala’s JDK process starts (`new ProcessBuilder(…).start()` with no `redirectErrorStream`/`redirectError`/`redirectOutput`/`inheritIO`, `Runtime.getRuntime.exec`) where one of `getInputStream`/`getErrorStream` is read and the other never while `waitFor()` is called or the read stream is read to its end. Deterministic, provable per finding. Advisory.
Other · Security — Whether a hand-rolled public/private IP check can be walked past — a method that unwraps IPv4-mapped IPv6 but returns the opposite verdict for the same host written as IPv4-compatible, 6to4 or NAT64.
Method: Roslyn syntax + semantics: methods that unwrap IPv4-mapped IPv6 and hand-roll IPv4 range carve-outs, checked for whether the IPv6 branch also accounts for the IPv4-compatible, 6to4 and NAT64 embeddings. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X17 · Uncapped recursion over a caller-supplied document1.5 / 10Critical✓ Tool-verified
Other · Security — Whether a walk that recurses through a JSON/XML tree handed in by its caller bounds how deep it will go — an uncapped walk lets the document's nesting choose the stack depth, and the resulting StackOverflowException cannot be caught.
Method: Roslyn syntax + semantics: methods that take a JSON/XML document node and call themselves with a child of it, reachable from an externally-callable member of the same type that accepts a document, checked for any depth parameter, descent counter or threaded arithmetic anywhere in the walk. On a repository with no .NET source it reads TypeScript off the engine’s own token stream (test, vendored, generated and minified paths and `.d.ts` not) with the same rule: a function or method with a parameter typed as a document value — `unknown`, `any`, `object`, `Record<string, unknown|any>`, a JSON alias (`JsonValue`, `JSONObject`, …) or a DOM node global the file does not rebind — that calls itself (bare, or through `this` for a method, or hands itself to a call over the value as in `value.map(walk)`) with something it took out of that value and never through an ancestor accessor such as `closest()` or `parentElement`, that is exported or reached from an exported function (a public method of the same exported class) taking such a value, and that names no depth, level, nesting, recursion, remaining or budget anywhere and threads no `+`/`-` arithmetic through a self-call. Plain JavaScript is not read: with no annotation nothing tells a parsed document from a tree the code built itself. Deterministic, provable per finding. Advisory.
`reasoning_control_rejected` is public, takes a document from its caller (line 145) and hands it to `_error_records`, which calls itself at line 160 (`_error_records`) with a piece of `payload` (and at line 163) — and nowhere in `_error_records` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_error_records` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/free_claude_code/providers/reasoning_compatibility.py:160
`sanitize_nim_tool_schemas` is public, takes a document from its caller (line 29) and hands it to `_sanitize_nim_schema_node`, which calls itself at line 104 (`_sanitize_nim_schema_node`) with a piece of `value` (and at line 110, line 118, line 128) — and nowhere in `_sanitize_nim_schema_node` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_sanitize_nim_schema_node` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/free_claude_code/providers/nvidia_nim/tool_schema.py:104
`apply_mistral_history_shape` is public, takes a document from its caller (line 38) and hands it to `_chunk_text`, which calls itself at line 326 (`_chunk_text`) with a piece of `chunk` — and nowhere in `_chunk_text` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_chunk_text` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/free_claude_code/providers/mistral/reasoning.py:326
`estimate_prepared_input_tokens` is public, takes a document from its caller (line 90) and hands it to `_json_costs`, which calls itself at line 32 (`_json_costs`) with a piece of `value` (and at line 34, line 39) — and nowhere in `_json_costs` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_json_costs` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/free_claude_code/providers/lmstudio/tokens.py:32
`translate_tool_schema_patterns` is public and takes `schema: Any` from its caller, and it calls itself at line 44 (`translate_tool_schema_patterns`) with a piece of `schema` (and at line 60, line 66) — and nowhere in `translate_tool_schema_patterns` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `translate_tool_schema_patterns` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/free_claude_code/core/tool_schema_patterns.py:44
`sanitize_trace_value` is public and takes `obj: Any` from its caller, and it calls itself at line 65 (`sanitize_trace_value`) with a piece of `obj` (and at line 68) — and nowhere in `sanitize_trace_value` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `sanitize_trace_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/free_claude_code/core/trace.py:65
`restore_tools` is public and takes `tools: JsonValue` from its caller, and it calls itself at line 498 (`self.restore_tools`) with a piece of `tools` — and nowhere in `restore_tools` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `restore_tools` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/free_claude_code/core/openai_responses/tool_adaptation.py:498
`restore_choice` is public and takes `value: JsonValue` from its caller, and it calls itself at line 602 (`self.restore_choice`) with a piece of `value` — and nowhere in `restore_choice` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `restore_choice` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/free_claude_code/core/openai_responses/tool_adaptation.py:602
`normalize_tool_search` is public, takes a document from its caller (line 165) and hands it to `_explicit_arguments`, which calls itself at line 183 (`_explicit_arguments`) with a piece of `schema` (and at line 187, line 191) — and nowhere in `_explicit_arguments` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_explicit_arguments` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack. — src/free_claude_code/core/openai_responses/tool_search.py:183
What to do
Each finding names the externally-callable member that accepts the document and the self-call that descends, and states that no depth parameter or counter exists anywhere in the walk. Confirm from the two, then thread a depth argument through the walk and reject documents past a fixed maximum, or rewrite it with an explicit stack.
Other · Code Health — Whether a method that temporarily changes state belonging to the whole process — the working directory, an environment variable — puts it back on EVERY path: a restore reached only when nothing throws leaks the change to the rest of the process.
Method: Roslyn syntax + semantics: method bodies that write the process working directory or an environment variable and write it back in the same body, checked for whether that restore sits in a `finally`/`catch` or only on the straight-line path. On a repository with no .NET source the same rule reads production JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not): `process.chdir`, `process.env.NAME =`/`["NAME"] =` and `delete process.env.NAME`, and Deno’s `Deno.chdir`/`Deno.env.set`/`Deno.env.delete`, paired per function body (a nested function or arrow is its own body, and module top-level code is none), where the last write puts back a local the body captured from the same global or deletes a variable the first write set, with at least one statement between them; a write in a `catch`/`finally` of that body silences it. Deterministic, provable per finding. Advisory.
Other · Code Health — Whether async functions that make a cancellable request accept or pass on an AbortSignal (adoption curve).
Method: Roslyn scan: every async method (excluding framework-fixed overrides/Blazor handlers) checked for CancellationToken parameter presence. Deterministic, adoption percentage. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same question: every named async function that itself makes a request an AbortSignal can cancel (global `fetch`, axios and its file-local instances, ky, ofetch) counts, and it is compliant when its parameters or body name a signal or it hands one of its own parameters to the request as options; signatures a framework fixes (JSX event handlers, route and lifecycle exports, request-first handlers, `override`, `'use server'` modules, TanStack `mutationFn`) are exempt unless they take a signal. Deterministic, adoption percentage.
Other · Code Health — Whether the work a diagnostic log line costs is paid only when that line is wanted — C# evaluates a call's arguments BEFORE the call, so a trace/debug message joined or projected out of a collection is built in full on every pass, and then discarded by a sink the shipped configuration leaves switched off.
Method: Roslyn syntax: log calls at a diagnostic level (a `Log`-prefixed method naming Trace/Debug/Verbose, or a bare `Debug`/`Trace`/`Verbose` on a receiver named for a logger), whose argument list is read for a call whose cost scales with a sequence — a LINQ operator, a materialisation, `string.Join`, a serializer — with no enclosing level check or conditional-compilation region. On a repository with no .NET source it reads JavaScript/TypeScript off the engine’s own token stream (test, vendored and minified paths not) with the same rule: a `debug`/`trace`/`verbose` call on a receiver named for a logger, or a `log`-prefixed method naming the level, whose argument calls an array operator (`map`/`filter`/`reduce`/`sort`/…), `Array.from`, `Object.keys/values/entries`, `JSON.stringify`/`util.inspect` over anything but a literal, or an array `join` — outside any arrow or function passed as an argument, which the logger calls only when the level is on — with no enclosing `if`, `&&` or `?:` whose condition names a level, a level string, or the `NODE_ENV`/`__DEV__`/`DEV` build switch. Deterministic, provable per finding. Advisory.
Do you agree with this assessment?
X24 · Document value interpolated into markup unescaped4.9 / 10Weak✓ Tool-verified
Other · Security — Whether text read out of the document being converted is escaped before it is written into generated markup — a value the document's author chose, interpolated into an attribute the surrounding literal delimits, can close that attribute and open another.
Method: Roslyn semantic model over the whole compilation: a string-typed `Value`/`InnerText`/`InnerXml`/`Text` member declared inside `DocumentFormat.OpenXml` or `System.Xml` is a taint SOURCE, propagated through assignments, returns, arguments, tuple elements and string composition to its transitive closure, then read at interpolated-string holes that sit in a markup position the surrounding literal itself delimits. Escaper/encoder calls and enclosing validator conditions cut the flow. Flow- and container-insensitive by construction. A second arm needs no provenance at all and reports a type that CONTRADICTS ITSELF — the same expression escaped at one delimited markup hole and interpolated raw at another hole in the same markup position of the same type, which the type's own escaping proves is a defect without knowing where the value came from. On a repository with no .NET source it reads JavaScript/TypeScript off the token stream with the same rule: a DOM read of raw document text (`getAttribute`, `textContent`, `innerText`, `nodeValue`) is the source, propagated through local bindings and string composition, and judged at template-literal and concatenation holes in the same two delimited markup positions; escapers and validating conditions cut it, and documentation-site, test, vendored and minified scripts are not read. Deterministic, provable per finding. Advisory.
`section.label` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/free_claude_code/api/admin_static/admin.js:870
`item.html` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup. — src/free_claude_code/api/admin_static/code_sessions.js:1416
What to do
Each finding names the expression, the attribute it lands in and the line. Confirm the value's origin from the read this analyzer traced, then escape it at the sink or validate it against the shape the attribute accepts before interpolating.
Other · Code Health — Whether a value the caller is invited to supply is the value the type actually uses — a constructor parameter stored in a private field that nothing ever reads while the default it was given is spelled out a second time at the site that should have read it, a keyed lookup that falls back to a different setting than the one its key names while the same type falls back to the matching one for that same key, or a culture-sensitive parse given no format provider by a type that feeds its own settable culture to the same kind of parse elsewhere, or a number an entry point writes to standard output under the host's culture while the same entry point formats with the invariant culture elsewhere. Either way, every caller who supplies a value silently gets something else.
Method: Roslyn syntax: private instance fields of a non-partial type assigned in a constructor from one of its own parameters with a `??` fallback, checked for whether anything in the type body reads the field and whether that same fallback expression is spelled out again outside the constructor; and `??` fallbacks onto a member access from a lookup call carrying exactly one string literal, grouped by that key across the type and checked for a fallback member whose folded name disagrees with the key while a sibling site for the same key agrees with it. On a repository with no .NET source the first two arms read JavaScript/TypeScript off the engine’s own token stream (tests included, bundles and vendored paths not): a `#x`, `private` or `private` parameter-property instance field filled in the constructor from a parameter (or one member of one) through `??`/`||` or a parameter default, never read anywhere in the file by name, whose constructed default is spelled again in the class body; and `lookup("key") ?? s.member` grouped by key per class, or per module outside every class. The culture arm has no JavaScript counterpart: its parses take no locale. Deterministic, provable per finding. Advisory.
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 `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.
Other · Code Health — Whether exceptions are handled rather than silently swallowed or rethrown with lost stack traces.
Method: Roslyn syntax scan: every catch clause counted; empty catches and bare rethrows flagged. Population is all catch clauses, not estimated. Deterministic, hard fact.
`except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter. (×12) — src/free_claude_code/providers/mistral/reasoning.py:81, src/free_claude_code/providers/groq/client.py:263, src/free_claude_code/providers/groq/client.py:270, …
An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it. (×11) — src/free_claude_code/providers/github_copilot/sdk.py:265, src/free_claude_code/messaging/limiter.py:124, src/free_claude_code/core/diagnostics.py:218, …
What to do
Swallowed exception (caught, then discarded)
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 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.
This repository commits no tsconfig, so whatever type-checks it uses tsc's own defaults, in which `strict` and `strictNullChecks` are OFF: `string` admits `null` and `undefined`, and a value that is null is compiled through to the property access that throws. If the build passes `--strict` on a command line instead, put it in a committed tsconfig — this check reads configuration, and configuration is all it can read.
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 13 of 55 WCAG 2.2 Level A/AA success criteria (24%; ≈26% of the 50 WCAG 2.1 AA criteria for EN 301 549). The other 42 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 — 40 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 — 4 control(s) we could not find positive evidence for
These checks grade a working control, and the repository shows no evidence of one. That is deliberately not scored as a zero: a repository cannot show an ops runbook, a database TTL or an infrastructure-side audit log, so absence of evidence here is not evidence the control is missing. It is also not a statement that the check is irrelevant to this codebase — the thing it grades applies; we just could not see it. Excluded from the score either way.
C3 Audit Trail — Not assessed: this repository stores data through 'sqlite3' (src/free_claude_code/runtime/code_sessions_sqlite.py:5) but declares no persisted model this check reads (Django, SQLAlchemy, SQLModel, Peewee, Tortoise and MongoEngine model fields, Alembic and Django migration columns, CREATE TABLE and ALTER TABLE … ADD columns in SQL files). Personal data may be written through raw SQL or a hosted backend, so whether its changes need an audit trail could not be established, and the trail's absence is not scored.
C4 Data Retention — Not assessed: this repository stores data through 'sqlite3' (src/free_claude_code/runtime/code_sessions_sqlite.py:5) but declares no persisted model this check reads (Django, SQLAlchemy, SQLModel, Peewee, Tortoise and mongoengine model fields, Alembic and Django migration columns, SQL schemas). Personal data may be written through raw SQL or a hosted backend, so whether a retention limit applies here could not be established, and its absence is not scored.
C5 Data-Subject Rights — Not assessed: this repository stores data through 'sqlite3' (src/free_claude_code/runtime/code_sessions_sqlite.py:5) but declares no persisted model this check reads (Django, SQLAlchemy, SQLModel, Peewee, Tortoise and mongoengine model fields, Alembic and Django migration columns, CREATE TABLE and ALTER TABLE … ADD columns in SQL files). Personal data may be written through raw SQL or a hosted backend, so whether data-subject rights apply here could not be established, and their absence is not scored.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
Not included — 58 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.
AC4 Keyboard semantics — No interactive element found in the parsed markup — AC4 not applicable here.
AX1 Captive dependencies — Not applicable: this repository's JavaScript 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; 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; 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.
AX4 Dependency direction — not applicable to a transaction-script/CRUD architecture (the inward-dependency rule is for layered/clean styles)
AX6 Interface segregation — no exported interface declares behaviour
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — no test/production split to check
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB1 Runtime evidence locked — no reproducible boot — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D10 Test Quality — ~161466 lines of test source are present (.py) but no test cases reached the test census for this repository — no test root we could resolve declared them, or the files we read declare no cases in a test framework we recognise — so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included — the .py suite was found but not re-run
D12 Dependency Hygiene — Dependency currency not established — no declaration carries an exact pin to grade
D16 Bus Factor — single-maintainer repository — bus factor is not applicable
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 — N/A — too few peers to establish a naming convention (12133 declarations, no unit with a dominant convention).
D22 Internal API Consistency — API consistency is measured on C# only; the exposed Python 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"]`.
D24 Comment Value — D24 reads C#, Visual Basic, TypeScript and JavaScript comments only; comments in this repository's .py source were not judged.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — D26 could not read how the parts of this repository's one build unit reference each other, so its cohesion was not measured. Not scored: this is a gap in the analyzer, not a verdict about this repository.
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
D32 Data Compliance (PII/GDPR) — 52 file(s) were not parsed by semgrep — the PII/GDPR ruleset never ran over them
D37 Vulnerability-disclosure Policy — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
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.
D5 Coupling — Not applicable — this Python build ships 1 production module(s), so there is no coupling BETWEEN modules to measure. (Its test and non-production modules are not part of the shipped graph.)
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 included — suite not readable by the collector
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this lens looks for (162 value object(s))
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this lens looks for
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 — SQLAlchemy is declared, but the schema-migration mechanism could not be identified. Our limit, not a verdict on this repository.
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 a pytest-benchmark or pytest-codspeed dependency with tests taking the `benchmark` fixture, an asv.conf.json with its `time_`/`mem_`/`peakmem_` benchmarks, or a pyperf Runner, 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.
R5 Dependency Freshness — no package-lock.json — dependency freshness not measured (would require an npm lockfile); JS/npm CVEs are scored in D30 (Dependency Vulnerabilities), which answers every ecosystem
R6 Tooling — no package.json in the repository — test/lint/typecheck wiring is read from package.json scripts (corroborated against CI), so this project's own toolchain isn't measured here
R8 Dependency Hygiene — Not measured — no package.json declares any dependency, so there is nothing to check imports against (imports may resolve through a host runtime rather than node).
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
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 6% of this repository's production lines — python (77,299 lines), objectivec (97 lines) was left unread. Not scored: a score over a minority of the product would be published as the whole of it.
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
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.
X21 Side-effecting pattern guard — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
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
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
X29 Per-element action decided by a fixed element — not applicable — the code was read and holds no site of this kind, so there is nothing for this check to judge
X32 Type resolved by simple name across every loaded assembly — This check is about how a .NET program searches the assemblies loaded into its process for a type, and this repository contains no .NET source, so there is nothing here for it to assess. Not a gap in the analyzer and not a finding about your code.
X4 Structured logging — 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
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.
Boundary-crossing change coupling: config.py ↔ model_listing.py smoke/lib/config.py:1— `smoke/lib/config.py` (context smoke) and `src/free_claude_code/providers/model_listing.py` (context free_claude_code) sit in DIFFERENT parts of the tree yet change together 75% of the time (9 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) — the bounded-context boundary may be in the wrong place, or one context is leaking into the other. This is the behavioural boundary violation a static scan can't see. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `10fb1d02` patch: Add OrcaRouter as an AI provider (#1754); `79f35480` Add Featherless AI provider (#1405); `5823d253` Add Chutes provider (#1402) — run `git show` on any of them.
Hotspot: src/free_claude_code/api/admin_static/admin.js src/free_claude_code/api/admin_static/admin.js:1570— src/free_claude_code/api/admin_static/admin.js changed 50 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 65 in admin.apply at line 1570. 2 of those changes were fix/bug commits, and the other 48 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/api/admin_static/admin.js`: 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: src/free_claude_code/providers/openai_responses/transport.py src/free_claude_code/providers/openai_responses/transport.py:415— src/free_claude_code/providers/openai_responses/transport.py changed 31 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 49 in OpenAIResponsesTransport._run_execution at line 415. 5 of those changes were fix/bug commits, and the other 26 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/providers/openai_responses/transport.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: src/free_claude_code/providers/anthropic_messages/transport.py src/free_claude_code/providers/anthropic_messages/transport.py:376— src/free_claude_code/providers/anthropic_messages/transport.py changed 20 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in AnthropicMessagesTransport._run at line 376. 1 of those changes was a fix/bug commit, and the other 19 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/providers/anthropic_messages/transport.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: src/free_claude_code/providers/openai_chat/transport.py src/free_claude_code/providers/openai_chat/transport.py:1171— src/free_claude_code/providers/openai_chat/transport.py changed 22 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 38 in _OpenAIChatStreamRunner._run_execution at line 1171. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/providers/openai_chat/transport.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: src/free_claude_code/api/admin_static/code_sessions.js src/free_claude_code/api/admin_static/code_sessions.js:1256— src/free_claude_code/api/admin_static/code_sessions.js changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 51 in code_sessions.renderControls at line 1256. 1 of those changes was a fix/bug commit, and the other 12 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/api/admin_static/code_sessions.js`: 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: src/free_claude_code/providers/continuation.py src/free_claude_code/providers/continuation.py:68— src/free_claude_code/providers/continuation.py changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 50 in SourceRecoveryState.observe at line 68. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/providers/continuation.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: src/free_claude_code/api/stream_delivery.py src/free_claude_code/api/stream_delivery.py:324— src/free_claude_code/api/stream_delivery.py changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in PublicResponseStream._publish at line 324. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/api/stream_delivery.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: src/free_claude_code/providers/anthropic_messages/passthrough.py src/free_claude_code/providers/anthropic_messages/passthrough.py:63— src/free_claude_code/providers/anthropic_messages/passthrough.py changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 43 in passthrough.stream_native_messages at line 63. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/providers/anthropic_messages/passthrough.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: src/free_claude_code/providers/failure_policy.py src/free_claude_code/providers/failure_policy.py:362— src/free_claude_code/providers/failure_policy.py changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 33 in failure_policy._classify_provider_failure at line 362. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/providers/failure_policy.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: src/free_claude_code/providers/openai_chat/reasoning_details.py src/free_claude_code/providers/openai_chat/reasoning_details.py:57— src/free_claude_code/providers/openai_chat/reasoning_details.py changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in StructuredReasoningStream.events at line 57. 1 of those changes was a fix/bug commit, 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/providers/openai_chat/reasoning_details.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: src/free_claude_code/core/delivered_response.py src/free_claude_code/core/delivered_response.py:322— src/free_claude_code/core/delivered_response.py changed 7 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 45 in DeliveredResponse._responses at line 322. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/core/delivered_response.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: src/free_claude_code/core/history_replay.py src/free_claude_code/core/history_replay.py:1139— src/free_claude_code/core/history_replay.py changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in history_replay._restore_gemini_parts at line 1139. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/core/history_replay.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: src/free_claude_code/core/anthropic/native_stream.py src/free_claude_code/core/anthropic/native_stream.py:50— src/free_claude_code/core/anthropic/native_stream.py changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in NativeMessagesStreamState.accept at line 50. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/core/anthropic/native_stream.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: src/free_claude_code/core/openai_responses/chat_request.py src/free_claude_code/core/openai_responses/chat_request.py:299— src/free_claude_code/core/openai_responses/chat_request.py changed 12 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in _ResponsesChatInputBuilder._apply_pending_reasoning at line 299. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/core/openai_responses/chat_request.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: src/free_claude_code/providers/history_replay.py src/free_claude_code/providers/history_replay.py:158— src/free_claude_code/providers/history_replay.py changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 46 in history_replay.history_retry_body at line 158. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/providers/history_replay.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: src/free_claude_code/core/anthropic/conversion.py src/free_claude_code/core/anthropic/conversion.py:625— src/free_claude_code/core/anthropic/conversion.py changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 25 in AnthropicToOpenAIConverter._convert_assistant_message at line 625. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/core/anthropic/conversion.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: src/free_claude_code/api/model_catalog.py src/free_claude_code/api/model_catalog.py:206— src/free_claude_code/api/model_catalog.py changed 14 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 16 in model_catalog._build_direct_models_response at line 206. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/api/model_catalog.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: src/free_claude_code/config/admin/persistence.py src/free_claude_code/config/admin/persistence.py:150— src/free_claude_code/config/admin/persistence.py changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 22 in persistence.prepare_admin_update at line 150. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/config/admin/persistence.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: src/free_claude_code/core/openai_responses/provider_input.py src/free_claude_code/core/openai_responses/provider_input.py:160— src/free_claude_code/core/openai_responses/provider_input.py changed 9 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 23 in provider_input._assistant_items at line 160. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/core/openai_responses/provider_input.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: src/free_claude_code/core/openai_responses/provider_stream.py src/free_claude_code/core/openai_responses/provider_stream.py:231— src/free_claude_code/core/openai_responses/provider_stream.py changed 10 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 20 in ResponsesProviderStream._item_done at line 231. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/core/openai_responses/provider_stream.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: src/free_claude_code/providers/model_listing.py src/free_claude_code/providers/model_listing.py:40— src/free_claude_code/providers/model_listing.py changed 4 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 48 in model_listing.extract_openai_model_infos at line 40. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/providers/model_listing.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: src/free_claude_code/core/openai_responses/tool_adaptation.py src/free_claude_code/core/openai_responses/tool_adaptation.py:625— src/free_claude_code/core/openai_responses/tool_adaptation.py changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 31 in ResponsesToolEventAdapter.feed at line 625. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/core/openai_responses/tool_adaptation.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: src/free_claude_code/core/gemini/request.py src/free_claude_code/core/gemini/request.py:106— src/free_claude_code/core/gemini/request.py changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in request._build at line 106. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/core/gemini/request.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: src/free_claude_code/core/continuation_overlap.py src/free_claude_code/core/continuation_overlap.py:170— src/free_claude_code/core/continuation_overlap.py changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 35 in ContinuationOverlap._texts at line 170. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/core/continuation_overlap.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: src/free_claude_code/core/anthropic/tokens.py src/free_claude_code/core/anthropic/tokens.py:37— src/free_claude_code/core/anthropic/tokens.py changed 5 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 32 in tokens.get_token_count at line 37. 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-14..2026-11-12, the 90 days ending at the analysed commit. Reproduce with `git log --since='2026-08-14 02:03:14 -08:00' --until='2026-11-12 02:03:14 -08:00' --full-history --no-merges -- src/free_claude_code/core/anthropic/tokens.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.
FileTooLong: admin_static/admin.js src/free_claude_code/api/admin_static/admin.js— FileTooLong — 2194 significant lines (blank, comment-only and punctuation-only lines excluded; the length bar is tripled for a single-responsibility module of 4 or fewer top-level units). The bar is 500 significant lines; this is 1694 over it, 4.39× 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: admin_static/code_sessions.js src/free_claude_code/api/admin_static/code_sessions.js— FileTooLong — 1439 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 939 over it, 2.88× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: openai_chat/transport.py src/free_claude_code/providers/openai_chat/transport.py— FileTooLong — 1308 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 808 over it, 2.62× 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: core/history_replay.py src/free_claude_code/core/history_replay.py— FileTooLong — 1084 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 584 over it, 2.17× 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: runtime/provider_manager.py src/free_claude_code/runtime/provider_manager.py— FileTooLong — 748 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 248 over it, 1.50× 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: config/provider_catalog.py src/free_claude_code/config/provider_catalog.py— FileTooLong — 705 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 205 over it, 1.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: runtime/integration_service.py src/free_claude_code/runtime/integration_service.py— FileTooLong — 697 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 197 over it, 1.39× 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: openai_responses/transport.py src/free_claude_code/providers/openai_responses/transport.py— FileTooLong — 688 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 188 over it, 1.38× 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: runtime/code_sessions_sqlite.py src/free_claude_code/runtime/code_sessions_sqlite.py— FileTooLong — 684 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 184 over it, 1.37× 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: openai_chat/profiles.py src/free_claude_code/providers/openai_chat/profiles.py— FileTooLong — 668 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 168 over it, 1.34× 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: anthropic/conversion.py src/free_claude_code/core/anthropic/conversion.py— FileTooLong — 666 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 166 over it, 1.33× 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: runtime/codex_app_server.py src/free_claude_code/runtime/codex_app_server.py— FileTooLong — 650 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 150 over it, 1.30× 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: openai_responses/tool_adaptation.py src/free_claude_code/core/openai_responses/tool_adaptation.py— FileTooLong — 644 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 144 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: lib/claude_cli_matrix.py smoke/lib/claude_cli_matrix.py— FileTooLong — 620 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 120 over it, 1.24× 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: openai_responses/chat_request.py src/free_claude_code/core/openai_responses/chat_request.py— FileTooLong — 604 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 104 over it, 1.21× 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: trees/manager.py src/free_claude_code/messaging/trees/manager.py— FileTooLong — 594 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 94 over it, 1.19× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: runtime/codex_protocol.py src/free_claude_code/runtime/codex_protocol.py— FileTooLong — 591 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 91 over it, 1.18× 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: openai_chat/stream_output.py src/free_claude_code/providers/openai_chat/stream_output.py— FileTooLong — 561 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 61 over it, 1.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: messaging/workflow.py src/free_claude_code/messaging/workflow.py— FileTooLong — 555 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 55 over it, 1.11× 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: code_sessions/state.py src/free_claude_code/application/code_sessions/state.py— FileTooLong — 549 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 49 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: application/execution.py src/free_claude_code/application/execution.py— FileTooLong — 548 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 48 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: core/delivered_response.py src/free_claude_code/core/delivered_response.py— FileTooLong — 547 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 47 over it, 1.09× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: anthropic_messages/transport.py src/free_claude_code/providers/anthropic_messages/transport.py— FileTooLong — 546 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 46 over it, 1.09× the bar. To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: openai_responses/messages_request.py src/free_claude_code/core/openai_responses/messages_request.py— FileTooLong — 532 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 32 over it, 1.06× 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: openai_codex/auth.py src/free_claude_code/providers/openai_codex/auth.py— FileTooLong — 528 significant lines (blank, comment-only and punctuation-only lines excluded). The bar is 500 significant lines; this is 28 over it, 1.06× 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.
Swallowed exception (caught, then discarded) src/free_claude_code/providers/mistral/reasoning.py:81— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/free_claude_code/providers/groq/client.py:263— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/free_claude_code/providers/groq/client.py:270— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/free_claude_code/providers/github_copilot/auth.py:358— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/free_claude_code/providers/github_copilot/auth.py:418— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/free_claude_code/providers/github_copilot/login.py:71— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/free_claude_code/messaging/commands.py:103— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/free_claude_code/messaging/workflow.py:55— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/free_claude_code/messaging/transcript/renderer.py:21— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/free_claude_code/messaging/transcript/segments.py:151— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/free_claude_code/messaging/platforms/telegram_io.py:201— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (caught, then discarded) src/free_claude_code/core/diagnostics.py:222— `except Exception` takes every exception and records none of it — the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter.
Swallowed exception (empty catch) src/free_claude_code/providers/github_copilot/sdk.py:265— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/free_claude_code/messaging/limiter.py:124— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/free_claude_code/core/diagnostics.py:218— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/free_claude_code/application/code_sessions/service.py:694— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/free_claude_code/api/admin_static/admin.js:105— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/free_claude_code/api/admin_static/admin.js:1489— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/free_claude_code/api/admin_static/admin.js:1557— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/free_claude_code/api/admin_static/admin.js:1751— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/free_claude_code/api/admin_static/admin.js:2604— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/free_claude_code/api/admin_static/admin.js:2718— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
Swallowed exception (empty catch) src/free_claude_code/api/admin_static/code_sessions.js:81— An empty catch block silently discards the error — failures vanish with no log and no rethrow. Log it, handle it, or don't catch it.
X17 · Uncapped recursion over a caller-supplied document· Recursive walk over a caller-supplied document has no depth cap · ×9
Recursive walk over a caller-supplied document has no depth cap src/free_claude_code/providers/reasoning_compatibility.py:160— `reasoning_control_rejected` is public, takes a document from its caller (line 145) and hands it to `_error_records`, which calls itself at line 160 (`_error_records`) with a piece of `payload` (and at line 163) — and nowhere in `_error_records` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_error_records` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap src/free_claude_code/providers/nvidia_nim/tool_schema.py:104— `sanitize_nim_tool_schemas` is public, takes a document from its caller (line 29) and hands it to `_sanitize_nim_schema_node`, which calls itself at line 104 (`_sanitize_nim_schema_node`) with a piece of `value` (and at line 110, line 118, line 128) — and nowhere in `_sanitize_nim_schema_node` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_sanitize_nim_schema_node` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap src/free_claude_code/providers/mistral/reasoning.py:326— `apply_mistral_history_shape` is public, takes a document from its caller (line 38) and hands it to `_chunk_text`, which calls itself at line 326 (`_chunk_text`) with a piece of `chunk` — and nowhere in `_chunk_text` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_chunk_text` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap src/free_claude_code/providers/lmstudio/tokens.py:32— `estimate_prepared_input_tokens` is public, takes a document from its caller (line 90) and hands it to `_json_costs`, which calls itself at line 32 (`_json_costs`) with a piece of `value` (and at line 34, line 39) — and nowhere in `_json_costs` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_json_costs` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap src/free_claude_code/core/tool_schema_patterns.py:44— `translate_tool_schema_patterns` is public and takes `schema: Any` from its caller, and it calls itself at line 44 (`translate_tool_schema_patterns`) with a piece of `schema` (and at line 60, line 66) — and nowhere in `translate_tool_schema_patterns` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `translate_tool_schema_patterns` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap src/free_claude_code/core/trace.py:65— `sanitize_trace_value` is public and takes `obj: Any` from its caller, and it calls itself at line 65 (`sanitize_trace_value`) with a piece of `obj` (and at line 68) — and nowhere in `sanitize_trace_value` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `sanitize_trace_value` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap src/free_claude_code/core/openai_responses/tool_adaptation.py:498— `restore_tools` is public and takes `tools: JsonValue` from its caller, and it calls itself at line 498 (`self.restore_tools`) with a piece of `tools` — and nowhere in `restore_tools` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `restore_tools` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap src/free_claude_code/core/openai_responses/tool_adaptation.py:602— `restore_choice` is public and takes `value: JsonValue` from its caller, and it calls itself at line 602 (`self.restore_choice`) with a piece of `value` — and nowhere in `restore_choice` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `restore_choice` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
Recursive walk over a caller-supplied document has no depth cap src/free_claude_code/core/openai_responses/tool_search.py:183— `normalize_tool_search` is public, takes a document from its caller (line 165) and hands it to `_explicit_arguments`, which calls itself at line 183 (`_explicit_arguments`) with a piece of `schema` (and at line 187, line 191) — and nowhere in `_explicit_arguments` is there a depth parameter, a descent counter, or any other cap. The walk therefore spends one stack frame per LEVEL of the value it is handed, so the nesting of the caller's document — not this code — decides how deep the stack goes. Python's parsers accept far more nesting than its stack allows: `json.loads` turns 3,000 bytes of brackets into 1,500 levels and `xml.etree.ElementTree` parses tens of thousands, while a walk like this one raises `RecursionError` once it passes the interpreter's default limit of 1,000 frames. Wherever that exception lands, the work fails: a request errors, and outside any `try` the worker or the program exits with it. Raising `sys.setrecursionlimit` only moves the number the document has to beat. Thread a depth argument through `_explicit_arguments` and reject the value past a fixed maximum, or rewrite the descent with an explicit stack.
TooManyMethods: ApplicationRuntime src/free_claude_code/runtime/application.py:101— TooManyMethods — 52 methods. The bar is 30 methods; this is 22 over it, 1.73× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: IntegrationService src/free_claude_code/runtime/integration_service.py:60— TooManyMethods — 49 methods. The bar is 30 methods; this is 19 over it, 1.63× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: SessionState src/free_claude_code/application/code_sessions/state.py:43— TooManyMethods — 43 methods. The bar is 30 methods; this is 13 over it, 1.43× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ProviderRuntimeManager src/free_claude_code/runtime/provider_manager.py:163— TooManyMethods — 40 methods. The bar is 30 methods; this is 10 over it, 1.33× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: ChatStreamOutput src/free_claude_code/providers/openai_chat/stream_output.py:75— TooManyMethods — 38 methods. The bar is 30 methods; this is 8 over it, 1.27× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: AnthropicStreamLedger src/free_claude_code/core/anthropic/streaming/ledger.py:66— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: MessagingWorkflow src/free_claude_code/messaging/workflow.py:88— TooManyMethods — 34 methods. The bar is 30 methods; this is 4 over it, 1.13× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
TooManyMethods: TreeQueueManager src/free_claude_code/messaging/trees/manager.py:86— TooManyMethods — 33 methods. The bar is 30 methods; this is 3 over it, 1.10× the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility.
Change coupling: capabilities.py ↔ features.py smoke/capabilities.py:1— `smoke/capabilities.py` and `smoke/features.py` change together 91% of the time (29 of the 32 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) with no explicit dependency between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 29 shared commits counted here, the most recent 3 are `cb7ae5b1` patch: Remove five Claude request optimizations (#2112); `8296b09e` patch: Remove obsolete Task foreground interception (#1925); `a78d2831` Support OpenCode 2 and migrate native v1 installations (#1840) — run `git show` on any of them.
Change coupling: settings.py ↔ profiles.py src/free_claude_code/config/settings.py:1— `src/free_claude_code/config/settings.py` and `src/free_claude_code/providers/openai_chat/profiles.py` change together 85% of the time (33 of the 39 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 33 shared commits counted here, the most recent 3 are `b920b8db` minor: Add Atlas Cloud provider (#2035); `f29cc304` minor: Add Opper provider (#1860); `f88793c7` minor: Add xKiro provider (#1960) — run `git show` on any of them.
Change coupling: discord.py ↔ telegram.py src/free_claude_code/messaging/platforms/discord.py:1— `src/free_claude_code/messaging/platforms/discord.py` and `src/free_claude_code/messaging/platforms/telegram.py` change together 82% of the time (9 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 between them. They sit in the same directory, but in this ecosystem each file is its own module — a sibling reference still needs an import — so the missing import edge is real: the coupling runs through shared behaviour, not a declared dependency. If they duplicate structure, extract the common part into one unit; otherwise the coupling is hidden and worth breaking. You can check this without leaving the row: of the 9 shared commits counted here, the most recent 3 are `78377253` Keep voice ownership continuous through admission (#1063); `795a83a8` Make pending voice cancellation atomic (#1054); `92488456` Refactor messaging platform bridge (#858) (at that commit the files were still `messaging/platforms/discord.py` and `messaging/platforms/telegram.py`) — run `git show` on any of them.
Change coupling: settings.py ↔ model_listing.py src/free_claude_code/config/settings.py:1— `src/free_claude_code/config/settings.py` and `src/free_claude_code/providers/model_listing.py` change together 75% of the time (9 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 9 shared commits counted here, the most recent 3 are `10fb1d02` patch: Add OrcaRouter as an AI provider (#1754); `79f35480` Add Featherless AI provider (#1405); `5823d253` Add Chutes provider (#1402) — run `git show` on any of them.
Change coupling: code_sessions.js ↔ service.py src/free_claude_code/api/admin_static/code_sessions.js:1— `src/free_claude_code/api/admin_static/code_sessions.js` and `src/free_claude_code/application/code_sessions/service.py` change together 60% of the time (6 of the 10 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) and are written in DIFFERENT LANGUAGES, so no import can join them and they cannot be co-located into one unit — they compile and ship as separate artifacts. What binds them is a CONTRACT across that boundary — an event or message name, a route, a serialised shape — that each side currently spells out on its own, which is exactly why a change to one drags the other. Declare that contract once where both sides read it (a shared schema, a generated constants file, an interface-definition file) so a change on one side fails the other's build instead of drifting silently; where the surface is too small to be worth that, name the counterpart in a comment on both sides so the next reader finds it. There is nothing here to merge. You can check this without leaving the row: of the 6 shared commits counted here, the most recent 3 are `bf59598c` Show context usage in native Code Sessions (#1785); `12761363` Show Thinking in transcript during 500 ms output gaps (#1777); `defc7425` Show Codex sub-agent Auto-review results in Code sessions (#1728) — run `git show` on any of them.
Change coupling: provider.py ↔ provider.py src/free_claude_code/providers/openai_chat/provider.py:1— `src/free_claude_code/providers/openai_chat/provider.py` and `src/free_claude_code/providers/openai_codex/provider.py` change together 58% of the time (7 of the 12 commits that touched whichever of the two files changed less often, counting a file under its earlier names as well — a repo-wide or module-wide sweep is evidence about the sweep rather than about any pair inside it and is left out of BOTH sides of this ratio, while a dependency bump, a formatter/rename sweep, or a commit whose edit to one of the two files was a tool directive such as //go:generate or whitespace only is left out of the shared count ONLY, so the two sides are not taken over identical commit sets) 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 7 shared commits counted here, the most recent 3 are `12262135` patch: isolate provider recovery by model (#2176); `f64e2b31` Fix OpenCode MissingSessionID errors through FCC (#1700); `e6f2633b` Recover context-window exhaustion across providers and Chat (#1661) — run `git show` on any of them.
D4 · Code Duplication· Edited copy of a member (10 corresponding lines) · ×5
Edited copy of a member (10 corresponding lines) src/free_claude_code/core/chat_completions/responses_stream.py:30— src/free_claude_code/core/chat_completions/responses_stream.py:30-39 | src/free_claude_code/core/gemini/responses_stream.py:28-39 — 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) src/free_claude_code/core/anthropic/conversion.py:188— src/free_claude_code/core/anthropic/conversion.py:188-208 | src/free_claude_code/core/openai_responses/provider_input.py:376-385 — 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) src/free_claude_code/providers/failure_policy.py:243— src/free_claude_code/providers/failure_policy.py:243-252 | src/free_claude_code/providers/openai_chat/usage.py:108-117 — 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) src/free_claude_code/messaging/trees/manager.py:278— src/free_claude_code/messaging/trees/manager.py:278-287 | src/free_claude_code/messaging/trees/manager.py:294-303 — 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) src/free_claude_code/providers/mistral/client.py:130— src/free_claude_code/providers/mistral/client.py:130-146 | src/free_claude_code/providers/openai_chat/provider.py:228-237 — 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.
D4 · Code Duplication· Edited copy of a member (9 corresponding lines) · ×5
Edited copy of a member (9 corresponding lines) src/free_claude_code/core/chat_completions/request.py:255— src/free_claude_code/core/chat_completions/request.py:255-263 | src/free_claude_code/core/chat_completions/request.py:470-490 — 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) src/free_claude_code/providers/openai_api/provider.py:133— src/free_claude_code/providers/openai_api/provider.py:133-141 | src/free_claude_code/providers/opencode/provider.py:191-200 — 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) src/free_claude_code/providers/mistral/client.py:161— src/free_claude_code/providers/mistral/client.py:161-171 | src/free_claude_code/providers/openai_chat/provider.py:252-260 — 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) src/free_claude_code/providers/mistral/client.py:186— src/free_claude_code/providers/mistral/client.py:186-196 | src/free_claude_code/providers/openai_chat/provider.py:275-283 — 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) src/free_claude_code/providers/mistral/client.py:211— src/free_claude_code/providers/mistral/client.py:211-221 | src/free_claude_code/providers/openai_chat/provider.py:298-306 — 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.
R4 · Test Coverage· No test reaches this file · ×5
No test reaches this file src/free_claude_code/api/admin_static/code_sessions.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 src/free_claude_code/api/admin_static/api_key_editor.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 src/free_claude_code/api/admin_static/session_ui.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 src/free_claude_code/cli/launchers/pi_extension.ts:1— No test imports this module directly or transitively. Import reachability cannot see a test that executes a file by path instead of importing it, nor one that drives it through a running browser by navigating to a URL — if neither does, no test reaches this one.
No test reaches this file src/free_claude_code/api/admin_static/form_controls.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.
Duplicated block (12 lines × 2) src/free_claude_code/application/execution.py:359— src/free_claude_code/application/execution.py:359-370 | src/free_claude_code/application/execution.py:421-434 — 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 `src/free_claude_code/application/execution.py:359` 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 (12 lines × 2) src/free_claude_code/messaging/transcript/buffer.py:143— src/free_claude_code/messaging/transcript/buffer.py:143-154 | src/free_claude_code/messaging/transcript/buffer.py:159-170 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (12 lines × 2) src/free_claude_code/providers/cloudflare/client.py:98— src/free_claude_code/providers/cloudflare/client.py:98-109 | src/free_claude_code/providers/vertex/client.py:63-74 — 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 `src/free_claude_code/providers/cloudflare/client.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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/free_claude_code/providers/cloudflare/client.py:110` calls `CloudflareChatBehavior` and `src/free_claude_code/providers/vertex/client.py:75` 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 (12 lines × 2) src/free_claude_code/messaging/transcription.py:43— src/free_claude_code/messaging/transcription.py:43-54 | src/free_claude_code/providers/nvidia_nim/voice.py:37-48 — 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. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
D4 · Code Duplication· Edited copy of a member (16 corresponding lines) · ×3
Edited copy of a member (16 corresponding lines) smoke/lib/e2e.py:126— smoke/lib/e2e.py:126-144 | smoke/lib/http.py:66-81 — 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.
Edited copy of a member (16 corresponding lines) src/free_claude_code/api/response_streams.py:138— src/free_claude_code/api/response_streams.py:138-157 | src/free_claude_code/core/async_tasks.py:15-30 — 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.
Edited copy of a member (16 corresponding lines) src/free_claude_code/providers/runtime/factory.py:176— src/free_claude_code/providers/runtime/factory.py:176-191 | src/free_claude_code/providers/runtime/factory.py:209-225 — 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 copy of a member (13 corresponding lines) · ×3
Edited copy of a member (13 corresponding lines) src/free_claude_code/messaging/trees/runtime.py:390— src/free_claude_code/messaging/trees/runtime.py:390-402 | src/free_claude_code/messaging/trees/runtime.py:407-422 — These two members are one piece of code written twice and then edited apart: 13 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 (13 corresponding lines) src/free_claude_code/messaging/transcript/buffer.py:139— src/free_claude_code/messaging/transcript/buffer.py:139-156 | src/free_claude_code/messaging/transcript/buffer.py:159-171 — These two members are one piece of code written twice and then edited apart: 13 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 (13 corresponding lines) smoke/lib/config.py:279— smoke/lib/config.py:279-291 | smoke/lib/config.py:294-306 — These two members are one piece of code written twice and then edited apart: 13 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 (12 corresponding lines) · ×3
Edited copy of a member (12 corresponding lines) src/free_claude_code/providers/openai_chat/usage.py:62— src/free_claude_code/providers/openai_chat/usage.py:62-73 | src/free_claude_code/providers/openai_chat/usage.py:77-92 — 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.
Edited copy of a member (12 corresponding lines) smoke/lib/claude_cli_matrix.py:372— smoke/lib/claude_cli_matrix.py:372-386 | smoke/lib/report.py:50-61 — 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.
Edited copy of a member (12 corresponding lines) src/free_claude_code/api/handlers/messages.py:252— src/free_claude_code/api/handlers/messages.py:252-263 | src/free_claude_code/api/handlers/responses.py:159-170 — 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 (11 corresponding lines) · ×3
Edited copy of a member (11 corresponding lines) src/free_claude_code/api/code_sessions_routes.py:359— src/free_claude_code/api/code_sessions_routes.py:359-372 | src/free_claude_code/api/code_sessions_routes.py:376-386 — 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) src/free_claude_code/core/chat_completions/responses_stream.py:196— src/free_claude_code/core/chat_completions/responses_stream.py:196-206 | src/free_claude_code/core/gemini/responses_stream.py:210-226 — 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) src/free_claude_code/core/trace.py:121— src/free_claude_code/core/trace.py:121-132 | src/free_claude_code/providers/mistral/caching.py:35-45 — 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 (5 corresponding lines) · ×3
Edited copy of a member (5 corresponding lines) src/free_claude_code/core/anthropic/conversion.py:212— src/free_claude_code/core/anthropic/conversion.py:212-218 | src/free_claude_code/core/openai_responses/provider_input.py:368-372 — 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.
Edited copy of a member (5 corresponding lines) src/free_claude_code/config/custom_providers.py:129— src/free_claude_code/config/custom_providers.py:129-133 | src/free_claude_code/config/model_refs.py:88-92 — 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.
Edited copy of a member (5 corresponding lines) src/free_claude_code/core/openai_responses/messages_stream.py:388— src/free_claude_code/core/openai_responses/messages_stream.py:388-392 | src/free_claude_code/providers/openai_chat/stream_output.py:674-680 — 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 (13 lines × 2) src/free_claude_code/core/gemini/native_request.py:257— src/free_claude_code/core/gemini/native_request.py:257-269 | src/free_claude_code/core/gemini/native_request.py:399-411 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) src/free_claude_code/messaging/rendering/discord_markdown.py:291— src/free_claude_code/messaging/rendering/discord_markdown.py:291-303 | src/free_claude_code/messaging/rendering/telegram_markdown.py:304-316 — before extracting anything, compare `src/free_claude_code/messaging/rendering/discord_markdown.py` and `src/free_claude_code/messaging/rendering/telegram_markdown.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (13 lines × 2) src/free_claude_code/providers/anthropic_messages/transport.py:572— src/free_claude_code/providers/anthropic_messages/transport.py:572-584 | src/free_claude_code/providers/openai_responses/transport.py:649-662 — 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. 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 × 2) src/free_claude_code/core/openai_tool_names.py:74— src/free_claude_code/core/openai_tool_names.py:74-84 | src/free_claude_code/core/openai_tool_names.py:92-102 — 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/free_claude_code/core/openai_tool_names.py:85` calls `isinstance` and `src/free_claude_code/core/openai_tool_names.py:103` does not — after which the two agree again for 3 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 (11 lines × 2) src/free_claude_code/messaging/platforms/discord.py:191— src/free_claude_code/messaging/platforms/discord.py:191-201 | src/free_claude_code/messaging/platforms/telegram.py:257-267 — 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 `src/free_claude_code/messaging/platforms/discord.py:191` 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 × 2) src/free_claude_code/providers/openai_chat/usage.py:62— src/free_claude_code/providers/openai_chat/usage.py:62-72 | src/free_claude_code/providers/openai_chat/usage.py:77-87 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) src/free_claude_code/messaging/rendering/discord_markdown.py:82— src/free_claude_code/messaging/rendering/discord_markdown.py:82-90 | src/free_claude_code/messaging/rendering/telegram_markdown.py:88-96 — before extracting anything, compare `src/free_claude_code/messaging/rendering/discord_markdown.py` and `src/free_claude_code/messaging/rendering/telegram_markdown.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/free_claude_code/messaging/rendering/discord_markdown.py:82` 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 (9 lines × 2) src/free_claude_code/messaging/trees/runtime.py:390— src/free_claude_code/messaging/trees/runtime.py:390-398 | src/free_claude_code/messaging/trees/runtime.py:407-415 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it.
Duplicated block (9 lines × 2) src/free_claude_code/api/handlers/chat.py:47— src/free_claude_code/api/handlers/chat.py:47-55 | src/free_claude_code/api/handlers/gemini.py:43-51 — the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach — a file they already depend on, or a new one alongside them — and call it from both call sites, so a change lands once.
Duplicated block (8 lines × 2) src/free_claude_code/runtime/integration_service.py:224— src/free_claude_code/runtime/integration_service.py:224-231 | src/free_claude_code/runtime/integration_service.py:251-258 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at `src/free_claude_code/runtime/integration_service.py:224` 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 (8 lines × 2) src/free_claude_code/harnesses/claude_integration.py:33— src/free_claude_code/harnesses/claude_integration.py:33-40 | src/free_claude_code/harnesses/claude_onboarding.py:18-25 — 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. 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 (8 lines × 2) src/free_claude_code/messaging/transcription.py:115— src/free_claude_code/messaging/transcription.py:115-122 | src/free_claude_code/providers/nvidia_nim/voice.py:100-107 — 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. 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.
FunctionTooLong: code_sessions.shell src/free_claude_code/api/admin_static/code_sessions.js:920— FunctionTooLong — shell runs 194 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 94 over it, 1.94× 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: code_sessions.buildPrompt src/free_claude_code/api/admin_static/code_sessions.js:1459— FunctionTooLong — buildPrompt runs 188 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 88 over it, 1.88× 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.
D4 · Code Duplication· Edited copy of a member (25 corresponding lines) · ×2
Edited copy of a member (25 corresponding lines) src/free_claude_code/api/handlers/chat.py:58— src/free_claude_code/api/handlers/chat.py:58-85 | src/free_claude_code/api/handlers/gemini.py:56-80 — 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) src/free_claude_code/providers/anthropic_messages/transport.py:350— src/free_claude_code/providers/anthropic_messages/transport.py:350-374 | src/free_claude_code/providers/gemini/transport.py:108-133 — 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 (24 corresponding lines) · ×2
Edited copy of a member (24 corresponding lines) src/free_claude_code/runtime/integration_service.py:626— src/free_claude_code/runtime/integration_service.py:626-649 | src/free_claude_code/runtime/integration_service.py:666-708 — 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.
Edited copy of a member (24 corresponding lines) src/free_claude_code/providers/failure_policy.py:256— src/free_claude_code/providers/failure_policy.py:256-285 | src/free_claude_code/providers/failure_policy.py:289-312 — 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 copy of a member (6 corresponding lines) · ×2
Edited copy of a member (6 corresponding lines) src/free_claude_code/providers/groq/tpm.py:97— src/free_claude_code/providers/groq/tpm.py:97-102 | src/free_claude_code/core/diagnostics.py:204-209 — 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) scripts/ci_timings.py:25— scripts/ci_timings.py:25-30 | src/free_claude_code/api/routes.py:60-65 — 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.
D4 · Code Duplication· Edited copy of a member (4 corresponding lines) · ×2
Edited copy of a member (4 corresponding lines) src/free_claude_code/providers/github_copilot/broker.py:226— src/free_claude_code/providers/github_copilot/broker.py:226-231 | src/free_claude_code/providers/github_copilot/sdk.py:223-226 — These two members are one piece of code written twice and then edited apart: 4 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 (4 corresponding lines) src/free_claude_code/providers/google_openai/reasoning.py:99— src/free_claude_code/providers/google_openai/reasoning.py:99-102 | src/free_claude_code/providers/openai_chat/reasoning.py:161-164 — These two members are one piece of code written twice and then edited apart: 4 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 (6 lines × 2) src/free_claude_code/harnesses/antigravity_integration.py:35— src/free_claude_code/harnesses/antigravity_integration.py:35-40 | src/free_claude_code/harnesses/config_file.py:16-21 — 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (6 lines × 2) src/free_claude_code/providers/anthropic_messages/wire.py:52— src/free_claude_code/providers/anthropic_messages/wire.py:52-57 | src/free_claude_code/providers/gemini/transport.py:74-79 — 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.
Low cohesion: FakePlatform (LCOM4 4) smoke/lib/e2e.py:311— FakePlatform's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Low cohesion: ResponsesOutputLedger (LCOM4 4) src/free_claude_code/core/openai_responses/streaming/ledger.py:17— ResponsesOutputLedger's methods fall into 4 groups that share no field and call none of each other, against a bar of more than 3 for this run (LCOM4, configurable — your repository's bar is the one quoted here). Each group is a set of methods reachable from one another through shared fields or direct calls, so 4 groups means the type has that many internally-connected clusters with nothing tying them together. Types whose shape makes a high count expected — and which would otherwise dominate this list — are excluded before this row is raised, so this is a genuine split candidate rather than a metric reading. It is still a shape, not a defect: confirm the groups match responsibilities you can name before splitting.
Duplicated block (7 lines × 2 locations) src/free_claude_code/api/admin_static/admin.js:2179— src/free_claude_code/api/admin_static/admin.js:2179 · src/free_claude_code/api/admin_static/admin.js:2700 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (7 lines × 2 locations) src/free_claude_code/api/admin_static/admin.js:2386— src/free_claude_code/api/admin_static/admin.js:2386 · src/free_claude_code/api/admin_static/admin.js:2584 — all 2 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
X24 · Document value interpolated into markup unescaped· Untrusted text written into markup unescaped · ×2
Untrusted text written into markup unescaped src/free_claude_code/api/admin_static/admin.js:870— `section.label` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Untrusted text written into markup unescaped src/free_claude_code/api/admin_static/code_sessions.js:1416— `item.html` is text this program did not author, and it is written into the text of an element through `innerHTML` with nothing encoding it for that place. Whoever controls the value controls the markup: it can close the element or attribute it sits in and open a script of its own. Encode it for HTML at this site, render it through the framework's escaping output, or sanitise it if it must stay markup.
Empty <h3> heading src/free_claude_code/api/admin_static/index.html:282— An empty heading appears in the document outline announced with no text. Give the heading text, or remove it if it's decorative.
AC6 · Visual & motion safety· Focus outline removed in CSS without a · ×1
Focus outline removed in CSS without a :focus replacement src/free_claude_code/api/admin_static/session_layout.css:445— `.session-composer textarea` sets the outline to none/0 and no visible :focus / :focus-visible style for that element replaces it in this stylesheet, so a keyboard user cannot see where focus is. Draw a focus ring (outline, box-shadow or border) under :focus-visible.
admin.apply (cyclomatic 65) src/free_claude_code/api/admin_static/admin.js:1570— admin.apply has cyclomatic complexity 65 (threshold 15). Of this number, 64 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
request_policy.resolve_messages_options (cyclomatic 63) src/free_claude_code/providers/anthropic_messages/request_policy.py:38— request_policy.resolve_messages_options has cyclomatic complexity 63 (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.
NativeMessagesStreamState.accept (cyclomatic 60) src/free_claude_code/core/anthropic/native_stream.py:50— NativeMessagesStreamState.accept has cyclomatic complexity 60 (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.
request._build (cyclomatic 60) src/free_claude_code/core/gemini/request.py:106— request._build has cyclomatic complexity 60 (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.
discord_markdown.render_markdown_to_discord (cyclomatic 56) src/free_claude_code/messaging/rendering/discord_markdown.py:55— discord_markdown.render_markdown_to_discord has cyclomatic complexity 56 (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.
telegram_markdown.render_markdown_to_mdv2 (cyclomatic 56) src/free_claude_code/messaging/rendering/telegram_markdown.py:52— telegram_markdown.render_markdown_to_mdv2 has cyclomatic complexity 56 (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.
GeminiStream.feed (cyclomatic 53) src/free_claude_code/providers/gemini/stream.py:65— GeminiStream.feed 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.
ChatRequest.validate_messages (cyclomatic 52) src/free_claude_code/core/chat_completions/request.py:33— ChatRequest.validate_messages has cyclomatic complexity 52 (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.
code_sessions.renderControls (cyclomatic 51) src/free_claude_code/api/admin_static/code_sessions.js:1256— code_sessions.renderControls has cyclomatic complexity 51 (threshold 15). Of this number, 50 points are the body's own statements and 1 belongs to one function literal inside it that branches. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
AnthropicMessagesTransport._run (cyclomatic 50) src/free_claude_code/providers/anthropic_messages/transport.py:376— AnthropicMessagesTransport._run has cyclomatic complexity 50 (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.
SourceRecoveryState.observe (cyclomatic 50) src/free_claude_code/providers/continuation.py:68— SourceRecoveryState.observe has cyclomatic complexity 50 (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.
OpenAIResponsesTransport._run_execution (cyclomatic 49) src/free_claude_code/providers/openai_responses/transport.py:415— OpenAIResponsesTransport._run_execution 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.
PublicResponseStream._publish (cyclomatic 48) src/free_claude_code/api/stream_delivery.py:324— PublicResponseStream._publish has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
model_listing.extract_openai_model_infos (cyclomatic 48) src/free_claude_code/providers/model_listing.py:40— model_listing.extract_openai_model_infos has cyclomatic complexity 48 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
event_parser.parse_cli_event (cyclomatic 46) src/free_claude_code/messaging/event_parser.py:12— event_parser.parse_cli_event 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.
history_replay.history_retry_body (cyclomatic 46) src/free_claude_code/providers/history_replay.py:158— history_replay.history_retry_body 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.
code_sessions.buildPrompt (cyclomatic 46) src/free_claude_code/api/admin_static/code_sessions.js:1459— code_sessions.buildPrompt has cyclomatic complexity 46 (threshold 15). Of this number, 25 points are the body's own statements and 21 belong to 6 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.
DeliveredResponse._responses (cyclomatic 45) src/free_claude_code/core/delivered_response.py:322— DeliveredResponse._responses has cyclomatic complexity 45 (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.
ChatResponseAccumulator.feed (cyclomatic 43) src/free_claude_code/core/chat_completions/response.py:166— ChatResponseAccumulator.feed 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.
native_request.messages_to_gemini (cyclomatic 43) src/free_claude_code/core/gemini/native_request.py:318— native_request.messages_to_gemini 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.
passthrough.stream_native_messages (cyclomatic 43) src/free_claude_code/providers/anthropic_messages/passthrough.py:63— passthrough.stream_native_messages 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.
native_request.responses_to_gemini (cyclomatic 41) src/free_claude_code/core/gemini/native_request.py:460— native_request.responses_to_gemini has cyclomatic complexity 41 (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.
_OpenAIChatStreamRunner._run_execution (cyclomatic 38) src/free_claude_code/providers/openai_chat/transport.py:1171— _OpenAIChatStreamRunner._run_execution has cyclomatic complexity 38 (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.
CodexProtocol.notification (cyclomatic 37) src/free_claude_code/runtime/codex_protocol.py:54— CodexProtocol.notification has cyclomatic complexity 37 (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.
native_request.chat_to_gemini (cyclomatic 36) src/free_claude_code/core/gemini/native_request.py:181— native_request.chat_to_gemini has cyclomatic complexity 36 (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.
ResponsesToolCallBuffer.feed (cyclomatic 36) src/free_claude_code/core/openai_responses/tool_calls.py:55— ResponsesToolCallBuffer.feed has cyclomatic complexity 36 (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.
GeminiTransport._run (cyclomatic 36) src/free_claude_code/providers/gemini/transport.py:135— GeminiTransport._run has cyclomatic complexity 36 (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.
ContinuationOverlap._texts (cyclomatic 35) src/free_claude_code/core/continuation_overlap.py:170— ContinuationOverlap._texts has cyclomatic complexity 35 (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.
GeminiResponsesStream.feed (cyclomatic 35) src/free_claude_code/core/gemini/responses_stream.py:52— GeminiResponsesStream.feed has cyclomatic complexity 35 (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.
history_replay._restore_gemini_parts (cyclomatic 35) src/free_claude_code/core/history_replay.py:1139— history_replay._restore_gemini_parts has cyclomatic complexity 35 (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.
ContinuationRequest.history (cyclomatic 34) src/free_claude_code/core/continuation_request.py:88— ContinuationRequest.history has cyclomatic complexity 34 (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.
failure_policy._classify_provider_failure (cyclomatic 33) src/free_claude_code/providers/failure_policy.py:362— failure_policy._classify_provider_failure 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.
code_sessions.render (cyclomatic 33) src/free_claude_code/api/admin_static/code_sessions.js:1152— code_sessions.render has cyclomatic complexity 33 (threshold 15). Of this number, 32 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
tokens.get_token_count (cyclomatic 32) src/free_claude_code/core/anthropic/tokens.py:37— tokens.get_token_count 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.
history_replay._validate_record (cyclomatic 32) src/free_claude_code/core/history_replay.py:200— history_replay._validate_record 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.
history_replay._prepare_chat_content (cyclomatic 32) src/free_claude_code/core/history_replay.py:942— history_replay._prepare_chat_content 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.
CodexAppServer._packet (cyclomatic 32) src/free_claude_code/runtime/codex_app_server.py:308— CodexAppServer._packet 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.
ResponsesToolEventAdapter.feed (cyclomatic 31) src/free_claude_code/core/openai_responses/tool_adaptation.py:625— ResponsesToolEventAdapter.feed 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.
MessagingNodeRunner._process_node_impl (cyclomatic 31) src/free_claude_code/messaging/node_runner.py:118— MessagingNodeRunner._process_node_impl 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.
ResponsesToolAdapter.restore_tools (cyclomatic 30) src/free_claude_code/core/openai_responses/tool_adaptation.py:486— ResponsesToolAdapter.restore_tools 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.
ResponsesToolCallBuffer._finish_item (cyclomatic 30) src/free_claude_code/core/openai_responses/tool_calls.py:162— ResponsesToolCallBuffer._finish_item 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.
MessagingRateLimiter._worker (cyclomatic 30) src/free_claude_code/messaging/limiter.py:61— MessagingRateLimiter._worker 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.
StructuredReasoningStream.events (cyclomatic 30) src/free_claude_code/providers/openai_chat/reasoning_details.py:57— StructuredReasoningStream.events 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.
OpenAIChatTransport._create_stream (cyclomatic 30) src/free_claude_code/providers/openai_chat/transport.py:634— OpenAIChatTransport._create_stream 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.
admin.refreshStartup (cyclomatic 30) src/free_claude_code/api/admin_static/admin.js:153— admin.refreshStartup has cyclomatic complexity 30 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
NativePrompt.answer (cyclomatic 29) src/free_claude_code/runtime/codex_protocol.py:530— NativePrompt.answer has cyclomatic complexity 29 (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.
codex_protocol._validate_field (cyclomatic 29) src/free_claude_code/runtime/codex_protocol.py:644— codex_protocol._validate_field has cyclomatic complexity 29 (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.
GeminiMessagesStream.feed (cyclomatic 28) src/free_claude_code/core/gemini/messages_stream.py:45— GeminiMessagesStream.feed has cyclomatic complexity 28 (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.
replay.decode_bundle (cyclomatic 28) src/free_claude_code/core/gemini/replay.py:60— replay.decode_bundle has cyclomatic complexity 28 (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.
merge (cyclomatic 28) src/free_claude_code/api/admin_static/code_sessions.js:164— merge has cyclomatic complexity 28 (threshold 15). Of this number, 25 points are the body's own statements and 3 belong to 2 function literals 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.
SessionState.stage_item (cyclomatic 27) src/free_claude_code/application/code_sessions/state.py:452— SessionState.stage_item has cyclomatic complexity 27 (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.
ManagedClaudeSession.start_task (cyclomatic 27) src/free_claude_code/cli/managed/session.py:96— ManagedClaudeSession.start_task 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.
MessageTreeGraph.from_snapshot (cyclomatic 27) src/free_claude_code/messaging/trees/graph.py:189— MessageTreeGraph.from_snapshot 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.
ChatResponsesStream.feed (cyclomatic 26) src/free_claude_code/core/chat_completions/responses_stream.py:48— ChatResponsesStream.feed 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.
history_replay.readable_reasoning (cyclomatic 26) src/free_claude_code/core/history_replay.py:399— history_replay.readable_reasoning 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.
request_policy.non_messages_reasoning (cyclomatic 26) src/free_claude_code/providers/github_copilot/request_policy.py:54— request_policy.non_messages_reasoning has cyclomatic complexity 26 (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.
CodexProtocol._project (cyclomatic 26) src/free_claude_code/runtime/codex_protocol.py:264— CodexProtocol._project 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.
NativePrompt._form (cyclomatic 26) src/free_claude_code/runtime/codex_protocol.py:389— NativePrompt._form 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.
credentials.resolve_credential_edit (cyclomatic 25) src/free_claude_code/config/admin/credentials.py:66— credentials.resolve_credential_edit has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
AnthropicToOpenAIConverter._convert_assistant_message (cyclomatic 25) src/free_claude_code/core/anthropic/conversion.py:625— AnthropicToOpenAIConverter._convert_assistant_message has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
native.build_native_messages_request (cyclomatic 25) src/free_claude_code/core/anthropic/native.py:116— native.build_native_messages_request has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_ResponsesChatInputBuilder._apply_pending_reasoning (cyclomatic 25) src/free_claude_code/core/openai_responses/chat_request.py:299— _ResponsesChatInputBuilder._apply_pending_reasoning has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ResponsesToolAdapter.__init__ (cyclomatic 25) src/free_claude_code/core/openai_responses/tool_adaptation.py:58— ResponsesToolAdapter.__init__ has cyclomatic complexity 25 (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.
ResponsesToolAdapter._tool (cyclomatic 25) src/free_claude_code/core/openai_responses/tool_adaptation.py:202— ResponsesToolAdapter._tool has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
sdk._endpoint (cyclomatic 25) src/free_claude_code/providers/github_copilot/sdk.py:405— sdk._endpoint has cyclomatic complexity 25 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
admin.updateProviderCard (cyclomatic 25) src/free_claude_code/api/admin_static/admin.js:375— admin.updateProviderCard has cyclomatic complexity 25 (threshold 15). Of this number, 24 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
ChatMessagesStream.feed (cyclomatic 24) src/free_claude_code/core/chat_completions/messages_stream.py:35— ChatMessagesStream.feed 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.
request._reasoning_items (cyclomatic 24) src/free_claude_code/core/chat_completions/request.py:266— request._reasoning_items 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.
request.chat_messages_body (cyclomatic 24) src/free_claude_code/core/chat_completions/request.py:352— request.chat_messages_body 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.
ContinuationOverlap._feed (cyclomatic 24) src/free_claude_code/core/continuation_overlap.py:80— ContinuationOverlap._feed 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.
ContinuationStream._map (cyclomatic 24) src/free_claude_code/core/continuation_stream.py:135— ContinuationStream._map 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.
tool_search.resolve_client_search_history (cyclomatic 24) src/free_claude_code/core/openai_responses/tool_search.py:33— tool_search.resolve_client_search_history 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.
response_collection._validate (cyclomatic 23) src/free_claude_code/application/response_collection.py:68— response_collection._validate 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.
ChatToolCallBuffer.feed (cyclomatic 23) src/free_claude_code/core/chat_completions/tool_calls.py:205— ChatToolCallBuffer.feed 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.
schema.json_schema (cyclomatic 23) src/free_claude_code/core/gemini/schema.py:39— schema.json_schema 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.
provider_input._assistant_items (cyclomatic 23) src/free_claude_code/core/openai_responses/provider_input.py:160— provider_input._assistant_items 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.
persistence.prepare_admin_update (cyclomatic 22) src/free_claude_code/config/admin/persistence.py:150— persistence.prepare_admin_update has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ToolCallIdentityResolver.resolve (cyclomatic 22) src/free_claude_code/core/chat_completions/tool_calls.py:52— ToolCallIdentityResolver.resolve 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.
ContinuationStream.finalize (cyclomatic 22) src/free_claude_code/core/continuation_stream.py:173— ContinuationStream.finalize has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
history.normalized_history (cyclomatic 22) src/free_claude_code/core/gemini/history.py:18— history.normalized_history has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
history_replay._prepare_gemini_history (cyclomatic 22) src/free_claude_code/core/history_replay.py:1242— history_replay._prepare_gemini_history has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
VoiceNoteFlow.handle (cyclomatic 22) src/free_claude_code/messaging/platforms/voice_flow.py:144— VoiceNoteFlow.handle has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
admin.renderField (cyclomatic 22) src/free_claude_code/api/admin_static/admin.js:930— admin.renderField has cyclomatic complexity 22 (threshold 15). Of this number, 17 points are the body's own statements and 5 belong to 3 function literals inside it that branch. 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.
ChatToolCallBuffer._complete_native_group (cyclomatic 21) src/free_claude_code/core/chat_completions/tool_calls.py:336— ChatToolCallBuffer._complete_native_group 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.
history_replay.prepare_history (cyclomatic 21) src/free_claude_code/core/history_replay.py:656— history_replay.prepare_history 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.
history_replay._prepare_response_history (cyclomatic 21) src/free_claude_code/core/history_replay.py:790— history_replay._prepare_response_history 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.
ResponsesToolAdapter.restore_item (cyclomatic 21) src/free_claude_code/core/openai_responses/tool_adaptation.py:419— ResponsesToolAdapter.restore_item 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.
renderItem (cyclomatic 21) src/free_claude_code/api/admin_static/code_sessions.js:1366— renderItem 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.
env_migrations.consolidate_managed_config (cyclomatic 20) src/free_claude_code/config/env_migrations.py:191— env_migrations.consolidate_managed_config 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.
DeliveredResponse.observe (cyclomatic 20) src/free_claude_code/core/delivered_response.py:94— DeliveredResponse.observe has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
history_replay.resolve_messages_replay (cyclomatic 20) src/free_claude_code/core/history_replay.py:352— history_replay.resolve_messages_replay 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.
ResponsesProviderStream._item_done (cyclomatic 20) src/free_claude_code/core/openai_responses/provider_stream.py:231— ResponsesProviderStream._item_done 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.
ReasoningCorrection.retry_body (cyclomatic 20) src/free_claude_code/providers/reasoning_compatibility.py:70— ReasoningCorrection.retry_body 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.
admin.inputForField (cyclomatic 20) src/free_claude_code/api/admin_static/admin.js:1022— admin.inputForField has cyclomatic complexity 20 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
SessionState.match_history (cyclomatic 19) src/free_claude_code/application/code_sessions/state.py:377— SessionState.match_history has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
request.chat_responses_body (cyclomatic 19) src/free_claude_code/core/chat_completions/request.py:493— request.chat_responses_body has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ChatResponsesStream._item (cyclomatic 19) src/free_claude_code/core/chat_completions/responses_stream.py:208— ChatResponsesStream._item has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
tool_calls._native_parts (cyclomatic 19) src/free_claude_code/core/chat_completions/tool_calls.py:472— tool_calls._native_parts has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DeliveredResponse._chat (cyclomatic 19) src/free_claude_code/core/delivered_response.py:145— DeliveredResponse._chat has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
request._controls (cyclomatic 19) src/free_claude_code/core/gemini/request.py:351— request._controls has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
chat_request.build_responses_chat_request (cyclomatic 19) src/free_claude_code/core/openai_responses/chat_request.py:364— chat_request.build_responses_chat_request has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
messages_request.build_responses_messages_request (cyclomatic 19) src/free_claude_code/core/openai_responses/messages_request.py:578— messages_request.build_responses_messages_request has cyclomatic complexity 19 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages.
openai_tool_names.encode_openai_chat_tool_names (cyclomatic 19) src/free_claude_code/core/openai_tool_names.py:65— openai_tool_names.encode_openai_chat_tool_names has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
CopilotResponsesEvents.__call__ (cyclomatic 19) src/free_claude_code/providers/github_copilot/responses_events.py:18— CopilotResponsesEvents.__call__ has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
claude_cli_matrix.classify_probe (cyclomatic 18) smoke/lib/claude_cli_matrix.py:267— claude_cli_matrix.classify_probe has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
request._normalized_search_history (cyclomatic 18) src/free_claude_code/application/web_tools/request.py:207— request._normalized_search_history has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
WebToolService._stream_automatic_search (cyclomatic 18) src/free_claude_code/application/web_tools/service.py:123— WebToolService._stream_automatic_search has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
custom_providers.merge_custom_provider (cyclomatic 18) src/free_claude_code/config/admin/custom_providers.py:25— custom_providers.merge_custom_provider has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ChatToolCallBuffer._feed_native (cyclomatic 18) src/free_claude_code/core/chat_completions/tool_calls.py:290— ChatToolCallBuffer._feed_native has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ContinuationOverlap._render (cyclomatic 18) src/free_claude_code/core/continuation_overlap.py:396— ContinuationOverlap._render has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
history_replay._continuation_replay (cyclomatic 18) src/free_claude_code/core/history_replay.py:162— history_replay._continuation_replay has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
history_replay._prepare_messages_content (cyclomatic 18) src/free_claude_code/core/history_replay.py:860— history_replay._prepare_messages_content has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ResponsesToolAdapter._identity (cyclomatic 18) src/free_claude_code/core/openai_responses/tool_adaptation.py:393— ResponsesToolAdapter._identity has cyclomatic complexity 18 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
replay_finalization._carrier_fields (cyclomatic 18) src/free_claude_code/core/replay_finalization.py:20— replay_finalization._carrier_fields has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ContinuationSeed.readable_text (cyclomatic 18) src/free_claude_code/core/stream_recovery.py:34— ContinuationSeed.readable_text has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
claude_desktop_integration._load (cyclomatic 18) src/free_claude_code/harnesses/claude_desktop_integration.py:203— claude_desktop_integration._load has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
MessagingRateLimiter.shutdown (cyclomatic 18) src/free_claude_code/messaging/limiter.py:171— MessagingRateLimiter.shutdown 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.
AlibabaCloudProvider._list_models_payload (cyclomatic 18) src/free_claude_code/providers/alibaba_cloud/client.py:64— AlibabaCloudProvider._list_models_payload has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
compat._strip_document_blocks (cyclomatic 18) src/free_claude_code/providers/deepseek/compat.py:106— compat._strip_document_blocks has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
tool_schema._sanitize_nim_schema_node (cyclomatic 18) src/free_claude_code/providers/nvidia_nim/tool_schema.py:96— tool_schema._sanitize_nim_schema_node has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
StructuredReasoningStream.finish (cyclomatic 18) src/free_claude_code/providers/openai_chat/reasoning_details.py:223— StructuredReasoningStream.finish has cyclomatic complexity 18 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
admin.openCustomProviderDialog (cyclomatic 18) src/free_claude_code/api/admin_static/admin.js:489— admin.openCustomProviderDialog has cyclomatic complexity 18 (threshold 15). Of this number, 17 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
admin.renderCodexIntegration (cyclomatic 18) src/free_claude_code/api/admin_static/admin.js:2316— admin.renderCodexIntegration 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.
code_sessions.shell (cyclomatic 18) src/free_claude_code/api/admin_static/code_sessions.js:920— code_sessions.shell has cyclomatic complexity 18 (threshold 15). Of this number, 11 points are the body's own statements and 7 belong to 5 function literals inside it that branch. 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.
request.plan_automatic_web_search (cyclomatic 17) src/free_claude_code/application/web_tools/request.py:103— request.plan_automatic_web_search has cyclomatic complexity 17 (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.
DeliveredResponse._messages (cyclomatic 17) src/free_claude_code/core/delivered_response.py:264— DeliveredResponse._messages has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
DeliveredResponse.snapshot (cyclomatic 17) src/free_claude_code/core/delivered_response.py:466— DeliveredResponse.snapshot has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
GeminiResponsesStream._item (cyclomatic 17) src/free_claude_code/core/gemini/responses_stream.py:228— GeminiResponsesStream._item has cyclomatic complexity 17 (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.
chat_request._body_tool_names (cyclomatic 17) src/free_claude_code/core/openai_responses/chat_request.py:680— chat_request._body_tool_names has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
_MessagesInput.add (cyclomatic 17) src/free_claude_code/core/openai_responses/messages_request.py:379— _MessagesInput.add has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
messages_request._output_format (cyclomatic 17) src/free_claude_code/core/openai_responses/messages_request.py:523— messages_request._output_format has cyclomatic complexity 17 (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.
AnthropicToResponsesStream.feed (cyclomatic 17) src/free_claude_code/core/openai_responses/messages_stream.py:172— AnthropicToResponsesStream.feed has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
ResponsesToolAdapter._input (cyclomatic 17) src/free_claude_code/core/openai_responses/tool_adaptation.py:282— ResponsesToolAdapter._input has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
tool_search._merge_tool_groups (cyclomatic 17) src/free_claude_code/core/openai_responses/tool_search.py:104— tool_search._merge_tool_groups has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
TranscriptBuffer.apply (cyclomatic 17) src/free_claude_code/messaging/transcript/buffer.py:47— TranscriptBuffer.apply has cyclomatic complexity 17 (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.
MessageTree.remove_message_subtree (cyclomatic 17) src/free_claude_code/messaging/trees/runtime.py:314— MessageTree.remove_message_subtree has cyclomatic complexity 17 (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.
headers.native_request (cyclomatic 17) src/free_claude_code/providers/anthropic/headers.py:23— headers.native_request has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
models.model_record (cyclomatic 17) src/free_claude_code/providers/anthropic/models.py:20— models.model_record has cyclomatic complexity 17 (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.
GeminiStream.finish (cyclomatic 17) src/free_claude_code/providers/gemini/stream.py:232— GeminiStream.finish has cyclomatic complexity 17 (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.
SdkRuntime._close_client (cyclomatic 17) src/free_claude_code/providers/github_copilot/sdk.py:232— SdkRuntime._close_client has cyclomatic complexity 17 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
discovery._provider_query_failure_reason (cyclomatic 17) src/free_claude_code/providers/runtime/discovery.py:42— discovery._provider_query_failure_reason has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
IntegrationService._dsh_desktop (cyclomatic 17) src/free_claude_code/runtime/integration_service.py:279— IntegrationService._dsh_desktop has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
admin.renderClaudeDesktopIntegration (cyclomatic 17) src/free_claude_code/api/admin_static/admin.js:2514— admin.renderClaudeDesktopIntegration has cyclomatic complexity 17 (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.
code_sessions.detail (cyclomatic 17) src/free_claude_code/api/admin_static/code_sessions.js:333— code_sessions.detail has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
code_sessions.readBootstrap (cyclomatic 17) src/free_claude_code/api/admin_static/code_sessions.js:377— code_sessions.readBootstrap has cyclomatic complexity 17 (threshold 15). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
code_sessions.synchronize (cyclomatic 17) src/free_claude_code/api/admin_static/code_sessions.js:430— code_sessions.synchronize has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
FccModelCombobox.handleKeydown (cyclomatic 17) src/free_claude_code/api/admin_static/model_combobox.js:166— FccModelCombobox.handleKeydown has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top.
model_catalog._build_direct_models_response (cyclomatic 16) src/free_claude_code/api/model_catalog.py:206— model_catalog._build_direct_models_response 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.
env_migrations._normalize_credential_lists (cyclomatic 16) src/free_claude_code/config/env_migrations.py:265— env_migrations._normalize_credential_lists 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.
AnthropicToOpenAIConverter._convert_message_to_segments (cyclomatic 16) src/free_claude_code/core/anthropic/conversion.py:494— AnthropicToOpenAIConverter._convert_message_to_segments 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.
MessagesToolCallBuffer.feed (cyclomatic 16) src/free_claude_code/core/anthropic/tool_calls.py:30— MessagesToolCallBuffer.feed 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.
_PendingCall.add (cyclomatic 16) src/free_claude_code/core/chat_completions/tool_calls.py:119— _PendingCall.add 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.
ContinuationOverlap._check_terminal_order (cyclomatic 16) src/free_claude_code/core/continuation_overlap.py:365— ContinuationOverlap._check_terminal_order 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.
AnthropicToResponsesStream._start_block (cyclomatic 16) src/free_claude_code/core/openai_responses/messages_stream.py:230— AnthropicToResponsesStream._start_block 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.
stream_output.call_references (cyclomatic 16) src/free_claude_code/core/stream_output.py:27— stream_output.call_references 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.
stream_recovery.assess_recovery (cyclomatic 16) src/free_claude_code/core/stream_recovery.py:99— stream_recovery.assess_recovery 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.
renderer.render_segments (cyclomatic 16) src/free_claude_code/messaging/transcript/renderer.py:10— renderer.render_segments 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.
PendingVoiceRegistry.handoff (cyclomatic 16) src/free_claude_code/messaging/voice.py:125— PendingVoiceRegistry.handoff 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.
provider._apply_native_reasoning (cyclomatic 16) src/free_claude_code/providers/anthropic/provider.py:58— provider._apply_native_reasoning 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.
failure_policy.retryable_transient_status (cyclomatic 16) src/free_claude_code/providers/failure_policy.py:198— failure_policy.retryable_transient_status 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.
sdk._model (cyclomatic 16) src/free_claude_code/providers/github_copilot/sdk.py:353— sdk._model 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.
history_replay._reasoning_records (cyclomatic 16) src/free_claude_code/providers/history_replay.py:300— history_replay._reasoning_records 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.
history_replay._rejected_record (cyclomatic 16) src/free_claude_code/providers/history_replay.py:343— history_replay._rejected_record 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.
admin.refreshLocalStatus (cyclomatic 16) src/free_claude_code/api/admin_static/admin.js:1664— admin.refreshLocalStatus has cyclomatic complexity 16 (threshold 15). Most of this is not in the body itself: 2 of the 16 points are its own statements and the rest belongs to 2 function literals inside it that branch (lines 1672, 1666). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
AnthropicMessagesTransport._run (cognitive 139) src/free_claude_code/providers/anthropic_messages/transport.py:376— AnthropicMessagesTransport._run has cognitive complexity 139 (threshold 15). Drivers by points: if/else 26 (75 pts), ternaries 7 (27 pts), loops 7 (25 pts), boolean chains 8, error handling 2 (4 pts) (nesting depth added 89). 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.
request._build (cognitive 137) src/free_claude_code/core/gemini/request.py:106— request._build has cognitive complexity 137 (threshold 15). Drivers by points: if/else 31 (85 pts), ternaries 13 (32 pts), boolean chains 10, loops 5 (10 pts) (nesting depth added 78). 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.
OpenAIResponsesTransport._run_execution (cognitive 129) src/free_claude_code/providers/openai_responses/transport.py:415— OpenAIResponsesTransport._run_execution has cognitive complexity 129 (threshold 15). Drivers by points: if/else 26 (83 pts), loops 5 (16 pts), ternaries 5 (13 pts), boolean chains 9, error handling 3 (8 pts) (nesting depth added 81). 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.
buildPrompt (cognitive 128) src/free_claude_code/api/admin_static/code_sessions.js:1459— buildPrompt has cognitive complexity 128 (threshold 15). Drivers by points: if/else 26 (66 pts), ternaries 10 (39 pts), loops 4 (12 pts), boolean chains 7, error handling 2 (4 pts) (nesting depth added 79). Of this number, 75 points are the body's own statements and 53 belong to 21 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.
ChatResponseAccumulator.feed (cognitive 119) src/free_claude_code/core/chat_completions/response.py:166— ChatResponseAccumulator.feed has cognitive complexity 119 (threshold 15). Drivers by points: if/else 21 (70 pts), loops 9 (35 pts), boolean chains 9, ternaries 1 (5 pts) (nesting depth added 79). 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.
discord_markdown.render_markdown_to_discord (cognitive 111) src/free_claude_code/messaging/rendering/discord_markdown.py:55— discord_markdown.render_markdown_to_discord has cognitive complexity 111 (threshold 15). Drivers by points: if/else 20 (67 pts), loops 7 (25 pts), error handling 2 (13 pts), boolean chains 6 (nesting depth added 76). 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.
telegram_markdown.render_markdown_to_mdv2 (cognitive 111) src/free_claude_code/messaging/rendering/telegram_markdown.py:52— telegram_markdown.render_markdown_to_mdv2 has cognitive complexity 111 (threshold 15). Drivers by points: if/else 20 (67 pts), loops 7 (25 pts), error handling 2 (13 pts), boolean chains 6 (nesting depth added 76). 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.
GeminiStream.feed (cognitive 110) src/free_claude_code/providers/gemini/stream.py:65— GeminiStream.feed has cognitive complexity 110 (threshold 15). Drivers by points: if/else 31 (79 pts), boolean chains 13, loops 4 (10 pts), error handling 2 (8 pts) (nesting depth added 60). 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.
passthrough.stream_native_messages (cognitive 104) src/free_claude_code/providers/anthropic_messages/passthrough.py:63— passthrough.stream_native_messages has cognitive complexity 104 (threshold 15). Drivers by points: if/else 26 (72 pts), loops 5 (13 pts), error handling 5 (9 pts), boolean chains 6, ternaries 2 (4 pts) (nesting depth added 60). 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.
model_listing.extract_openai_model_infos (cognitive 103) src/free_claude_code/providers/model_listing.py:40— model_listing.extract_openai_model_infos has cognitive complexity 103 (threshold 15). Drivers by points: if/else 28 (78 pts), boolean chains 11, loops 5 (10 pts), ternaries 2 (4 pts) (nesting depth added 57). 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.
NativeMessagesStreamState.accept (cognitive 98) src/free_claude_code/core/anthropic/native_stream.py:50— NativeMessagesStreamState.accept has cognitive complexity 98 (threshold 15). Drivers by points: if/else 42 (79 pts), boolean chains 15, ternaries 1 (2 pts), error handling 1, loops 1 (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.
ResponsesToolAdapter.restore_tools (cognitive 96) src/free_claude_code/core/openai_responses/tool_adaptation.py:486— ResponsesToolAdapter.restore_tools has cognitive complexity 96 (threshold 15). Drivers by points: if/else 20 (75 pts), ternaries 2 (8 pts), boolean chains 7, loops 2 (6 pts) (nesting depth added 65). 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.
history_replay.history_retry_body (cognitive 95) src/free_claude_code/providers/history_replay.py:158— history_replay.history_retry_body has cognitive complexity 95 (threshold 15). Drivers by points: if/else 24 (63 pts), boolean chains 14, loops 4 (9 pts), ternaries 3 (8 pts), error handling 1 (nesting depth added 49). 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.
native_request.messages_to_gemini (cognitive 86) src/free_claude_code/core/gemini/native_request.py:318— native_request.messages_to_gemini has cognitive complexity 86 (threshold 15). Drivers by points: if/else 26 (56 pts), ternaries 6 (20 pts), loops 4 (6 pts), boolean chains 4 (nesting depth added 46). 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.
GeminiTransport._run (cognitive 83) src/free_claude_code/providers/gemini/transport.py:135— GeminiTransport._run has cognitive complexity 83 (threshold 15). Drivers by points: if/else 23 (59 pts), ternaries 3 (10 pts), error handling 3 (6 pts), loops 3 (5 pts), boolean chains 3 (nesting depth added 48). 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.
SourceRecoveryState.observe (cognitive 81) src/free_claude_code/providers/continuation.py:68— SourceRecoveryState.observe has cognitive complexity 81 (threshold 15). Drivers by points: if/else 23 (51 pts), boolean chains 20, loops 4 (10 pts) (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_OpenAIChatStreamRunner._run_execution (cognitive 81) src/free_claude_code/providers/openai_chat/transport.py:1171— _OpenAIChatStreamRunner._run_execution has cognitive complexity 81 (threshold 15). Drivers by points: if/else 15 (41 pts), loops 12 (28 pts), boolean chains 5, error handling 2 (4 pts), ternaries 3 (nesting depth added 44). 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.
event_parser.parse_cli_event (cognitive 80) src/free_claude_code/messaging/event_parser.py:12— event_parser.parse_cli_event has cognitive complexity 80 (threshold 15). Drivers by points: if/else 30 (60 pts), ternaries 4 (10 pts), boolean chains 7, loops 1 (3 pts) (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.
ChatRequest.validate_messages (cognitive 79) src/free_claude_code/core/chat_completions/request.py:33— ChatRequest.validate_messages has cognitive complexity 79 (threshold 15). Drivers by points: if/else 21 (45 pts), boolean chains 23, loops 5 (8 pts), ternaries 1 (3 pts) (nesting depth added 29). 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.
tokens.get_token_count (cognitive 78) src/free_claude_code/core/anthropic/tokens.py:37— tokens.get_token_count has cognitive complexity 78 (threshold 15). Drivers by points: if/else 16 (47 pts), error handling 2 (10 pts), loops 4 (9 pts), ternaries 2 (8 pts), boolean chains 4 (nesting depth added 50). 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.
history_replay._prepare_chat_content (cognitive 77) src/free_claude_code/core/history_replay.py:942— history_replay._prepare_chat_content has cognitive complexity 77 (threshold 15). Drivers by points: if/else 18 (50 pts), loops 4 (15 pts), boolean chains 9, ternaries 1 (3 pts) (nesting depth added 45). 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.
request_policy.resolve_messages_options (cognitive 77) src/free_claude_code/providers/anthropic_messages/request_policy.py:38— request_policy.resolve_messages_options has cognitive complexity 77 (threshold 15). Drivers by points: if/else 28 (44 pts), boolean chains 24, ternaries 6 (9 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessagingRateLimiter._worker (cognitive 76) src/free_claude_code/messaging/limiter.py:61— MessagingRateLimiter._worker has cognitive complexity 76 (threshold 15). Drivers by points: if/else 14 (42 pts), loops 6 (14 pts), error handling 5 (12 pts), boolean chains 4, ternaries 1 (4 pts) (nesting depth added 46). 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.
apply (cognitive 73) src/free_claude_code/api/admin_static/admin.js:1570— apply has cognitive complexity 73 (threshold 15). Drivers by points: if/else 22 (30 pts), boolean chains 22, ternaries 13 (18 pts), loops 1 (2 pts), error handling 1 (nesting depth added 14). Of this number, 72 points are the body's own statements and 1 belongs to 4 function literals inside it that branch. 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.
DeliveredResponse._responses (cognitive 68) src/free_claude_code/core/delivered_response.py:322— DeliveredResponse._responses has cognitive complexity 68 (threshold 15). Drivers by points: if/else 16 (30 pts), ternaries 10 (23 pts), boolean chains 11, loops 2 (4 pts) (nesting depth added 29). 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.
PublicResponseStream._publish (cognitive 67) src/free_claude_code/api/stream_delivery.py:324— PublicResponseStream._publish has cognitive complexity 67 (threshold 15). Drivers by points: if/else 24 (45 pts), boolean chains 17, ternaries 3 (5 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ContinuationRequest.history (cognitive 66) src/free_claude_code/core/continuation_request.py:88— ContinuationRequest.history has cognitive complexity 66 (threshold 15). Drivers by points: if/else 25 (55 pts), boolean chains 5, loops 2 (5 pts), ternaries 1 (nesting depth added 33). 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.
ResponsesToolEventAdapter.feed (cognitive 64) src/free_claude_code/core/openai_responses/tool_adaptation.py:625— ResponsesToolEventAdapter.feed has cognitive complexity 64 (threshold 15). Drivers by points: if/else 18 (43 pts), boolean chains 8, ternaries 2 (6 pts), error handling 1 (4 pts), loops 1 (3 pts) (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.
ResponsesToolCallBuffer.feed (cognitive 63) src/free_claude_code/core/openai_responses/tool_calls.py:55— ResponsesToolCallBuffer.feed has cognitive complexity 63 (threshold 15). Drivers by points: if/else 21 (46 pts), boolean chains 13, loops 1 (3 pts), ternaries 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.
native_request.responses_to_gemini (cognitive 62) src/free_claude_code/core/gemini/native_request.py:460— native_request.responses_to_gemini has cognitive complexity 62 (threshold 15). Drivers by points: if/else 23 (43 pts), ternaries 5 (9 pts), boolean chains 7, loops 3 (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.
history_replay._restore_gemini_parts (cognitive 62) src/free_claude_code/core/history_replay.py:1139— history_replay._restore_gemini_parts has cognitive complexity 62 (threshold 15). Drivers by points: if/else 19 (40 pts), boolean chains 9, loops 3 (5 pts), error handling 1 (4 pts), ternaries 3 (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.
ContinuationOverlap._texts (cognitive 59) src/free_claude_code/core/continuation_overlap.py:170— ContinuationOverlap._texts has cognitive complexity 59 (threshold 15). Drivers by points: if/else 14 (24 pts), ternaries 14 (24 pts), loops 3 (8 pts), boolean chains 3 (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.
native_request.chat_to_gemini (cognitive 59) src/free_claude_code/core/gemini/native_request.py:181— native_request.chat_to_gemini has cognitive complexity 59 (threshold 15). Drivers by points: if/else 21 (40 pts), loops 5 (8 pts), ternaries 3 (6 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.
GeminiResponsesStream.feed (cognitive 58) src/free_claude_code/core/gemini/responses_stream.py:52— GeminiResponsesStream.feed has cognitive complexity 58 (threshold 15). Drivers by points: if/else 20 (31 pts), ternaries 11 (23 pts), boolean chains 2, loops 1 (2 pts) (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.
OpenAIChatTransport._create_stream (cognitive 58) src/free_claude_code/providers/openai_chat/transport.py:634— OpenAIChatTransport._create_stream has cognitive complexity 58 (threshold 15). Drivers by points: if/else 17 (41 pts), ternaries 3 (7 pts), boolean chains 5, error handling 2 (4 pts), loops 1 (nesting depth added 30). 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.
CodexAppServer._packet (cognitive 57) src/free_claude_code/runtime/codex_app_server.py:308— CodexAppServer._packet has cognitive complexity 57 (threshold 15). Drivers by points: if/else 19 (41 pts), boolean chains 9, loops 1 (3 pts), error handling 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 26). 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.
history.normalized_history (cognitive 54) src/free_claude_code/core/gemini/history.py:18— history.normalized_history has cognitive complexity 54 (threshold 15). Drivers by points: if/else 11 (37 pts), ternaries 2 (8 pts), loops 3 (5 pts), boolean chains 4 (nesting depth added 34). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DeliveredResponse.closing_events (cognitive 53) src/free_claude_code/core/delivered_response.py:544— DeliveredResponse.closing_events has cognitive complexity 53 (threshold 15). Drivers by points: ternaries 4 (23 pts), if/else 7 (21 pts), loops 3 (8 pts), boolean chains 1 (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.
ManagedClaudeSession.start_task (cognitive 51) src/free_claude_code/cli/managed/session.py:96— ManagedClaudeSession.start_task has cognitive complexity 51 (threshold 15). Drivers by points: if/else 18 (34 pts), loops 4 (12 pts), boolean chains 3, error handling 1, ternaries 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatToolCallBuffer._complete_native_group (cognitive 49) src/free_claude_code/core/chat_completions/tool_calls.py:336— ChatToolCallBuffer._complete_native_group has cognitive complexity 49 (threshold 15). Drivers by points: if/else 13 (39 pts), loops 4 (7 pts), boolean chains 3 (nesting depth added 29). 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.
ResponsesToolCallBuffer._finish_item (cognitive 49) src/free_claude_code/core/openai_responses/tool_calls.py:162— ResponsesToolCallBuffer._finish_item has cognitive complexity 49 (threshold 15). Drivers by points: if/else 19 (32 pts), loops 4 (9 pts), boolean chains 6, ternaries 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.
compat._strip_document_blocks (cognitive 49) src/free_claude_code/providers/deepseek/compat.py:106— compat._strip_document_blocks has cognitive complexity 49 (threshold 15). Drivers by points: if/else 11 (37 pts), loops 3 (9 pts), boolean chains 3 (nesting depth added 32). 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.
request._reasoning_items (cognitive 48) src/free_claude_code/core/chat_completions/request.py:266— request._reasoning_items has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (33 pts), loops 4 (6 pts), boolean chains 5, ternaries 2 (4 pts) (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.
NativePrompt._form (cognitive 48) src/free_claude_code/runtime/codex_protocol.py:389— NativePrompt._form has cognitive complexity 48 (threshold 15). Drivers by points: if/else 13 (26 pts), loops 5 (11 pts), ternaries 2 (6 pts), boolean chains 5 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
render (cognitive 48) src/free_claude_code/api/admin_static/code_sessions.js:1152— render has cognitive complexity 48 (threshold 15). Drivers by points: if/else 11 (19 pts), ternaries 6 (13 pts), boolean chains 9, loops 4 (7 pts) (nesting depth added 18). Of this number, 47 points are the body's own statements and 1 belongs to 10 function literals inside it that branch. 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.
tool_search._merge_tool_groups (cognitive 47) src/free_claude_code/core/openai_responses/tool_search.py:104— tool_search._merge_tool_groups has cognitive complexity 47 (threshold 15). Drivers by points: if/else 10 (34 pts), loops 4 (7 pts), ternaries 1 (4 pts), boolean chains 2 (nesting depth added 30). 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.
ContinuationStream._map (cognitive 46) src/free_claude_code/core/continuation_stream.py:135— ContinuationStream._map has cognitive complexity 46 (threshold 15). Drivers by points: if/else 15 (31 pts), loops 5 (12 pts), boolean chains 3 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StructuredReasoningStream.events (cognitive 46) src/free_claude_code/providers/openai_chat/reasoning_details.py:57— StructuredReasoningStream.events has cognitive complexity 46 (threshold 15). Drivers by points: if/else 14 (28 pts), boolean chains 11, loops 3 (6 pts), ternaries 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
response_collection._validate (cognitive 45) src/free_claude_code/application/response_collection.py:68— response_collection._validate has cognitive complexity 45 (threshold 15). Drivers by points: if/else 10 (27 pts), loops 4 (11 pts), boolean chains 7 (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.
ChatResponsesStream.feed (cognitive 45) src/free_claude_code/core/chat_completions/responses_stream.py:48— ChatResponsesStream.feed has cognitive complexity 45 (threshold 15). Drivers by points: if/else 17 (28 pts), ternaries 6 (13 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
history_replay._prepare_response_history (cognitive 45) src/free_claude_code/core/history_replay.py:790— history_replay._prepare_response_history has cognitive complexity 45 (threshold 15). Drivers by points: if/else 12 (32 pts), loops 4 (8 pts), boolean chains 4, ternaries 1 (nesting depth added 24). 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.
failure_policy._classify_provider_failure (cognitive 45) src/free_claude_code/providers/failure_policy.py:362— failure_policy._classify_provider_failure has cognitive complexity 45 (threshold 15). Drivers by points: if/else 28 (42 pts), boolean chains 3 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
NativePrompt.answer (cognitive 45) src/free_claude_code/runtime/codex_protocol.py:530— NativePrompt.answer has cognitive complexity 45 (threshold 15). Drivers by points: if/else 19 (33 pts), boolean chains 7, loops 3 (5 pts) (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
history_replay.readable_reasoning (cognitive 43) src/free_claude_code/core/history_replay.py:399— history_replay.readable_reasoning has cognitive complexity 43 (threshold 15). Drivers by points: if/else 13 (27 pts), boolean chains 6, loops 4 (5 pts), ternaries 2 (5 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.
CodexProtocol.notification (cognitive 43) src/free_claude_code/runtime/codex_protocol.py:54— CodexProtocol.notification has cognitive complexity 43 (threshold 15). Drivers by points: if/else 18 (26 pts), boolean chains 9, ternaries 4 (8 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.
MessagingNodeRunner._process_node_impl (cognitive 42) src/free_claude_code/messaging/node_runner.py:118— MessagingNodeRunner._process_node_impl has cognitive complexity 42 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 7, ternaries 3 (7 pts), error handling 5, loops 2 (3 pts) (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tool_schema._sanitize_nim_schema_node (cognitive 42) src/free_claude_code/providers/nvidia_nim/tool_schema.py:96— tool_schema._sanitize_nim_schema_node has cognitive complexity 42 (threshold 15). Drivers by points: if/else 10 (28 pts), loops 4 (12 pts), boolean chains 2 (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.
GeminiMessagesStream.feed (cognitive 41) src/free_claude_code/core/gemini/messages_stream.py:45— GeminiMessagesStream.feed has cognitive complexity 41 (threshold 15). Drivers by points: if/else 17 (33 pts), boolean chains 4, ternaries 2 (4 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.
_ResponsesChatInputBuilder._apply_pending_reasoning (cognitive 41) src/free_claude_code/core/openai_responses/chat_request.py:299— _ResponsesChatInputBuilder._apply_pending_reasoning has cognitive complexity 41 (threshold 15). Drivers by points: if/else 11 (21 pts), loops 4 (9 pts), boolean chains 8, ternaries 1 (3 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
openai_tool_names.encode_openai_chat_tool_names (cognitive 41) src/free_claude_code/core/openai_tool_names.py:65— openai_tool_names.encode_openai_chat_tool_names has cognitive complexity 41 (threshold 15). Drivers by points: if/else 15 (34 pts), loops 3 (7 pts) (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessageTreeGraph.from_snapshot (cognitive 41) src/free_claude_code/messaging/trees/graph.py:189— MessageTreeGraph.from_snapshot has cognitive complexity 41 (threshold 15). Drivers by points: if/else 19 (33 pts), boolean chains 4, loops 3 (4 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.
ResponsesToolAdapter._tool (cognitive 39) src/free_claude_code/core/openai_responses/tool_adaptation.py:202— ResponsesToolAdapter._tool has cognitive complexity 39 (threshold 15). Drivers by points: if/else 18 (32 pts), boolean chains 5, ternaries 1 (2 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TelegramMessenger._with_retry (cognitive 39) src/free_claude_code/messaging/platforms/telegram_io.py:57— TelegramMessenger._with_retry has cognitive complexity 39 (threshold 15). Drivers by points: if/else 9 (28 pts), error handling 3 (6 pts), ternaries 1 (3 pts), boolean chains 1, loops 1 (nesting depth added 24). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
history_replay._validate_record (cognitive 38) src/free_claude_code/core/history_replay.py:200— history_replay._validate_record has cognitive complexity 38 (threshold 15). Drivers by points: if/else 16 (22 pts), boolean chains 13, error handling 1 (2 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
history_replay._prepare_gemini_history (cognitive 38) src/free_claude_code/core/history_replay.py:1242— history_replay._prepare_gemini_history has cognitive complexity 38 (threshold 15). Drivers by points: if/else 9 (19 pts), loops 4 (9 pts), boolean chains 6, ternaries 2 (4 pts) (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
provider_input._assistant_items (cognitive 38) src/free_claude_code/core/openai_responses/provider_input.py:160— provider_input._assistant_items has cognitive complexity 38 (threshold 15). Drivers by points: if/else 10 (24 pts), ternaries 4 (8 pts), boolean chains 4, error handling 1, loops 1 (nesting depth added 18). To reduce it, flatten the nesting: this score is depth rather than breadth — most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language's equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function.
AnthropicToOpenAIConverter._convert_assistant_message (cognitive 37) src/free_claude_code/core/anthropic/conversion.py:625— AnthropicToOpenAIConverter._convert_assistant_message has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (26 pts), ternaries 3 (7 pts), boolean chains 3, loops 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
native.build_native_messages_request (cognitive 37) src/free_claude_code/core/anthropic/native.py:116— native.build_native_messages_request has cognitive complexity 37 (threshold 15). Drivers by points: if/else 15 (29 pts), boolean chains 4, loops 3 (4 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.
ContinuationOverlap._render (cognitive 37) src/free_claude_code/core/continuation_overlap.py:396— ContinuationOverlap._render has cognitive complexity 37 (threshold 15). Drivers by points: if/else 8 (22 pts), loops 3 (7 pts), boolean chains 5, ternaries 1 (3 pts) (nesting depth added 20). 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.
history_replay.prepare_history (cognitive 37) src/free_claude_code/core/history_replay.py:656— history_replay.prepare_history has cognitive complexity 37 (threshold 15). Drivers by points: if/else 12 (28 pts), boolean chains 6, ternaries 2, loops 1 (nesting depth added 16). 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.
history_replay.normalize_messages_history (cognitive 37) src/free_claude_code/providers/history_replay.py:49— history_replay.normalize_messages_history has cognitive complexity 37 (threshold 15). Drivers by points: if/else 9 (27 pts), loops 2 (4 pts), ternaries 1 (4 pts), boolean chains 1, error handling 1 (nesting depth added 23). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatMessagesStream.feed (cognitive 36) src/free_claude_code/core/chat_completions/messages_stream.py:35— ChatMessagesStream.feed has cognitive complexity 36 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 5, ternaries 1 (3 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.
tool_search.resolve_client_search_history (cognitive 36) src/free_claude_code/core/openai_responses/tool_search.py:33— tool_search.resolve_client_search_history has cognitive complexity 36 (threshold 15). Drivers by points: if/else 11 (23 pts), boolean chains 8, ternaries 1 (3 pts), loops 2 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
stream_output.call_references (cognitive 36) src/free_claude_code/core/stream_output.py:27— stream_output.call_references has cognitive complexity 36 (threshold 15). Drivers by points: if/else 5 (19 pts), loops 5 (13 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.
replay.decode_bundle (cognitive 35) src/free_claude_code/core/gemini/replay.py:60— replay.decode_bundle has cognitive complexity 35 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 9, ternaries 3, loops 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.
chat_request._body_tool_names (cognitive 35) src/free_claude_code/core/openai_responses/chat_request.py:680— chat_request._body_tool_names has cognitive complexity 35 (threshold 15). Drivers by points: if/else 10 (25 pts), loops 3 (7 pts), boolean chains 3 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
credentials.resolve_credential_edit (cognitive 34) src/free_claude_code/config/admin/credentials.py:66— credentials.resolve_credential_edit has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 7, loops 3 (5 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
custom_providers.merge_custom_provider (cognitive 34) src/free_claude_code/config/admin/custom_providers.py:25— custom_providers.merge_custom_provider has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (24 pts), ternaries 1 (4 pts), loops 1 (3 pts), boolean chains 2, error handling 1 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
request.chat_messages_body (cognitive 34) src/free_claude_code/core/chat_completions/request.py:352— request.chat_messages_body has cognitive complexity 34 (threshold 15). Drivers by points: if/else 14 (22 pts), ternaries 4 (8 pts), boolean chains 2, loops 2 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatToolCallBuffer._feed_native (cognitive 34) src/free_claude_code/core/chat_completions/tool_calls.py:290— ChatToolCallBuffer._feed_native has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (21 pts), loops 4 (9 pts), boolean chains 4 (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.
ContinuationSeed.readable_text (cognitive 34) src/free_claude_code/core/stream_recovery.py:34— ContinuationSeed.readable_text has cognitive complexity 34 (threshold 15). Drivers by points: if/else 7 (21 pts), ternaries 2 (5 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 19). 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.
sdk._endpoint (cognitive 34) src/free_claude_code/providers/github_copilot/sdk.py:405— sdk._endpoint has cognitive complexity 34 (threshold 15). Drivers by points: if/else 11 (17 pts), boolean chains 7, error handling 4 (7 pts), ternaries 1 (2 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.
merge (cognitive 34) src/free_claude_code/api/admin_static/code_sessions.js:164— merge has cognitive complexity 34 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 10, loops 2 (3 pts), other 3, ternaries 3 (nesting depth added 7). Of this number, 31 points are the body's own statements and 3 belong to 2 function literals inside it that branch. 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.
persistence.prepare_admin_update (cognitive 33) src/free_claude_code/config/admin/persistence.py:150— persistence.prepare_admin_update has cognitive complexity 33 (threshold 15). Drivers by points: if/else 7 (13 pts), error handling 5 (10 pts), boolean chains 6, ternaries 2 (3 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
env_migrations._normalize_credential_lists (cognitive 33) src/free_claude_code/config/env_migrations.py:265— env_migrations._normalize_credential_lists has cognitive complexity 33 (threshold 15). Drivers by points: if/else 10 (22 pts), error handling 2 (4 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 17). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ContinuationOverlap._feed (cognitive 33) src/free_claude_code/core/continuation_overlap.py:80— ContinuationOverlap._feed has cognitive complexity 33 (threshold 15). Drivers by points: if/else 13 (20 pts), boolean chains 7, loops 3 (4 pts), ternaries 1 (2 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.
schema.json_schema (cognitive 33) src/free_claude_code/core/gemini/schema.py:39— schema.json_schema has cognitive complexity 33 (threshold 15). Drivers by points: if/else 14 (23 pts), boolean chains 3, error handling 1 (3 pts), loops 3, ternaries 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.
history_replay._prepare_messages_content (cognitive 33) src/free_claude_code/core/history_replay.py:860— history_replay._prepare_messages_content has cognitive complexity 33 (threshold 15). Drivers by points: if/else 12 (26 pts), boolean chains 4, loops 2 (3 pts) (nesting depth added 15). 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.
CodexProtocol._project (cognitive 33) src/free_claude_code/runtime/codex_protocol.py:264— CodexProtocol._project has cognitive complexity 33 (threshold 15). Drivers by points: if/else 9 (16 pts), ternaries 4 (8 pts), boolean chains 7, loops 1 (2 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.
codex_protocol._validate_field (cognitive 33) src/free_claude_code/runtime/codex_protocol.py:644— codex_protocol._validate_field has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 16, if/else 9 (15 pts), ternaries 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.
renderControls (cognitive 33) src/free_claude_code/api/admin_static/code_sessions.js:1256— renderControls has cognitive complexity 33 (threshold 15). Drivers by points: boolean chains 21, if/else 4, loops 3 (4 pts), ternaries 4 (nesting depth added 1). Of this number, 32 points are the body's own statements and 1 belongs to 5 function literals inside it that branch. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
ChatToolCallBuffer.feed (cognitive 32) src/free_claude_code/core/chat_completions/tool_calls.py:205— ChatToolCallBuffer.feed has cognitive complexity 32 (threshold 15). Drivers by points: if/else 10 (20 pts), boolean chains 8, loops 3 (4 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.
AlibabaCloudProvider._list_models_payload (cognitive 32) src/free_claude_code/providers/alibaba_cloud/client.py:64— AlibabaCloudProvider._list_models_payload has cognitive complexity 32 (threshold 15). Drivers by points: if/else 7 (17 pts), boolean chains 6, ternaries 2 (6 pts), loops 2 (3 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.
tokens._input_costs (cognitive 32) src/free_claude_code/providers/lmstudio/tokens.py:64— tokens._input_costs has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (19 pts), loops 7 (13 pts) (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ReasoningCorrection.retry_body (cognitive 32) src/free_claude_code/providers/reasoning_compatibility.py:70— ReasoningCorrection.retry_body has cognitive complexity 32 (threshold 15). Drivers by points: if/else 6 (12 pts), loops 6 (9 pts), ternaries 4 (7 pts), boolean chains 4 (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.
_ToolScope.__init__ (cognitive 30) src/free_claude_code/core/openai_responses/messages_request.py:125— _ToolScope.__init__ has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 4 (6 pts), ternaries 1 (3 pts), boolean chains 2 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ResponsesProviderStream._item_done (cognitive 30) src/free_claude_code/core/openai_responses/provider_stream.py:231— ResponsesProviderStream._item_done has cognitive complexity 30 (threshold 15). Drivers by points: if/else 11 (20 pts), boolean chains 6, ternaries 2 (4 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.
history_negotiation._normalize_chat_override (cognitive 30) src/free_claude_code/providers/history_negotiation.py:67— history_negotiation._normalize_chat_override has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (19 pts), loops 4 (8 pts), boolean chains 3 (nesting depth added 16). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
StructuredReasoningStream.finish (cognitive 30) src/free_claude_code/providers/openai_chat/reasoning_details.py:223— StructuredReasoningStream.finish has cognitive complexity 30 (threshold 15). Drivers by points: if/else 7 (16 pts), boolean chains 7, ternaries 2 (5 pts), loops 1 (2 pts) (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
SessionState.stage_item (cognitive 29) src/free_claude_code/application/code_sessions/state.py:452— SessionState.stage_item has cognitive complexity 29 (threshold 15). Drivers by points: boolean chains 12, ternaries 8 (10 pts), if/else 6 (7 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
request._normalized_search_history (cognitive 29) src/free_claude_code/application/web_tools/request.py:207— request._normalized_search_history has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (20 pts), loops 3 (5 pts), boolean chains 4 (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.
Settings.validate_provider_references (cognitive 29) src/free_claude_code/config/settings.py:85— Settings.validate_provider_references has cognitive complexity 29 (threshold 15). Drivers by points: if/else 6 (16 pts), ternaries 3 (7 pts), boolean chains 3, loops 2 (3 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.
history_replay.resolve_messages_replay (cognitive 29) src/free_claude_code/core/history_replay.py:352— history_replay.resolve_messages_replay has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (17 pts), boolean chains 6, ternaries 2 (4 pts), loops 2 (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.
ResponsesToolAdapter.__init__ (cognitive 29) src/free_claude_code/core/openai_responses/tool_adaptation.py:58— ResponsesToolAdapter.__init__ has cognitive complexity 29 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 8, loops 1 (3 pts), ternaries 3 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
ResponsesToolAdapter._input (cognitive 29) src/free_claude_code/core/openai_responses/tool_adaptation.py:282— ResponsesToolAdapter._input has cognitive complexity 29 (threshold 15). Drivers by points: if/else 15 (28 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ResponsesToolAdapter.restore_item (cognitive 29) src/free_claude_code/core/openai_responses/tool_adaptation.py:419— ResponsesToolAdapter.restore_item has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (19 pts), ternaries 2 (4 pts), boolean chains 3, error handling 1 (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.
VoiceNoteFlow.handle (cognitive 29) src/free_claude_code/messaging/platforms/voice_flow.py:144— VoiceNoteFlow.handle has cognitive complexity 29 (threshold 15). Drivers by points: if/else 16 (23 pts), error handling 4, boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
request_policy.non_messages_reasoning (cognitive 29) src/free_claude_code/providers/github_copilot/request_policy.py:54— request_policy.non_messages_reasoning has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (12 pts), boolean chains 10, ternaries 5, error handling 1 (2 pts) (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
CopilotResponsesEvents.__call__ (cognitive 29) src/free_claude_code/providers/github_copilot/responses_events.py:18— CopilotResponsesEvents.__call__ has cognitive complexity 29 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 7, loops 1 (3 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.
OpenAICodexProvider._list_models_payload (cognitive 29) src/free_claude_code/providers/openai_codex/provider.py:113— OpenAICodexProvider._list_models_payload has cognitive complexity 29 (threshold 15). Drivers by points: if/else 7 (24 pts), error handling 2 (4 pts), loops 1 (nesting depth added 19). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
renderItem (cognitive 29) src/free_claude_code/api/admin_static/code_sessions.js:1366— renderItem has cognitive complexity 29 (threshold 15). Drivers by points: if/else 9 (12 pts), ternaries 6 (12 pts), boolean chains 4, other 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.
request.chat_responses_body (cognitive 28) src/free_claude_code/core/chat_completions/request.py:493— request.chat_responses_body has cognitive complexity 28 (threshold 15). Drivers by points: if/else 11 (18 pts), ternaries 3 (6 pts), boolean chains 2, loops 2 (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.
tokens._bounded_json_text (cognitive 28) src/free_claude_code/core/openai_responses/tokens.py:63— tokens._bounded_json_text has cognitive complexity 28 (threshold 15). Drivers by points: if/else 9 (20 pts), error handling 2 (6 pts), boolean chains 1, loops 1 (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.
discovery._provider_query_failure_reason (cognitive 28) src/free_claude_code/providers/runtime/discovery.py:42— discovery._provider_query_failure_reason has cognitive complexity 28 (threshold 15). Drivers by points: if/else 12 (23 pts), boolean chains 3, loops 2 (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.
admin.updateProviderCard (cognitive 28) src/free_claude_code/api/admin_static/admin.js:375— admin.updateProviderCard has cognitive complexity 28 (threshold 15). Drivers by points: ternaries 10 (14 pts), boolean chains 8, if/else 6 (nesting depth added 4). Of this number, 27 points are the body's own statements and 1 belongs to one function literal inside it that branches. 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.
status.provider_config_status (cognitive 27) src/free_claude_code/config/admin/status.py:15— status.provider_config_status has cognitive complexity 27 (threshold 15). Drivers by points: ternaries 6 (14 pts), if/else 5 (11 pts), boolean chains 1, loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessagesToolCallBuffer.feed (cognitive 27) src/free_claude_code/core/anthropic/tool_calls.py:30— MessagesToolCallBuffer.feed has cognitive complexity 27 (threshold 15). Drivers by points: if/else 10 (19 pts), boolean chains 5, loops 1 (3 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.
DeliveredResponse._chat (cognitive 27) src/free_claude_code/core/delivered_response.py:145— DeliveredResponse._chat has cognitive complexity 27 (threshold 15). Drivers by points: if/else 13 (22 pts), boolean chains 4, 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.
DeliveredResponse._messages (cognitive 27) src/free_claude_code/core/delivered_response.py:264— DeliveredResponse._messages has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12 (23 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
openai_tool_names._request_tool_names (cognitive 27) src/free_claude_code/core/openai_tool_names.py:119— openai_tool_names._request_tool_names has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (21 pts), loops 3 (4 pts), boolean chains 2 (nesting depth added 14). 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.
claude_desktop_integration._load (cognitive 27) src/free_claude_code/harnesses/claude_desktop_integration.py:203— claude_desktop_integration._load has cognitive complexity 27 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 8, loops 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
config.redacted (cognitive 26) smoke/lib/config.py:448— config.redacted has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (14 pts), loops 3 (6 pts), error handling 1 (4 pts), boolean chains 1, ternaries 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
env_migrations.consolidate_managed_config (cognitive 26) src/free_claude_code/config/env_migrations.py:191— env_migrations.consolidate_managed_config has cognitive complexity 26 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 4, boolean chains 3, loops 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tool_calls._native_parts (cognitive 26) src/free_claude_code/core/chat_completions/tool_calls.py:472— tool_calls._native_parts has cognitive complexity 26 (threshold 15). Drivers by points: if/else 7 (10 pts), ternaries 3 (8 pts), boolean chains 7, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ContinuationStream.finalize (cognitive 26) src/free_claude_code/core/continuation_stream.py:173— ContinuationStream.finalize has cognitive complexity 26 (threshold 15). Drivers by points: if/else 8 (12 pts), boolean chains 9, ternaries 2 (3 pts), loops 1 (2 pts) (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
history_replay.normalize_history_source (cognitive 26) src/free_claude_code/core/history_replay.py:620— history_replay.normalize_history_source has cognitive complexity 26 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (6 pts), ternaries 1 (5 pts), boolean chains 4 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
history_replay._reasoning_records (cognitive 26) src/free_claude_code/providers/history_replay.py:300— history_replay._reasoning_records has cognitive complexity 26 (threshold 15). Drivers by points: if/else 6 (13 pts), loops 3 (5 pts), boolean chains 4, ternaries 2 (4 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.
SessionState.match_history (cognitive 25) src/free_claude_code/application/code_sessions/state.py:377— SessionState.match_history has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (16 pts), boolean chains 8, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
WebToolService._stream_automatic_search (cognitive 25) src/free_claude_code/application/web_tools/service.py:123— WebToolService._stream_automatic_search has cognitive complexity 25 (threshold 15). Drivers by points: if/else 8 (12 pts), loops 7 (10 pts), boolean chains 3 (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.
model_refs.normalize_retired_model_settings (cognitive 25) src/free_claude_code/config/model_refs.py:95— model_refs.normalize_retired_model_settings has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (17 pts), ternaries 1 (4 pts), loops 2 (3 pts), error handling 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnthropicToOpenAIConverter._convert_message_to_segments (cognitive 25) src/free_claude_code/core/anthropic/conversion.py:494— AnthropicToOpenAIConverter._convert_message_to_segments has cognitive complexity 25 (threshold 15). Drivers by points: if/else 9 (15 pts), loops 2 (5 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
native_request._text_parts (cognitive 25) src/free_claude_code/core/gemini/native_request.py:42— native_request._text_parts has cognitive complexity 25 (threshold 15). Drivers by points: if/else 5 (12 pts), ternaries 4 (12 pts), loops 1 (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.
admin.refreshStartup (cognitive 25) src/free_claude_code/api/admin_static/admin.js:153— admin.refreshStartup has cognitive complexity 25 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 11, error handling 1, ternaries 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.
shell (cognitive 25) src/free_claude_code/api/admin_static/code_sessions.js:920— shell has cognitive complexity 25 (threshold 15). Drivers by points: boolean chains 9, if/else 5 (8 pts), error handling 2 (4 pts), loops 1 (2 pts), ternaries 1 (2 pts) (nesting depth added 7). Most of this is not in the body itself: 9 of the 25 points are its own statements and the rest belongs to 16 function literals inside it that branch (lines 974, 1053, 1069, …). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
passthrough.restore_native_history (cognitive 24) src/free_claude_code/core/anthropic/passthrough.py:49— passthrough.restore_native_history has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 1 (nesting depth added 13). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ToolCallIdentityResolver.resolve (cognitive 24) src/free_claude_code/core/chat_completions/tool_calls.py:52— ToolCallIdentityResolver.resolve has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 10, ternaries 2 (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.
ContinuationOverlap._check_terminal_order (cognitive 24) src/free_claude_code/core/continuation_overlap.py:365— ContinuationOverlap._check_terminal_order has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (16 pts), loops 3, ternaries 1 (3 pts), boolean chains 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
request._controls (cognitive 24) src/free_claude_code/core/gemini/request.py:351— request._controls has cognitive complexity 24 (threshold 15). Drivers by points: if/else 12 (16 pts), ternaries 4 (6 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessagingRateLimiter.shutdown (cognitive 24) src/free_claude_code/messaging/limiter.py:171— MessagingRateLimiter.shutdown has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (13 pts), error handling 3 (6 pts), loops 3, boolean chains 2 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
renderer.render_segments (cognitive 24) src/free_claude_code/messaging/transcript/renderer.py:10— renderer.render_segments has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (14 pts), ternaries 2 (4 pts), boolean chains 2, error handling 1 (2 pts), loops 2 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tokens._content_costs (cognitive 24) src/free_claude_code/providers/lmstudio/tokens.py:44— tokens._content_costs has cognitive complexity 24 (threshold 15). Drivers by points: if/else 5 (16 pts), ternaries 1 (4 pts), boolean chains 2, loops 1 (2 pts) (nesting depth added 15). 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.
FccModelCombobox.handleKeydown (cognitive 24) src/free_claude_code/api/admin_static/model_combobox.js:166— FccModelCombobox.handleKeydown has cognitive complexity 24 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 6, ternaries 2 (5 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.
model_catalog._build_direct_models_response (cognitive 23) src/free_claude_code/api/model_catalog.py:206— model_catalog._build_direct_models_response has cognitive complexity 23 (threshold 15). Drivers by points: ternaries 10 (17 pts), boolean chains 3, if/else 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ChatResponsesStream._item (cognitive 23) src/free_claude_code/core/chat_completions/responses_stream.py:208— ChatResponsesStream._item has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (12 pts), boolean chains 6, loops 2 (5 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
diagnostics._category_hint_from_body (cognitive 23) src/free_claude_code/core/diagnostics.py:288— diagnostics._category_hint_from_body has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (13 pts), loops 2 (5 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
history_replay._gemini_replay_turns (cognitive 23) src/free_claude_code/core/history_replay.py:1087— history_replay._gemini_replay_turns has cognitive complexity 23 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 3 (7 pts), boolean chains 5 (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.
_ToolScope.choice (cognitive 23) src/free_claude_code/core/openai_responses/messages_request.py:244— _ToolScope.choice has cognitive complexity 23 (threshold 15). Drivers by points: if/else 7 (12 pts), ternaries 2 (6 pts), boolean chains 5 (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.
headers.native_request (cognitive 23) src/free_claude_code/providers/anthropic/headers.py:23— headers.native_request has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 4, loops 2 (3 pts), error handling 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.
tool_schema._alias_nim_schema_property_names (cognitive 23) src/free_claude_code/providers/nvidia_nim/tool_schema.py:174— tool_schema._alias_nim_schema_property_names has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 2 (3 pts), ternaries 1 (3 pts), boolean chains 2 (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.
IntegrationService._dsh_desktop (cognitive 23) src/free_claude_code/runtime/integration_service.py:279— IntegrationService._dsh_desktop has cognitive complexity 23 (threshold 15). Drivers by points: if/else 9 (15 pts), error handling 3, loops 2 (3 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
renderField (cognitive 23) src/free_claude_code/api/admin_static/admin.js:930— renderField has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10 (12 pts), ternaries 6 (8 pts), boolean chains 3 (nesting depth added 4). Of this number, 15 points are the body's own statements and 8 belong to 4 function literals inside it that branch. 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.
validation_log.summarize_request_validation_body (cognitive 22) src/free_claude_code/api/validation_log.py:6— validation_log.summarize_request_validation_body has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (14 pts), ternaries 2 (5 pts), loops 1 (2 pts), boolean chains 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
DeliveredResponse.observe (cognitive 22) src/free_claude_code/core/delivered_response.py:94— DeliveredResponse.observe has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 7, ternaries 2 (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.
DeliveredResponse.snapshot (cognitive 22) src/free_claude_code/core/delivered_response.py:466— DeliveredResponse.snapshot has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (11 pts), ternaries 2 (7 pts), boolean chains 3, loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_MessagesInput.add (cognitive 22) src/free_claude_code/core/openai_responses/messages_request.py:379— _MessagesInput.add has cognitive complexity 22 (threshold 15). Drivers by points: if/else 12 (16 pts), boolean chains 3, ternaries 1 (3 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.
AnthropicToResponsesStream.feed (cognitive 22) src/free_claude_code/core/openai_responses/messages_stream.py:172— AnthropicToResponsesStream.feed has cognitive complexity 22 (threshold 15). Drivers by points: if/else 15 (21 pts), boolean chains 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
native.build_native_responses_request (cognitive 22) src/free_claude_code/core/openai_responses/native.py:23— native.build_native_responses_request has cognitive complexity 22 (threshold 15). Drivers by points: if/else 6 (11 pts), ternaries 2 (5 pts), loops 2 (4 pts), boolean chains 2 (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.
provider_input._user_items (cognitive 22) src/free_claude_code/core/openai_responses/provider_input.py:307— provider_input._user_items has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), loops 2 (5 pts), error handling 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.
replay_finalization._carrier_fields (cognitive 22) src/free_claude_code/core/replay_finalization.py:20— replay_finalization._carrier_fields has cognitive complexity 22 (threshold 15). Drivers by points: if/else 4 (8 pts), boolean chains 7, loops 5 (7 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.
replay_finalization.finalize_replay (cognitive 22) src/free_claude_code/core/replay_finalization.py:42— replay_finalization.finalize_replay has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (14 pts), ternaries 3 (6 pts), boolean chains 1, 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.
PendingVoiceRegistry.handoff (cognitive 22) src/free_claude_code/messaging/voice.py:125— PendingVoiceRegistry.handoff has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (12 pts), boolean chains 5, error handling 2 (4 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
thought_signatures._apply_cached_tool_call_signatures (cognitive 22) src/free_claude_code/providers/google_openai/thought_signatures.py:106— thought_signatures._apply_cached_tool_call_signatures has cognitive complexity 22 (threshold 15). Drivers by points: if/else 7 (17 pts), loops 2 (3 pts), boolean chains 2 (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.
inputForField (cognitive 22) src/free_claude_code/api/admin_static/admin.js:1022— inputForField has cognitive complexity 22 (threshold 15). Drivers by points: if/else 8, boolean chains 7, ternaries 4 (7 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
routes._create_messages_response (cognitive 21) src/free_claude_code/api/routes.py:168— routes._create_messages_response has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 4 (7 pts), boolean chains 2, ternaries 2 (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.
ThinkTagParser._parse_outside_think (cognitive 21) src/free_claude_code/core/anthropic/thinking.py:58— ThinkTagParser._parse_outside_think has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (16 pts), boolean chains 5 (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.
GeminiResponsesStream._item (cognitive 21) src/free_claude_code/core/gemini/responses_stream.py:228— GeminiResponsesStream._item has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9 (11 pts), boolean chains 5, loops 2 (5 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
history_replay._continuation_replay (cognitive 21) src/free_claude_code/core/history_replay.py:162— history_replay._continuation_replay has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (9 pts), boolean chains 8, loops 1 (2 pts), error handling 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
chat_request.build_responses_chat_request (cognitive 21) src/free_claude_code/core/openai_responses/chat_request.py:364— chat_request.build_responses_chat_request has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (14 pts), boolean chains 3, loops 2, ternaries 1 (2 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
messages_request.build_responses_messages_request (cognitive 21) src/free_claude_code/core/openai_responses/messages_request.py:578— messages_request.build_responses_messages_request has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13 (16 pts), boolean chains 2, loops 2, error handling 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
AnthropicToResponsesStream._finish_block (cognitive 21) src/free_claude_code/core/openai_responses/messages_stream.py:336— AnthropicToResponsesStream._finish_block has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 3, error handling 1 (3 pts), ternaries 1 (2 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.
GeminiProvider.list_model_infos (cognitive 21) src/free_claude_code/providers/gemini/client.py:91— GeminiProvider.list_model_infos has cognitive complexity 21 (threshold 15). Drivers by points: if/else 4 (10 pts), ternaries 2 (6 pts), loops 2 (3 pts), boolean chains 2 (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.
GeminiStream.finish (cognitive 21) src/free_claude_code/providers/gemini/stream.py:232— GeminiStream.finish has cognitive complexity 21 (threshold 15). Drivers by points: if/else 8 (10 pts), ternaries 6 (8 pts), boolean chains 3 (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.
SdkRuntime._close_client (cognitive 21) src/free_claude_code/providers/github_copilot/sdk.py:232— SdkRuntime._close_client has cognitive complexity 21 (threshold 15). Drivers by points: error handling 5 (9 pts), if/else 6 (7 pts), boolean chains 2, loops 2, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
output_cap._structured_error_texts (cognitive 21) src/free_claude_code/providers/openai_chat/output_cap.py:72— output_cap._structured_error_texts has cognitive complexity 21 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 3 (6 pts) (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
openCustomProviderDialog (cognitive 21) src/free_claude_code/api/admin_static/admin.js:489— openCustomProviderDialog has cognitive complexity 21 (threshold 15). Drivers by points: ternaries 5 (8 pts), boolean chains 7, if/else 4 (5 pts), loops 1 (nesting depth added 4). Of this number, 20 points are the body's own statements and 1 belongs to 8 function literals inside it that branch. 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.
activate (cognitive 21) src/free_claude_code/api/admin_static/code_sessions.js:554— activate has cognitive complexity 21 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, error handling 1 (3 pts), ternaries 1 (3 pts) (nesting depth added 8). Of this number, 17 points are the body's own statements and 4 belong to one function literal inside it that branches. 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.
MessagesHandler._to_public_response (cognitive 20) src/free_claude_code/api/handlers/messages.py:157— MessagesHandler._to_public_response has cognitive complexity 20 (threshold 15). Drivers by points: error handling 6 (12 pts), if/else 3 (6 pts), ternaries 1 (2 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ModelRouter._direct_provider_model (cognitive 20) src/free_claude_code/application/routing.py:214— ModelRouter._direct_provider_model has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (13 pts), ternaries 3 (5 pts), boolean chains 1, error handling 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
api_keys.normalize_api_keys (cognitive 20) src/free_claude_code/config/api_keys.py:9— api_keys.normalize_api_keys has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (14 pts), error handling 1 (3 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_ToolScope._definition (cognitive 20) src/free_claude_code/core/openai_responses/messages_request.py:185— _ToolScope._definition has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10 (17 pts), ternaries 2, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
AnthropicToResponsesStream._start_block (cognitive 20) src/free_claude_code/core/openai_responses/messages_stream.py:230— AnthropicToResponsesStream._start_block has cognitive complexity 20 (threshold 15). Drivers by points: if/else 12 (17 pts), boolean chains 3 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sqlite_database.initialize_database (cognitive 20) src/free_claude_code/runtime/sqlite_database.py:139— sqlite_database.initialize_database has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9 (15 pts), boolean chains 2, error handling 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
code_sessions.synchronize (cognitive 20) src/free_claude_code/api/admin_static/code_sessions.js:430— code_sessions.synchronize has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (12 pts), loops 4, boolean chains 2, error handling 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
support.launched (cognitive 19) smoke/desktop/support.py:81— support.launched has cognitive complexity 19 (threshold 15). Drivers by points: if/else 6 (11 pts), loops 3 (4 pts), boolean chains 2, error handling 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.
PublicResponseStream._iterate (cognitive 19) src/free_claude_code/api/stream_delivery.py:213— PublicResponseStream._iterate has cognitive complexity 19 (threshold 15). Drivers by points: loops 4 (10 pts), if/else 2 (7 pts), error handling 1 (2 pts) (nesting depth added 12). To reduce it, break up the iteration: give each loop body a named function, and split a multi-phase loop into one function per phase so no single body carries the whole pipeline.
image_sources.portable_anthropic_image_url (cognitive 19) src/free_claude_code/core/anthropic/image_sources.py:28— image_sources.portable_anthropic_image_url has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2, ternaries 1 (2 pts), error handling 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
stream_contracts.assert_anthropic_stream_contract (cognitive 19) src/free_claude_code/core/anthropic/stream_contracts.py:105— stream_contracts.assert_anthropic_stream_contract has cognitive complexity 19 (threshold 15). Drivers by points: if/else 7 (15 pts), boolean chains 2, loops 1, ternaries 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.
replay.apply_call_replay (cognitive 19) src/free_claude_code/core/gemini/replay.py:178— replay.apply_call_replay has cognitive complexity 19 (threshold 15). Drivers by points: if/else 5 (11 pts), loops 2 (3 pts), ternaries 2 (3 pts), boolean chains 2 (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.
GeminiResponseAccumulator.feed (cognitive 19) src/free_claude_code/core/gemini/response.py:217— GeminiResponseAccumulator.feed has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), loops 3 (4 pts), boolean chains 2 (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.
thought_signatures.apply_native_message_signatures (cognitive 19) src/free_claude_code/providers/google_openai/thought_signatures.py:52— thought_signatures.apply_native_message_signatures has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (15 pts), boolean chains 3, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RuntimeASGIApp._lifespan (cognitive 19) src/free_claude_code/runtime/asgi.py:27— RuntimeASGIApp._lifespan has cognitive complexity 19 (threshold 15). Drivers by points: if/else 4 (11 pts), error handling 2 (7 pts), loops 1 (nesting depth added 12). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessagingService.close_delivery (cognitive 19) src/free_claude_code/runtime/messaging_service.py:282— MessagingService.close_delivery has cognitive complexity 19 (threshold 15). Drivers by points: if/else 11 (19 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.
native_folder_dialog.decode_result (cognitive 19) REDACTED:90— native_folder_dialog.decode_result has cognitive complexity 19 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 6 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
PublicResponseStream._publish_packet (cognitive 18) src/free_claude_code/api/stream_delivery.py:126— PublicResponseStream._publish_packet has cognitive complexity 18 (threshold 15). Drivers by points: if/else 4 (7 pts), loops 3 (6 pts), ternaries 1 (3 pts), boolean chains 1, 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.
PublicResponseStream._finalize_frame (cognitive 18) src/free_claude_code/api/stream_delivery.py:168— PublicResponseStream._finalize_frame has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, ternaries 1 (3 pts) (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ServerSockets.reserve (cognitive 18) src/free_claude_code/cli/server_socket.py:15— ServerSockets.reserve has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (11 pts), error handling 3 (5 pts), boolean chains 1, loops 1 (nesting depth added 8). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
persistence.target_values_with_updates (cognitive 18) src/free_claude_code/config/admin/persistence.py:93— persistence.target_values_with_updates has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 7, loops 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
chat_request._message_content (cognitive 18) src/free_claude_code/core/openai_responses/chat_request.py:459— chat_request._message_content has cognitive complexity 18 (threshold 15). Drivers by points: if/else 9 (14 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
messages_request._content (cognitive 18) src/free_claude_code/core/openai_responses/messages_request.py:310— messages_request._content has cognitive complexity 18 (threshold 15). Drivers by points: if/else 7 (13 pts), boolean chains 2, ternaries 1 (2 pts), loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
messages_request._output_format (cognitive 18) src/free_claude_code/core/openai_responses/messages_request.py:523— messages_request._output_format has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13 (15 pts), boolean chains 3 (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.
ResponsesToolAdapter._choice (cognitive 18) src/free_claude_code/core/openai_responses/tool_adaptation.py:345— ResponsesToolAdapter._choice has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 5 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ResponsesToolAdapter._identity (cognitive 18) src/free_claude_code/core/openai_responses/tool_adaptation.py:393— ResponsesToolAdapter._identity has cognitive complexity 18 (threshold 15). Drivers by points: boolean chains 9, if/else 6 (7 pts), ternaries 2 (nesting depth added 1). To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
claude_desktop_integration.check_unmanaged (cognitive 18) src/free_claude_code/harnesses/claude_desktop_integration.py:74— claude_desktop_integration.check_unmanaged has cognitive complexity 18 (threshold 15). Drivers by points: error handling 3 (7 pts), if/else 3 (5 pts), loops 2 (4 pts), ternaries 1 (2 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.
TelegramMessenger.delete_messages (cognitive 18) src/free_claude_code/messaging/platforms/telegram_io.py:188— TelegramMessenger.delete_messages has cognitive complexity 18 (threshold 15). Drivers by points: loops 4 (8 pts), error handling 2 (5 pts), if/else 4, boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessageTree.remove_message_subtree (cognitive 18) src/free_claude_code/messaging/trees/runtime.py:314— MessageTree.remove_message_subtree has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 4, ternaries 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
MessageTree.fail_claim (cognitive 18) src/free_claude_code/messaging/trees/runtime.py:424— MessageTree.fail_claim has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (11 pts), boolean chains 3, loops 1 (3 pts), ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
GitHubCopilotProvider._dispatch (cognitive 18) src/free_claude_code/providers/github_copilot/provider.py:247— GitHubCopilotProvider._dispatch has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (12 pts), error handling 1 (2 pts), ternaries 1 (2 pts), boolean chains 1, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
reasoning._contains_reasoning_rejection (cognitive 18) src/free_claude_code/providers/mistral/reasoning.py:218— reasoning._contains_reasoning_rejection has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (15 pts), loops 1 (2 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.
application._await_owned_task (cognitive 18) src/free_claude_code/runtime/application.py:69— application._await_owned_task has cognitive complexity 18 (threshold 15). Drivers by points: if/else 5 (13 pts), error handling 2 (3 pts), boolean chains 1, 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.
claude_cli_matrix.classify_probe (cognitive 17) smoke/lib/claude_cli_matrix.py:267— claude_cli_matrix.classify_probe has cognitive complexity 17 (threshold 15). Drivers by points: boolean chains 11, if/else 6. To reduce it, name the conditions: bind each compound test to a well-named local or a small predicate function, so the body reads as a sequence of named decisions rather than a chain of operators.
_PendingCall.add (cognitive 17) src/free_claude_code/core/chat_completions/tool_calls.py:119— _PendingCall.add has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (13 pts), boolean chains 3, ternaries 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.
DeliveredResponse._gemini (cognitive 17) src/free_claude_code/core/delivered_response.py:198— DeliveredResponse._gemini has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (13 pts), boolean chains 3, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
history_replay.responses_reasoning_blocks (cognitive 17) src/free_claude_code/core/history_replay.py:548— history_replay.responses_reasoning_blocks has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (12 pts), boolean chains 5 (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.
_NativeUsage.update (cognitive 17) src/free_claude_code/core/openai_responses/messages_stream.py:41— _NativeUsage.update has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 4, ternaries 1 (2 pts), loops 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
provider_input.build_responses_provider_request (cognitive 17) src/free_claude_code/core/openai_responses/provider_input.py:41— provider_input.build_responses_provider_request has cognitive complexity 17 (threshold 15). Drivers by points: if/else 12 (15 pts), boolean chains 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
tool_search._explicit_arguments (cognitive 17) src/free_claude_code/core/openai_responses/tool_search.py:175— tool_search._explicit_arguments has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), ternaries 2 (4 pts), loops 3 (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.
stream_recovery.assess_recovery (cognitive 17) src/free_claude_code/core/stream_recovery.py:99— stream_recovery.assess_recovery has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 5, ternaries 2 (3 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
TranscriptBuffer.apply (cognitive 17) src/free_claude_code/messaging/transcript/buffer.py:47— TranscriptBuffer.apply has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15 (16 pts), boolean chains 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.
MessagingTurnIntake.handle_message (cognitive 17) src/free_claude_code/messaging/turn_intake.py:54— MessagingTurnIntake.handle_message has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10 (11 pts), boolean chains 3, ternaries 2 (3 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level.
provider._apply_native_reasoning (cognitive 17) src/free_claude_code/providers/anthropic/provider.py:58— provider._apply_native_reasoning has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8, boolean chains 6, ternaries 2, loops 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.
failure_policy.retryable_transient_status (cognitive 17) src/free_claude_code/providers/failure_policy.py:198— failure_policy.retryable_transient_status has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, ternaries 2 (4 pts), boolean chains 2 (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.
history_replay._rejected_record (cognitive 17) src/free_claude_code/providers/history_replay.py:343— history_replay._rejected_record has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (9 pts), boolean chains 6, ternaries 1 (2 pts) (nesting depth added 2). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
tool_schema._collect_nim_tool_property_names (cognitive 17) src/free_claude_code/providers/nvidia_nim/tool_schema.py:156— tool_schema._collect_nim_tool_property_names has cognitive complexity 17 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 3 (7 pts) (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
_ChatStreamPresenter._feed_frame (cognitive 17) src/free_claude_code/providers/openai_chat/transport.py:310— _ChatStreamPresenter._feed_frame has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9 (14 pts), loops 1 (2 pts), ternaries 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
catalog.parse_open_code_catalog (cognitive 17) src/free_claude_code/providers/opencode/catalog.py:77— catalog.parse_open_code_catalog has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 4 (8 pts), if/else 4 (7 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
CodexProtocol.history (cognitive 17) src/free_claude_code/runtime/codex_protocol.py:219— CodexProtocol.history has cognitive complexity 17 (threshold 15). Drivers by points: if/else 3 (6 pts), ternaries 2 (6 pts), loops 2 (3 pts), boolean chains 2 (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.
IntegrationService._vscode_chat (cognitive 17) src/free_claude_code/runtime/integration_service.py:393— IntegrationService._vscode_chat has cognitive complexity 17 (threshold 15). Drivers by points: if/else 5 (8 pts), ternaries 2 (4 pts), boolean chains 2, error handling 2, loops 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessagingService._start_messaging_if_configured (cognitive 17) src/free_claude_code/runtime/messaging_service.py:125— MessagingService._start_messaging_if_configured has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11 (15 pts), error handling 2 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
sqlite_database._schema_version (cognitive 17) src/free_claude_code/runtime/sqlite_database.py:63— sqlite_database._schema_version has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (11 pts), boolean chains 4, loops 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
egress.get_validated_stream_addrinfos_for_egress (cognitive 17) src/free_claude_code/runtime/web_tools/egress.py:30— egress.get_validated_stream_addrinfos_for_egress has cognitive complexity 17 (threshold 15). Drivers by points: if/else 8 (10 pts), boolean chains 3, error handling 2 (3 pts), loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition.
admin.refreshLocalStatus (cognitive 17) src/free_claude_code/api/admin_static/admin.js:1664— admin.refreshLocalStatus has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (8 pts), boolean chains 4, ternaries 3 (4 pts), error handling 1 (nesting depth added 2). Most of this is not in the body itself: 1 of the 17 points is its own statement and the rest belongs to 2 function literals inside it that branch (lines 1672, 1666). The decisions are inside those literals, which nothing outside this body can call, review or test on its own, so splitting the enclosing body is not the move available here. To reduce it, lift the literals' work into a named function or method at the enclosing scope and have each literal call it, then reduce whichever part then reads as the largest.
detail (cognitive 17) src/free_claude_code/api/admin_static/code_sessions.js:333— detail has cognitive complexity 17 (threshold 15). Drivers by points: if/else 6 (10 pts), boolean chains 3, loops 1 (2 pts), error handling 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
model_catalog._build_claude_models_response (cognitive 16) src/free_claude_code/api/model_catalog.py:171— model_catalog._build_claude_models_response has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 5 (10 pts), if/else 2 (4 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
RequestOutcomeMiddleware.__call__ (cognitive 16) src/free_claude_code/api/request_outcomes.py:47— RequestOutcomeMiddleware.__call__ has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 6, error handling 2 (nesting depth added 3). 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.
request.plan_automatic_web_search (cognitive 16) src/free_claude_code/application/web_tools/request.py:103— request.plan_automatic_web_search has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, boolean chains 6. 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.
macos_app.install (cognitive 16) src/free_claude_code/cli/macos_app.py:70— macos_app.install has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (10 pts), boolean chains 5, error handling 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.
errors.anthropic_error_type_for_failure (cognitive 16) src/free_claude_code/core/anthropic/errors.py:34— errors.anthropic_error_type_for_failure has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ContinuationStream.prepare (cognitive 16) src/free_claude_code/core/continuation_stream.py:82— ContinuationStream.prepare has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 4, loops 2 (4 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
gateway_model_ids.decode_gateway_model_id (cognitive 16) src/free_claude_code/core/gateway_model_ids.py:37— gateway_model_ids.decode_gateway_model_id has cognitive complexity 16 (threshold 15). Drivers by points: if/else 8 (11 pts), boolean chains 3, error handling 1 (2 pts) (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
errors.openai_error_type_for_failure (cognitive 16) src/free_claude_code/core/openai_responses/errors.py:25— errors.openai_error_type_for_failure has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ResponsesProviderStream._finish (cognitive 16) src/free_claude_code/core/openai_responses/provider_stream.py:318— ResponsesProviderStream._finish has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (6 pts), ternaries 5, boolean chains 3, loops 2 (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.
dsh_files.regular_path (cognitive 16) src/free_claude_code/harnesses/dsh_files.py:23— dsh_files.regular_path has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), boolean chains 2, error handling 1 (2 pts), ternaries 1 (2 pts), loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
TreeQueueProcessor._finish_and_continue (cognitive 16) src/free_claude_code/messaging/trees/processor.py:200— TreeQueueProcessor._finish_and_continue has cognitive complexity 16 (threshold 15). Drivers by points: loops 3 (7 pts), if/else 4 (6 pts), error handling 2 (3 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
MessageTree.cancel_all (cognitive 16) src/free_claude_code/messaging/trees/runtime.py:262— MessageTree.cancel_all has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (10 pts), boolean chains 3, loops 2, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
models.model_record (cognitive 16) src/free_claude_code/providers/anthropic/models.py:20— models.model_record has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 11 (12 pts), if/else 3, boolean chains 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.
client._parse_reasoning_vocabulary (cognitive 16) src/free_claude_code/providers/groq/client.py:200— client._parse_reasoning_vocabulary has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), loops 4 (6 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.
client._body_error_candidates (cognitive 16) src/free_claude_code/providers/groq/client.py:310— client._body_error_candidates has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (9 pts), loops 3 (6 pts), boolean chains 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
tool_schema.sanitize_nim_tool_schemas (cognitive 16) src/free_claude_code/providers/nvidia_nim/tool_schema.py:29— tool_schema.sanitize_nim_tool_schemas has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 1, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body.
ProviderRuntimeManager.wait_for_model_catalog (cognitive 16) src/free_claude_code/runtime/provider_manager.py:450— ProviderRuntimeManager.wait_for_model_catalog has cognitive complexity 16 (threshold 15). Drivers by points: if/else 4 (10 pts), error handling 2 (5 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.
ProviderRuntimeManager.wait_for_catalog_file (cognitive 16) src/free_claude_code/runtime/provider_manager.py:504— ProviderRuntimeManager.wait_for_catalog_file has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (12 pts), error handling 1 (3 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.
admin.byId("confirmDshDesktopIntegration").addEventListener("click") (cognitive 16) src/free_claude_code/api/admin_static/admin.js:2693— admin.byId("confirmDshDesktopIntegration").addEventListener("click") has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 2 (3 pts), ternaries 2, boolean chains 1 (nesting depth added 4). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. 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.
renderCodexIntegration (cognitive 16) src/free_claude_code/api/admin_static/admin.js:2316— renderCodexIntegration has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 7, boolean chains 6, if/else 3. 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.
renderClaudeDesktopIntegration (cognitive 16) src/free_claude_code/api/admin_static/admin.js:2514— renderClaudeDesktopIntegration has cognitive complexity 16 (threshold 15). Drivers by points: ternaries 9, boolean chains 6, if/else 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.
(anonymous) (cognitive 16) src/free_claude_code/api/admin_static/admin.js:2693— (anonymous) has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7 (10 pts), error handling 2 (3 pts), ternaries 2, boolean chains 1 (nesting depth added 4). Of this number, 15 points are the body's own statements and 1 belongs to one function item inside it that branches. 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.
readBootstrap (cognitive 16) src/free_claude_code/api/admin_static/code_sessions.js:377— readBootstrap has cognitive complexity 16 (threshold 15). Drivers by points: if/else 5 (8 pts), boolean chains 7, error handling 1 (nesting depth added 3). 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: provider_manifest.py → model_listing.py, profiles.py, factory.py src/free_claude_code/config/admin/provider_manifest.py— `src/free_claude_code/config/admin/provider_manifest.py` changes together with 3 other files — `src/free_claude_code/providers/model_listing.py`, `src/free_claude_code/providers/openai_chat/profiles.py`, `src/free_claude_code/providers/runtime/factory.py` — 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.
Near-duplicate member pair (228 shared lines) src/free_claude_code/messaging/rendering/discord_markdown.py:56— src/free_claude_code/messaging/rendering/discord_markdown.py:56-307 | src/free_claude_code/messaging/rendering/telegram_markdown.py:53-320 — These two members are variants of one another: 228 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 (31 corresponding lines) · ×1
Edited copy of a member (31 corresponding lines) src/free_claude_code/core/openai_responses/chat_request.py:681— src/free_claude_code/core/openai_responses/chat_request.py:681-711 | src/free_claude_code/core/openai_tool_names.py:68-116 — These two members are one piece of code written twice and then edited apart: 31 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, 52+ corresponding lines) · ×1
Edited copies of one member (4 members, 52+ corresponding lines) src/free_claude_code/application/execution.py:220— src/free_claude_code/application/execution.py:220-276 | src/free_claude_code/application/execution.py:285-347 | src/free_claude_code/application/execution.py:356-408 | src/free_claude_code/application/execution.py:417-468 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 52 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, 21+ corresponding lines) · ×1
Edited copies of one member (3 members, 21+ corresponding lines) src/free_claude_code/runtime/integration_service.py:210— src/free_claude_code/runtime/integration_service.py:210-237 | src/free_claude_code/runtime/integration_service.py:240-263 | src/free_claude_code/runtime/integration_service.py:579-599 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 21 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 (27 corresponding lines) · ×1
Edited copy of a member (27 corresponding lines) src/free_claude_code/api/response_streams.py:409— src/free_claude_code/api/response_streams.py:409-435 | src/free_claude_code/api/response_streams.py:444-474 — These two members are one piece of code written twice and then edited apart: 27 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 (30 corresponding lines) · ×1
Edited copy of a member (30 corresponding lines) src/free_claude_code/providers/cloudflare/client.py:121— src/free_claude_code/providers/cloudflare/client.py:121-150 | src/free_claude_code/providers/vertex/client.py:113-143 — 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 (3 members, 22+ corresponding lines) · ×1
Edited copies of one member (3 members, 22+ corresponding lines) src/free_claude_code/providers/custom.py:233— src/free_claude_code/providers/custom.py:233-271 | src/free_claude_code/providers/custom.py:285-306 | src/free_claude_code/providers/custom.py:320-341 — 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 (29 corresponding lines) · ×1
Edited copy of a member (29 corresponding lines) src/free_claude_code/api/handlers/chat.py:88— src/free_claude_code/api/handlers/chat.py:88-116 | src/free_claude_code/api/handlers/responses.py:122-151 — These two members are one piece of code written twice and then edited apart: 29 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 (20 corresponding lines) · ×1
Edited copy of a member (20 corresponding lines) src/free_claude_code/providers/anthropic/provider.py:115— src/free_claude_code/providers/anthropic/provider.py:115-134 | src/free_claude_code/providers/gemini/client.py:63-83 — 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 copies of one member (3 members, 16+ corresponding lines) · ×1
Edited copies of one member (3 members, 16+ corresponding lines) src/free_claude_code/providers/gemini/client.py:209— src/free_claude_code/providers/gemini/client.py:209-226 | src/free_claude_code/providers/gemini/client.py:240-258 | src/free_claude_code/providers/gemini/client.py:272-287 — These 3 members are one piece of code written 3 times and then edited apart: every two of them correspond over at least 16 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 (17 corresponding lines) · ×1
Edited copy of a member (17 corresponding lines) src/free_claude_code/config/admin/provider_manifest.py:407— src/free_claude_code/config/admin/provider_manifest.py:407-423 | src/free_claude_code/config/admin/provider_manifest.py:469-488 — These two members are one piece of code written twice and then edited apart: 17 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, 15+ corresponding lines) · ×1
Edited copies of one member (4 members, 15+ corresponding lines) src/free_claude_code/providers/anthropic/provider.py:276— src/free_claude_code/providers/anthropic/provider.py:276-290 | src/free_claude_code/providers/anthropic/provider.py:304-318 | src/free_claude_code/providers/anthropic/provider.py:332-346 | src/free_claude_code/providers/anthropic/provider.py:360-374 — These 4 members are one piece of code written 4 times and then edited apart: every two of them correspond over at least 15 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 (15 corresponding lines) · ×1
Edited copy of a member (15 corresponding lines) src/free_claude_code/api/admin_security.py:22— src/free_claude_code/api/admin_security.py:22-37 | src/free_claude_code/api/admin_security.py:41-55 — 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 (7 corresponding lines) · ×1
Edited copy of a member (7 corresponding lines) src/free_claude_code/providers/groq/client.py:125— src/free_claude_code/providers/groq/client.py:125-131 | src/free_claude_code/providers/openai_chat/transport.py:860-868 — These two members are one piece of code written twice and then edited apart: 7 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 (3 corresponding lines) · ×1
Edited copy of a member (3 corresponding lines) smoke/lib/config.py:336— smoke/lib/config.py:336-338 | src/free_claude_code/cli/managed/diagnostics.py:44-47 — These two members are one piece of code written twice and then edited apart: 3 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 (90 lines × 2) src/free_claude_code/messaging/rendering/discord_markdown.py:194— src/free_claude_code/messaging/rendering/discord_markdown.py:194-283 | src/free_claude_code/messaging/rendering/telegram_markdown.py:207-296 — before extracting anything, compare `src/free_claude_code/messaging/rendering/discord_markdown.py` and `src/free_claude_code/messaging/rendering/telegram_markdown.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/free_claude_code/messaging/rendering/discord_markdown.py:194` 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 (65 lines × 2) src/free_claude_code/messaging/rendering/discord_markdown.py:129— src/free_claude_code/messaging/rendering/discord_markdown.py:129-193 | src/free_claude_code/messaging/rendering/telegram_markdown.py:141-205 — before extracting anything, compare `src/free_claude_code/messaging/rendering/discord_markdown.py` and `src/free_claude_code/messaging/rendering/telegram_markdown.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (20–31 lines × 2) src/free_claude_code/core/delivered_response.py:365— src/free_claude_code/core/delivered_response.py:365-384 | src/free_claude_code/core/delivered_response.py:411-441 — 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 `src/free_claude_code/core/delivered_response.py:365` 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. 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 (20–21 lines × 2) src/free_claude_code/providers/anthropic_messages/transport.py:354— src/free_claude_code/providers/anthropic_messages/transport.py:354-374 | src/free_claude_code/providers/gemini/transport.py:114-133 — 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 `src/free_claude_code/providers/anthropic_messages/transport.py:354` 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 (18–20 lines × 2) src/free_claude_code/application/execution.py:228— src/free_claude_code/application/execution.py:228-247 | src/free_claude_code/application/execution.py:291-308 — 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 `src/free_claude_code/application/execution.py:228` 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 (20 lines × 2) src/free_claude_code/messaging/rendering/discord_markdown.py:56— src/free_claude_code/messaging/rendering/discord_markdown.py:56-75 | src/free_claude_code/messaging/rendering/telegram_markdown.py:53-72 — before extracting anything, compare `src/free_claude_code/messaging/rendering/discord_markdown.py` and `src/free_claude_code/messaging/rendering/telegram_markdown.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place.
Duplicated block (19–20 lines × 2) src/free_claude_code/messaging/rendering/discord_markdown.py:92— src/free_claude_code/messaging/rendering/discord_markdown.py:92-110 | src/free_claude_code/messaging/rendering/telegram_markdown.py:98-117 — before extracting anything, compare `src/free_claude_code/messaging/rendering/discord_markdown.py` and `src/free_claude_code/messaging/rendering/telegram_markdown.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/free_claude_code/messaging/rendering/discord_markdown.py:92` 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. 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–17 lines × 2) src/free_claude_code/messaging/rendering/discord_markdown.py:112— src/free_claude_code/messaging/rendering/discord_markdown.py:112-123 | src/free_claude_code/messaging/rendering/telegram_markdown.py:119-135 — before extracting anything, compare `src/free_claude_code/messaging/rendering/discord_markdown.py` and `src/free_claude_code/messaging/rendering/telegram_markdown.py` as WHOLE FILES: this scan already matched 7 separate duplicated blocks between them, totalling at least 234 lines, which is the signature of one file having been copied from the other rather than of a helper waiting to be extracted. If that is what happened, the fix is to keep one copy and have the other call it (or delete it), which resolves this row and its siblings together — extracting one helper per block leaves the fork in place. Read the line range as the matched WINDOW rather than a finished unit: at `src/free_claude_code/messaging/rendering/discord_markdown.py:112` 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) src/free_claude_code/api/routes.py:226— src/free_claude_code/api/routes.py:226-240 | src/free_claude_code/api/routes.py:260-275 — 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 `src/free_claude_code/api/routes.py:260` 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 lines × 3) src/free_claude_code/application/execution.py:310— src/free_claude_code/application/execution.py:310-324 | src/free_claude_code/application/execution.py:378-392 | src/free_claude_code/application/execution.py:438-452 — 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 `src/free_claude_code/application/execution.py:310` 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 (15 lines × 2) src/free_claude_code/core/anthropic/errors.py:37— src/free_claude_code/core/anthropic/errors.py:37-51 | src/free_claude_code/core/openai_responses/errors.py:28-42 — 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. 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 (13–14 lines × 2) src/free_claude_code/core/chat_completions/responses_stream.py:118— src/free_claude_code/core/chat_completions/responses_stream.py:118-131 | src/free_claude_code/core/gemini/responses_stream.py:144-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. Read the line range as the matched WINDOW rather than a finished unit: at `src/free_claude_code/core/chat_completions/responses_stream.py:118` 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. ★ These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, `src/free_claude_code/core/gemini/responses_stream.py:157` calls `order_records`, `sorted` and `src/free_claude_code/core/chat_completions/responses_stream.py:132` 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 (14 lines × 2) src/free_claude_code/core/gemini/native_request.py:275— src/free_claude_code/core/gemini/native_request.py:275-288 | src/free_claude_code/core/gemini/native_request.py:568-581 — 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 `src/free_claude_code/core/gemini/native_request.py:275` 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–13 lines × 2) src/free_claude_code/core/gemini/native_request.py:400— src/free_claude_code/core/gemini/native_request.py:400-412 | src/free_claude_code/core/gemini/native_request.py:554-564 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) src/free_claude_code/harnesses/claude_desktop_integration.py:39— src/free_claude_code/harnesses/claude_desktop_integration.py:39-48 | src/free_claude_code/harnesses/claude_integration.py:20-29 — 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. The `return` at the foot of the matched lines is the enclosing body's own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that `return` occupied — no decision has to be handed back and re-acted on.
Duplicated block (5–7 lines × 2) src/free_claude_code/core/gemini/request.py:98— src/free_claude_code/core/gemini/request.py:98-102 | src/free_claude_code/core/gemini/request.py:203-209 — 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 `src/free_claude_code/core/gemini/request.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 (7 lines × 2) src/free_claude_code/core/openai_responses/chat_request.py:684— src/free_claude_code/core/openai_responses/chat_request.py:684-690 | src/free_claude_code/core/openai_responses/chat_request.py:698-706 — 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.
P4 · Deployment & Rollback· No deployment automation · ×1
No deployment automation — No release automation was found in CI — neither a deploy stage (Helm/Kubernetes/compose manifests, an orchestrated rollout) nor a publish job that ships the built artifact. Releases appear to be run by hand, which is slower, less repeatable and harder to reverse.
Outbound HTTP without resilience src/free_claude_code/providers/vertex/auth.py:69— `requests.Session(` 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.
Duplicated block (22 lines × 4 locations) src/free_claude_code/api/admin_static/admin.js:2073— src/free_claude_code/api/admin_static/admin.js:2073 · src/free_claude_code/api/admin_static/admin.js:2279 · src/free_claude_code/api/admin_static/admin.js:2380 · src/free_claude_code/api/admin_static/admin.js:2477 — all 4 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (13 lines × 6 locations) src/free_claude_code/api/admin_static/admin.js:2095— src/free_claude_code/api/admin_static/admin.js:2095 · src/free_claude_code/api/admin_static/admin.js:2201 · src/free_claude_code/api/admin_static/admin.js:2300 · src/free_claude_code/api/admin_static/admin.js:2402 · +2 more site(s) not listed — all 6 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (13 lines × 2 locations) src/free_claude_code/api/admin_static/admin.js:2528— src/free_claude_code/api/admin_static/admin.js:2528 · src/free_claude_code/api/admin_static/admin.js:2648 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 3 locations) src/free_claude_code/api/admin_static/admin.js:2232— src/free_claude_code/api/admin_static/admin.js:2232 · src/free_claude_code/api/admin_static/admin.js:2334 · src/free_claude_code/api/admin_static/admin.js:2431 — all 3 copies are in the same file, and the CITED SPAN is not a self-contained block — it runs from inside one construct into the next (the tail of a branch plus the head of the following one, a run of switch arms, the end of a declaration plus the list that follows it) rather than covering a whole unit. So do not lift these lines literally: no call can be substituted for a half-open construct. Extract the enclosing repeated UNIT instead — the whole function, component or branch these lines sit in — and where the repetition IS the construct (a run of switch arms, a stack of near-identical declarations) replace it with one table or registry looked up by key rather than a helper each arm calls. The copies still drift apart the first time only one of them is edited, which is why this is reported.
Duplicated block (7 lines × 8 locations) src/free_claude_code/api/admin_static/admin.js:1948— src/free_claude_code/api/admin_static/admin.js:1948 · src/free_claude_code/api/admin_static/admin.js:2099 · src/free_claude_code/api/admin_static/admin.js:2205 · src/free_claude_code/api/admin_static/admin.js:2304 · +4 more site(s) not listed — all 8 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.
R10 · Code Duplication· Duplicated block with local edits (6 matched lines × 2 locations) · ×1
Duplicated block with local edits (6 matched lines × 2 locations) smoke/lib/dsh_desktop.cjs:80— smoke/lib/dsh_desktop.cjs:80 · smoke/lib/dsh_desktop.cjs:85 — the two spans are one implementation copied and then locally edited — 66 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.
Duplicated block (5 lines × 2 locations) src/free_claude_code/api/admin_static/admin.js:2112— src/free_claude_code/api/admin_static/admin.js:2112 · src/free_claude_code/api/admin_static/admin.js:2221 — 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.
Complex function apply (cyclomatic 64, cognitive 72) src/free_claude_code/api/admin_static/admin.js:1570— apply has cyclomatic complexity 64 and cognitive complexity 72; 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 renderControls (cyclomatic 50, cognitive 32) src/free_claude_code/api/admin_static/code_sessions.js:1256— renderControls has cyclomatic complexity 50 and cognitive complexity 32; 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 render (cyclomatic 32, cognitive 47) src/free_claude_code/api/admin_static/code_sessions.js:1152— render has cyclomatic complexity 32 and cognitive complexity 47; 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 refreshStartup (cyclomatic 30, cognitive 24) src/free_claude_code/api/admin_static/admin.js:153— refreshStartup has cyclomatic complexity 30 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive 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 buildPrompt (cyclomatic 25, cognitive 75) src/free_claude_code/api/admin_static/code_sessions.js:1459— buildPrompt has cyclomatic complexity 25 and cognitive complexity 75; 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 merge (cyclomatic 25, cognitive 31) src/free_claude_code/api/admin_static/code_sessions.js:164— merge has cyclomatic complexity 25 and cognitive complexity 31; 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 updateProviderCard (cyclomatic 24, cognitive 24) src/free_claude_code/api/admin_static/admin.js:375— updateProviderCard has cyclomatic complexity 24 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function renderItem (cyclomatic 21, cognitive 29) src/free_claude_code/api/admin_static/code_sessions.js:1366— renderItem has cyclomatic complexity 21 and cognitive complexity 29; 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 inputForField (cyclomatic 20, cognitive 22) src/free_claude_code/api/admin_static/admin.js:1022— inputForField has cyclomatic complexity 20 and cognitive complexity 22; 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 renderCodexIntegration (cyclomatic 18, cognitive 16) src/free_claude_code/api/admin_static/admin.js:2316— renderCodexIntegration has cyclomatic complexity 18 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 handleKeydown (cyclomatic 17, cognitive 24) src/free_claude_code/api/admin_static/model_combobox.js:166— handleKeydown has cyclomatic complexity 17 and cognitive complexity 24; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function openCustomProviderDialog (cyclomatic 17, cognitive 20) src/free_claude_code/api/admin_static/admin.js:489— openCustomProviderDialog has cyclomatic complexity 17 and cognitive complexity 20; 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 synchronize (cyclomatic 17, cognitive 20) src/free_claude_code/api/admin_static/code_sessions.js:430— synchronize has cyclomatic complexity 17 and cognitive complexity 20; 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 detail (cyclomatic 17, cognitive 17) src/free_claude_code/api/admin_static/code_sessions.js:333— detail has cyclomatic complexity 17 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function renderClaudeDesktopIntegration (cyclomatic 17, cognitive 16) src/free_claude_code/api/admin_static/admin.js:2514— renderClaudeDesktopIntegration 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 readBootstrap (cyclomatic 17, cognitive 16) src/free_claude_code/api/admin_static/code_sessions.js:377— readBootstrap 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 renderField (cyclomatic 17, cognitive 15) src/free_claude_code/api/admin_static/admin.js:930— renderField has cyclomatic complexity 17 and cognitive complexity 15; 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 renderAntigravityIntegration (cyclomatic 15, cognitive 14) src/free_claude_code/api/admin_static/admin.js:2111— renderAntigravityIntegration has cyclomatic complexity 15 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
R2 · Cyclomatic Complexity· Complex function list (cyclomatic 15, cognitive 13) · ×1
Complex function list (cyclomatic 15, cognitive 13) src/free_claude_code/api/admin_static/code_sessions.js:279— list has cyclomatic complexity 15 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function (anonymous) (cyclomatic 14, cognitive 14) src/free_claude_code/api/admin_static/admin.js:1672— (anonymous) has cyclomatic complexity 14 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function renderDshDesktopIntegration (cyclomatic 14, cognitive 13) src/free_claude_code/api/admin_static/admin.js:2634— renderDshDesktopIntegration has cyclomatic complexity 14 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive sits below cyclomatic here, so much of the count is breadth — arms side by side rather than stacked — and splitting per arm would leave a function per arm; group the work between the checks into named steps instead. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function activate (cyclomatic 13, cognitive 17) src/free_claude_code/api/admin_static/code_sessions.js:554— activate has cyclomatic complexity 13 and cognitive complexity 17; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function startConnectedAccountLogin (cyclomatic 13, cognitive 14) src/free_claude_code/api/admin_static/admin.js:673— startConnectedAccountLogin has cyclomatic complexity 13 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function renderClaudeIntegration (cyclomatic 13, cognitive 13) src/free_claude_code/api/admin_static/admin.js:2014— renderClaudeIntegration has cyclomatic complexity 13 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function projectFccModels (cyclomatic 13, cognitive 13) src/free_claude_code/cli/launchers/pi_extension.ts:69— projectFccModels has cyclomatic complexity 13 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function renderVSCodeChatIntegration (cyclomatic 13, cognitive 12) src/free_claude_code/api/admin_static/admin.js:2217— renderVSCodeChatIntegration has cyclomatic complexity 13 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 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 12, cognitive 15) src/free_claude_code/api/admin_static/admin.js:2693— (anonymous) has cyclomatic complexity 12 and cognitive complexity 15; 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 refreshIntegrationUpdates (cyclomatic 12, cognitive 14) src/free_claude_code/api/admin_static/admin.js:1988— refreshIntegrationUpdates has cyclomatic complexity 12 and cognitive complexity 14; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function readFieldValue (cyclomatic 12, cognitive 13) src/free_claude_code/api/admin_static/admin.js:1377— readFieldValue has cyclomatic complexity 12 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function renderJetBrainsIntegration (cyclomatic 12, cognitive 11) src/free_claude_code/api/admin_static/admin.js:2418— renderJetBrainsIntegration 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 deliver (cyclomatic 11, cognitive 15) src/free_claude_code/api/admin_static/code_sessions.js:603— deliver has cyclomatic complexity 11 and cognitive complexity 15; 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 updateSettings (cyclomatic 11, cognitive 13) src/free_claude_code/api/admin_static/code_sessions.js:823— updateSettings has cyclomatic complexity 11 and cognitive complexity 13; this row is raised above a cyclomatic bar of 10. The two numbers answer different questions and the gap between them is what decides whether to act: cyclomatic counts the independent arms through the body, cognitive counts what it costs to hold them in your head, so nesting and mixed boolean chains raise it while a flat run of independent arms does not. Cognitive is at or above cyclomatic here, so the branching is nested or entangled rather than laid out side by side — extracting each decision into its own named function is the change that pays. Measured by this repository's own parse of the file, so a body assembled at runtime, or generated, is counted as written rather than as it executes.
Complex function populateConnectedAccountActions (cyclomatic 11, cognitive 12) src/free_claude_code/api/admin_static/admin.js:588— populateConnectedAccountActions 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.
R3 · Large Files· src/free_claude_code/api/admin_static/admin.js · ×1
src/free_claude_code/api/admin_static/admin.js: 2591 lines of code src/free_claude_code/api/admin_static/admin.js:1— src/free_claude_code/api/admin_static/admin.js has 2591 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· src/free_claude_code/api/admin_static/code_sessions.js · ×1
src/free_claude_code/api/admin_static/code_sessions.js: 1721 lines of code src/free_claude_code/api/admin_static/code_sessions.js:1— src/free_claude_code/api/admin_static/code_sessions.js has 1721 significant lines (blank lines excluded), over the 400-line bar, and contains logic — a file this long is usually several responsibilities in one module.
Dead file (~96 LoC) smoke/lib/dsh_desktop.cjs— no import path from any entry point (7 application, 0 tooling, 1 test roots considered), and no other file in the scanned tree imports it — nothing in-repo names this module at all, which is the strongest form of this claim the import graph can make
Duplicated predicate src/free_claude_code/api/admin_static/admin.js:1845— `combobox.isOpen && !combobox.element.contains(event.target)` appears character-identically in 2 files — src/free_claude_code/api/admin_static/admin.js, src/free_claude_code/api/admin_static/code_sessions.js. 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 src/free_claude_code/providers/anthropic_messages/transport.py:558— `attempt_failure is not None and attempt_failure.retry_allowed` appears character-identically in 3 files — src/free_claude_code/providers/anthropic_messages/transport.py, src/free_claude_code/providers/gemini/transport.py, src/free_claude_code/providers/openai_responses/transport.py. 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 src/free_claude_code/core/chat_completions/request.py:562— `body.get("max_completion_tokens") or body.get("max_tokens")` appears character-identically in 2 files — src/free_claude_code/core/chat_completions/request.py, src/free_claude_code/core/gemini/native_request.py. 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 src/free_claude_code/messaging/rendering/discord_markdown.py:109— `child.type == "text" or child.type == "code_inline"` appears character-identically in 2 files — src/free_claude_code/messaging/rendering/discord_markdown.py, src/free_claude_code/messaging/rendering/telegram_markdown.py. 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 src/free_claude_code/core/diagnostics.py:264— `current.__cause__ or current.__context__` appears character-identically in 2 files — src/free_claude_code/core/diagnostics.py, src/free_claude_code/providers/runtime/discovery.py. 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 src/free_claude_code/providers/mistral/client.py:85— `detail.body_text or detail.exception_text or ""` appears character-identically in 2 files — src/free_claude_code/providers/mistral/client.py, src/free_claude_code/providers/reasoning_compatibility.py. 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 src/free_claude_code/providers/anthropic_messages/wire.py:37— `event.event == "ping" or event.data.get("type") == "ping"` appears character-identically in 2 files — src/free_claude_code/providers/anthropic_messages/wire.py, src/free_claude_code/providers/gemini/transport.py. 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 src/free_claude_code/application/code_sessions/service.py:853— `event.kind == "notice" and event.message` appears character-identically in 2 files — src/free_claude_code/application/code_sessions/service.py, src/free_claude_code/runtime/codex_app_server.py. 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 src/free_claude_code/core/anthropic/errors.py:39— `failure.kind == FailureKind.PERMISSION and failure.status_code == 402` appears character-identically in 2 files — src/free_claude_code/core/anthropic/errors.py, src/free_claude_code/core/openai_responses/errors.py. 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 src/free_claude_code/core/anthropic/errors.py:46— `failure.kind == FailureKind.TIMEOUT and failure.status_code == 504` appears character-identically in 2 files — src/free_claude_code/core/anthropic/errors.py, src/free_claude_code/core/openai_responses/errors.py. 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 src/free_claude_code/messaging/rendering/discord_markdown.py:104— `i < len(children) and children[i].type != "link_close"` appears character-identically in 2 files — src/free_claude_code/messaging/rendering/discord_markdown.py, src/free_claude_code/messaging/rendering/telegram_markdown.py. 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 src/free_claude_code/messaging/commands.py:34— `incoming.is_reply() and incoming.reply_to_message_id` appears character-identically in 2 files — src/free_claude_code/messaging/commands.py, src/free_claude_code/messaging/turn_intake.py. 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 src/free_claude_code/core/anthropic/stream_contracts.py:207— `isinstance(block, dict) and block.get("type") == "tool_use"` appears character-identically in 2 files — src/free_claude_code/core/anthropic/stream_contracts.py, src/free_claude_code/providers/anthropic_messages/passthrough.py. 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 src/free_claude_code/providers/history_negotiation.py:82— `isinstance(carrier, str) and is_replay(carrier)` appears character-identically in 2 files — src/free_claude_code/providers/history_negotiation.py, src/free_claude_code/providers/history_replay.py. 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 src/free_claude_code/core/gemini/messages_stream.py:164— `isinstance(count, int) and not isinstance(count, bool) and count >= 0` appears character-identically in 3 files — src/free_claude_code/core/gemini/messages_stream.py, src/free_claude_code/core/gemini/responses_stream.py, src/free_claude_code/core/openai_responses/messages_stream.py. 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 src/free_claude_code/core/anthropic/conversion.py:118— `isinstance(extra_content, dict) and extra_content` appears character-identically in 2 files — src/free_claude_code/core/anthropic/conversion.py, src/free_claude_code/core/anthropic/streaming/ledger.py. 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 smoke/lib/local_providers.py:48— `isinstance(item, dict) and isinstance(item.get("id"), str)` appears character-identically in 2 files — smoke/lib/local_providers.py, src/free_claude_code/core/continuation_stream.py. 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 src/free_claude_code/core/history_replay.py:816— `isinstance(item, dict) and item.get("type") == "reasoning"` appears character-identically in 2 files — src/free_claude_code/core/history_replay.py, src/free_claude_code/core/replay_finalization.py. 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 src/free_claude_code/core/history_replay.py:419— `isinstance(part, dict) and isinstance(part.get("text"), str)` appears character-identically in 2 files — src/free_claude_code/core/history_replay.py, src/free_claude_code/core/openai_responses/provider_stream.py. 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 src/free_claude_code/core/openai_responses/chat_request.py:326— `isinstance(part, dict) and part.get("type") == "reasoning_text" and part.get("text") == ""` appears character-identically in 2 files — src/free_claude_code/core/openai_responses/chat_request.py, src/free_claude_code/core/openai_responses/provider_stream.py. 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 src/free_claude_code/providers/anthropic_messages/passthrough.py:218— `isinstance(raw_error, ExecutionFailure) and raw_error.stream_context and raw_error.stream_context.source.unsafe_reason` appears character-identically in 3 files — src/free_claude_code/providers/anthropic_messages/passthrough.py, src/free_claude_code/providers/anthropic_messages/transport.py, src/free_claude_code/providers/openai_responses/transport.py. 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 src/free_claude_code/api/handlers/messages.py:352— `isinstance(raw_message, str) and raw_message.strip()` appears character-identically in 2 files — src/free_claude_code/api/handlers/messages.py, src/free_claude_code/application/web_tools/service.py. 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 src/free_claude_code/core/anthropic/conversion.py:661— `isinstance(signature, str) and signature` appears character-identically in 3 files — src/free_claude_code/core/anthropic/conversion.py, src/free_claude_code/core/openai_responses/provider_input.py, src/free_claude_code/providers/google_openai/thought_signatures.py. 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 src/free_claude_code/application/web_tools/service.py:360— `isinstance(value, int) and not isinstance(value, bool)` appears character-identically in 4 files — src/free_claude_code/application/web_tools/service.py, src/free_claude_code/core/anthropic/server_tool_sse.py, src/free_claude_code/core/openai_responses/provider_stream.py, src/free_claude_code/providers/openai_chat/usage.py. 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 src/free_claude_code/core/history_replay.py:530— `isinstance(value, str) and is_replay(value)` appears character-identically in 2 files — src/free_claude_code/core/history_replay.py, src/free_claude_code/providers/history_replay.py. 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.
No ADRs found REDACTED:46— 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 `REDACTED` makes this repository a deployable product (line 46).
D34 · Knowledge Freshness· Orphaned files with no living knowledge · ×1
Orphaned files with no living knowledge — 1 of 295 analysed file(s) have no living knowledge left — their last meaningful change has decayed away, so if one breaks, no one currently understands it (counted over production source files of roughly 2,400 bytes or more, excluding vendored, generated, example/demo and scaffolding-template trees and test files identified by path convention, largest first; 295 of the 470 production source files in this repository met that bar). None is large enough to earn a read-through of its own, so this row stands in for the per-file rows rather than raising one each — most significant first: src/free_claude_code/messaging/rendering/discord_markdown.py. Attach the read to the next change that touches one of them: have a second person review that change, and leave behind a short comment or test recording what the file is for, so the knowledge comes back at the cost of a change you were making anyway.
Orphaned file src/free_claude_code/messaging/rendering/discord_markdown.py:1— No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for.
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.
P1 · CI/CD gates· CI build step not evidenced · ×1
CI build step not evidenced — A CI pipeline exists but no build step was matched — changes may merge without the build ever running. A build step may be invoked directly as a command, or declared as a task that a runner named in the pipeline resolves.
No SAST .github/workflows/tests.yml:22— No static application security testing detected. For this repository's stack, add bandit, `semgrep --config=p/python`, or CodeQL's python pack as a CI step. What was searched, so you can tell an absence from a miss: the 4 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge's web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen — if that is your case the row is wrong, and saying so is more useful than adding a second scanner.
No changelog — No CHANGELOG/HISTORY/RELEASES file — what shipped when isn't easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)
X5 · Nullable reference types· Strict null checking is not enabled everywhere the repository type-checks · ×1
Strict null checking is not enabled everywhere the repository type-checks — This repository commits no tsconfig, so whatever type-checks it uses tsc's own defaults, in which `strict` and `strictNullChecks` are OFF: `string` admits `null` and `undefined`, and a value that is null is compiled through to the property access that throws. If the build passes `--strict` on a command line instead, put it in a committed tsconfig — this check reads configuration, and configuration is all it can read.
Silent fallback default in catch src/free_claude_code/api/admin_static/code_sessions.js:74— `saved` swallows every exception into `return {}` — a data error becomes a silent behavior change with no trail. Log the failure or let it raise. 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 handler or in the docstring, and the row stops firing.
Dependency hygiene PARTLY measured — Python dependencies read, no exact pin to grade for currency — This repository's Python dependencies were read: 3 shipped distribution(s) across 1 manifest(s) (14 development or optional declaration(s) excluded, because a consumer does not install them). Whether any of them is behind its current release is the dependency-CURRENCY question, and no declaration here carries an EXACT pin to ask it about — every one is a floor or a range, which installs the newest release it admits and therefore cannot be behind one. That is a healthy declaration style, NOT a defect and NOT a gap in this analyzer; there is simply no currency question to answer. This is NOT a finding that these dependencies are current or healthy. Lockfiles are deliberately not read (poetry.lock, REDACTED, Pipfile.lock, pdm.lock): the four disagree about dev/optional membership, and misreading one would charge a test-only package a consumer never receives. Known CVEs in the same dependency graph are a separate question, reported under D30.
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.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Docker Compose, Terraform, Kubernetes/Helm, CloudFormation, ARM, Bicep, Ansible); nothing to scan.
semgrep: not applicable — No personal data was found crossing a boundary the PII/GDPR ruleset checks — nothing written to a log or console sink, placed in a URL or query string, or persisted to browser storage. That is a clean result for the LEAK surface only: this ruleset detects personal data escaping, it does not inventory the personal data a repository holds, so it is not evidence that this repository has no personal-data surface. The personal-data map (Appendix C) and the C1-C5 compliance cards are what speak to that. semgrep could not parse 52 file(s) — `e2e/code_support.py`, `smoke/lib/dsh_provider.py`, `src/free_claude_code/api/generation_paths.py`, `src/free_claude_code/application/code_sessions/models.py`, `src/free_claude_code/application/code_sessions/ports.py`, … (+47 more) — so the PII/GDPR sweep did not cover the unparsed regions of them; rows reported elsewhere in those files are real.
disclosure: not applicable — No vulnerability-disclosure policy file found (SECURITY.md/.markdown/.rst/.txt at root or under .github/.forgejo/.gitea/docs, .well-known/security.txt). A coordinated-disclosure policy may live off-repo, so this is not evidenced rather than failed.
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 01a1d7c8-359f-7bc1-9ef1-920b8a58c21b · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 23 · Warnings: 686 · Recommendations: 52 · Info: 1 — Appendix A · all findings · full markdown report.
Generated by the Canine Code Analyzer: deterministic code-health analysis. 14-11-2026 @ 01:59 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.